Examples
Worked workflow patterns using the Solana node
1. Check a Balance Before a Payout Step
Guard a downstream payout/transfer action by confirming the treasury wallet has enough SOL first.
- Solana node:
resource=account,operation=balance,address={{treasuryAddress}} - Condition node:
sol >= requiredAmount - If true, continue to the payout step (
transaction/sendNative); if false, route to an alert/notification branch
2. Onboard a New Token Holder (Create ATA, Then Transfer)
Send an SPL token to a wallet that may not yet hold an Associated Token Account for that mint.
- Solana node:
resource=token,operation=createAta,owner={{recipientAddress}},mint={{tokenMint}},credentialID={{treasuryWalletCredential}}— safe to call unconditionally; returnsalreadyExisted: trueif it's already there. - Solana node:
resource=token,operation=transfer,mint={{tokenMint}},destinationOwner={{recipientAddress}},amount={{rawAmount}},credentialID={{treasuryWalletCredential}}
Why both steps:
transfer requires the destination ATA to already exist —
chaining createAta first makes the whole flow work for both first-time and repeat
recipients without a branch.
3. Convert a User-Entered SOL Amount Before a Transfer
A form collects an amount in SOL from a user; transaction/sendNative needs lamports.
- Solana node:
resource=utility,operation=convertUnits,sol={{userInputSol}} - Pass the response's
lamportsinto the downstreamtransaction/sendNativestep'slamportsfield.
4. Confirm the Wallet Credential Before Enabling Live Writes
Sanity-check a newly wired credentialID before it's used for real transfers.
- Solana node:
resource=wallet,operation=getPublicKey,credentialID={{newCredential}} - Condition node: compare the returned
addressagainst the expected treasury address - If it doesn't match, halt and alert rather than proceeding to a signing operation with an unexpected wallet.
5. Watch a Cluster's Chain Tip as a Heartbeat
A scheduled workflow confirms a configured cluster is live before running downstream steps.
- Solana node:
resource=block,operation=latestSlot,cluster={{targetCluster}} - Store the returned
slotalongside a timestamp; alert if it hasn't advanced meaningfully since the last run.
6. Poll a Transaction's Result After Submission
Confirm a sendNative transaction landed successfully before telling a user it completed.
- Solana node:
resource=transaction,operation=sendNative,toAddress={{recipient}},lamports={{amount}},credentialID={{walletCredential}}→ capture the returnedsignature. - Add a short delay (a few seconds).
- Solana node:
resource=transaction,operation=get,signature={{signature}} - Condition node:
err == ""— if true, the transfer succeeded; if false, inspectlogsto diagnose.
7. Look Up the Current Validator Set Before Delegating
Pick a validator by commission/stake before delegating an existing stake account to it.
- Solana node:
resource=staking,operation=getValidators - Transform step: sort/filter the returned array by
commission(ascending) andactivatedStake, pick avotePubkey. - Solana node:
resource=staking,operation=delegate,stakeAccountAddress={{yourStakeAccount}},voteAccountAddress={{chosenVotePubkey}},credentialID={{stakeAuthorityCredential}}