This node represents a constant seed for a program-derived address (PDA).
Attribute | Type | Description |
---|---|---|
kind |
"constantPdaSeedNode" |
The node discriminator. |
Attribute | Type | Description |
---|---|---|
type |
TypeNode |
The type of the constant seed. |
value |
ValueNode | ProgramIdValueNode |
The value of the constant seed. |
Helper function that creates a ConstantPdaSeedNode
object from a type node and a value node.
const node = constantPdaSeedNode(numberTypeNode('u32'), numberValueNode(42));
Helper function that creates a ConstantPdaSeedNode
object of type StringTypeNode
from an encoding and a string of data.
constantPdaSeedNodeFromString('utf8', 'Hello');
// Equivalent to:
constantPdaSeedNode(stringTypeNode('utf8'), stringValueNode('Hello'));
Helper function that creates a ConstantValueNode
object of type BytesTypeNode
from an encoding and a string of data.
constantValueNodeFromBytes('base16', 'FF99CC');
// Equivalent to:
constantValueNode(bytesTypeNode(), bytesValueNode('base16', 'FF99CC'));
pdaNode({
name: 'tickets',
seeds: [constantPdaSeedNodeFromString('utf8', 'tickets')],
});