@arcanetech/privacy-sdk-stellar
v0.3.0
Published
Stellar preset for the Arcane privacy SDK
Readme
@arcanetech/privacy-sdk-stellar
Stellar preset for the Arcane privacy SDK.
Overview
This package provides:
createStellarPrivacyClient()for browser usage (preloadedArrayBufferassets)@arcanetech/privacy-sdk-stellar/nodefor Node.js filesystem asset loading@arcanetech/privacy-sdk-stellar/testingfor fake transact engines in unit tests- Stellar wallet, storage, and policy adapter contracts
- disclosure validation for currently supported Stellar routes
- orchestration over
@auditable/privacy-pool-zk-sdk
Browser Example
import {
createStellarPrivacyClient,
isStellarPrivacyClient,
} from '@arcanetech/privacy-sdk-stellar';
const clientOrRejected = await createStellarPrivacyClient({
network,
wallet,
storage,
assets: {
sdkWasm,
circuitWasm,
provingKey,
},
});
if (!isStellarPrivacyClient(clientOrRejected)) {
throw new Error('Client creation failed');
}
const operation = await clientOrRejected.deposit(intent);
if (operation.status === 'prepared') {
await operation.execute({ onEvent: console.log });
}Node Example
import { createStellarPrivacyClientFromNodeConfig } from '@arcanetech/privacy-sdk-stellar/node';
const clientOrRejected = await createStellarPrivacyClientFromNodeConfig({
network,
wallet,
storage,
assets: {
sdkWasmPath: './assets/client_sdk_wasm_bg.wasm',
circuitWasmPath: './assets/main.wasm',
provingKeyPath: './assets/main_final.zkey',
},
});Required Assets
The Stellar preset expects caller-provided circuit and proving artifacts. Do not regenerate ptau or Groth16 zkey files inside this repository.
