Skip to main content

Solana Instructions & Signatures

Helper components for constructing program instructions and assembling signature pairs for use with BUILD_SOLANA_TRANSACTION and SIGN_SOLANA_TRANSACTION.


BUILD_SOLANA_INSTRUCTION​

BUILD_SOLANA_INSTRUCTION Component

Builds a Solana transaction instruction from a program ID, account metas, and hex-encoded data. The output instruction can be passed into BUILD_SOLANA_TRANSACTION's instructions array.

Config​

None.

Inputs​

FieldTypeDescription
programIdstring (base58)Program to invoke
keysAccountMeta[] | nullAccount metas required by the instruction
datastring | null (hex)Hex-encoded instruction data. null if no data

Outputs​

FieldTypeDescription
instructionInstructionInstruction object for BUILD_SOLANA_TRANSACTION

AccountMeta type​

{
pubkey: string; // base58
isSigner: boolean;
isWritable: boolean;
}

BUILD_SOLANA_ACCOUNT_META_ITEM​

BUILD_SOLANA_ACCOUNT_META_ITEM Component

Wraps a public key, isSigner, and isWritable into an AccountMeta object for use in program instructions.

Config​

None.

Inputs​

FieldTypeDescription
pubkeystring (base58)Account public key
isSignerbooleanWhether this account must sign the transaction
isWritablebooleanWhether this account will be written to

Outputs​

FieldTypeDescription
itemAccountMetaAccountMeta object

BUILD_SOLANA_SIGNATURE_PAIR_ITEM​

BUILD_SOLANA_SIGNATURE_PAIR_ITEM Component

Wraps a public key and signature into a SignaturePair object for use with SIGN_SOLANA_TRANSACTION.

Config​

None.

Inputs​

FieldTypeDescription
publicKeystring (base58)Signer public key
signaturestring (hex)Ed25519 signature — 64 bytes (128 hex chars). Optional 0x prefix

Outputs​

FieldTypeDescription
itemSignaturePairSignature pair to pass into SIGN_SOLANA_TRANSACTION's signatures array