TokenInstruction.revoke constructor
TokenInstruction.revoke({
- required Ed25519HDPublicKey source,
- required Ed25519HDPublicKey sourceOwner,
- List<
Ed25519HDPublicKey> signers = const <Ed25519HDPublicKey>[],
Revokes the delegate's authority.
Implementation
factory TokenInstruction.revoke({
required Ed25519HDPublicKey source,
required Ed25519HDPublicKey sourceOwner,
List<Ed25519HDPublicKey> signers = const <Ed25519HDPublicKey>[],
}) =>
TokenInstruction._(
accounts: [
AccountMeta.writeable(pubKey: source, isSigner: false),
AccountMeta.readonly(
pubKey: sourceOwner,
isSigner: signers.isEmpty,
),
...signers.map(
(pubKey) => AccountMeta.readonly(pubKey: pubKey, isSigner: true),
),
],
data: TokenProgram.revokeInstructionIndex,
);