Skip to content

Document Generating and Using Contract Bindings and SDKs #465

Description

@codebestia

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions