A node that refers to an argument — e.g. an instruction argument in the context of an instruction.
Attribute | Type | Description |
---|---|---|
kind |
"argumentValueNode" |
The node discriminator. |
name |
CamelCaseString |
The name of the argument. |
This node has no children.
Helper function that creates a ArgumentValueNode
object from the argument name.
const node = argumentValueNode('amount');
instructionNode({
name: 'mint',
arguments: [
instructionArgumentNode({
name: 'amount',
type: numberTypeNode('u64'),
}),
instructionArgumentNode({
name: 'amountToDelegate',
type: numberTypeNode('u64'),
defaultValue: argumentValueNode('amount'),
}),
// ...
],
});