@dignetwork/chip35-dl-coin-wasm 0.1.0 → 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/chip35_dl_coin_wasm.d.ts
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
|
|
4
4
|
export function addFee(spender_synthetic_key: Uint8Array, selected_coins: any, assert_coin_ids: any, fee: bigint): any;
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Derive the digstore-scoped owner discovery hint for a 32-byte owner puzzle hash. The app
|
|
8
|
+
* computes the SAME hint to enumerate the wallet's stores via coinset
|
|
9
|
+
* get_coin_records_by_hint — it MUST match the hint mint_store emits. Returns 32 bytes.
|
|
10
|
+
*/
|
|
11
|
+
export function digstoreOwnerHint(owner_puzzle_hash: Uint8Array): Uint8Array;
|
|
12
|
+
|
|
6
13
|
export function hexSpendBundleToCoinSpends(hex: string): any;
|
|
7
14
|
|
|
8
15
|
/**
|
package/chip35_dl_coin_wasm.js
CHANGED
|
@@ -5,5 +5,5 @@ import { __wbg_set_wasm } from "./chip35_dl_coin_wasm_bg.js";
|
|
|
5
5
|
__wbg_set_wasm(wasm);
|
|
6
6
|
|
|
7
7
|
export {
|
|
8
|
-
addFee, hexSpendBundleToCoinSpends, init, meltStore, mintStore, oracleSpend, spendBundleToHex, updateStoreMetadata, updateStoreOwnership
|
|
8
|
+
addFee, digstoreOwnerHint, hexSpendBundleToCoinSpends, init, meltStore, mintStore, oracleSpend, spendBundleToHex, updateStoreMetadata, updateStoreOwnership
|
|
9
9
|
} from "./chip35_dl_coin_wasm_bg.js";
|
|
@@ -23,6 +23,34 @@ export function addFee(spender_synthetic_key, selected_coins, assert_coin_ids, f
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
/**
|
|
27
|
+
* Derive the digstore-scoped owner discovery hint for a 32-byte owner puzzle hash. The app
|
|
28
|
+
* computes the SAME hint to enumerate the wallet's stores via coinset
|
|
29
|
+
* get_coin_records_by_hint — it MUST match the hint mint_store emits. Returns 32 bytes.
|
|
30
|
+
* @param {Uint8Array} owner_puzzle_hash
|
|
31
|
+
* @returns {Uint8Array}
|
|
32
|
+
*/
|
|
33
|
+
export function digstoreOwnerHint(owner_puzzle_hash) {
|
|
34
|
+
try {
|
|
35
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
36
|
+
const ptr0 = passArray8ToWasm0(owner_puzzle_hash, wasm.__wbindgen_export);
|
|
37
|
+
const len0 = WASM_VECTOR_LEN;
|
|
38
|
+
wasm.digstoreOwnerHint(retptr, ptr0, len0);
|
|
39
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
40
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
41
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
42
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
43
|
+
if (r3) {
|
|
44
|
+
throw takeObject(r2);
|
|
45
|
+
}
|
|
46
|
+
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
47
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
48
|
+
return v2;
|
|
49
|
+
} finally {
|
|
50
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
26
54
|
/**
|
|
27
55
|
* @param {string} hex
|
|
28
56
|
* @returns {any}
|
|
Binary file
|
package/package.json
CHANGED