@cloakely/sdk 0.6.0 → 0.7.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 CHANGED
@@ -87,6 +87,22 @@ await priv.send(usdc.token, "cloak:…", parseUnits("20", 6)); // am
87
87
  await priv.unshieldToken(usdc.token, freshAddress, parseUnits("10", 6)); // 0.25% fee kept
88
88
  ```
89
89
 
90
+ Launches from Nov 2 on keep their private balances in one shared launch-token vault (a testnet experiment). There a
91
+ private send doesn't even show which token moved: its relayer is paid from your private HYPE in the same transaction.
92
+
93
+ ```ts
94
+ const shared = new SharedVaultClient(
95
+ priv, d.shared!, d.sharedRouter!,
96
+ () => loadSharedProver(d.circuitsUrl), // its own circuit (the token is inside each note), hash-checked
97
+ sharedRelayerSubmitter(d.relayerUrl), d.sharedBlock,
98
+ );
99
+ await shared.buy(token, parseEther("0.25")); // private HYPE → private token, through the Uniswap pool
100
+ await shared.send(token, parseEther("100"), "cloak:…"); // amount, parties and the token itself hidden
101
+ await shared.sell(token, parseEther("50")); // back to private HYPE
102
+ await shared.unshield(token, parseEther("10"), freshAddress);
103
+ console.log(await shared.balances()); // every token this account holds there
104
+ ```
105
+
90
106
  The private account comes from one EIP-712 signature bound to the chain only (never to a contract), so it and the `cloak:` address never change. The same wallet always restores it, and nothing is stored on a server. In Node, read the circuit files yourself and pass them to `createProver(wasm, zkey)`.
91
107
 
92
108
  ## Fees (testnet beta)