stakwork / sphinx-rs

Rust crates for Sphinx Chat
0 stars 0 forks source link

simplify mobile signer bindings, better wasm example, docs #31

Closed Evanfeenstra closed 11 months ago

Evanfeenstra commented 11 months ago
type Bytes = Uint8Array;

interface Args {
  seed: Bytes; // 32 bytes
  network: string; // "bitcoin" or "regtest"
  policy: Policy;
  velocity?: Velocity;
  allowlist: string[];
  timestamp: number; // unix ts in seconds
  lss_nonce: Bytes; // random 32 bytes
}

type State = { [k: string]: Bytes };

interface VlsResponse {
  topic: string;
  vls_bytes?: Bytes;
  lss_bytes?: Bytes;
  sequence: number;
  state?: Bytes; // Map of strings to bytes, serialized with msgpack
}