Skip to content

Latest commit

 

History

History
52 lines (39 loc) · 1.17 KB

AccountBumpValueNode.md

File metadata and controls

52 lines (39 loc) · 1.17 KB

AccountBumpValueNode

A node that refers to the seed bump of a PDA account.

Attributes

Data

Attribute Type Description
kind "accountBumpValueNode" The node discriminator.
name CamelCaseString The name of the account.

Children

This node has no children.

Functions

accountBumpValueNode(name)

Helper function that creates a AccountBumpValueNode object from the account name.

const node = accountBumpValueNode('associatedTokenAccount');

Examples

An instruction argument defaulting to the bump derivation of an instruction account

instructionNode({
    name: 'transfer',
    accounts: [
        instructionAccountNode({
            name: 'associatedTokenAccount',
            isSigner: false,
            isWritable: true,
        }),
        // ...
    ],
    arguments: [
        instructionArgumentNode({
            name: 'bump',
            type: numberTypeNode('u8'),
            defaultValue: accountBumpValueNode('associatedTokenAccount'),
        }),
        // ...
    ],
});