AccountLinkNodeThis node represents a reference to an existing AccountNode in the Codama IDL.
| Attribute | Type | Description |
|---|---|---|
kind |
"accountLinkNode" |
The node discriminator. |
name |
CamelCaseString |
The name of the AccountNode we are referring to. |
| Attribute | Type | Description |
|---|---|---|
program |
ProgramLinkNode |
(Optional) The program associated with the linked account. Default to using the program we are currently under. |
accountLinkNode(name, program?)Helper function that creates an AccountLinkNode object from the name of the AccountNode we are referring to. If the account is from another program, the program parameter must be provided as either a string or a ProgramLinkNode.
const node = accountLinkNode('myAccount');
const nodeFromAnotherProgram = accountLinkNode('myAccount', 'myOtherProgram');