Document how client developers get typed bindings for the contracts, how to keep them in sync with the deployed WASM, and how the generated types map to the data types reference.
Proposed steps:
- Create
docs/guides/contract-bindings.md.
- Document generating TypeScript bindings from a built WASM or a deployed contract ID with the Stellar CLI, including the exact commands and output layout.
- Document how workspace types (
i128, BytesN<32>, Vec<T>, custom structs and enums) surface in the generated client, with conversion pitfalls (bigint handling, address formats, enum representation).
- Provide a minimal working client example: instantiate, read (
get_invoice), and write (pay_invoice) with signing.
- Document versioning: regenerating bindings after an interface change, and how to detect a mismatch between client bindings and the deployed contract.
- Document network configuration for local, testnet, and mainnet clients.
Acceptance criteria:
docs/guides/contract-bindings.md exists.
- Binding generation commands are verified against the current toolchain.
- Type mapping pitfalls are documented with examples.
- A minimal read-and-write client example is included and runnable.
Document how client developers get typed bindings for the contracts, how to keep them in sync with the deployed WASM, and how the generated types map to the data types reference.
Proposed steps:
docs/guides/contract-bindings.md.i128,BytesN<32>,Vec<T>, custom structs and enums) surface in the generated client, with conversion pitfalls (bigint handling, address formats, enum representation).get_invoice), and write (pay_invoice) with signing.Acceptance criteria:
docs/guides/contract-bindings.mdexists.