A node that refers to an account — e.g. an instruction account in the context of an instruction.
Attribute | Type | Description |
---|---|---|
kind |
"accountValueNode" |
The node discriminator. |
name |
CamelCaseString |
The name of the account. |
This node has no children.
Helper function that creates a AccountValueNode
object from the account name.
const node = accountValueNode('mint');
instructionNode({
name: 'mint',
accounts: [
instructionAccountNode({
name: 'payer',
isSigner: true,
isWritable: false,
}),
instructionAccountNode({
name: 'authority',
isSigner: false,
isWritable: true,
defaultValue: accountValueNode('payer'),
}),
// ...
],
});