- bbbfee6: Consolidate native bindings into
aptos_confidential_asset_ffi(iOS/Android rebuild; Android loadslibaptos_confidential_asset_ffi). - bbbfee6: Harden CI and release: require changesets for
rust/ffi, add Android JNI compile smoke, publishaarch64-unknown-linux-muslFFI artifacts, verify FFI git tags matchpackage.json, serialize native solver calls with a mutex, and unify npm publish with automaticv*tag + native FFI GitHub Release (release.yml→bindings-release.yml).
-
8f50786: fix: resolve node:fs bundler errors in browser environments by providing a dedicated browser build via the
browserexport conditionBundlers (webpack, Vite, Turbopack) statically analyse dynamic imports regardless of runtime guards. The
node:fsimport in the shared WASM loader was being pulled into browser bundles, causing build-time or runtime errors.The fix introduces a proper source split:
src/web/shared.ts— WASM API factory with no environment-specific codesrc/web/index.node.ts— Node.js entry: resolves WASM from localnode_modulesvianode:fs, falls back to CDNsrc/web/index.browser.ts— Browser entry: unconditionally uses CDN URL; zeronode:fsreferences
The
browserexport condition inpackage.jsonroutes all bundler targets toindex.browser.mjs, so no bundler-specific magic comments are needed.
-
a258d0f: Add React Native / Expo native module with full iOS and Android support.
The package now runs natively on iOS (C FFI → xcframework) and Android (JNI → .so) via Expo's JSI layer, with no WASM involved on mobile. The public API (
solveDiscreteLog,batchRangeProof,batchVerifyProof) is identical across all platforms. Web and Node.js continue to use the existing WASM path.
-
63334cd: Initial release of
@aptos-labs/confidential-asset-bindings.This package provides TypeScript bindings for Aptos confidential asset cryptography.
solveDiscreteLog(y, maxNumBits)— solves discrete logarithms on the Ristretto255 curve for 16-bit and 32-bit secrets;- Default algorithm: TBSGS-k32 (~774 KiB WASM) — configurable at compile time via Cargo features (
tbsgs_k,bsgs_k,bsgs,bl12)
rangeProof(inputs)/verifyProof(inputs)— single range proof generation and verificationbatchRangeProof(inputs)/batchVerifyProof(inputs)— batched variants- Supports 8, 16, 32, and 64-bit ranges using Pedersen commitments with custom base points
- Proofs are cross-version compatible with bulletproofs v4.0.0 (as used in aptos-core)
- Pure Rust core (
aptos_confidential_asset_core) separated from the WASM runtime crate (aptos_confidential_asset_wasm) for reusability - Ships ESM and CJS bundles with full TypeScript type definitions