Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 1.51 KB

AccountLinkNode.md

File metadata and controls

29 lines (19 loc) · 1.51 KB

AccountLinkNode

This node represents a reference to an existing AccountNode in the Codama IDL.

Attributes

Data

Attribute Type Description
kind "accountLinkNode" The node discriminator.
name CamelCaseString The name of the AccountNode we are referring to.

Children

Attribute Type Description
program ProgramLinkNode (Optional) The program associated with the linked account. Default to using the program we are currently under.

Functions

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');