posemesh-domain-http 1.4.2

HTTP client library for interacting with AukiLabs domain data services, supporting both native and WebAssembly targets.
Documentation
posemesh-domain-http-1.4.2 has been yanked.

posemesh-domain-http

Cross-platform HTTP client for Auki posemesh domains (native + WASM) with Rust, JavaScript, and Python bindings.

Authentication Modes

  • App credentials (key/secret): read-all, no writes.
  • User credentials (email/password): read-all + write own org domains.
  • OIDC access token: read/write per assigned roles.

Key Features

  • Streaming downloads and uploads (WASM streaming download; uploads not in Python).
  • Domain listing/creation/deletion helpers.
  • Reconstruction job submission.
  • JavaScript package @auki/domain-client for browsers, Deno, and Node 18+ (ReadableStream).

Usage

client_id must be non-empty (use device/user ID on frontend; unique service ID on backend).

Rust

use posemesh_domain_http::{DomainClient, DownloadQuery, ListDomainsQuery};

let client = DomainClient::new_with_user_credential(
    &api_url, &dds_url, &client_id, &email, &password, true)?;
let domains = client.list_domains(&ListDomainsQuery{ org: "own".into(), portal_id: None, portal_short_id: None }).await?;
let data = client.download_domain_data(&domain_id, &DownloadQuery{ ids: vec![], name: None, data_type: None }).await?;

JavaScript / TypeScript

import { DomainClient } from "@auki/domain-client";
const client = await DomainClient.new_with_user_credential(apiUrl, ddsUrl, clientId, email, password, true);
const domains = await client.listDomains({ org: "own" });
const data = await client.downloadDomainData(domainId, { ids: [] });
client.free();

Python

from auki_domain_client import DomainClient, ListDomainsQuery, DownloadQuery
client = DomainClient.new_with_user_credential(api_url, dds_url, client_id, email, password, True)
domains = client.list_domains(ListDomainsQuery(org="own", portal_id=None, portal_short_id=None))
data = client.download_domain_data(domain_id, DownloadQuery(ids=[], name=None, data_type=None))

Build

  • Native: cargo build -p posemesh-domain-http --release
  • WASM JS pkg: make build-domain-http TARGET=wasmdomain-http/bindings/javascript/pkg
  • Python pkg: make build-domain-http TARGET=pythondomain-http/bindings/python/.venv/lib/auki_domain_client

Test

make unit-tests (runs Rust + JS/WASM)

Changelog

See CHANGELOG.md.