blokboard/ Open app

Node reference

Program subscribe

Stream program account changes

Solana

Program subscribe listens for changes to accounts owned by a Solana program. Use filters to limit the account data your workflow receives.

Try it step by step#

  1. Enter the program ID you want to observe on the selected network.
  2. Add a Filters JSON array only when you know that program’s account layout. dataSize filters account size; memcmp matches bytes at an offset.
  3. Run and inspect accountId, account, and context.slot for a matching account change.

What to expect#

Notifications identify the changed account in accountId. It will usually differ from the programId that owns the account.

Things to check#

  • A program subscription observes account changes, not a decoded list of business events.
  • Incorrect size or byte filters can silently match no accounts. Start with a known account layout.
  • Use Logs subscribe if you need transaction log messages instead.

Keep learning#

Network setup: This node uses solana. See connections for RPC setup and Test mode for network selection.

Parameters#

SettingDefaultWhat it does
Program ID—Program whose owned accounts should be observed.
Account filters(empty)Optional JSON array of dataSize or memcmp filters.
Account database64How account data is encoded in notifications. Base64 returns encoded bytes.
CommitmentconfirmedHow far a Solana block must be confirmed before its data is used.
RPC URL{{global.chains.solana.rpcUrl}}Configured for Solana in workspace RPC settings.
Timeout (seconds)0Use 0 to wait until a matching notification arrives or the workflow is stopped.
On failurestopChoose whether a failed execution stops the workflow or only ends this path.
Retry attempts5How many times to reconnect after the subscription connection fails.

Account filters: Available under More options.

Account data: Choices: Base64 (base64), Base58 (base58), Base64 + zstd (base64+zstd), JSON parsed (jsonParsed). Available under More options.

Commitment: Choices: Processed (processed), Confirmed (confirmed), Finalized (finalized). Available under More options.

RPC URL: Available under More options.

Timeout (seconds): Available under More options.

On failure: Choices: Stop workflow (stop), Continue (continue). Available under More options.

Retry attempts: Available under More options. Limits: minimum 0.

Inputs#

PortValue
inany

Outputs#

PortValueDescription
outobjectThe next changed account owned by the program.

out fields#

FieldType
programIdstring
accountIdstring
context.slotnumber
account.lamportsstring
account.lamportsNumbernumber
account.ownerstring
account.executableboolean
account.rentEpochnumber
account.spacenumber
account.dataany
account.dataEncodingstring