@arcanetech/privacy-sdk-stellar 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,69 @@
1
+ # @arcanetech/privacy-sdk-stellar
2
+
3
+ Stellar preset for the Arcane privacy SDK.
4
+
5
+ ## Overview
6
+
7
+ This package provides:
8
+
9
+ - `createStellarPrivacyClient()` for browser usage (preloaded `ArrayBuffer` assets)
10
+ - `@arcanetech/privacy-sdk-stellar/node` for Node.js filesystem asset loading
11
+ - `@arcanetech/privacy-sdk-stellar/testing` for fake transact engines in unit tests
12
+ - Stellar wallet, storage, and policy adapter contracts
13
+ - disclosure validation for currently supported Stellar routes
14
+ - orchestration over `@auditable/privacy-pool-zk-sdk`
15
+
16
+ ## Browser Example
17
+
18
+ ```ts
19
+ import {
20
+ createStellarPrivacyClient,
21
+ isStellarPrivacyClient,
22
+ } from '@arcanetech/privacy-sdk-stellar';
23
+
24
+ const clientOrRejected = await createStellarPrivacyClient({
25
+ network,
26
+ wallet,
27
+ storage,
28
+ assets: {
29
+ sdkWasm,
30
+ circuitWasm,
31
+ provingKey,
32
+ },
33
+ });
34
+
35
+ if (!isStellarPrivacyClient(clientOrRejected)) {
36
+ throw new Error('Client creation failed');
37
+ }
38
+
39
+ const operation = await clientOrRejected.deposit(intent);
40
+ if (operation.status === 'prepared') {
41
+ await operation.execute({ onEvent: console.log });
42
+ }
43
+ ```
44
+
45
+ ## Node Example
46
+
47
+ ```ts
48
+ import { createStellarPrivacyClientFromNodeConfig } from '@arcanetech/privacy-sdk-stellar/node';
49
+
50
+ const clientOrRejected = await createStellarPrivacyClientFromNodeConfig({
51
+ network,
52
+ wallet,
53
+ storage,
54
+ assets: {
55
+ sdkWasmPath: './assets/client_sdk_wasm_bg.wasm',
56
+ circuitWasmPath: './assets/main.wasm',
57
+ provingKeyPath: './assets/main_final.zkey',
58
+ },
59
+ });
60
+ ```
61
+
62
+ ## Required Assets
63
+
64
+ The Stellar preset expects caller-provided circuit and proving artifacts. Do not regenerate `ptau` or Groth16 zkey files inside this repository.
65
+
66
+ ## Related Docs
67
+
68
+ - [Root README](../../README.md)
69
+ - [Mintlify Stellar docs](../../docs/packages/stellar.mdx)