@left-curve/sdk
The SDK package for interacting with the Dango execution environment.
Installation
npm install @left-curve/sdk
For lighter installs, use the individual packages:
npm install @left-curve/types
npm install @left-curve/encoding
npm install @left-curve/utils
npm install @left-curve/crypto
Usage
import { createPublicClient, createSignerClient, testnet } from "@left-curve/sdk";
import { getBalance } from "@left-curve/sdk/actions";
const client = createPublicClient({ chain: testnet });
const balance = await getBalance(client, { address, denom: "dango" });
Package Structure
The SDK is split into independent packages for lighter dependency trees:
@left-curve/types | TypeScript type definitions |
@left-curve/encoding | Hex, base64, binary, JSON encoding |
@left-curve/utils | Decimal math, formatting, assertions |
@left-curve/crypto | Hash functions, key pairs, WebAuthn |
@left-curve/sdk | Clients, actions, chains, transports |
The root @left-curve/sdk import re-exports common items from all sub-packages for convenience.
Exports
import { createPublicClient, testnet, Decimal, sha256 } from "@left-curve/sdk";
import { getBalance, swap, transfer } from "@left-curve/sdk/actions";
License
TBD