MetaplexTokenMetaDataProgram.useV1 constructor
MetaplexTokenMetaDataProgram.useV1({
- required SolAddress authority,
- required SolAddress mint,
- required SolAddress metadata,
- required SolAddress payer,
- required SolAddress sysvarInstructions,
- required MetaplexTokenMetaDataUseV1Layout layout,
- SolAddress? delegateRecord,
- SolAddress? token,
- SolAddress? edition,
- SolAddress systemProgram = SystemProgramConst.programId,
- SolAddress? splTokenProgram,
- SolAddress? authorizationRulesProgram,
- SolAddress? authorizationRules,
Implementation
factory MetaplexTokenMetaDataProgram.useV1({
required SolAddress authority,
required SolAddress mint,
required SolAddress metadata,
required SolAddress payer,
required SolAddress sysvarInstructions,
required MetaplexTokenMetaDataUseV1Layout layout,
SolAddress? delegateRecord,
SolAddress? token,
SolAddress? edition,
SolAddress systemProgram = SystemProgramConst.programId,
SolAddress? splTokenProgram,
SolAddress? authorizationRulesProgram,
SolAddress? authorizationRules,
}) {
return MetaplexTokenMetaDataProgram(keys: [
authority.toSigner(),
delegateRecord?.toWritable() ??
MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
token?.toWritable() ??
MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
mint.toReadOnly(),
metadata.toWritable(),
edition?.toWritable() ??
MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
payer.toSigner(),
systemProgram.toReadOnly(),
sysvarInstructions.toReadOnly(),
splTokenProgram?.toReadOnly() ??
MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
authorizationRulesProgram?.toReadOnly() ??
MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
authorizationRules?.toReadOnly() ??
MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
], programId: MetaplexTokenMetaDataProgramConst.programId, layout: layout);
}