bounded-sh/skill

bounded-onchain

- Add onchain to a Bounded app: Solana collections, embedded non-custodial wallets for email/social users (@user.address, Turnkey by default), client- and server-signed transactions, DEX/perps trading patterns, and crypto payments (accept USDC/crypto non-cu…

소스 보기
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Bounded onchain

Wallets, tokens, on-chain transactions, and payments. The canonical Bounded email/social login includes a wallet by default: keep the default Turnkey auth and supported email/social logins carry a real @user.address - see docs/embedded-wallets.md. @user.id (the account id) stays the identity/ownership key; @user.address is the wallet. On-chain writes still pass their policy rules and invariants first, so pair this with the bounded-backend skill for the governing rules. To route across the family, see the root bounded skill.

Reference Router

Read only the row matching the current task or term.

Task or termRead
Find a plugin namespace or function quicklyplugin catalog - compact namespace/function router
Scan every bare signature and callable contextcomplete signatures index
One plugin function's exact signature, manifest argument descriptions and signer markers, return type, and callable contextplugin catalog, then its per-namespace page under docs/plugins/
Who holds funds, who signs, escrow vs named PDA vs user wallet, @AccountPlugin.createAccount, account-id hygiene, create-fund-use idiomcustody and PDAs
A complete policy for an escrow, vault, treasury, staking, market, launch, NFT, Token-2022, randomness, or liquidity appexamples index
A failing onchain write: error lookup, rent, ATA payer, transaction limits, confirmation, environment differencesonchain troubleshooting
Fund any wallet with simulated SOL, USDC, or another token on Poofnet, bounded wallet fund, realtime_offchainPoofnet onchain simulation
SOLANA_DEVNET_RPC_URL is required, SOLANA_MAINNET_RPC_URL, validate pre-built transaction, submission fails before signing, no --rpc-url flag, public-RPC fallbackCLI submission needs an explicit RPC endpoint
Browser Pre-built Solana transaction submission requires init({ rpcUrl }), web onchain set() cannot submit, top-level chain + rpcUrl in init(), VITE_SOLANA_RPC_URLBrowser/SDK submission needs an explicit RPC endpoint
onchain account resolution failed (422), onchain account not found: <pubkey>, a write naming an account that does not exist on chain, wrong mint/pool derivation, 1-arg vs 3-arg getTokenMintAddress mismatchMissing onchain accounts vs platform 502s
onchain account resolution failed (502), onchain query failed (502), Transaction building failed without a 403 and without a 422, named queries and plain getBalance failing together, platform resolver outagePlatform resolver and onchain-query 502s
Pump.fun launch fails after signing with insufficient lamports (need 1461600, Create Metadata Accounts v3), app-custody creator fundingerror table and the token-launch example
Onchain collections, onchain:true, --protocol, Solana, mainnet permit, patches, readonly !, FieldReadOnlyonchain
Compiler vs deployed support, devnet status, blocked or unverified integrations (Jupiter, Phoenix, DFlow, Kamino, Pump.fun, PumpSwap, Tensor, SPL stake pool, liquid staking, Raydium CPMM, Meteora DLMM), runtime-v4 gatingcapability status
Helius, mirror/indexer, missed transactions, eventual consistency, unmirrored writes; who owns webhooks, ingest queue/DLQ, recovery and reconciliationmirror completeness
Transaction too large, 413, 1182/1232-byte packet limit, oversized hook, lookup tablestransaction-size limit
governance.upgrade, immutable/controller policy, manifest root, governed session, recovery, extend, cancelruntime-v3 governance
@CPI, @Solana, @Bytes, @App, @DocumentPlugin.updateField, @PredictionMarketPlugin, PDAs, get/getAfter, ProgramData, shouldSubmitTx, skipPreflight, @contract.address, @AccountPlugin.getAccountAddress, generic CPI, cross-app, prediction-market arithmetic, runtime parity, @Solana.verifyEd25519, @Solana.secp256k1Recover, @Bytes.sha256, @Bytes.keccak256, signature verification, EVM signer recoverypolicy primitives
Auction, order book, multi-transaction financial state machine, aggregate buckets, permissionless crank, lazy claim/settlement, fixed-point units, independent arithmetic oracle, operation receipt retry, _hook_completed, _error_messagepolicy-native financial state machines
Anchor/custom errors or stale numeric decodingcustom-error diagnosis
Trading, Phoenix perps, DEX swaps, server-signed executiononchain trading
Escrow custody, source argument, per-entity funds, named PDA accounts, @AccountPlugin.createAccountnamed escrow accounts
Rule arithmetic overflow, int64, division-first pins, large-magnitude comparisonsrule arithmetic
Randomness, VRF, raffle/gacha/shuffle, @OraclePlugin, requestRandomness, getRandomNumber, isRevealPathrandomness
Meteora token launch, DBC, anti-snipe fee decay, DAMM v2, createMeteoraConfig, createMeteoraVirtualPool, claimDammV2PoolFees, withdrawLeftoverMeteora launch
Pump.fun, PumpSwap, @PumpFunPlugin, createToken/createTokenV2, buyExactSolIn, creator fees, fee sharing, updateShareholders, distributeCreatorFees, pumpswapDeposit/pumpswapWithdraw, argument names/unitsPump.fun reference
Multi-party fee split, feepool, mulDivFloor, keeper/scheduled onchain writes, actAs, rollingSum fee-funded build allowanceoApps tokenomics
Embedded wallet for email/social users, @user.address, Turnkey, auth.walletsembedded wallets
403 anonymous_onchain_blocked, guest/signInAnonymously session writing an onchain collection, works on poofnet but not mainnetguests cannot write to an onchain collection
Bring-your-own Solana wallet login, walletLogin, Phantom / Wallet-Standard, SIWSwallet login
onramp(), buy SOL/USDC by card, Coinbase Onramp, wallet top-uponramp
Accept crypto/USDC, payments.acceptCrypto, seller settlement, direct-transfer railaccept crypto

Rules Of Thumb

  • Default onchain login = default Turnkey email/social auth, plus optional wallet login. Do not add authMode or auth.wallets for the normal path; supported email/social users already have @user.address. Deploy "auth": { "wallets": true } only for an EXTERNAL-keypair session (wallet login, a server-SDK keypair client, the CLI keypair data lane). Full rule and the opt-outs: docs/embedded-wallets.md -> recommended login.
  • Use @user.address only for wallet/onchain semantics; use @user.id for normal ownership. See the bounded-backend skill.
  • A guest (`signInAnonymously`) session can never write an `onchain: true` collection, on ANY network. Poofnet, devnet, and mainnet all return 403 anonymous_onchain_blocked before a transaction is built, so a guest flow that works against a test network cannot break on promotion. Keep the guest-reachable surface offchain and prompt the upgrade before the first onchain write. See guests cannot write to an onchain collection.
  • When a function's existing manifest description accepts account IDs, a non-pubkey string resolves to its own program-signed PDA. @contract.address is ONE shared fund for the whole app; a named id is a separate fund per name. Do not assume every source, owner, creator, or destination accepts all three custody forms - check that argument's manifest description on the function page. When separate pots of user money coexist (escrows, auctions, prize pools, per-tenant balances), use named accounts where accepted. Decide before the first deposit; retrofitting means migrating live balances.
  • For onchain writes, use explicit network/RPC configuration and devnet by default; do not treat immediate read-after-write as confirmation.

The CLI submits the transaction itself, and it reads its endpoint ONLY from SOLANA_DEVNET_RPC_URL / SOLANA_MAINNET_RPC_URL: no flag, no config-file setting, and no public-RPC fallback. An unset variable fails the write before signing with validate pre-built transaction: SOLANA_DEVNET_RPC_URL is required ..., so set it in the shell running bounded whenever an app is realtime_devnet or realtime_mainnet. See CLI submission needs an explicit RPC endpoint.

  • Mainnet is a real target, not a placeholder: the program is live on mainnet-beta. Creating a mainnet app requires a paid account plan (no API key or shared secret), and an app you create is owned on-chain by the creator's wallet immutably - a wallet your signed-in identity can prove it controls: the local CLI keypair, or on a web login your Bounded account's own wallet, whose permit signatures happen through a per-deploy browser approval. It can never be ownership-transferred. (oApp roots and workloads are also mainnet, but the platform mints them under a Bounded-custodied owner; you never create those yourself - see the oapps-fun skill.) See docs/onchain.md.
  • @contract.address is the Solana program-ID sentinel, not the app escrow address returned by a direct query.

Supported built-in plugins resolve the sentinel to the app escrow PDA. On the current deployed Devnet runtime, do not compose the sentinel as @AccountPlugin.getAccountAddress(@contract.address): that call fails because the sentinel is address-typed while this function currently accepts a string account id. For a Devnet policy query that needs the concrete escrow address, bind the current Devnet program ID as a string literal: @AccountPlugin.getAccountAddress("openTv7fbpYSseNHYmCZFZ1CZgj4r8D9fKNgEz1qo6F"). This literal is Devnet-specific and must be updated if the deployed program changes. See policy-primitives.md.

  • Treat discovery, deployed-runtime support, and live-network verification as three independent states.
  • Use bounded plugins list --json and bounded plugins describe <plugin.function> --json as the offline callable signature source before authoring a hook.
  • Run bounded verify --protocol <protocol> --json on the actual policy and inspect advisory capabilityReadiness, while still requiring retained live evidence before claiming network support.
  • Check the Solana devnet capability catalog before proposing any plugin or primitive.
  • Never infer devnet support from a compiler tag, manifest, proof contract, Poofnet model, lookup-table entry, or local validator test.
  • When live evidence uses a hosted release marker, resolve its environment-qualified site URL from bounded domains list --app-id <id> --env <environment> --json slugUrl or the exact successful site-deploy receipt url.

Require the JSON field itself for staging evidence instead of copying a human-rendered hostname. bounded apps inspect proves the active policy/runtime publication and carries no hosted URL.

  • Never emit runtime-v2 primitives for a runtime-v1 deployment; follow docs/policy-primitives.md.
  • Current chain-backed named queries belong on onchain: true paths. Anonymous execution is admitted for identity-independent queries whose path read rule authorizes the caller; a query reading @user.address/@user.evmAddress requires that identity. The anonymous surface is the browser SDK, not the CLI.
  • Do not recommend an onchain: false view for an offchain-only plugin read until standalone chain-query execution is fixed.
  • Treat runtime-v3 governance the same way: enroll only after the deployed capability registry reports v3, and publish governance from observed chain state rather than policy intent.
  • Keep Poofnet and Solana behavior paired.
  • Use bounded wallet fund only for explicit development funding on realtime_offchain.

The caller must be the app owner, an admin, or a developer, and the balance exists only inside the selected app's simulated ledger.

  • Pure/read primitives must return the same shape in runtimes where they are actually executable, and mutating primitives must apply a modeled effect or fail closed.
  • Validation-only success is a parity bug.
  • For a Poofnet onchain hook, application-side success means _hook_completed == _transaction_hash. Row existence and _error_message == null are only pending state. But those stamps are SIMULATOR-only: a policy RULE that requires them is permanently unsatisfiable on a real-chain protocol - a payout gated that way becomes a one-way valve that locks user funds, and every sim-side proof and test stays green. Rules gate on a declared field the hook itself writes (paidAt-style) or on the hook-derived head state; reserved _ stamps are for Poofnet clients only. Give every semantic operation id a policy-legal failed-attempt retry path. See reserved receipt stamps are Poofnet-only.
  • Helius mirroring is environment-level Bounded infrastructure: one raw program webhook per environment/network, never one per app. App builders never create webhook URLs or supply provider secrets, and the operator runbook (webhook, secrets, queue/DLQ, recovery) lives in the monorepo, not this skill. See mirror completeness for the app-facing caveats.
  • Crypto is accepted non-custodially; sellers settle to their own wallet.
같은 저장소의 Skills

더 많은 Skills

모든 Skills
bounded-sh
커뮤니티

bounded

- Build and use Bounded (bounded.sh), the full-stack app platform and policy-enforced realtime runtime for coding agents. Start here for a complete app, then load the focused Bounded skill for backend, frontend, deployment, or onchain work.

설치 수
1
GitHub Stars
0
업데이트
9월 3일
bounded-sh
커뮤니티

bounded-backend

- Author a Bounded backend: policy.json rules and invariants (rollingSum/windowSum/flowBound/conserve/tenantTag/tenantEdge/bound), functions (ctx.user/ctx.bounded/ctx.ai/ ctx.services/ctx.secrets), the actor and identity model (@user, runAs/actAs, @origin, service keys, reserved identity sets), data and queries, realtime/live rooms, and the proof loop (bounded verify, counterexamples, proof coverage). Use when writing or changing server-side Bounded logic, policies, or the rules that govern who can do what. Part of the Bounded skill family; see the bounded skill to route across frontend, deploy, onchain, teams, and cross-cutting Action Boundaries guidance.

설치 수
1
GitHub Stars
0
업데이트
9월 3일
bounded-sh
커뮤니티

bounded-deploy

- Ship and configure a Bounded app: CLI setup, browser-backed developer login, verify and deploy, hosted frontend publishing, environments, source sync, domains, bounded.json, collaborators, and release recovery. Part of the Bounded skill family.

설치 수
1
GitHub Stars
0
업데이트
9월 3일
bounded-sh
커뮤니티

bounded-frontend

- Wire a web or React Native frontend to Bounded: the @bounded-sh/client SDK (reads, writes, subscriptions, queries), hosted static frontends, and end-user auth UI (email OTP, OAuth, browser guest/anonymous accounts and upgrade). Use when building the client of a Bounded app or handling how end users sign in. Part of the Bounded skill family; server-side rules, functions, and the actor model live in the bounded-backend skill, and deploy/hosting config in bounded-deploy.

설치 수
1
GitHub Stars
0
업데이트
9월 3일