@chironbuilder/ootle-sdk 0.1.10 → 0.1.11
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/package.json +1 -1
- package/vendor/ootle-patched/package.json +1 -1
- package/vendor/ootle-wasm-patched/README.md +58 -89
- package/vendor/ootle-wasm-patched/ootle_wasm.js +1 -1
- package/vendor/ootle-wasm-patched/ootle_wasm_bg.js +22 -30
- package/vendor/ootle-wasm-patched/ootle_wasm_bg.wasm +0 -0
- package/vendor/ootle-wasm-patched/ootle_wasm_bg.wasm.d.ts +20 -20
- package/vendor/ootle-wasm-patched/package.json +5 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chironbuilder/ootle-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "Shared TypeScript client for Tari Ootle (L2): account derivation, balances, transactions, HTLCs, and stealth/confidential transfers — the account core behind Sapient and the Tari L1 web wallet's Ootle support.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -1,128 +1,97 @@
|
|
|
1
1
|
# ootle-wasm
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Rust → WASM library providing client-side crypto operations for Tari Ootle L2.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Architecture
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
All keys and signatures are **`Uint8Array`** (raw 32-byte values).
|
|
14
|
-
|
|
15
|
-
### `generateKeypair()`
|
|
7
|
+
- `core/` — Pure Rust library. All crypto/encoding logic lives here. Testable natively with `cargo test`.
|
|
8
|
+
- `wasm/` — Thin `wasm-bindgen` shell. Accepts JSON strings, calls core, returns results.
|
|
16
9
|
|
|
17
|
-
|
|
10
|
+
## Prerequisites
|
|
18
11
|
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
```bash
|
|
13
|
+
# Install wasm-pack
|
|
14
|
+
cargo install wasm-pack
|
|
15
|
+
|
|
16
|
+
# (Optional) Install wasm-opt for size optimisation
|
|
17
|
+
# macOS:
|
|
18
|
+
brew install binaryen
|
|
19
|
+
# or via cargo:
|
|
20
|
+
cargo install wasm-opt
|
|
25
21
|
```
|
|
26
22
|
|
|
27
|
-
|
|
23
|
+
## Build
|
|
28
24
|
|
|
29
|
-
|
|
25
|
+
### Native (tests only)
|
|
30
26
|
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const publicKey = publicKeyFromSecretKey(secretKey);
|
|
35
|
-
// publicKey: Uint8Array (32 bytes)
|
|
27
|
+
```bash
|
|
28
|
+
cargo test -p ootle-wasm-core
|
|
36
29
|
```
|
|
37
30
|
|
|
38
|
-
###
|
|
31
|
+
### WASM
|
|
39
32
|
|
|
40
|
-
|
|
33
|
+
```bash
|
|
34
|
+
# Build for bundler (webpack, vite, rollup, esbuild)
|
|
35
|
+
wasm-pack build crates/ootle_wasm/wasm --target bundler --release --out-dir ../../../pkg
|
|
41
36
|
|
|
42
|
-
|
|
43
|
-
-
|
|
37
|
+
# Build for Node.js
|
|
38
|
+
wasm-pack build crates/ootle_wasm/wasm --target nodejs --release --out-dir ../../../pkg
|
|
44
39
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const hash = hashUnsignedTransaction(
|
|
49
|
-
JSON.stringify(unsignedTransaction),
|
|
50
|
-
sealSignerPublicKey,
|
|
51
|
-
);
|
|
40
|
+
# Build for web (no bundler)
|
|
41
|
+
wasm-pack build crates/ootle_wasm/wasm --target web --release --out-dir ../../../pkg
|
|
52
42
|
```
|
|
53
43
|
|
|
54
|
-
|
|
44
|
+
The output goes to `pkg/` at the repo root containing:
|
|
55
45
|
|
|
56
|
-
|
|
46
|
+
- `ootle_wasm_bg.wasm` — the WASM binary
|
|
47
|
+
- `ootle_wasm.js` — JS glue code
|
|
48
|
+
- `ootle_wasm.d.ts` — TypeScript type definitions
|
|
57
49
|
|
|
58
|
-
|
|
59
|
-
import { schnorrSign } from "@tari-project/ootle-wasm";
|
|
50
|
+
### Size optimisation (optional)
|
|
60
51
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
// signature: Uint8Array (32 bytes)
|
|
52
|
+
```bash
|
|
53
|
+
wasm-opt -Oz --strip-debug --strip-producers pkg/ootle_wasm_bg.wasm -o pkg/ootle_wasm_bg.wasm
|
|
64
54
|
```
|
|
65
55
|
|
|
66
|
-
###
|
|
67
|
-
|
|
68
|
-
BOR-encode a signed `Transaction` into a base64 `TransactionEnvelope` string, ready to submit to the network.
|
|
56
|
+
### Debug build (with panic hook)
|
|
69
57
|
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
const envelope = borEncodeTransaction(JSON.stringify(transaction));
|
|
58
|
+
```bash
|
|
59
|
+
wasm-pack build crates/ootle_wasm/wasm --target bundler --dev --out-dir ../../../pkg -- --features debug
|
|
74
60
|
```
|
|
75
61
|
|
|
76
|
-
##
|
|
62
|
+
## WASM Exports
|
|
77
63
|
|
|
78
|
-
|
|
64
|
+
| Function | Signature | Description |
|
|
65
|
+
|---------------------------|-----------------------------------------------------------------------------|-----------------------------------------------------|
|
|
66
|
+
| `borEncodeTransaction` | `(transactionJson: string) → string` | BOR-encode a Transaction JSON → base64 envelope |
|
|
67
|
+
| `hashUnsignedTransaction` | `(unsignedTxJson: string, sealSignerPubKeyHex: string) → Uint8Array` | Hash an unsigned transaction for signing (64 bytes) |
|
|
68
|
+
| `schnorrSign` | `(secretKeyHex: string, message: Uint8Array) → { public_nonce, signature }` | Schnorr-sign a message |
|
|
69
|
+
| `generateKeypair` | `() → { secret_key, public_key }` | Generate a random Ristretto keypair |
|
|
70
|
+
| `publicKeyFromSecretKey` | `(secretKeyHex: string) → string` | Derive public key from secret key |
|
|
79
71
|
|
|
80
|
-
|
|
81
|
-
import { generateKeypair, publicKeyFromSecretKey } from "@tari-project/ootle-wasm";
|
|
72
|
+
All keys and signatures are lowercase hex-encoded strings.
|
|
82
73
|
|
|
83
|
-
|
|
84
|
-
const { secret_key, public_key } = generateKeypair();
|
|
85
|
-
console.log("Public key:", public_key.toHex());
|
|
86
|
-
|
|
87
|
-
// Load a key from a hex string
|
|
88
|
-
const restored = Uint8Array.fromHex("a1b2c3...");
|
|
89
|
-
const derivedPublicKey = publicKeyFromSecretKey(restored);
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
## Full example
|
|
74
|
+
## Usage from JS/TS
|
|
93
75
|
|
|
94
76
|
```typescript
|
|
95
|
-
import {
|
|
77
|
+
import init, {
|
|
96
78
|
generateKeypair,
|
|
97
|
-
publicKeyFromSecretKey,
|
|
98
|
-
hashUnsignedTransaction,
|
|
99
79
|
schnorrSign,
|
|
80
|
+
hashUnsignedTransaction,
|
|
100
81
|
borEncodeTransaction,
|
|
101
|
-
|
|
82
|
+
publicKeyFromSecretKey,
|
|
83
|
+
} from './pkg/ootle_wasm.js';
|
|
102
84
|
|
|
103
|
-
//
|
|
104
|
-
|
|
85
|
+
// Initialise the WASM module
|
|
86
|
+
await init();
|
|
105
87
|
|
|
106
|
-
//
|
|
107
|
-
const
|
|
108
|
-
/* ... UnsignedTransactionV1 fields ... */
|
|
109
|
-
};
|
|
88
|
+
// Generate a keypair
|
|
89
|
+
const { secret_key, public_key } = generateKeypair();
|
|
110
90
|
|
|
111
|
-
//
|
|
112
|
-
const
|
|
91
|
+
// Hash an unsigned transaction for signing
|
|
92
|
+
const unsignedTxJson = JSON.stringify(unsignedTransaction);
|
|
93
|
+
const hash = hashUnsignedTransaction(unsignedTxJson, sealSignerPublicKeyHex);
|
|
113
94
|
|
|
114
|
-
//
|
|
95
|
+
// Sign the hash
|
|
115
96
|
const { public_nonce, signature } = schnorrSign(secret_key, hash);
|
|
116
|
-
|
|
117
|
-
// 5. Assemble the signed transaction and BOR-encode
|
|
118
|
-
const signedTx = {
|
|
119
|
-
/* ... Transaction with signature attached ... */
|
|
120
|
-
};
|
|
121
|
-
const envelope = borEncodeTransaction(JSON.stringify(signedTx));
|
|
122
|
-
|
|
123
|
-
// 6. Submit envelope to the Ootle network
|
|
124
97
|
```
|
|
125
|
-
|
|
126
|
-
## License
|
|
127
|
-
|
|
128
|
-
BSD-3-Clause
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export class DecryptedOutputResult {
|
|
5
5
|
static __wrap(ptr) {
|
|
6
|
-
ptr = ptr >>> 0;
|
|
7
6
|
const obj = Object.create(DecryptedOutputResult.prototype);
|
|
8
7
|
obj.__wbg_ptr = ptr;
|
|
9
8
|
DecryptedOutputResultFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -38,7 +37,7 @@ export class DecryptedOutputResult {
|
|
|
38
37
|
const ret = wasm.__wbg_get_decryptedoutputresult_memo_json(this.__wbg_ptr);
|
|
39
38
|
let v1;
|
|
40
39
|
if (ret[0] !== 0) {
|
|
41
|
-
v1 = getStringFromWasm0(ret[0], ret[1])
|
|
40
|
+
v1 = getStringFromWasm0(ret[0], ret[1]);
|
|
42
41
|
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
43
42
|
}
|
|
44
43
|
return v1;
|
|
@@ -85,7 +84,6 @@ if (Symbol.dispose) DecryptedOutputResult.prototype[Symbol.dispose] = DecryptedO
|
|
|
85
84
|
*/
|
|
86
85
|
export class KeypairResult {
|
|
87
86
|
static __wrap(ptr) {
|
|
88
|
-
ptr = ptr >>> 0;
|
|
89
87
|
const obj = Object.create(KeypairResult.prototype);
|
|
90
88
|
obj.__wbg_ptr = ptr;
|
|
91
89
|
KeypairResultFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -143,7 +141,6 @@ if (Symbol.dispose) KeypairResult.prototype[Symbol.dispose] = KeypairResult.prot
|
|
|
143
141
|
*/
|
|
144
142
|
export class OotlePublicKey {
|
|
145
143
|
static __wrap(ptr) {
|
|
146
|
-
ptr = ptr >>> 0;
|
|
147
144
|
const obj = Object.create(OotlePublicKey.prototype);
|
|
148
145
|
obj.__wbg_ptr = ptr;
|
|
149
146
|
OotlePublicKeyFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -186,7 +183,7 @@ export class OotlePublicKey {
|
|
|
186
183
|
set owner_key(arg0) {
|
|
187
184
|
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
188
185
|
const len0 = WASM_VECTOR_LEN;
|
|
189
|
-
wasm.
|
|
186
|
+
wasm.__wbg_set_ootlepublickey_owner_key(this.__wbg_ptr, ptr0, len0);
|
|
190
187
|
}
|
|
191
188
|
/**
|
|
192
189
|
* The view-only public key bytes.
|
|
@@ -195,7 +192,7 @@ export class OotlePublicKey {
|
|
|
195
192
|
set view_key(arg0) {
|
|
196
193
|
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
197
194
|
const len0 = WASM_VECTOR_LEN;
|
|
198
|
-
wasm.
|
|
195
|
+
wasm.__wbg_set_ootlepublickey_view_key(this.__wbg_ptr, ptr0, len0);
|
|
199
196
|
}
|
|
200
197
|
}
|
|
201
198
|
if (Symbol.dispose) OotlePublicKey.prototype[Symbol.dispose] = OotlePublicKey.prototype.free;
|
|
@@ -205,7 +202,6 @@ if (Symbol.dispose) OotlePublicKey.prototype[Symbol.dispose] = OotlePublicKey.pr
|
|
|
205
202
|
*/
|
|
206
203
|
export class OotleSecretKey {
|
|
207
204
|
static __wrap(ptr) {
|
|
208
|
-
ptr = ptr >>> 0;
|
|
209
205
|
const obj = Object.create(OotleSecretKey.prototype);
|
|
210
206
|
obj.__wbg_ptr = ptr;
|
|
211
207
|
OotleSecretKeyFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -248,7 +244,7 @@ export class OotleSecretKey {
|
|
|
248
244
|
set owner_key(arg0) {
|
|
249
245
|
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
250
246
|
const len0 = WASM_VECTOR_LEN;
|
|
251
|
-
wasm.
|
|
247
|
+
wasm.__wbg_set_ootlesecretkey_owner_key(this.__wbg_ptr, ptr0, len0);
|
|
252
248
|
}
|
|
253
249
|
/**
|
|
254
250
|
* The view-only secret key bytes.
|
|
@@ -257,7 +253,7 @@ export class OotleSecretKey {
|
|
|
257
253
|
set view_key(arg0) {
|
|
258
254
|
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
259
255
|
const len0 = WASM_VECTOR_LEN;
|
|
260
|
-
wasm.
|
|
256
|
+
wasm.__wbg_set_ootlesecretkey_view_key(this.__wbg_ptr, ptr0, len0);
|
|
261
257
|
}
|
|
262
258
|
}
|
|
263
259
|
if (Symbol.dispose) OotleSecretKey.prototype[Symbol.dispose] = OotleSecretKey.prototype.free;
|
|
@@ -267,7 +263,6 @@ if (Symbol.dispose) OotleSecretKey.prototype[Symbol.dispose] = OotleSecretKey.pr
|
|
|
267
263
|
*/
|
|
268
264
|
export class ParsedOotleAddress {
|
|
269
265
|
static __wrap(ptr) {
|
|
270
|
-
ptr = ptr >>> 0;
|
|
271
266
|
const obj = Object.create(ParsedOotleAddress.prototype);
|
|
272
267
|
obj.__wbg_ptr = ptr;
|
|
273
268
|
ParsedOotleAddressFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -347,7 +342,7 @@ export class ParsedOotleAddress {
|
|
|
347
342
|
set owner_key(arg0) {
|
|
348
343
|
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
349
344
|
const len0 = WASM_VECTOR_LEN;
|
|
350
|
-
wasm.
|
|
345
|
+
wasm.__wbg_set_parsedootleaddress_owner_key(this.__wbg_ptr, ptr0, len0);
|
|
351
346
|
}
|
|
352
347
|
/**
|
|
353
348
|
* The view-only public key bytes.
|
|
@@ -356,7 +351,7 @@ export class ParsedOotleAddress {
|
|
|
356
351
|
set view_key(arg0) {
|
|
357
352
|
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
358
353
|
const len0 = WASM_VECTOR_LEN;
|
|
359
|
-
wasm.
|
|
354
|
+
wasm.__wbg_set_parsedootleaddress_view_key(this.__wbg_ptr, ptr0, len0);
|
|
360
355
|
}
|
|
361
356
|
}
|
|
362
357
|
if (Symbol.dispose) ParsedOotleAddress.prototype[Symbol.dispose] = ParsedOotleAddress.prototype.free;
|
|
@@ -367,7 +362,6 @@ if (Symbol.dispose) ParsedOotleAddress.prototype[Symbol.dispose] = ParsedOotleAd
|
|
|
367
362
|
*/
|
|
368
363
|
export class SchnorrSignatureResult {
|
|
369
364
|
static __wrap(ptr) {
|
|
370
|
-
ptr = ptr >>> 0;
|
|
371
365
|
const obj = Object.create(SchnorrSignatureResult.prototype);
|
|
372
366
|
obj.__wbg_ptr = ptr;
|
|
373
367
|
SchnorrSignatureResultFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -407,7 +401,7 @@ export class SchnorrSignatureResult {
|
|
|
407
401
|
set public_nonce(arg0) {
|
|
408
402
|
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
409
403
|
const len0 = WASM_VECTOR_LEN;
|
|
410
|
-
wasm.
|
|
404
|
+
wasm.__wbg_set_schnorrsignatureresult_public_nonce(this.__wbg_ptr, ptr0, len0);
|
|
411
405
|
}
|
|
412
406
|
/**
|
|
413
407
|
* @param {Uint8Array} arg0
|
|
@@ -415,7 +409,7 @@ export class SchnorrSignatureResult {
|
|
|
415
409
|
set signature(arg0) {
|
|
416
410
|
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
417
411
|
const len0 = WASM_VECTOR_LEN;
|
|
418
|
-
wasm.
|
|
412
|
+
wasm.__wbg_set_schnorrsignatureresult_signature(this.__wbg_ptr, ptr0, len0);
|
|
419
413
|
}
|
|
420
414
|
}
|
|
421
415
|
if (Symbol.dispose) SchnorrSignatureResult.prototype[Symbol.dispose] = SchnorrSignatureResult.prototype.free;
|
|
@@ -425,7 +419,6 @@ if (Symbol.dispose) SchnorrSignatureResult.prototype[Symbol.dispose] = SchnorrSi
|
|
|
425
419
|
*/
|
|
426
420
|
export class StealthOutputsResult {
|
|
427
421
|
static __wrap(ptr) {
|
|
428
|
-
ptr = ptr >>> 0;
|
|
429
422
|
const obj = Object.create(StealthOutputsResult.prototype);
|
|
430
423
|
obj.__wbg_ptr = ptr;
|
|
431
424
|
StealthOutputsResultFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -476,7 +469,7 @@ export class StealthOutputsResult {
|
|
|
476
469
|
set aggregated_output_mask(arg0) {
|
|
477
470
|
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
478
471
|
const len0 = WASM_VECTOR_LEN;
|
|
479
|
-
wasm.
|
|
472
|
+
wasm.__wbg_set_stealthoutputsresult_aggregated_output_mask(this.__wbg_ptr, ptr0, len0);
|
|
480
473
|
}
|
|
481
474
|
/**
|
|
482
475
|
* JSON-serialized `StealthOutputsStatement` (the wire-format payload).
|
|
@@ -485,7 +478,7 @@ export class StealthOutputsResult {
|
|
|
485
478
|
set statement_json(arg0) {
|
|
486
479
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
487
480
|
const len0 = WASM_VECTOR_LEN;
|
|
488
|
-
wasm.
|
|
481
|
+
wasm.__wbg_set_stealthoutputsresult_statement_json(this.__wbg_ptr, ptr0, len0);
|
|
489
482
|
}
|
|
490
483
|
}
|
|
491
484
|
if (Symbol.dispose) StealthOutputsResult.prototype[Symbol.dispose] = StealthOutputsResult.prototype.free;
|
|
@@ -1321,14 +1314,14 @@ export function validateStealthTransfer(transfer_json, view_key) {
|
|
|
1321
1314
|
throw takeFromExternrefTable0(ret[0]);
|
|
1322
1315
|
}
|
|
1323
1316
|
}
|
|
1324
|
-
export function
|
|
1317
|
+
export function __wbg_Error_67e7344beaa85059(arg0, arg1) {
|
|
1325
1318
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
1326
1319
|
return ret;
|
|
1327
1320
|
}
|
|
1328
|
-
export function
|
|
1321
|
+
export function __wbg___wbindgen_throw_5d9e815e6fdf150f(arg0, arg1) {
|
|
1329
1322
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1330
1323
|
}
|
|
1331
|
-
export function
|
|
1324
|
+
export function __wbg_getRandomValues_47873ea553f6780e() { return handleError(function (arg0, arg1) {
|
|
1332
1325
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
1333
1326
|
}, arguments); }
|
|
1334
1327
|
export function __wbindgen_init_externref_table() {
|
|
@@ -1342,25 +1335,25 @@ export function __wbindgen_init_externref_table() {
|
|
|
1342
1335
|
}
|
|
1343
1336
|
const DecryptedOutputResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1344
1337
|
? { register: () => {}, unregister: () => {} }
|
|
1345
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_decryptedoutputresult_free(ptr
|
|
1338
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_decryptedoutputresult_free(ptr, 1));
|
|
1346
1339
|
const KeypairResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1347
1340
|
? { register: () => {}, unregister: () => {} }
|
|
1348
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_keypairresult_free(ptr
|
|
1341
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_keypairresult_free(ptr, 1));
|
|
1349
1342
|
const OotlePublicKeyFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1350
1343
|
? { register: () => {}, unregister: () => {} }
|
|
1351
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_ootlepublickey_free(ptr
|
|
1344
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_ootlepublickey_free(ptr, 1));
|
|
1352
1345
|
const OotleSecretKeyFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1353
1346
|
? { register: () => {}, unregister: () => {} }
|
|
1354
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_ootlesecretkey_free(ptr
|
|
1347
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_ootlesecretkey_free(ptr, 1));
|
|
1355
1348
|
const ParsedOotleAddressFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1356
1349
|
? { register: () => {}, unregister: () => {} }
|
|
1357
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_parsedootleaddress_free(ptr
|
|
1350
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_parsedootleaddress_free(ptr, 1));
|
|
1358
1351
|
const SchnorrSignatureResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1359
1352
|
? { register: () => {}, unregister: () => {} }
|
|
1360
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_schnorrsignatureresult_free(ptr
|
|
1353
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_schnorrsignatureresult_free(ptr, 1));
|
|
1361
1354
|
const StealthOutputsResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1362
1355
|
? { register: () => {}, unregister: () => {} }
|
|
1363
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_stealthoutputsresult_free(ptr
|
|
1356
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_stealthoutputsresult_free(ptr, 1));
|
|
1364
1357
|
|
|
1365
1358
|
function addToExternrefTable0(obj) {
|
|
1366
1359
|
const idx = wasm.__externref_table_alloc();
|
|
@@ -1374,8 +1367,7 @@ function getArrayU8FromWasm0(ptr, len) {
|
|
|
1374
1367
|
}
|
|
1375
1368
|
|
|
1376
1369
|
function getStringFromWasm0(ptr, len) {
|
|
1377
|
-
|
|
1378
|
-
return decodeText(ptr, len);
|
|
1370
|
+
return decodeText(ptr >>> 0, len);
|
|
1379
1371
|
}
|
|
1380
1372
|
|
|
1381
1373
|
let cachedUint8ArrayMemory0 = null;
|
|
Binary file
|
|
@@ -5,9 +5,19 @@ export const __wbg_decryptedoutputresult_free: (a: number, b: number) => void;
|
|
|
5
5
|
export const __wbg_get_decryptedoutputresult_mask: (a: number) => [number, number];
|
|
6
6
|
export const __wbg_get_decryptedoutputresult_memo_json: (a: number) => [number, number];
|
|
7
7
|
export const __wbg_get_decryptedoutputresult_value: (a: number) => bigint;
|
|
8
|
+
export const __wbg_get_keypairresult_public_key: (a: number) => [number, number];
|
|
8
9
|
export const __wbg_get_keypairresult_secret_key: (a: number) => [number, number];
|
|
10
|
+
export const __wbg_get_ootlepublickey_owner_key: (a: number) => [number, number];
|
|
11
|
+
export const __wbg_get_ootlepublickey_view_key: (a: number) => [number, number];
|
|
12
|
+
export const __wbg_get_ootlesecretkey_owner_key: (a: number) => [number, number];
|
|
13
|
+
export const __wbg_get_ootlesecretkey_view_key: (a: number) => [number, number];
|
|
9
14
|
export const __wbg_get_parsedootleaddress_memo: (a: number) => [number, number];
|
|
10
15
|
export const __wbg_get_parsedootleaddress_network: (a: number) => number;
|
|
16
|
+
export const __wbg_get_parsedootleaddress_owner_key: (a: number) => [number, number];
|
|
17
|
+
export const __wbg_get_parsedootleaddress_view_key: (a: number) => [number, number];
|
|
18
|
+
export const __wbg_get_schnorrsignatureresult_public_nonce: (a: number) => [number, number];
|
|
19
|
+
export const __wbg_get_schnorrsignatureresult_signature: (a: number) => [number, number];
|
|
20
|
+
export const __wbg_get_stealthoutputsresult_aggregated_output_mask: (a: number) => [number, number];
|
|
11
21
|
export const __wbg_get_stealthoutputsresult_statement_json: (a: number) => [number, number];
|
|
12
22
|
export const __wbg_keypairresult_free: (a: number, b: number) => void;
|
|
13
23
|
export const __wbg_ootlepublickey_free: (a: number, b: number) => void;
|
|
@@ -19,8 +29,18 @@ export const __wbg_set_decryptedoutputresult_memo_json: (a: number, b: number, c
|
|
|
19
29
|
export const __wbg_set_decryptedoutputresult_value: (a: number, b: bigint) => void;
|
|
20
30
|
export const __wbg_set_keypairresult_public_key: (a: number, b: number, c: number) => void;
|
|
21
31
|
export const __wbg_set_keypairresult_secret_key: (a: number, b: number, c: number) => void;
|
|
32
|
+
export const __wbg_set_ootlepublickey_owner_key: (a: number, b: number, c: number) => void;
|
|
33
|
+
export const __wbg_set_ootlepublickey_view_key: (a: number, b: number, c: number) => void;
|
|
34
|
+
export const __wbg_set_ootlesecretkey_owner_key: (a: number, b: number, c: number) => void;
|
|
35
|
+
export const __wbg_set_ootlesecretkey_view_key: (a: number, b: number, c: number) => void;
|
|
22
36
|
export const __wbg_set_parsedootleaddress_memo: (a: number, b: number, c: number) => void;
|
|
23
37
|
export const __wbg_set_parsedootleaddress_network: (a: number, b: number) => void;
|
|
38
|
+
export const __wbg_set_parsedootleaddress_owner_key: (a: number, b: number, c: number) => void;
|
|
39
|
+
export const __wbg_set_parsedootleaddress_view_key: (a: number, b: number, c: number) => void;
|
|
40
|
+
export const __wbg_set_schnorrsignatureresult_public_nonce: (a: number, b: number, c: number) => void;
|
|
41
|
+
export const __wbg_set_schnorrsignatureresult_signature: (a: number, b: number, c: number) => void;
|
|
42
|
+
export const __wbg_set_stealthoutputsresult_aggregated_output_mask: (a: number, b: number, c: number) => void;
|
|
43
|
+
export const __wbg_set_stealthoutputsresult_statement_json: (a: number, b: number, c: number) => void;
|
|
24
44
|
export const __wbg_stealthoutputsresult_free: (a: number, b: number) => void;
|
|
25
45
|
export const addTransactionSigner: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
|
|
26
46
|
export const aggregateInputMasks: (a: number, b: number) => [number, number, number, number];
|
|
@@ -51,26 +71,6 @@ export const stealthDhSecret: (a: number, b: number, c: number, d: number, e: nu
|
|
|
51
71
|
export const unblindOutput: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number];
|
|
52
72
|
export const validateBalanceProofSignature: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number, number];
|
|
53
73
|
export const validateStealthTransfer: (a: number, b: number, c: number, d: number) => [number, number];
|
|
54
|
-
export const __wbg_get_keypairresult_public_key: (a: number) => [number, number];
|
|
55
|
-
export const __wbg_get_ootlepublickey_owner_key: (a: number) => [number, number];
|
|
56
|
-
export const __wbg_get_ootlepublickey_view_key: (a: number) => [number, number];
|
|
57
|
-
export const __wbg_get_ootlesecretkey_owner_key: (a: number) => [number, number];
|
|
58
|
-
export const __wbg_get_ootlesecretkey_view_key: (a: number) => [number, number];
|
|
59
|
-
export const __wbg_get_parsedootleaddress_owner_key: (a: number) => [number, number];
|
|
60
|
-
export const __wbg_get_parsedootleaddress_view_key: (a: number) => [number, number];
|
|
61
|
-
export const __wbg_get_schnorrsignatureresult_public_nonce: (a: number) => [number, number];
|
|
62
|
-
export const __wbg_get_schnorrsignatureresult_signature: (a: number) => [number, number];
|
|
63
|
-
export const __wbg_get_stealthoutputsresult_aggregated_output_mask: (a: number) => [number, number];
|
|
64
|
-
export const __wbg_set_ootlepublickey_owner_key: (a: number, b: number, c: number) => void;
|
|
65
|
-
export const __wbg_set_ootlepublickey_view_key: (a: number, b: number, c: number) => void;
|
|
66
|
-
export const __wbg_set_ootlesecretkey_owner_key: (a: number, b: number, c: number) => void;
|
|
67
|
-
export const __wbg_set_ootlesecretkey_view_key: (a: number, b: number, c: number) => void;
|
|
68
|
-
export const __wbg_set_parsedootleaddress_owner_key: (a: number, b: number, c: number) => void;
|
|
69
|
-
export const __wbg_set_parsedootleaddress_view_key: (a: number, b: number, c: number) => void;
|
|
70
|
-
export const __wbg_set_schnorrsignatureresult_public_nonce: (a: number, b: number, c: number) => void;
|
|
71
|
-
export const __wbg_set_schnorrsignatureresult_signature: (a: number, b: number, c: number) => void;
|
|
72
|
-
export const __wbg_set_stealthoutputsresult_aggregated_output_mask: (a: number, b: number, c: number) => void;
|
|
73
|
-
export const __wbg_set_stealthoutputsresult_statement_json: (a: number, b: number, c: number) => void;
|
|
74
74
|
export const tari_free: (a: number) => void;
|
|
75
75
|
export const tari_alloc: (a: number) => number;
|
|
76
76
|
export const __wbindgen_exn_store: (a: number) => void;
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"collaborators": [
|
|
5
5
|
"The Tari Development Community"
|
|
6
6
|
],
|
|
7
|
-
"description": "WASM bindings for Tari Ootle client-side crypto — thin wasm-bindgen shell over ootle-wasm-core. LOCAL VENDOR PATCH: adds createConfidentialWithdrawProofLiteral, built from tari-dan crates/ootle_wasm at commit
|
|
8
|
-
"version": "0.
|
|
7
|
+
"description": "WASM bindings for Tari Ootle client-side crypto — thin wasm-bindgen shell over ootle-wasm-core. LOCAL VENDOR PATCH: adds createConfidentialWithdrawProofLiteral, built from tari-dan crates/ootle_wasm at commit ac73128 (v0.41.0, esmeralda V1 activation) plus the confidential.rs module added on top -- not yet in an upstream release.",
|
|
8
|
+
"version": "0.41.0",
|
|
9
9
|
"license": "BSD-3-Clause",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
"ootle_wasm.d.ts",
|
|
19
19
|
"README.md"
|
|
20
20
|
],
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
21
24
|
"main": "ootle_wasm.js",
|
|
22
25
|
"types": "ootle_wasm.d.ts",
|
|
23
26
|
"sideEffects": [
|