Skip to main content

Domain HTTP

A cross-platform HTTP client library for interacting with posemesh domains on the Auki Network. Supports both native and WebAssembly (WASM) environments.

Authentication Modes

posemesh-domain-http supports multiple authentication methods, each providing different levels of access to domain data:

1. Sign in with App Credentials

  • How: Use your app's key and secret to authenticate.
  • Access:
    • Read access to all domains.
    • No write access—app credentials are intended for read-only operations.
  • Use case: Suitable for backend services or applications that need to fetch domain data but do not need to modify it.

2. Sign in with Auki User Credentials

  • How: Authenticate using a user's email and password.
  • Access:
    • Write access to domains owned by the user within the same organization.
    • Read access to all domains.
  • Use case: Use this mode when you need to allow users to manage (create, update, or delete) their own domains, as well as view other domains in the organization.

3. Authenticate with OIDC Access Token

  • How: Provide a valid OIDC (OpenID Connect) access token obtained from the authentication service.
  • Access:
    • Grants read and write access to domains, according to the roles assigned to the user.
  • Use case: Enables single sign-on and fine-grained access control. Permissions are determined by the user’s assigned roles.

Key Features:

  • Secure authentication and authorization with the Auki Network.
  • (not supported in Python) Efficient streaming download of domain data, enabling seamless handling of large datasets.
  • Flexible upload functionality for both creating and updating domain data.
  • Universal compatibility: JavaScript package works in browsers, Deno, and Node.js(v18+ with ReadableStream support).

Usage

The client_id parameter must not be empty.

  • Frontend applications: Use the device ID or user ID as the client_id.
  • Backend environments: Use a unique identifier that represents your service or application.

The purpose of client_id is to distinguish whether multiple accesses to a domain originate from the same client (for example, the same app instance on the same device). When this is the case, network credits will only be deducted once for repeated calls from the same client.

Rust Examples

For more examples, check /src/domain_client.rs.

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

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = DomainClient::new_with_user_credential(
        &api_url,
        &dds_url,
        &client_id,
        &email,
        &password,
        true,
    )?;

    // List domains in the given organization, `all`, `own` or an organization id
    let query = ListDomainsQuery { org: "own".to_string(), portal_id: None, portal_short_id: None, domain_server_id: None };
    let domains = client.list_domains(query)?;
    println!("Domains: {:?}", domains);

    // Download all data for a domain
    let domain_id = "your-domain-id";
    let download_query = DownloadQuery { ids: vec![], name: None, data_type: None };
    let domain_data = client.download_domain_data(domain_id, download_query)?;
    for data in domain_data {
        println!("Data: {} ({} bytes)", data.metadata.name, data.metadata.size);
    }
    Ok(())
}

Python Exampels

For more examples, check /bindings/python/tests/test_basic.py.

from auki_domain_client import DomainClient, DownloadQuery, ListDomainsQuery
import os

# Authenticate using user credentials (with password recall)
client = DomainClient.new_with_user_credential(
    api_url, dds_url, client_id, email, password, True
)

# List domains in the given organization, `all`, `own` or an organization id
query = ListDomainsQuery(org="own", portal_id=None, portal_short_id=None, domain_server_id=None)
response = client.list_domains(query)
print("Domains:", response.domains)

# Download domain data
domain_id = "your-domain-id"
download_query = DownloadQuery(
    ids=[],  # All data
    name=None,
    data_type=None,
)
domain_data = client.download_domain_data(domain_id, download_query)
for data in domain_data:
    print(f"Name: {data.metadata['name']}, Size: {data.metadata['size']}")

JavaScript/Typescript Example

For more examples, check /bindings/javascript/tests/basic.test.ts

import { DomainClient, DownloadQuery, ListDomainsQuery, signInWithUserCredential } from "@auki/domain-client";

// Authenticate using user credentials
const client = await signInWithUserCredential(
  apiUrl,
  ddsUrl,
  clientId,
  email,
  password,
  true // remember password
);

