Third Party Signer
Overview
The Third Party Signer guard requires a predefined address to sign each mint transaction. The signer will need to be passed within the mint settings of this guard.
This allows for more centralized mints where every single mint transaction has to go through a specific signer.
Guard Settings
The Third Party Signer guard contains the following settings:
- Signer Key: The address of the signer that will need to sign each mint transaction.
JavaScript — Umi library (recommended)
Here’s how we can set up a Candy Machine using the Third Party Signer guard.
const myConfiguredSigner = generateSigner(umi);
create(umi, {
// ...
guards: {
thirdPartySigner: some({ signerKey: myConfiguredSigner.publicKey }),
},
});
API References: create, ThirdPartySigner
JavaScript — SDK
Here’s how we can set up a Candy Machine using the Third Party Signer guard via the JS SDK.
const { candyMachine } = await metaplex.candyMachines().create({
// ...
guards: {
thirdPartySigner: {
signerKey: someWallet.publicKey,
},
},
});
In this example, the someWallet
wallet will need to sign every mint transaction.
API References: Operation, Input, Output, Transaction Builder, Guard Settings.
Mint Settings
The Third Party Signer guard contains the following Mint Settings:
- Signer: The required third-party signer. The address of this signer must match the Signer Key in the guard settings.
JavaScript — Umi library (recommended)
When minting via the Umi library, simply provide the third-party signer via the signer
attribute like so.
create(umi, {
// ...
guards: {
thirdPartySigner: some({ signer: myConfiguredSigner }),
},
});
JavaScript — SDK
When minting via the JS SDK, simply provide the third-party signer via the signer
attribute like so.
const { nft } = await metaplex.candyMachines().mint({
// ...
guards: {
thirdPartySigner: {
signer: someWallet,
},
},
});
API References: Operation, Input, Output, Transaction Builder, Mint Settings.
Route Instruction
The Third Party Signer guard does not support the route instruction.