General Liquidity
Clients

SDKs

Generated from one specification, so the shape is the same in every language.

TypeScript
@general-liquidity/sdk. Hand-written, with the signer and a separate operator client.
Python
Generated. Money, identity, governance, commerce, memory, operator and webhook classes.
Go
Generated. Fluent builders, context aware. Import path ends in /client.
Rust
Generated, async, on reqwest.

TypeScript

TypeScript
import { createClient } from "@general-liquidity/sdk";

// There is no token field. The client signs with a signer you supply, and
// sends no credential of its own.
const gl = createClient({ baseUrl, signer });

const receipt = await gl.pay(intent);   // see Concepts for the Intent shape

Python

Python
from general_liquidity import ApiClient, Configuration, MoneyApi

config = Configuration(host="https://api.generalliquidity.com")

with ApiClient(config) as api_client:
    # idempotency_key is a required positional argument, not an option.
    receipt = MoneyApi(api_client).pay(idempotency_key, intent)

Go

Go
// go get github.com/general-liquidity/general-liquidity-go/client
cfg := gl.NewConfiguration()
client := gl.NewAPIClient(cfg)

receipt, _, err := client.MoneyAPI.Pay(ctx).
    IdempotencyKey(key).
    Intent(intent).
    Execute()

Rust

Rust
use general_liquidity::apis::{configuration::Configuration, money_api};

let config = Configuration::new();

let receipt = money_api::pay(&config, idempotency_key, intent).await?;