// List domains in the given organization, `all`, `own` or an organization id
const response = await client.listDomains({org: "own"});
console.log("Domains:", response.domains);

// Download domain data
const domainId = "your-domain-id";
const domainData = await client.downloadDomainData(domainId, {ids:[]});

domainData.forEach((data) => {
  console.log(`Name: ${data.metadata.name}, Size: ${data.metadata.size}`);
});

client.free();

Changelog

See CHANGELOG.md for a list of features, bug fixes, and breaking changes.

Development

To build the domain-http crate locally for different platforms and for WebAssembly (WASM), follow these instructions:

1. Build for Native (Host) Platform

From the repository root, run:

cargo build -p posemesh-domain-http --release

2. Build for a Different Target Platform (Cross-Compile)

For cross-compiling, use cross. Install cross if you don't already have it:

cargo install cross

Then, build for your desired target. For example, to build for ARM64 Linux:

cross build -p posemesh-domain-http --release --target aarch64-unknown-linux-gnu

Replace aarch64-unknown-linux-gnu with the appropriate Rust target triple for your platform.

3. Generate wasm binding

use the provided Makefile task:

make build-domain-http TARGET=wasm

This will produce the WASM package in domain-http/bindings/javascript/pkg.

4. Generate Python binding

make build-domain-http TARGET=python

This will produce the python package in domain-http/bindings/python/.venv/lib/auki_domain_client.

5. Additional Notes

  • Make sure you have the required Rust target installed:
    rustup target add wasm32-unknown-unknown
    

Test

To run all tests (including both Rust and JS/WASM tests), use:

make unit-tests

This will run all unit and integration tests for both the Rust crate and the JavaScript/WASM package.

Publish

To publish a new version of this crate, follow these steps:

  1. Update the Version in Cargo.toml

    • If you are publishing a development/unstable release (such as during pre-release testing or RCs), increment the version in Cargo.toml to an unstable version suffix, such as:
      • 1.5.0-alpha.1
      • 1.5.0-beta.1
      • 1.5.0-rc.1
    • Only stable releases (e.g., 1.5.0, with no - suffix) are published to crates.io by CI.
    • Stable versions:
      • When you are ready for a stable release, bump the version to a new stable version (e.g., 1.5.0).
      • Update the changelog in README.md with the changes for the new release.
  2. Committing & PR

    • Always commit and push your version bump (and changelog update if stable) in your PR.
  3. Publishing

    • For stable versions: After merging your PR to the default branch, the CI will automatically build and publish the crate to crates.io and npm.js
    • For unstable/pre-release versions: You can publish manually if needed

Contributing

Contributions are welcome! Please ensure that all tests pass before submitting a pull request.

Release files for auki-domain-client 1.5.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for auki-domain-client 1.5.3
File
auki_domain_client-1.5.3-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details
auki_domain_client-1.5.3-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
auki_domain_client-1.5.3-py3-none-win32.whl Python 3 none Windows x86-32 Details
auki_domain_client-1.5.3-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details
auki_domain_client-1.5.3-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details
auki_domain_client-1.5.3-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details
auki_domain_client-1.5.3-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details
auki_domain_client-1.5.3-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
auki_domain_client-1.5.3-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details

Total release size: 18.4 MB

Release files / auki_domain_client-1.5.3-py3-none-win_arm64.whl

Download URL auki_domain_client-1.5.3-py3-none-win_arm64.whl
Size 2.0 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
0220f0f4559533c1865eee23842ae95b1b84d2462de766f2443fa9c48aca9d38
BLAKE2b-256 checksum
How to use checksums
41a1fb545afcdc6364362828dd7631bd7b33dac342fcfd9b81268c6f6b9b1b20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.

Transparency log

Release files / auki_domain_client-1.5.3-py3-none-win_amd64.whl

