MetaplexTokenMetaDataProgram.mintV1 constructor
MetaplexTokenMetaDataProgram.mintV1({
- required SolAddress token,
- required SolAddress mint,
- required SolAddress authority,
- required SolAddress payer,
- required SolAddress sysvarInstructions,
- required SolAddress splTokenProgram,
- required SolAddress splAtaProgram,
- required SolAddress metadata,
- required MetaplexTokenMetaDataMintV1Layout layout,
- SolAddress systemProgram = SystemProgramConst.programId,
- SolAddress? tokenOwner,
- SolAddress? masterEdition,
- SolAddress? tokenRecord,
- SolAddress? delegateRecord,
- SolAddress? authorizationRulesProgram,
- SolAddress? authorizationRules,
Implementation
factory MetaplexTokenMetaDataProgram.mintV1({
required SolAddress token,
required SolAddress mint,
required SolAddress authority,
required SolAddress payer,
required SolAddress sysvarInstructions,
required SolAddress splTokenProgram,
required SolAddress splAtaProgram,
required SolAddress metadata,
required MetaplexTokenMetaDataMintV1Layout layout,
SolAddress systemProgram = SystemProgramConst.programId,
SolAddress? tokenOwner,
SolAddress? masterEdition,
SolAddress? tokenRecord,
SolAddress? delegateRecord,
SolAddress? authorizationRulesProgram,
SolAddress? authorizationRules,
}) {
return MetaplexTokenMetaDataProgram(keys: [
token.toWritable(),
tokenOwner?.toReadOnly() ??
MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
metadata.toReadOnly(),
masterEdition?.toWritable() ??
MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
tokenRecord?.toWritable() ??
MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
mint.toWritable(),
authority.toSigner(),
delegateRecord?.toReadOnly() ??
MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
payer.toSignerAndWritable(),
systemProgram.toReadOnly(),
sysvarInstructions.toReadOnly(),
splTokenProgram.toReadOnly(),
splAtaProgram.toReadOnly(),
authorizationRulesProgram?.toWritable() ??
MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
authorizationRules?.toWritable() ??
MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
], programId: MetaplexTokenMetaDataProgramConst.programId, layout: layout);
}