Portal Community

1. Check a Balance Before a Payout Step

Guard a downstream payout/transfer action by confirming the treasury wallet has enough SOL first.

  1. Solana node: resource=account, operation=balance, address={{treasuryAddress}}
  2. Condition node: sol >= requiredAmount
  3. 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.

  1. Solana node: resource=token, operation=createAta, owner={{recipientAddress}}, mint={{tokenMint}}, credentialID={{treasuryWalletCredential}} — safe to call unconditionally; returns alreadyExisted: true if it's already there.
  2. 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.

  1. Solana node: resource=utility, operation=convertUnits, sol={{userInputSol}}
  2. Pass the response's lamports into the downstream transaction/sendNative step's lamports field.

4. Confirm the Wallet Credential Before Enabling Live Writes

Sanity-check a newly wired credentialID before it's used for real transfers.

  1. Solana node: resource=wallet, operation=getPublicKey, credentialID={{newCredential}}
  2. Condition node: compare the returned address against the expected treasury address
  3. 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.

  1. Solana node: resource=block, operation=latestSlot, cluster={{targetCluster}}
  2. Store the returned slot alongside 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.

  1. Solana node: resource=transaction, operation=sendNative, toAddress={{recipient}}, lamports={{amount}}, credentialID={{walletCredential}} → capture the returned signature.
  2. Add a short delay (a few seconds).
  3. Solana node: resource=transaction, operation=get, signature={{signature}}
  4. Condition node: err == "" — if true, the transfer succeeded; if false, inspect logs to diagnose.

7. Look Up the Current Validator Set Before Delegating

Pick a validator by commission/stake before delegating an existing stake account to it.

  1. Solana node: resource=staking, operation=getValidators
  2. Transform step: sort/filter the returned array by commission (ascending) and activatedStake, pick a votePubkey.
  3. Solana node: resource=staking, operation=delegate, stakeAccountAddress={{yourStakeAccount}}, voteAccountAddress={{chosenVotePubkey}}, credentialID={{stakeAuthorityCredential}}