Download URL auki_domain_client-1.5.3-py3-none-win_amd64.whl
Size 2.1 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
c6b16bde6e3229ebbb4521d417058230853b16ed802cb9743b88f0a663811763
BLAKE2b-256 checksum
How to use checksums
f52e1632ae3b4172bffc01ac26c61126fdfad2256961d48205bfeebca7739cc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.

Transparency log

Release files / auki_domain_client-1.5.3-py3-none-win32.whl

Download URL auki_domain_client-1.5.3-py3-none-win32.whl
Size 1.7 MB
Tags Python 3 Windows x86-32
SHA-256 checksum
How to use checksums
512a8494d0f0b7698cd8da78d8d328adbdc46cd9ad40d0c1c2175bc09e20d467
BLAKE2b-256 checksum
How to use checksums
a72ef2740c54902b8b7a379a8da79873229b25e671f5abbaae8c51eac2238b26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.

Transparency log

Release files / auki_domain_client-1.5.3-py3-none-musllinux_1_2_x86_64.whl

Download URL auki_domain_client-1.5.3-py3-none-musllinux_1_2_x86_64.whl
Size 2.2 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
c0e76b8bc80a6167c7a07ff04e952775db3d0a12e94e98f618a2ae25d1849963
BLAKE2b-256 checksum
How to use checksums
cebd996d8ce76a8db8993b94f6495ec0cfe2dbaaf5954bb0e93c5fa11d054b8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.

Transparency log

Release files / auki_domain_client-1.5.3-py3-none-musllinux_1_2_aarch64.whl

Download URL auki_domain_client-1.5.3-py3-none-musllinux_1_2_aarch64.whl
Size 2.1 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
8fb51db2a844123f5a270dce0598de6a8f261160bbd36beb2f9d3324a7a80d87
BLAKE2b-256 checksum
How to use checksums
adeb2a9c99cb55197dc9a173201858639bc50e15d69f1a08e57e34c03583d582
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.

Transparency log

Release files / auki_domain_client-1.5.3-py3-none-manylinux_2_28_x86_64.whl

Download URL auki_domain_client-1.5.3-py3-none-manylinux_2_28_x86_64.whl
Size 2.2 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
7aa532273136473a6e30188e0ca0f69c7724a1e1134b77463536be4ede88d1c7
BLAKE2b-256 checksum
How to use checksums
bb067c8912aa14a1ba7ef723ee6a7171228509fb24a1a81d4e1ed055b4b6deb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.

Transparency log

Release files / auki_domain_client-1.5.3-py3-none-manylinux_2_28_aarch64.whl

Download URL auki_domain_client-1.5.3-py3-none-manylinux_2_28_aarch64.whl
Size 2.0 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
668199d9fdf2b27e1579d8258181930af8b0f29e1f8e76c94ad9f0d6dab45c53
BLAKE2b-256 checksum
How to use checksums
ca340fa26acafa61d5688a50bad1101896f23a37ed0e50279f59798d9cc997a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.

Transparency log

Release files / auki_domain_client-1.5.3-py3-none-macosx_11_0_arm64.whl

Download URL auki_domain_client-1.5.3-py3-none-macosx_11_0_arm64.whl
Size 2.0 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2e322d4feac62c603270526bd080048b9dc87ff77a15b73ead689e879f01586b
BLAKE2b-256 checksum
How to use checksums
ce1140ec2e28030d01abe41e8258c4091a709fa80577027ad9276edd0685ead0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.

Transparency log

Release files / auki_domain_client-1.5.3-py3-none-macosx_10_12_x86_64.whl

Download URL auki_domain_client-1.5.3-py3-none-macosx_10_12_x86_64.whl
Size 2.1 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
425ba12b722f341fc67df89375619ecdcb0575486284f6f4b72ab7d510595273
BLAKE2b-256 checksum
How to use checksums
eabe4f582ad264a2a3b32f9e9d2bb89498c1f1f8bba6ac625288279dcaea18b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.5.3 This release

9 release files

1.5.2

9 release files

1.4.0

9 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page