Bound
SDK

Overview

The typed TypeScript client for Bound — what is in the package and how it is meant to be used.

@bound/sdk is the client over the five contracts. It wraps the generated bindings, ships the committed deployment addresses, and exposes read helpers (verify a certificate, check balances and stakes) and write helpers (stake, deposit, publish, attest, pay, challenge) for callers who hold a Stellar keypair.

npm install @bound/sdk

Current version: 0.1.0 · npm · source

Two entry points

ImportContainsSafe in a browser bundle
@bound/sdkBoundClient, the ready-made bound instance, the generated bindings, money helpersNo — pulls in @stellar/stellar-sdk
@bound/sdk/deploymentsContract addresses, endpoints, demo actor public keys, deploy provenanceYes — data only, no secrets

If your client code only needs to display an address, import the deployments subpath. It carries no chain client and no credentials.

The ready-made client

import { bound } from "@bound/sdk";

bound is a BoundClient already pointed at the committed testnet deployment. There is no config object to fill in and no environment variable to set — a required setting for a choice with one option is an onboarding tax. Construct your own BoundClient when a second network exists.

Reads and writes are different shapes

Every read is a simulation: no keypair, no signature, no fee, no state change. Every write takes a Keypair as its first argument, signs locally, and submits.

Writes are server-side only

Write methods need the caller's own secret key material. They belong behind your backend — never in a browser bundle, and never anywhere a secret key would reach a client. Reads have no such constraint.

On this page