Seesaw integration instructions#
Use this template in an integration project. Add the exact release commit and deployment values before enabling execution.
Scope#
Default to read-only operation. Do not sign from a price observation alone.
Require explicit authorization for the reviewed-intent digest before each new economic action.
Bind that digest to wallet, cluster genesis hash, program, market, fee policy, referral decision, quantity, and limits.
Use createReviewedOrderIntent and checkReviewedIntentAtSigning.
Versions and source authority#
Use the locked checkout dependencies and the runtime pins in docs/sdk/runtime-support.md.
Do not assume registry publication. Check docs/sdk/package-registry-status.json.
Use program/src/abi_compaction.rs, program/src/state/, spec/ACCOUNTS.md, and spec/IX.md for the protocol contract.
Keep exact instruction discriminants and generated layouts. Do not invent API parity between languages.
Units#
Price uses basis points in the named outcome's price space. 10,000 basis points is one quote unit per share. Share quantity uses share atoms. One share is 1,000,000 share atoms. Quote amounts use settlement-token atoms. Do not substitute share atoms for quote atoms. Use bigint for encoded quantities. Do not convert encoded u64 values to JavaScript number.
Validation and secrets#
Check account owner, discriminator, length, version, PDA, market identity, and related mint and wallet fields. Use the required commitment. Record observation time and slot. Parsing validates shape. It does not prove chain authenticity. Keep wallet keys and provider credentials outside source control and browser bundles. Runner credentials belong to the runner. Wallet pairing does not grant resolution authority.
Execution and recovery#
Build from the approved intent. Simulate the exact unsigned transaction. Check fresh scope, fee, Clock, and voluntary-control observations immediately before signing. Compare the wallet's signed message with the reviewed unsigned message. Derive the signature from signed bytes. Persist the attempt before dispatch. Use a durable journal scoped by wallet, cluster, and program. If persistence fails, do not dispatch. If the journal is corrupt, stop and preserve the file. Reconcile with signature history and a subsequent block-height read. Unknown status and expired blockhash do not establish failure. Rebroadcast only the recorded signed bytes while valid. Do not rebuild after a timeout. Require a separate authorization for new exposure. Persist completed and pending redemption identities. Reconcile pending progress before rebuilding a holdings plan. Measure complete transaction groups, including signer slots and prefix instructions. A measured packet size does not establish wallet transport support.
Evidence#
Run the checked-in example fixtures. Record actual commands and results. Keep offline construction, signed-wire fixtures, local-chain results, and deployment qualification separate. Do not describe missing external evidence as complete.