@bitgo/wasm-utxo 1.18.0 → 1.20.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/dist/cjs/js/fixedScriptWallet/BitGoPsbt.d.ts +45 -4
- package/dist/cjs/js/fixedScriptWallet/BitGoPsbt.js +52 -43
- package/dist/cjs/js/fixedScriptWallet/Dimensions.d.ts +65 -0
- package/dist/cjs/js/fixedScriptWallet/Dimensions.js +83 -0
- package/dist/cjs/js/fixedScriptWallet/index.d.ts +1 -0
- package/dist/cjs/js/fixedScriptWallet/index.js +3 -1
- package/dist/cjs/js/index.d.ts +1 -0
- package/dist/cjs/js/index.js +3 -1
- package/dist/cjs/js/transaction.d.ts +8 -0
- package/dist/cjs/js/transaction.js +10 -0
- package/dist/cjs/js/wasm/wasm_utxo.d.ts +82 -0
- package/dist/cjs/js/wasm/wasm_utxo.js +223 -0
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm.d.ts +38 -26
- package/dist/esm/js/fixedScriptWallet/BitGoPsbt.d.ts +45 -4
- package/dist/esm/js/fixedScriptWallet/BitGoPsbt.js +52 -43
- package/dist/esm/js/fixedScriptWallet/Dimensions.d.ts +65 -0
- package/dist/esm/js/fixedScriptWallet/Dimensions.js +79 -0
- package/dist/esm/js/fixedScriptWallet/index.d.ts +1 -0
- package/dist/esm/js/fixedScriptWallet/index.js +1 -0
- package/dist/esm/js/index.d.ts +1 -0
- package/dist/esm/js/index.js +1 -0
- package/dist/esm/js/transaction.d.ts +8 -0
- package/dist/esm/js/transaction.js +10 -0
- package/dist/esm/js/wasm/wasm_utxo.d.ts +82 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.js +222 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm.d.ts +38 -26
- package/package.json +1 -1
|
@@ -190,6 +190,10 @@ const WasmDashTransactionFinalization = (typeof FinalizationRegistry === 'undefi
|
|
|
190
190
|
? { register: () => {}, unregister: () => {} }
|
|
191
191
|
: new FinalizationRegistry(ptr => wasm.__wbg_wasmdashtransaction_free(ptr >>> 0, 1));
|
|
192
192
|
|
|
193
|
+
const WasmDimensionsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
194
|
+
? { register: () => {}, unregister: () => {} }
|
|
195
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmdimensions_free(ptr >>> 0, 1));
|
|
196
|
+
|
|
193
197
|
const WasmECPairFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
194
198
|
? { register: () => {}, unregister: () => {} }
|
|
195
199
|
: new FinalizationRegistry(ptr => wasm.__wbg_wasmecpair_free(ptr >>> 0, 1));
|
|
@@ -804,6 +808,36 @@ export class BitGoPsbt {
|
|
|
804
808
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
805
809
|
}
|
|
806
810
|
}
|
|
811
|
+
/**
|
|
812
|
+
* Add an output to the PSBT by address
|
|
813
|
+
*
|
|
814
|
+
* # Arguments
|
|
815
|
+
* * `address` - The destination address
|
|
816
|
+
* * `value` - The value in satoshis
|
|
817
|
+
*
|
|
818
|
+
* # Returns
|
|
819
|
+
* The index of the newly added output
|
|
820
|
+
* @param {string} address
|
|
821
|
+
* @param {bigint} value
|
|
822
|
+
* @returns {number}
|
|
823
|
+
*/
|
|
824
|
+
add_output_with_address(address, value) {
|
|
825
|
+
try {
|
|
826
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
827
|
+
const ptr0 = passStringToWasm0(address, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
828
|
+
const len0 = WASM_VECTOR_LEN;
|
|
829
|
+
wasm.bitgopsbt_add_output_with_address(retptr, this.__wbg_ptr, ptr0, len0, value);
|
|
830
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
831
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
832
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
833
|
+
if (r2) {
|
|
834
|
+
throw takeObject(r1);
|
|
835
|
+
}
|
|
836
|
+
return r0 >>> 0;
|
|
837
|
+
} finally {
|
|
838
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
839
|
+
}
|
|
840
|
+
}
|
|
807
841
|
/**
|
|
808
842
|
* Verify if a valid signature exists for a given ECPair key at the specified input index
|
|
809
843
|
*
|
|
@@ -1738,6 +1772,180 @@ export class WasmDashTransaction {
|
|
|
1738
1772
|
}
|
|
1739
1773
|
if (Symbol.dispose) WasmDashTransaction.prototype[Symbol.dispose] = WasmDashTransaction.prototype.free;
|
|
1740
1774
|
|
|
1775
|
+
/**
|
|
1776
|
+
* Dimensions for estimating transaction virtual size.
|
|
1777
|
+
*
|
|
1778
|
+
* Tracks weight internally with min/max bounds to handle ECDSA signature variance.
|
|
1779
|
+
* Schnorr signatures have no variance (always 64 bytes).
|
|
1780
|
+
*/
|
|
1781
|
+
export class WasmDimensions {
|
|
1782
|
+
static __wrap(ptr) {
|
|
1783
|
+
ptr = ptr >>> 0;
|
|
1784
|
+
const obj = Object.create(WasmDimensions.prototype);
|
|
1785
|
+
obj.__wbg_ptr = ptr;
|
|
1786
|
+
WasmDimensionsFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1787
|
+
return obj;
|
|
1788
|
+
}
|
|
1789
|
+
__destroy_into_raw() {
|
|
1790
|
+
const ptr = this.__wbg_ptr;
|
|
1791
|
+
this.__wbg_ptr = 0;
|
|
1792
|
+
WasmDimensionsFinalization.unregister(this);
|
|
1793
|
+
return ptr;
|
|
1794
|
+
}
|
|
1795
|
+
free() {
|
|
1796
|
+
const ptr = this.__destroy_into_raw();
|
|
1797
|
+
wasm.__wbg_wasmdimensions_free(ptr, 0);
|
|
1798
|
+
}
|
|
1799
|
+
/**
|
|
1800
|
+
* Create dimensions for a single input from chain code
|
|
1801
|
+
*
|
|
1802
|
+
* # Arguments
|
|
1803
|
+
* * `chain` - Chain code (0/1=p2sh, 10/11=p2shP2wsh, 20/21=p2wsh, 30/31=p2tr, 40/41=p2trMusig2)
|
|
1804
|
+
* * `signer` - Optional signer key ("user", "backup", "bitgo")
|
|
1805
|
+
* * `cosigner` - Optional cosigner key ("user", "backup", "bitgo")
|
|
1806
|
+
* @param {number} chain
|
|
1807
|
+
* @param {string | null} [signer]
|
|
1808
|
+
* @param {string | null} [cosigner]
|
|
1809
|
+
* @returns {WasmDimensions}
|
|
1810
|
+
*/
|
|
1811
|
+
static from_input(chain, signer, cosigner) {
|
|
1812
|
+
try {
|
|
1813
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1814
|
+
var ptr0 = isLikeNone(signer) ? 0 : passStringToWasm0(signer, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1815
|
+
var len0 = WASM_VECTOR_LEN;
|
|
1816
|
+
var ptr1 = isLikeNone(cosigner) ? 0 : passStringToWasm0(cosigner, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1817
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1818
|
+
wasm.wasmdimensions_from_input(retptr, chain, ptr0, len0, ptr1, len1);
|
|
1819
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1820
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1821
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1822
|
+
if (r2) {
|
|
1823
|
+
throw takeObject(r1);
|
|
1824
|
+
}
|
|
1825
|
+
return WasmDimensions.__wrap(r0);
|
|
1826
|
+
} finally {
|
|
1827
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1828
|
+
}
|
|
1829
|
+
}
|
|
1830
|
+
/**
|
|
1831
|
+
* Get total weight (min or max)
|
|
1832
|
+
*
|
|
1833
|
+
* # Arguments
|
|
1834
|
+
* * `size` - "min" or "max", defaults to "max"
|
|
1835
|
+
* @param {string | null} [size]
|
|
1836
|
+
* @returns {number}
|
|
1837
|
+
*/
|
|
1838
|
+
get_weight(size) {
|
|
1839
|
+
var ptr0 = isLikeNone(size) ? 0 : passStringToWasm0(size, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1840
|
+
var len0 = WASM_VECTOR_LEN;
|
|
1841
|
+
const ret = wasm.wasmdimensions_get_weight(this.__wbg_ptr, ptr0, len0);
|
|
1842
|
+
return ret >>> 0;
|
|
1843
|
+
}
|
|
1844
|
+
/**
|
|
1845
|
+
* Whether any inputs are segwit (affects overhead calculation)
|
|
1846
|
+
* @returns {boolean}
|
|
1847
|
+
*/
|
|
1848
|
+
has_segwit() {
|
|
1849
|
+
const ret = wasm.wasmdimensions_has_segwit(this.__wbg_ptr);
|
|
1850
|
+
return ret !== 0;
|
|
1851
|
+
}
|
|
1852
|
+
/**
|
|
1853
|
+
* Create dimensions for a single output from script bytes
|
|
1854
|
+
* @param {Uint8Array} script
|
|
1855
|
+
* @returns {WasmDimensions}
|
|
1856
|
+
*/
|
|
1857
|
+
static from_output_script(script) {
|
|
1858
|
+
const ptr0 = passArray8ToWasm0(script, wasm.__wbindgen_export);
|
|
1859
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1860
|
+
const ret = wasm.wasmdimensions_from_output_script(ptr0, len0);
|
|
1861
|
+
return WasmDimensions.__wrap(ret);
|
|
1862
|
+
}
|
|
1863
|
+
/**
|
|
1864
|
+
* Create dimensions for a single input from script type string
|
|
1865
|
+
*
|
|
1866
|
+
* # Arguments
|
|
1867
|
+
* * `script_type` - One of: "p2sh", "p2shP2wsh", "p2wsh", "p2trLegacy",
|
|
1868
|
+
* "p2trMusig2KeyPath", "p2trMusig2ScriptPath", "p2shP2pk"
|
|
1869
|
+
* @param {string} script_type
|
|
1870
|
+
* @returns {WasmDimensions}
|
|
1871
|
+
*/
|
|
1872
|
+
static from_input_script_type(script_type) {
|
|
1873
|
+
try {
|
|
1874
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1875
|
+
const ptr0 = passStringToWasm0(script_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1876
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1877
|
+
wasm.wasmdimensions_from_input_script_type(retptr, ptr0, len0);
|
|
1878
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1879
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1880
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1881
|
+
if (r2) {
|
|
1882
|
+
throw takeObject(r1);
|
|
1883
|
+
}
|
|
1884
|
+
return WasmDimensions.__wrap(r0);
|
|
1885
|
+
} finally {
|
|
1886
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1887
|
+
}
|
|
1888
|
+
}
|
|
1889
|
+
/**
|
|
1890
|
+
* Combine with another Dimensions instance
|
|
1891
|
+
* @param {WasmDimensions} other
|
|
1892
|
+
* @returns {WasmDimensions}
|
|
1893
|
+
*/
|
|
1894
|
+
plus(other) {
|
|
1895
|
+
_assertClass(other, WasmDimensions);
|
|
1896
|
+
const ret = wasm.wasmdimensions_plus(this.__wbg_ptr, other.__wbg_ptr);
|
|
1897
|
+
return WasmDimensions.__wrap(ret);
|
|
1898
|
+
}
|
|
1899
|
+
/**
|
|
1900
|
+
* Create empty dimensions (zero weight)
|
|
1901
|
+
* @returns {WasmDimensions}
|
|
1902
|
+
*/
|
|
1903
|
+
static empty() {
|
|
1904
|
+
const ret = wasm.wasmdimensions_empty();
|
|
1905
|
+
return WasmDimensions.__wrap(ret);
|
|
1906
|
+
}
|
|
1907
|
+
/**
|
|
1908
|
+
* Create dimensions from a BitGoPsbt
|
|
1909
|
+
*
|
|
1910
|
+
* Parses PSBT inputs and outputs to compute weight bounds without
|
|
1911
|
+
* requiring wallet keys. Input types are detected from BIP32 derivation
|
|
1912
|
+
* paths stored in the PSBT.
|
|
1913
|
+
* @param {BitGoPsbt} psbt
|
|
1914
|
+
* @returns {WasmDimensions}
|
|
1915
|
+
*/
|
|
1916
|
+
static from_psbt(psbt) {
|
|
1917
|
+
try {
|
|
1918
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1919
|
+
_assertClass(psbt, BitGoPsbt);
|
|
1920
|
+
wasm.wasmdimensions_from_psbt(retptr, psbt.__wbg_ptr);
|
|
1921
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1922
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1923
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1924
|
+
if (r2) {
|
|
1925
|
+
throw takeObject(r1);
|
|
1926
|
+
}
|
|
1927
|
+
return WasmDimensions.__wrap(r0);
|
|
1928
|
+
} finally {
|
|
1929
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1930
|
+
}
|
|
1931
|
+
}
|
|
1932
|
+
/**
|
|
1933
|
+
* Get virtual size (min or max)
|
|
1934
|
+
*
|
|
1935
|
+
* # Arguments
|
|
1936
|
+
* * `size` - "min" or "max", defaults to "max"
|
|
1937
|
+
* @param {string | null} [size]
|
|
1938
|
+
* @returns {number}
|
|
1939
|
+
*/
|
|
1940
|
+
get_vsize(size) {
|
|
1941
|
+
var ptr0 = isLikeNone(size) ? 0 : passStringToWasm0(size, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1942
|
+
var len0 = WASM_VECTOR_LEN;
|
|
1943
|
+
const ret = wasm.wasmdimensions_get_vsize(this.__wbg_ptr, ptr0, len0);
|
|
1944
|
+
return ret >>> 0;
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1947
|
+
if (Symbol.dispose) WasmDimensions.prototype[Symbol.dispose] = WasmDimensions.prototype.free;
|
|
1948
|
+
|
|
1741
1949
|
/**
|
|
1742
1950
|
* WASM wrapper for elliptic curve key pairs (always uses compressed keys)
|
|
1743
1951
|
*/
|
|
@@ -2258,6 +2466,20 @@ export class WasmTransaction {
|
|
|
2258
2466
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2259
2467
|
}
|
|
2260
2468
|
}
|
|
2469
|
+
/**
|
|
2470
|
+
* Get the virtual size of the transaction
|
|
2471
|
+
*
|
|
2472
|
+
* Virtual size is calculated as ceil(weight / 4), where weight accounts
|
|
2473
|
+
* for the segwit discount on witness data.
|
|
2474
|
+
*
|
|
2475
|
+
* # Returns
|
|
2476
|
+
* The virtual size in virtual bytes (vbytes)
|
|
2477
|
+
* @returns {number}
|
|
2478
|
+
*/
|
|
2479
|
+
get_vsize() {
|
|
2480
|
+
const ret = wasm.wasmtransaction_get_vsize(this.__wbg_ptr);
|
|
2481
|
+
return ret >>> 0;
|
|
2482
|
+
}
|
|
2261
2483
|
}
|
|
2262
2484
|
if (Symbol.dispose) WasmTransaction.prototype[Symbol.dispose] = WasmTransaction.prototype.free;
|
|
2263
2485
|
|
|
Binary file
|
|
@@ -1,7 +1,26 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
+
export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
|
|
5
|
+
export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
|
|
6
|
+
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
7
|
+
export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
|
|
8
|
+
export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
|
|
4
9
|
export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
|
|
10
|
+
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
11
|
+
export const __wbg_wrappsbt_free: (a: number, b: number) => void;
|
|
12
|
+
export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
13
|
+
export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
14
|
+
export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
15
|
+
export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
|
|
16
|
+
export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
17
|
+
export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
|
|
18
|
+
export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
|
|
19
|
+
export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
20
|
+
export const wasmtransaction_get_vsize: (a: number) => number;
|
|
21
|
+
export const wasmtransaction_to_bytes: (a: number, b: number) => void;
|
|
22
|
+
export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
23
|
+
export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
|
|
5
24
|
export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
|
|
6
25
|
export const wrapdescriptor_descType: (a: number, b: number) => void;
|
|
7
26
|
export const wrapdescriptor_encode: (a: number, b: number) => void;
|
|
@@ -13,33 +32,32 @@ export const wrapdescriptor_node: (a: number, b: number) => void;
|
|
|
13
32
|
export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
|
|
14
33
|
export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
|
|
15
34
|
export const wrapdescriptor_toString: (a: number, b: number) => void;
|
|
16
|
-
export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
|
|
17
|
-
export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
|
|
18
|
-
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
19
|
-
export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
20
|
-
export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
21
|
-
export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
22
|
-
export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
|
|
23
35
|
export const wrapminiscript_encode: (a: number, b: number) => void;
|
|
24
36
|
export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
25
37
|
export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
26
38
|
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
27
39
|
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
28
40
|
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
41
|
+
export const wrappsbt_clone: (a: number) => number;
|
|
42
|
+
export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
|
|
43
|
+
export const wrappsbt_finalize: (a: number, b: number) => void;
|
|
44
|
+
export const wrappsbt_serialize: (a: number, b: number) => void;
|
|
45
|
+
export const wrappsbt_signWithPrv: (a: number, b: number, c: number, d: number) => void;
|
|
46
|
+
export const wrappsbt_signWithXprv: (a: number, b: number, c: number, d: number) => void;
|
|
47
|
+
export const wrappsbt_updateInputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
|
|
48
|
+
export const wrappsbt_updateOutputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
|
|
29
49
|
export const __wbg_addressnamespace_free: (a: number, b: number) => void;
|
|
30
50
|
export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
|
|
31
51
|
export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
|
|
32
52
|
export const __wbg_wasmbip32_free: (a: number, b: number) => void;
|
|
53
|
+
export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
|
|
33
54
|
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
34
|
-
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
35
55
|
export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
|
|
36
|
-
export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
|
|
37
|
-
export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
|
|
38
|
-
export const __wbg_wrappsbt_free: (a: number, b: number) => void;
|
|
39
56
|
export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
40
57
|
export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
41
58
|
export const bitgopsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number, j: number, k: number) => void;
|
|
42
59
|
export const bitgopsbt_add_output: (a: number, b: number, c: number, d: number, e: bigint) => void;
|
|
60
|
+
export const bitgopsbt_add_output_with_address: (a: number, b: number, c: number, d: number, e: bigint) => void;
|
|
43
61
|
export const bitgopsbt_add_paygo_attestation: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
44
62
|
export const bitgopsbt_add_replay_protection_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number) => void;
|
|
45
63
|
export const bitgopsbt_add_wallet_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number) => void;
|
|
@@ -88,6 +106,15 @@ export const wasmbip32_private_key: (a: number) => number;
|
|
|
88
106
|
export const wasmbip32_public_key: (a: number) => number;
|
|
89
107
|
export const wasmbip32_to_base58: (a: number, b: number) => void;
|
|
90
108
|
export const wasmbip32_to_wif: (a: number, b: number) => void;
|
|
109
|
+
export const wasmdimensions_empty: () => number;
|
|
110
|
+
export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
111
|
+
export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number) => void;
|
|
112
|
+
export const wasmdimensions_from_output_script: (a: number, b: number) => number;
|
|
113
|
+
export const wasmdimensions_from_psbt: (a: number, b: number) => void;
|
|
114
|
+
export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
|
|
115
|
+
export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
|
|
116
|
+
export const wasmdimensions_has_segwit: (a: number) => number;
|
|
117
|
+
export const wasmdimensions_plus: (a: number, b: number) => number;
|
|
91
118
|
export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
|
|
92
119
|
export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
|
|
93
120
|
export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
|
|
@@ -98,26 +125,11 @@ export const wasmecpair_public_key: (a: number) => number;
|
|
|
98
125
|
export const wasmecpair_to_wif: (a: number, b: number) => void;
|
|
99
126
|
export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
|
|
100
127
|
export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
|
|
101
|
-
export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
102
|
-
export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
|
|
103
|
-
export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
|
|
104
128
|
export const wasmrootwalletkeys_backup_key: (a: number) => number;
|
|
105
129
|
export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
|
|
106
130
|
export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
|
|
107
131
|
export const wasmrootwalletkeys_user_key: (a: number) => number;
|
|
108
132
|
export const wasmrootwalletkeys_with_derivation_prefixes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
|
|
109
|
-
export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
110
|
-
export const wasmtransaction_to_bytes: (a: number, b: number) => void;
|
|
111
|
-
export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
112
|
-
export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
|
|
113
|
-
export const wrappsbt_clone: (a: number) => number;
|
|
114
|
-
export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
|
|
115
|
-
export const wrappsbt_finalize: (a: number, b: number) => void;
|
|
116
|
-
export const wrappsbt_serialize: (a: number, b: number) => void;
|
|
117
|
-
export const wrappsbt_signWithPrv: (a: number, b: number, c: number, d: number) => void;
|
|
118
|
-
export const wrappsbt_signWithXprv: (a: number, b: number, c: number, d: number) => void;
|
|
119
|
-
export const wrappsbt_updateInputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
|
|
120
|
-
export const wrappsbt_updateOutputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
|
|
121
133
|
export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
|
|
122
134
|
export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
|
|
123
135
|
export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
|