MetaplexTokenMetaDataProgram.transferV1 constructor
MetaplexTokenMetaDataProgram.transferV1({
- required SolAddress token,
- required SolAddress tokenOwner,
- required SolAddress destination,
- required SolAddress destinationOwner,
- required SolAddress mint,
- required SolAddress metadata,
- required SolAddress authority,
- required SolAddress payer,
- required SolAddress sysvarInstructions,
- required SolAddress splTokenProgram,
- required SolAddress splAtaProgram,
- required MetaplexTokenMetaDataTransferV1Layout layout,
- SolAddress? edition,
- SolAddress? ownerTokenRecord,
- SolAddress? destinationTokenRecord,
- SolAddress systemProgram = SystemProgramConst.programId,
- SolAddress? authorizationRulesProgram,
- SolAddress? authorizationRules,
Implementation
factory MetaplexTokenMetaDataProgram.transferV1({
required SolAddress token,
required SolAddress tokenOwner,
required SolAddress destination,
required SolAddress destinationOwner,
required SolAddress mint,
required SolAddress metadata,
required SolAddress authority,
required SolAddress payer,
required SolAddress sysvarInstructions,
required SolAddress splTokenProgram,
required SolAddress splAtaProgram,
required MetaplexTokenMetaDataTransferV1Layout layout,
SolAddress? edition,
SolAddress? ownerTokenRecord,
SolAddress? destinationTokenRecord,
SolAddress systemProgram = SystemProgramConst.programId,
SolAddress? authorizationRulesProgram,
SolAddress? authorizationRules,
}) {
return MetaplexTokenMetaDataProgram(keys: [
token.toWritable(),
tokenOwner.toReadOnly(),
destination.toWritable(),
destinationOwner.toReadOnly(),
mint.toReadOnly(),
metadata.toWritable(),
edition?.toReadOnly() ??
MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
ownerTokenRecord?.toWritable() ??
MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
destinationTokenRecord?.toWritable() ??
MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
authority.toSigner(),
payer.toSignerAndWritable(),
systemProgram.toReadOnly(),
sysvarInstructions.toReadOnly(),
splTokenProgram.toReadOnly(),
splAtaProgram.toReadOnly(),
authorizationRulesProgram?.toReadOnly() ??
MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
authorizationRules?.toReadOnly() ??
MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
], programId: MetaplexTokenMetaDataProgramConst.programId, layout: layout);
}