@bitgo/wasm-utxo 5.1.0 → 5.3.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 +1 -0
- package/dist/cjs/js/fixedScriptWallet/ZcashBitGoPsbt.d.ts +12 -0
- package/dist/cjs/js/fixedScriptWallet/ZcashBitGoPsbt.js +13 -0
- package/dist/cjs/js/fixedScriptWallet/ZcashIronwoodBitGoPsbt.d.ts +28 -0
- package/dist/cjs/js/fixedScriptWallet/ZcashIronwoodBitGoPsbt.js +37 -0
- package/dist/cjs/js/fixedScriptWallet/ZcashPsbt.d.ts +15 -0
- package/dist/cjs/js/fixedScriptWallet/ZcashPsbt.js +24 -0
- package/dist/cjs/js/fixedScriptWallet/index.d.ts +2 -1
- package/dist/cjs/js/fixedScriptWallet/index.js +3 -1
- package/dist/cjs/js/index.d.ts +1 -0
- package/dist/cjs/js/index.js +8 -1
- package/dist/cjs/js/wasm/wasm_utxo.d.ts +16 -0
- package/dist/cjs/js/wasm/wasm_utxo.js +52 -0
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm.d.ts +59 -57
- package/dist/esm/js/fixedScriptWallet/ZcashBitGoPsbt.d.ts +12 -0
- package/dist/esm/js/fixedScriptWallet/ZcashBitGoPsbt.js +13 -0
- package/dist/esm/js/fixedScriptWallet/ZcashIronwoodBitGoPsbt.d.ts +28 -0
- package/dist/esm/js/fixedScriptWallet/ZcashIronwoodBitGoPsbt.js +37 -0
- package/dist/esm/js/fixedScriptWallet/ZcashPsbt.d.ts +15 -0
- package/dist/esm/js/fixedScriptWallet/ZcashPsbt.js +20 -0
- package/dist/esm/js/fixedScriptWallet/index.d.ts +2 -1
- 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/wasm/wasm_utxo.d.ts +16 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.js +52 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm.d.ts +59 -57
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,6 +7,7 @@ that help verify and co-sign transactions built by the BitGo Wallet Platform API
|
|
|
7
7
|
|
|
8
8
|
## Documentation
|
|
9
9
|
|
|
10
|
+
- **[`../../CONVENTIONS.md`](../../CONVENTIONS.md)** - Repository-wide API and structured-error conventions
|
|
10
11
|
- **[`src/wasm-bindgen.md`](src/wasm-bindgen.md)** - Guide for creating WASM bindings using the namespace pattern
|
|
11
12
|
- **[`js/README.md`](js/README.md)** - TypeScript wrapper layer architecture and best practices
|
|
12
13
|
- **[`cli/README.md`](cli/README.md)** - Command-line interface for address and PSBT operations
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BitGoPsbt as WasmBitGoPsbt } from "../wasm/wasm_utxo.js";
|
|
1
2
|
import { type WalletKeysArg } from "./RootWalletKeys.js";
|
|
2
3
|
import { BitGoPsbt, type CreateEmptyOptions, type HydrationUnspent, type ParsedOutput } from "./BitGoPsbt.js";
|
|
3
4
|
import { ZcashTransaction, type ITransaction } from "../transaction.js";
|
|
@@ -15,6 +16,8 @@ export type ZcashParsedOutput = ParsedOutput & {
|
|
|
15
16
|
*/
|
|
16
17
|
isShielded: boolean;
|
|
17
18
|
};
|
|
19
|
+
/** Zcash transaction versions supported by the fixed-script PSBT API. */
|
|
20
|
+
export type ZcashTransactionVersion = 4 | 6;
|
|
18
21
|
/**
|
|
19
22
|
* Zcash v6 (Ironwood) version group id (0xd884b698). Its presence marks a PSBT as v6 — see
|
|
20
23
|
* `ZcashIronwoodBitGoPsbt`.
|
|
@@ -124,6 +127,8 @@ export declare class ZcashBitGoPsbt extends BitGoPsbt<ZcashParsedOutput> {
|
|
|
124
127
|
* @returns A ZcashBitGoPsbt instance
|
|
125
128
|
*/
|
|
126
129
|
static fromBytes(bytes: Uint8Array, network: ZcashNetworkName): ZcashBitGoPsbt;
|
|
130
|
+
/** @internal Create from a parsed WASM instance without reparsing the bytes. */
|
|
131
|
+
static fromWasm(wasm: WasmBitGoPsbt): ZcashBitGoPsbt;
|
|
127
132
|
/**
|
|
128
133
|
* Reconstruct a Zcash PSBT from a network-format transaction (unsigned, half-signed, or fully-signed).
|
|
129
134
|
*
|
|
@@ -173,6 +178,13 @@ export declare class ZcashBitGoPsbt extends BitGoPsbt<ZcashParsedOutput> {
|
|
|
173
178
|
* @returns The version group ID (e.g., 0x892F2085 for Sapling)
|
|
174
179
|
*/
|
|
175
180
|
get versionGroupId(): number;
|
|
181
|
+
/**
|
|
182
|
+
* Get the Zcash transaction version represented by this PSBT.
|
|
183
|
+
*
|
|
184
|
+
* The version group ID is the discriminator because the v4 and v6 PSBT encodings do not expose
|
|
185
|
+
* the same unsigned transaction bytes to a standard PSBT parser.
|
|
186
|
+
*/
|
|
187
|
+
getVersion(): ZcashTransactionVersion;
|
|
176
188
|
/**
|
|
177
189
|
* Get the Zcash expiry height
|
|
178
190
|
* @returns The expiry height (0 if not set)
|
|
@@ -111,6 +111,10 @@ class ZcashBitGoPsbt extends BitGoPsbt_js_1.BitGoPsbt {
|
|
|
111
111
|
}
|
|
112
112
|
return psbt;
|
|
113
113
|
}
|
|
114
|
+
/** @internal Create from a parsed WASM instance without reparsing the bytes. */
|
|
115
|
+
static fromWasm(wasm) {
|
|
116
|
+
return new ZcashBitGoPsbt(wasm);
|
|
117
|
+
}
|
|
114
118
|
/**
|
|
115
119
|
* Reconstruct a Zcash PSBT from a network-format transaction (unsigned, half-signed, or fully-signed).
|
|
116
120
|
*
|
|
@@ -181,6 +185,15 @@ class ZcashBitGoPsbt extends BitGoPsbt_js_1.BitGoPsbt {
|
|
|
181
185
|
get versionGroupId() {
|
|
182
186
|
return this.wasm.version_group_id();
|
|
183
187
|
}
|
|
188
|
+
/**
|
|
189
|
+
* Get the Zcash transaction version represented by this PSBT.
|
|
190
|
+
*
|
|
191
|
+
* The version group ID is the discriminator because the v4 and v6 PSBT encodings do not expose
|
|
192
|
+
* the same unsigned transaction bytes to a standard PSBT parser.
|
|
193
|
+
*/
|
|
194
|
+
getVersion() {
|
|
195
|
+
return this.versionGroupId === exports.IRONWOOD_VERSION_GROUP_ID ? 6 : 4;
|
|
196
|
+
}
|
|
184
197
|
/**
|
|
185
198
|
* Get the Zcash expiry height
|
|
186
199
|
* @returns The expiry height (0 if not set)
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BitGoPsbt as WasmBitGoPsbt } from "../wasm/wasm_utxo.js";
|
|
1
2
|
import { type BIP32Arg } from "../bip32.js";
|
|
2
3
|
import { type ECPairArg } from "../ecpair.js";
|
|
3
4
|
import { type WalletKeysArg } from "./RootWalletKeys.js";
|
|
@@ -122,6 +123,8 @@ export declare class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
|
|
|
122
123
|
* @returns A ZcashIronwoodBitGoPsbt instance
|
|
123
124
|
*/
|
|
124
125
|
static fromBytes(bytes: Uint8Array, network: ZcashNetworkName): ZcashIronwoodBitGoPsbt;
|
|
126
|
+
/** @internal Create from a parsed WASM instance without reparsing the bytes. */
|
|
127
|
+
static fromWasm(wasm: WasmBitGoPsbt): ZcashIronwoodBitGoPsbt;
|
|
125
128
|
/**
|
|
126
129
|
* Add the shielded output (Constructor role). Stores the orchard PCZT in the PSBT.
|
|
127
130
|
*
|
|
@@ -246,6 +249,31 @@ export declare class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
|
|
|
246
249
|
* {@link sign} (all matching inputs) instead.
|
|
247
250
|
*/
|
|
248
251
|
sign(inputIndex: number, key: BIP32Arg | ECPairArg): void;
|
|
252
|
+
/**
|
|
253
|
+
* Check whether transparent input `inputIndex` carries a valid signature by `key`, over the
|
|
254
|
+
* ZIP-244 transparent sighash — the digest v6 (Ironwood) keys actually sign (see
|
|
255
|
+
* {@link transparentSighash}). The inherited `BitGoPsbt.verifySignature` digests ZIP-243
|
|
256
|
+
* (Sapling) instead, so it would report `false` for a valid v6 signature; this override routes
|
|
257
|
+
* to the v6 sighash path instead.
|
|
258
|
+
*
|
|
259
|
+
* Mirrors the inherited signature: an xpub (BIP32Arg) resolves to a public key via the input's
|
|
260
|
+
* `bip32_derivation`; a raw key (ECPairArg) verifies with its public key directly.
|
|
261
|
+
*
|
|
262
|
+
* @param inputIndex - 0-based transparent input index
|
|
263
|
+
* @param key - the signing key: an xpub (BIP32Arg: base58 string, BIP32 instance, or WasmBIP32)
|
|
264
|
+
* or an ECPairArg (Uint8Array, ECPair instance, or WasmECPair)
|
|
265
|
+
* @returns true if a valid signature by the key's public key exists for the input's
|
|
266
|
+
* ZIP-244 transparent sighash
|
|
267
|
+
* @throws Error if the input index is out of range, the key cannot be parsed, or the v6
|
|
268
|
+
* sighash cannot be computed (e.g. the Ironwood PCZT has not been added yet)
|
|
269
|
+
*
|
|
270
|
+
* @example
|
|
271
|
+
* ```typescript
|
|
272
|
+
* // Verify the user's signature over the v6 transparent sighash
|
|
273
|
+
* const hasUserSig = psbt.verifySignature(0, userXpub);
|
|
274
|
+
* ```
|
|
275
|
+
*/
|
|
276
|
+
verifySignature(inputIndex: number, key: BIP32Arg | ECPairArg): boolean;
|
|
249
277
|
/**
|
|
250
278
|
* Transaction Extractor role: given the external prover's `proof` bytes, finalize the
|
|
251
279
|
* transparent inputs, apply the shielded binding signature, and return the broadcast-ready v6
|
|
@@ -4,6 +4,7 @@ exports.ZcashIronwoodBitGoPsbt = void 0;
|
|
|
4
4
|
exports.zip302NoMemo = zip302NoMemo;
|
|
5
5
|
const wasm_utxo_js_1 = require("../wasm/wasm_utxo.js");
|
|
6
6
|
const bip32_js_1 = require("../bip32.js");
|
|
7
|
+
const ecpair_js_1 = require("../ecpair.js");
|
|
7
8
|
const RootWalletKeys_js_1 = require("./RootWalletKeys.js");
|
|
8
9
|
const ZcashBitGoPsbt_js_1 = require("./ZcashBitGoPsbt.js");
|
|
9
10
|
/**
|
|
@@ -121,6 +122,10 @@ class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt_js_1.ZcashBitGoPsbt {
|
|
|
121
122
|
}
|
|
122
123
|
return psbt;
|
|
123
124
|
}
|
|
125
|
+
/** @internal Create from a parsed WASM instance without reparsing the bytes. */
|
|
126
|
+
static fromWasm(wasm) {
|
|
127
|
+
return new ZcashIronwoodBitGoPsbt(wasm);
|
|
128
|
+
}
|
|
124
129
|
/**
|
|
125
130
|
* Add the shielded output (Constructor role). Stores the orchard PCZT in the PSBT.
|
|
126
131
|
*
|
|
@@ -238,6 +243,38 @@ class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt_js_1.ZcashBitGoPsbt {
|
|
|
238
243
|
const keys = RootWalletKeys_js_1.RootWalletKeys.from(keyOrRootWalletKeys);
|
|
239
244
|
return Array.from(this.wasm.sign_ironwood_v6(wasmKey, keys.wasm), Number);
|
|
240
245
|
}
|
|
246
|
+
/**
|
|
247
|
+
* Check whether transparent input `inputIndex` carries a valid signature by `key`, over the
|
|
248
|
+
* ZIP-244 transparent sighash — the digest v6 (Ironwood) keys actually sign (see
|
|
249
|
+
* {@link transparentSighash}). The inherited `BitGoPsbt.verifySignature` digests ZIP-243
|
|
250
|
+
* (Sapling) instead, so it would report `false` for a valid v6 signature; this override routes
|
|
251
|
+
* to the v6 sighash path instead.
|
|
252
|
+
*
|
|
253
|
+
* Mirrors the inherited signature: an xpub (BIP32Arg) resolves to a public key via the input's
|
|
254
|
+
* `bip32_derivation`; a raw key (ECPairArg) verifies with its public key directly.
|
|
255
|
+
*
|
|
256
|
+
* @param inputIndex - 0-based transparent input index
|
|
257
|
+
* @param key - the signing key: an xpub (BIP32Arg: base58 string, BIP32 instance, or WasmBIP32)
|
|
258
|
+
* or an ECPairArg (Uint8Array, ECPair instance, or WasmECPair)
|
|
259
|
+
* @returns true if a valid signature by the key's public key exists for the input's
|
|
260
|
+
* ZIP-244 transparent sighash
|
|
261
|
+
* @throws Error if the input index is out of range, the key cannot be parsed, or the v6
|
|
262
|
+
* sighash cannot be computed (e.g. the Ironwood PCZT has not been added yet)
|
|
263
|
+
*
|
|
264
|
+
* @example
|
|
265
|
+
* ```typescript
|
|
266
|
+
* // Verify the user's signature over the v6 transparent sighash
|
|
267
|
+
* const hasUserSig = psbt.verifySignature(0, userXpub);
|
|
268
|
+
* ```
|
|
269
|
+
*/
|
|
270
|
+
verifySignature(inputIndex, key) {
|
|
271
|
+
if ((0, bip32_js_1.isBIP32Arg)(key)) {
|
|
272
|
+
return this.wasm.verify_ironwood_v6_signature_with_xpub(inputIndex, bip32_js_1.BIP32.from(key).wasm);
|
|
273
|
+
}
|
|
274
|
+
// Otherwise it's an ECPairArg (Uint8Array, ECPair, or WasmECPair)
|
|
275
|
+
const wasmECPair = ecpair_js_1.ECPair.from(key).wasm;
|
|
276
|
+
return this.wasm.verify_ironwood_v6_signature_with_pub(inputIndex, wasmECPair);
|
|
277
|
+
}
|
|
241
278
|
/**
|
|
242
279
|
* Transaction Extractor role: given the external prover's `proof` bytes, finalize the
|
|
243
280
|
* transparent inputs, apply the shielded binding signature, and return the broadcast-ready v6
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ZcashBitGoPsbt, type ZcashNetworkName } from "./ZcashBitGoPsbt.js";
|
|
2
|
+
import { ZcashIronwoodBitGoPsbt } from "./ZcashIronwoodBitGoPsbt.js";
|
|
3
|
+
export type ZcashPsbtInstance = ZcashBitGoPsbt | ZcashIronwoodBitGoPsbt;
|
|
4
|
+
/** Factory for deserializing either supported Zcash PSBT format. */
|
|
5
|
+
export declare class ZcashPsbt {
|
|
6
|
+
private constructor();
|
|
7
|
+
/**
|
|
8
|
+
* Deserialize a Zcash PSBT and return the format-specific implementation.
|
|
9
|
+
*
|
|
10
|
+
* The version is read from the parsed Zcash metadata, so callers do not need to run a separate
|
|
11
|
+
* byte-level detector or choose a concrete parser before deserializing.
|
|
12
|
+
*/
|
|
13
|
+
static from(bytes: Uint8Array, network: ZcashNetworkName): ZcashPsbtInstance;
|
|
14
|
+
static fromBytes(bytes: Uint8Array, network: ZcashNetworkName): ZcashPsbtInstance;
|
|
15
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ZcashPsbt = void 0;
|
|
4
|
+
const wasm_utxo_js_1 = require("../wasm/wasm_utxo.js");
|
|
5
|
+
const ZcashBitGoPsbt_js_1 = require("./ZcashBitGoPsbt.js");
|
|
6
|
+
const ZcashIronwoodBitGoPsbt_js_1 = require("./ZcashIronwoodBitGoPsbt.js");
|
|
7
|
+
/** Factory for deserializing either supported Zcash PSBT format. */
|
|
8
|
+
class ZcashPsbt {
|
|
9
|
+
constructor() { }
|
|
10
|
+
/**
|
|
11
|
+
* Deserialize a Zcash PSBT and return the format-specific implementation.
|
|
12
|
+
*
|
|
13
|
+
* The version is read from the parsed Zcash metadata, so callers do not need to run a separate
|
|
14
|
+
* byte-level detector or choose a concrete parser before deserializing.
|
|
15
|
+
*/
|
|
16
|
+
static from(bytes, network) {
|
|
17
|
+
const parsed = ZcashBitGoPsbt_js_1.ZcashBitGoPsbt.fromWasm(wasm_utxo_js_1.BitGoPsbt.from_bytes(bytes, network));
|
|
18
|
+
return parsed.getVersion() === 6 ? ZcashIronwoodBitGoPsbt_js_1.ZcashIronwoodBitGoPsbt.fromWasm(parsed.wasm) : parsed;
|
|
19
|
+
}
|
|
20
|
+
static fromBytes(bytes, network) {
|
|
21
|
+
return ZcashPsbt.from(bytes, network);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.ZcashPsbt = ZcashPsbt;
|
|
@@ -8,7 +8,8 @@ export { ChainCode, chainCodes, assertChainCode, type Scope } from "./chains.js"
|
|
|
8
8
|
export { requiresPrevTxForP2sh } from "./prevTx.js";
|
|
9
9
|
export { BitGoPsbt, getWalletKeysFromPsbt, type NetworkName, type ScriptId, type ParsedInput, type ParsedOutput, type ParsedTransaction, type SignPath, type CreateEmptyOptions, type AddInputOptions, type AddOutputOptions, type AddWalletInputOptions, type AddWalletOutputOptions, type ParseTransactionOptions, type ParseOutputsOptions, type HydrationUnspent, } from "./BitGoPsbt.js";
|
|
10
10
|
export { BitGoKeySubtype, type PsbtKvKey } from "./BitGoKeySubtype.js";
|
|
11
|
-
export { ZcashBitGoPsbt, type ZcashNetworkName, type ZcashParsedOutput, type CreateEmptyZcashOptions, IRONWOOD_VERSION_GROUP_ID, } from "./ZcashBitGoPsbt.js";
|
|
11
|
+
export { ZcashBitGoPsbt, type ZcashNetworkName, type ZcashParsedOutput, type ZcashTransactionVersion, type CreateEmptyZcashOptions, IRONWOOD_VERSION_GROUP_ID, } from "./ZcashBitGoPsbt.js";
|
|
12
|
+
export { ZcashPsbt, type ZcashPsbtInstance } from "./ZcashPsbt.js";
|
|
12
13
|
export { ZcashIronwoodBitGoPsbt, zip302NoMemo, type CreateEmptyIronwoodOptions, type CreateEmptyIronwoodWithConsensusBranchIdOptions, } from "./ZcashIronwoodBitGoPsbt.js";
|
|
13
14
|
export { ZcashUnifiedAddress } from "./ZcashUnifiedAddress.js";
|
|
14
15
|
export { ZcashV6Transaction } from "./ZcashV6Transaction.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ZcashIronwoodWitness = exports.ZcashV6Transaction = exports.ZcashUnifiedAddress = exports.zip302NoMemo = exports.ZcashIronwoodBitGoPsbt = exports.IRONWOOD_VERSION_GROUP_ID = exports.ZcashBitGoPsbt = exports.BitGoKeySubtype = exports.getWalletKeysFromPsbt = exports.BitGoPsbt = exports.requiresPrevTxForP2sh = exports.assertChainCode = exports.chainCodes = exports.ChainCode = exports.inputScriptTypes = exports.outputScriptTypes = exports.Dimensions = exports.address = exports.outputScript = exports.ReplayProtection = exports.RootWalletKeys = void 0;
|
|
3
|
+
exports.ZcashIronwoodWitness = exports.ZcashV6Transaction = exports.ZcashUnifiedAddress = exports.zip302NoMemo = exports.ZcashIronwoodBitGoPsbt = exports.ZcashPsbt = exports.IRONWOOD_VERSION_GROUP_ID = exports.ZcashBitGoPsbt = exports.BitGoKeySubtype = exports.getWalletKeysFromPsbt = exports.BitGoPsbt = exports.requiresPrevTxForP2sh = exports.assertChainCode = exports.chainCodes = exports.ChainCode = exports.inputScriptTypes = exports.outputScriptTypes = exports.Dimensions = exports.address = exports.outputScript = exports.ReplayProtection = exports.RootWalletKeys = void 0;
|
|
4
4
|
exports.supportsScriptType = supportsScriptType;
|
|
5
5
|
exports.createOpReturnScript = createOpReturnScript;
|
|
6
6
|
exports.p2shP2pkOutputScript = p2shP2pkOutputScript;
|
|
@@ -34,6 +34,8 @@ Object.defineProperty(exports, "BitGoKeySubtype", { enumerable: true, get: funct
|
|
|
34
34
|
var ZcashBitGoPsbt_js_1 = require("./ZcashBitGoPsbt.js");
|
|
35
35
|
Object.defineProperty(exports, "ZcashBitGoPsbt", { enumerable: true, get: function () { return ZcashBitGoPsbt_js_1.ZcashBitGoPsbt; } });
|
|
36
36
|
Object.defineProperty(exports, "IRONWOOD_VERSION_GROUP_ID", { enumerable: true, get: function () { return ZcashBitGoPsbt_js_1.IRONWOOD_VERSION_GROUP_ID; } });
|
|
37
|
+
var ZcashPsbt_js_1 = require("./ZcashPsbt.js");
|
|
38
|
+
Object.defineProperty(exports, "ZcashPsbt", { enumerable: true, get: function () { return ZcashPsbt_js_1.ZcashPsbt; } });
|
|
37
39
|
// Zcash v6 (Ironwood / NU6.3) shielding PSBT
|
|
38
40
|
var ZcashIronwoodBitGoPsbt_js_1 = require("./ZcashIronwoodBitGoPsbt.js");
|
|
39
41
|
Object.defineProperty(exports, "ZcashIronwoodBitGoPsbt", { enumerable: true, get: function () { return ZcashIronwoodBitGoPsbt_js_1.ZcashIronwoodBitGoPsbt; } });
|
package/dist/cjs/js/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export { ECPair } from "./ecpair.js";
|
|
|
13
13
|
export { BIP32 } from "./bip32.js";
|
|
14
14
|
export { Dimensions } from "./fixedScriptWallet/Dimensions.js";
|
|
15
15
|
export { ZcashDimensions } from "./fixedScriptWallet/ZcashDimensions.js";
|
|
16
|
+
export { ZcashBitGoPsbt, ZcashPsbt, ZcashIronwoodBitGoPsbt, type ZcashPsbtInstance, type ZcashTransactionVersion, ZcashUnifiedAddress, ZcashV6Transaction, ZcashIronwoodWitness, } from "./fixedScriptWallet/index.js";
|
|
16
17
|
export type WasmUtxoVersionInfo = {
|
|
17
18
|
version: string;
|
|
18
19
|
gitHash: string;
|
package/dist/cjs/js/index.js
CHANGED
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.hasPsbtMagic = exports.ZcashTransaction = exports.Transaction = exports.DashTransaction = exports.Psbt = exports.Miniscript = exports.Descriptor = exports.requiresPrevTxForP2sh = exports.isCoinName = exports.isTestnet = exports.isMainnet = exports.getMainnet = exports.ZcashDimensions = exports.Dimensions = exports.BIP32 = exports.ECPair = exports.ecpair = exports.bip32 = exports.descriptorWallet = exports.fixedScriptWallet = exports.utxolibCompat = exports.message = exports.inscriptions = exports.bip322 = exports.ast = exports.zcashAddress = exports.address = void 0;
|
|
36
|
+
exports.hasPsbtMagic = exports.ZcashTransaction = exports.Transaction = exports.DashTransaction = exports.Psbt = exports.Miniscript = exports.Descriptor = exports.requiresPrevTxForP2sh = exports.isCoinName = exports.isTestnet = exports.isMainnet = exports.getMainnet = exports.ZcashIronwoodWitness = exports.ZcashV6Transaction = exports.ZcashUnifiedAddress = exports.ZcashIronwoodBitGoPsbt = exports.ZcashPsbt = exports.ZcashBitGoPsbt = exports.ZcashDimensions = exports.Dimensions = exports.BIP32 = exports.ECPair = exports.ecpair = exports.bip32 = exports.descriptorWallet = exports.fixedScriptWallet = exports.utxolibCompat = exports.message = exports.inscriptions = exports.bip322 = exports.ast = exports.zcashAddress = exports.address = void 0;
|
|
37
37
|
exports.getWasmUtxoVersion = getWasmUtxoVersion;
|
|
38
38
|
exports.isWasmUtxoError = isWasmUtxoError;
|
|
39
39
|
const wasm = __importStar(require("./wasm/wasm_utxo.js"));
|
|
@@ -63,6 +63,13 @@ var Dimensions_js_1 = require("./fixedScriptWallet/Dimensions.js");
|
|
|
63
63
|
Object.defineProperty(exports, "Dimensions", { enumerable: true, get: function () { return Dimensions_js_1.Dimensions; } });
|
|
64
64
|
var ZcashDimensions_js_1 = require("./fixedScriptWallet/ZcashDimensions.js");
|
|
65
65
|
Object.defineProperty(exports, "ZcashDimensions", { enumerable: true, get: function () { return ZcashDimensions_js_1.ZcashDimensions; } });
|
|
66
|
+
var index_js_1 = require("./fixedScriptWallet/index.js");
|
|
67
|
+
Object.defineProperty(exports, "ZcashBitGoPsbt", { enumerable: true, get: function () { return index_js_1.ZcashBitGoPsbt; } });
|
|
68
|
+
Object.defineProperty(exports, "ZcashPsbt", { enumerable: true, get: function () { return index_js_1.ZcashPsbt; } });
|
|
69
|
+
Object.defineProperty(exports, "ZcashIronwoodBitGoPsbt", { enumerable: true, get: function () { return index_js_1.ZcashIronwoodBitGoPsbt; } });
|
|
70
|
+
Object.defineProperty(exports, "ZcashUnifiedAddress", { enumerable: true, get: function () { return index_js_1.ZcashUnifiedAddress; } });
|
|
71
|
+
Object.defineProperty(exports, "ZcashV6Transaction", { enumerable: true, get: function () { return index_js_1.ZcashV6Transaction; } });
|
|
72
|
+
Object.defineProperty(exports, "ZcashIronwoodWitness", { enumerable: true, get: function () { return index_js_1.ZcashIronwoodWitness; } });
|
|
66
73
|
function getWasmUtxoVersion() {
|
|
67
74
|
return wasm_utxo_js_1.WasmUtxoNamespace.get_wasm_utxo_version();
|
|
68
75
|
}
|
|
@@ -813,6 +813,22 @@ export class BitGoPsbt {
|
|
|
813
813
|
*/
|
|
814
814
|
transparent_output_unified_address(index: number): string | undefined;
|
|
815
815
|
unsigned_tx_id(): string;
|
|
816
|
+
/**
|
|
817
|
+
* Verify if a valid signature exists for a given ECPair key at the specified input index,
|
|
818
|
+
* computed over the ZIP-244 v6 (Ironwood) transparent sighash — the v6 (Ironwood)
|
|
819
|
+
* counterpart to `verify_signature_with_pub`, which digests ZIP-243 (Sapling) and would
|
|
820
|
+
* report `Ok(false)` for a valid v6 signature. Only v6 (Ironwood) Zcash PSBTs are
|
|
821
|
+
* supported.
|
|
822
|
+
*/
|
|
823
|
+
verify_ironwood_v6_signature_with_pub(input_index: number, ecpair: WasmECPair): boolean;
|
|
824
|
+
/**
|
|
825
|
+
* Verify if a valid signature exists for an extended public key at the specified input
|
|
826
|
+
* index, computed over the ZIP-244 v6 (Ironwood) transparent sighash — the v6 (Ironwood)
|
|
827
|
+
* counterpart to `verify_signature_with_xpub`, which digests ZIP-243 (Sapling) and would
|
|
828
|
+
* report `Ok(false)` for a valid v6 signature. Only v6 (Ironwood) Zcash PSBTs are
|
|
829
|
+
* supported.
|
|
830
|
+
*/
|
|
831
|
+
verify_ironwood_v6_signature_with_xpub(input_index: number, xpub: WasmBIP32): boolean;
|
|
816
832
|
/**
|
|
817
833
|
* Verify if a replay protection input has a valid signature
|
|
818
834
|
*
|
|
@@ -2681,6 +2681,58 @@ class BitGoPsbt {
|
|
|
2681
2681
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
2682
2682
|
}
|
|
2683
2683
|
}
|
|
2684
|
+
/**
|
|
2685
|
+
* Verify if a valid signature exists for a given ECPair key at the specified input index,
|
|
2686
|
+
* computed over the ZIP-244 v6 (Ironwood) transparent sighash — the v6 (Ironwood)
|
|
2687
|
+
* counterpart to `verify_signature_with_pub`, which digests ZIP-243 (Sapling) and would
|
|
2688
|
+
* report `Ok(false)` for a valid v6 signature. Only v6 (Ironwood) Zcash PSBTs are
|
|
2689
|
+
* supported.
|
|
2690
|
+
* @param {number} input_index
|
|
2691
|
+
* @param {WasmECPair} ecpair
|
|
2692
|
+
* @returns {boolean}
|
|
2693
|
+
*/
|
|
2694
|
+
verify_ironwood_v6_signature_with_pub(input_index, ecpair) {
|
|
2695
|
+
try {
|
|
2696
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2697
|
+
_assertClass(ecpair, WasmECPair);
|
|
2698
|
+
wasm.bitgopsbt_verify_ironwood_v6_signature_with_pub(retptr, this.__wbg_ptr, input_index, ecpair.__wbg_ptr);
|
|
2699
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2700
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2701
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
2702
|
+
if (r2) {
|
|
2703
|
+
throw takeObject(r1);
|
|
2704
|
+
}
|
|
2705
|
+
return r0 !== 0;
|
|
2706
|
+
} finally {
|
|
2707
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2708
|
+
}
|
|
2709
|
+
}
|
|
2710
|
+
/**
|
|
2711
|
+
* Verify if a valid signature exists for an extended public key at the specified input
|
|
2712
|
+
* index, computed over the ZIP-244 v6 (Ironwood) transparent sighash — the v6 (Ironwood)
|
|
2713
|
+
* counterpart to `verify_signature_with_xpub`, which digests ZIP-243 (Sapling) and would
|
|
2714
|
+
* report `Ok(false)` for a valid v6 signature. Only v6 (Ironwood) Zcash PSBTs are
|
|
2715
|
+
* supported.
|
|
2716
|
+
* @param {number} input_index
|
|
2717
|
+
* @param {WasmBIP32} xpub
|
|
2718
|
+
* @returns {boolean}
|
|
2719
|
+
*/
|
|
2720
|
+
verify_ironwood_v6_signature_with_xpub(input_index, xpub) {
|
|
2721
|
+
try {
|
|
2722
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2723
|
+
_assertClass(xpub, WasmBIP32);
|
|
2724
|
+
wasm.bitgopsbt_verify_ironwood_v6_signature_with_xpub(retptr, this.__wbg_ptr, input_index, xpub.__wbg_ptr);
|
|
2725
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2726
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2727
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
2728
|
+
if (r2) {
|
|
2729
|
+
throw takeObject(r1);
|
|
2730
|
+
}
|
|
2731
|
+
return r0 !== 0;
|
|
2732
|
+
} finally {
|
|
2733
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2734
|
+
}
|
|
2735
|
+
}
|
|
2684
2736
|
/**
|
|
2685
2737
|
* Verify if a replay protection input has a valid signature
|
|
2686
2738
|
*
|
|
Binary file
|
|
@@ -1,6 +1,34 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
+
export const __wbg_addressnamespace_free: (a: number, b: number) => void;
|
|
5
|
+
export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
|
|
6
|
+
export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
|
|
7
|
+
export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
8
|
+
export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
9
|
+
export const isInspectEnabled: () => number;
|
|
10
|
+
export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
11
|
+
export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
12
|
+
export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
13
|
+
export const wasmdimensions_empty: () => number;
|
|
14
|
+
export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
15
|
+
export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
|
|
16
|
+
export const wasmdimensions_from_output_script_length: (a: number) => number;
|
|
17
|
+
export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
|
|
18
|
+
export const wasmdimensions_from_psbt: (a: number, b: number) => void;
|
|
19
|
+
export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
|
|
20
|
+
export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
|
|
21
|
+
export const wasmdimensions_get_output_vsize: (a: number) => number;
|
|
22
|
+
export const wasmdimensions_get_output_weight: (a: number) => number;
|
|
23
|
+
export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
|
|
24
|
+
export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
|
|
25
|
+
export const wasmdimensions_has_segwit: (a: number) => number;
|
|
26
|
+
export const wasmdimensions_plus: (a: number, b: number) => number;
|
|
27
|
+
export const wasmdimensions_times: (a: number, b: number) => number;
|
|
28
|
+
export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
29
|
+
export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
30
|
+
export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
|
|
31
|
+
export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
|
|
4
32
|
export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
|
|
5
33
|
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
6
34
|
export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
|
|
@@ -23,42 +51,23 @@ export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d:
|
|
|
23
51
|
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
24
52
|
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
25
53
|
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
26
|
-
export const
|
|
27
|
-
export const __wbg_messagenamespace_free: (a: number, b: number) => void;
|
|
28
|
-
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
29
|
-
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
30
|
-
export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
31
|
-
export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
32
|
-
export const isInspectEnabled: () => number;
|
|
33
|
-
export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
|
|
34
|
-
export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
35
|
-
export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
36
|
-
export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
|
|
37
|
-
export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
|
|
38
|
-
export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
|
|
39
|
-
export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
|
|
40
|
-
export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
|
|
41
|
-
export const wasmecpair_private_key: (a: number) => number;
|
|
42
|
-
export const wasmecpair_public_key: (a: number) => number;
|
|
43
|
-
export const wasmecpair_to_wif: (a: number, b: number) => void;
|
|
44
|
-
export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
|
|
45
|
-
export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
|
|
46
|
-
export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
47
|
-
export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
|
|
48
|
-
export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
|
|
49
|
-
export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
50
|
-
export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
54
|
+
export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
|
|
51
55
|
export const __wbg_ironwoodwitness_free: (a: number, b: number) => void;
|
|
56
|
+
export const __wbg_messagenamespace_free: (a: number, b: number) => void;
|
|
52
57
|
export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
|
|
58
|
+
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
53
59
|
export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
|
|
54
|
-
export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
|
|
55
60
|
export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
|
|
56
61
|
export const __wbg_wrappsbt_free: (a: number, b: number) => void;
|
|
57
62
|
export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
|
|
58
63
|
export const __wbg_zcashv6transaction_free: (a: number, b: number) => void;
|
|
64
|
+
export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
65
|
+
export const inscriptionsnamespace_sign_reveal_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: bigint) => void;
|
|
59
66
|
export const ironwood_build_witness: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
60
67
|
export const ironwoodwitness_auth_path: (a: number, b: number) => void;
|
|
61
68
|
export const ironwoodwitness_position: (a: number) => number;
|
|
69
|
+
export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
|
|
70
|
+
export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
62
71
|
export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
63
72
|
export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
|
|
64
73
|
export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
|
|
@@ -69,6 +78,16 @@ export const wasmdashtransaction_lock_time: (a: number) => number;
|
|
|
69
78
|
export const wasmdashtransaction_output_count: (a: number) => number;
|
|
70
79
|
export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
|
|
71
80
|
export const wasmdashtransaction_version: (a: number) => number;
|
|
81
|
+
export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
|
|
82
|
+
export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
|
|
83
|
+
export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
|
|
84
|
+
export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
|
|
85
|
+
export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
|
|
86
|
+
export const wasmecpair_private_key: (a: number) => number;
|
|
87
|
+
export const wasmecpair_public_key: (a: number) => number;
|
|
88
|
+
export const wasmecpair_to_wif: (a: number, b: number) => void;
|
|
89
|
+
export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
|
|
90
|
+
export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
|
|
72
91
|
export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
73
92
|
export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
74
93
|
export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
|
|
@@ -81,7 +100,6 @@ export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c:
|
|
|
81
100
|
export const wasmtransaction_get_txid: (a: number, b: number) => void;
|
|
82
101
|
export const wasmtransaction_get_vsize: (a: number) => number;
|
|
83
102
|
export const wasmtransaction_to_bytes: (a: number, b: number) => void;
|
|
84
|
-
export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
|
|
85
103
|
export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
86
104
|
export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
|
|
87
105
|
export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
|
|
@@ -169,26 +187,11 @@ export const wasmzcashtransaction_lock_time: (a: number) => number;
|
|
|
169
187
|
export const wasmzcashtransaction_version: (a: number) => number;
|
|
170
188
|
export const wrappsbt_lock_time: (a: number) => number;
|
|
171
189
|
export const wrappsbt_version: (a: number) => number;
|
|
172
|
-
export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
|
|
173
|
-
export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
|
|
174
|
-
export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
175
|
-
export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
176
|
-
export const wasmdimensions_empty: () => number;
|
|
177
|
-
export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
178
|
-
export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
|
|
179
|
-
export const wasmdimensions_from_output_script_length: (a: number) => number;
|
|
180
|
-
export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
|
|
181
|
-
export const wasmdimensions_from_psbt: (a: number, b: number) => void;
|
|
182
|
-
export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
|
|
183
|
-
export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
|
|
184
|
-
export const wasmdimensions_get_output_vsize: (a: number) => number;
|
|
185
|
-
export const wasmdimensions_get_output_weight: (a: number) => number;
|
|
186
|
-
export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
|
|
187
|
-
export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
|
|
188
|
-
export const wasmdimensions_has_segwit: (a: number) => number;
|
|
189
|
-
export const wasmdimensions_plus: (a: number, b: number) => number;
|
|
190
|
-
export const wasmdimensions_times: (a: number, b: number) => number;
|
|
191
190
|
export const __wbg_bip322namespace_free: (a: number, b: number) => void;
|
|
191
|
+
export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
|
|
192
|
+
export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
|
|
193
|
+
export const __wbg_wasmbip32_free: (a: number, b: number) => void;
|
|
194
|
+
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
192
195
|
export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
|
|
193
196
|
export const bip322namespace_add_bip322_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
|
|
194
197
|
export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
|
|
@@ -196,15 +199,6 @@ export const bip322namespace_verify_bip322_psbt_input: (a: number, b: number, c:
|
|
|
196
199
|
export const bip322namespace_verify_bip322_psbt_input_with_pubkeys: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
|
|
197
200
|
export const bip322namespace_verify_bip322_tx_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
|
|
198
201
|
export const bip322namespace_verify_bip322_tx_input_with_pubkeys: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
|
|
199
|
-
export const wasmrootwalletkeys_backup_key: (a: number) => number;
|
|
200
|
-
export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
|
|
201
|
-
export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
|
|
202
|
-
export const wasmrootwalletkeys_user_key: (a: number) => number;
|
|
203
|
-
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;
|
|
204
|
-
export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
|
|
205
|
-
export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
|
|
206
|
-
export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
|
|
207
|
-
export const __wbg_wasmbip32_free: (a: number, b: number) => void;
|
|
208
202
|
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;
|
|
209
203
|
export const bitgopsbt_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number, j: number, k: number, l: number) => void;
|
|
210
204
|
export const bitgopsbt_add_ironwood_output: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
|
|
@@ -287,6 +281,8 @@ export const bitgopsbt_sign_with_privkey: (a: number, b: number, c: number, d: n
|
|
|
287
281
|
export const bitgopsbt_sign_with_xpriv: (a: number, b: number, c: number, d: number) => void;
|
|
288
282
|
export const bitgopsbt_transparent_output_unified_address: (a: number, b: number, c: number) => void;
|
|
289
283
|
export const bitgopsbt_unsigned_tx_id: (a: number, b: number) => void;
|
|
284
|
+
export const bitgopsbt_verify_ironwood_v6_signature_with_pub: (a: number, b: number, c: number, d: number) => void;
|
|
285
|
+
export const bitgopsbt_verify_ironwood_v6_signature_with_xpub: (a: number, b: number, c: number, d: number) => void;
|
|
290
286
|
export const bitgopsbt_verify_replay_protection_signature: (a: number, b: number, c: number, d: number) => void;
|
|
291
287
|
export const bitgopsbt_verify_signature_with_pub: (a: number, b: number, c: number, d: number) => void;
|
|
292
288
|
export const bitgopsbt_verify_signature_with_xpub: (a: number, b: number, c: number, d: number) => void;
|
|
@@ -302,8 +298,6 @@ export const fixedscriptwalletnamespace_output_script_with_network_str: (a: numb
|
|
|
302
298
|
export const fixedscriptwalletnamespace_p2sh_p2pk_output_script: (a: number, b: number, c: number) => void;
|
|
303
299
|
export const fixedscriptwalletnamespace_supports_script_type: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
304
300
|
export const fixedscriptwalletnamespace_to_wallet_keys: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
305
|
-
export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
306
|
-
export const inscriptionsnamespace_sign_reveal_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: bigint) => void;
|
|
307
301
|
export const wasmbip32_chain_code: (a: number) => number;
|
|
308
302
|
export const wasmbip32_depth: (a: number) => number;
|
|
309
303
|
export const wasmbip32_derive: (a: number, b: number, c: number) => void;
|
|
@@ -326,6 +320,14 @@ export const wasmbip32_private_key: (a: number) => number;
|
|
|
326
320
|
export const wasmbip32_public_key: (a: number) => number;
|
|
327
321
|
export const wasmbip32_to_base58: (a: number, b: number) => void;
|
|
328
322
|
export const wasmbip32_to_wif: (a: number, b: number) => void;
|
|
323
|
+
export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
324
|
+
export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
|
|
325
|
+
export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
|
|
326
|
+
export const wasmrootwalletkeys_backup_key: (a: number) => number;
|
|
327
|
+
export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
|
|
328
|
+
export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
|
|
329
|
+
export const wasmrootwalletkeys_user_key: (a: number) => number;
|
|
330
|
+
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;
|
|
329
331
|
export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
|
|
330
332
|
export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
|
|
331
333
|
export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BitGoPsbt as WasmBitGoPsbt } from "../wasm/wasm_utxo.js";
|
|
1
2
|
import { type WalletKeysArg } from "./RootWalletKeys.js";
|
|
2
3
|
import { BitGoPsbt, type CreateEmptyOptions, type HydrationUnspent, type ParsedOutput } from "./BitGoPsbt.js";
|
|
3
4
|
import { ZcashTransaction, type ITransaction } from "../transaction.js";
|
|
@@ -15,6 +16,8 @@ export type ZcashParsedOutput = ParsedOutput & {
|
|
|
15
16
|
*/
|
|
16
17
|
isShielded: boolean;
|
|
17
18
|
};
|
|
19
|
+
/** Zcash transaction versions supported by the fixed-script PSBT API. */
|
|
20
|
+
export type ZcashTransactionVersion = 4 | 6;
|
|
18
21
|
/**
|
|
19
22
|
* Zcash v6 (Ironwood) version group id (0xd884b698). Its presence marks a PSBT as v6 — see
|
|
20
23
|
* `ZcashIronwoodBitGoPsbt`.
|
|
@@ -124,6 +127,8 @@ export declare class ZcashBitGoPsbt extends BitGoPsbt<ZcashParsedOutput> {
|
|
|
124
127
|
* @returns A ZcashBitGoPsbt instance
|
|
125
128
|
*/
|
|
126
129
|
static fromBytes(bytes: Uint8Array, network: ZcashNetworkName): ZcashBitGoPsbt;
|
|
130
|
+
/** @internal Create from a parsed WASM instance without reparsing the bytes. */
|
|
131
|
+
static fromWasm(wasm: WasmBitGoPsbt): ZcashBitGoPsbt;
|
|
127
132
|
/**
|
|
128
133
|
* Reconstruct a Zcash PSBT from a network-format transaction (unsigned, half-signed, or fully-signed).
|
|
129
134
|
*
|
|
@@ -173,6 +178,13 @@ export declare class ZcashBitGoPsbt extends BitGoPsbt<ZcashParsedOutput> {
|
|
|
173
178
|
* @returns The version group ID (e.g., 0x892F2085 for Sapling)
|
|
174
179
|
*/
|
|
175
180
|
get versionGroupId(): number;
|
|
181
|
+
/**
|
|
182
|
+
* Get the Zcash transaction version represented by this PSBT.
|
|
183
|
+
*
|
|
184
|
+
* The version group ID is the discriminator because the v4 and v6 PSBT encodings do not expose
|
|
185
|
+
* the same unsigned transaction bytes to a standard PSBT parser.
|
|
186
|
+
*/
|
|
187
|
+
getVersion(): ZcashTransactionVersion;
|
|
176
188
|
/**
|
|
177
189
|
* Get the Zcash expiry height
|
|
178
190
|
* @returns The expiry height (0 if not set)
|
|
@@ -108,6 +108,10 @@ export class ZcashBitGoPsbt extends BitGoPsbt {
|
|
|
108
108
|
}
|
|
109
109
|
return psbt;
|
|
110
110
|
}
|
|
111
|
+
/** @internal Create from a parsed WASM instance without reparsing the bytes. */
|
|
112
|
+
static fromWasm(wasm) {
|
|
113
|
+
return new ZcashBitGoPsbt(wasm);
|
|
114
|
+
}
|
|
111
115
|
/**
|
|
112
116
|
* Reconstruct a Zcash PSBT from a network-format transaction (unsigned, half-signed, or fully-signed).
|
|
113
117
|
*
|
|
@@ -178,6 +182,15 @@ export class ZcashBitGoPsbt extends BitGoPsbt {
|
|
|
178
182
|
get versionGroupId() {
|
|
179
183
|
return this.wasm.version_group_id();
|
|
180
184
|
}
|
|
185
|
+
/**
|
|
186
|
+
* Get the Zcash transaction version represented by this PSBT.
|
|
187
|
+
*
|
|
188
|
+
* The version group ID is the discriminator because the v4 and v6 PSBT encodings do not expose
|
|
189
|
+
* the same unsigned transaction bytes to a standard PSBT parser.
|
|
190
|
+
*/
|
|
191
|
+
getVersion() {
|
|
192
|
+
return this.versionGroupId === IRONWOOD_VERSION_GROUP_ID ? 6 : 4;
|
|
193
|
+
}
|
|
181
194
|
/**
|
|
182
195
|
* Get the Zcash expiry height
|
|
183
196
|
* @returns The expiry height (0 if not set)
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BitGoPsbt as WasmBitGoPsbt } from "../wasm/wasm_utxo.js";
|
|
1
2
|
import { type BIP32Arg } from "../bip32.js";
|
|
2
3
|
import { type ECPairArg } from "../ecpair.js";
|
|
3
4
|
import { type WalletKeysArg } from "./RootWalletKeys.js";
|
|
@@ -122,6 +123,8 @@ export declare class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
|
|
|
122
123
|
* @returns A ZcashIronwoodBitGoPsbt instance
|
|
123
124
|
*/
|
|
124
125
|
static fromBytes(bytes: Uint8Array, network: ZcashNetworkName): ZcashIronwoodBitGoPsbt;
|
|
126
|
+
/** @internal Create from a parsed WASM instance without reparsing the bytes. */
|
|
127
|
+
static fromWasm(wasm: WasmBitGoPsbt): ZcashIronwoodBitGoPsbt;
|
|
125
128
|
/**
|
|
126
129
|
* Add the shielded output (Constructor role). Stores the orchard PCZT in the PSBT.
|
|
127
130
|
*
|
|
@@ -246,6 +249,31 @@ export declare class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
|
|
|
246
249
|
* {@link sign} (all matching inputs) instead.
|
|
247
250
|
*/
|
|
248
251
|
sign(inputIndex: number, key: BIP32Arg | ECPairArg): void;
|
|
252
|
+
/**
|
|
253
|
+
* Check whether transparent input `inputIndex` carries a valid signature by `key`, over the
|
|
254
|
+
* ZIP-244 transparent sighash — the digest v6 (Ironwood) keys actually sign (see
|
|
255
|
+
* {@link transparentSighash}). The inherited `BitGoPsbt.verifySignature` digests ZIP-243
|
|
256
|
+
* (Sapling) instead, so it would report `false` for a valid v6 signature; this override routes
|
|
257
|
+
* to the v6 sighash path instead.
|
|
258
|
+
*
|
|
259
|
+
* Mirrors the inherited signature: an xpub (BIP32Arg) resolves to a public key via the input's
|
|
260
|
+
* `bip32_derivation`; a raw key (ECPairArg) verifies with its public key directly.
|
|
261
|
+
*
|
|
262
|
+
* @param inputIndex - 0-based transparent input index
|
|
263
|
+
* @param key - the signing key: an xpub (BIP32Arg: base58 string, BIP32 instance, or WasmBIP32)
|
|
264
|
+
* or an ECPairArg (Uint8Array, ECPair instance, or WasmECPair)
|
|
265
|
+
* @returns true if a valid signature by the key's public key exists for the input's
|
|
266
|
+
* ZIP-244 transparent sighash
|
|
267
|
+
* @throws Error if the input index is out of range, the key cannot be parsed, or the v6
|
|
268
|
+
* sighash cannot be computed (e.g. the Ironwood PCZT has not been added yet)
|
|
269
|
+
*
|
|
270
|
+
* @example
|
|
271
|
+
* ```typescript
|
|
272
|
+
* // Verify the user's signature over the v6 transparent sighash
|
|
273
|
+
* const hasUserSig = psbt.verifySignature(0, userXpub);
|
|
274
|
+
* ```
|
|
275
|
+
*/
|
|
276
|
+
verifySignature(inputIndex: number, key: BIP32Arg | ECPairArg): boolean;
|
|
249
277
|
/**
|
|
250
278
|
* Transaction Extractor role: given the external prover's `proof` bytes, finalize the
|
|
251
279
|
* transparent inputs, apply the shielded binding signature, and return the broadcast-ready v6
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BitGoPsbt as WasmBitGoPsbt } from "../wasm/wasm_utxo.js";
|
|
2
2
|
import { BIP32, isBIP32Arg } from "../bip32.js";
|
|
3
|
+
import { ECPair } from "../ecpair.js";
|
|
3
4
|
import { RootWalletKeys } from "./RootWalletKeys.js";
|
|
4
5
|
import { IRONWOOD_VERSION_GROUP_ID, ZcashBitGoPsbt, } from "./ZcashBitGoPsbt.js";
|
|
5
6
|
/**
|
|
@@ -117,6 +118,10 @@ export class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
|
|
|
117
118
|
}
|
|
118
119
|
return psbt;
|
|
119
120
|
}
|
|
121
|
+
/** @internal Create from a parsed WASM instance without reparsing the bytes. */
|
|
122
|
+
static fromWasm(wasm) {
|
|
123
|
+
return new ZcashIronwoodBitGoPsbt(wasm);
|
|
124
|
+
}
|
|
120
125
|
/**
|
|
121
126
|
* Add the shielded output (Constructor role). Stores the orchard PCZT in the PSBT.
|
|
122
127
|
*
|
|
@@ -234,6 +239,38 @@ export class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
|
|
|
234
239
|
const keys = RootWalletKeys.from(keyOrRootWalletKeys);
|
|
235
240
|
return Array.from(this.wasm.sign_ironwood_v6(wasmKey, keys.wasm), Number);
|
|
236
241
|
}
|
|
242
|
+
/**
|
|
243
|
+
* Check whether transparent input `inputIndex` carries a valid signature by `key`, over the
|
|
244
|
+
* ZIP-244 transparent sighash — the digest v6 (Ironwood) keys actually sign (see
|
|
245
|
+
* {@link transparentSighash}). The inherited `BitGoPsbt.verifySignature` digests ZIP-243
|
|
246
|
+
* (Sapling) instead, so it would report `false` for a valid v6 signature; this override routes
|
|
247
|
+
* to the v6 sighash path instead.
|
|
248
|
+
*
|
|
249
|
+
* Mirrors the inherited signature: an xpub (BIP32Arg) resolves to a public key via the input's
|
|
250
|
+
* `bip32_derivation`; a raw key (ECPairArg) verifies with its public key directly.
|
|
251
|
+
*
|
|
252
|
+
* @param inputIndex - 0-based transparent input index
|
|
253
|
+
* @param key - the signing key: an xpub (BIP32Arg: base58 string, BIP32 instance, or WasmBIP32)
|
|
254
|
+
* or an ECPairArg (Uint8Array, ECPair instance, or WasmECPair)
|
|
255
|
+
* @returns true if a valid signature by the key's public key exists for the input's
|
|
256
|
+
* ZIP-244 transparent sighash
|
|
257
|
+
* @throws Error if the input index is out of range, the key cannot be parsed, or the v6
|
|
258
|
+
* sighash cannot be computed (e.g. the Ironwood PCZT has not been added yet)
|
|
259
|
+
*
|
|
260
|
+
* @example
|
|
261
|
+
* ```typescript
|
|
262
|
+
* // Verify the user's signature over the v6 transparent sighash
|
|
263
|
+
* const hasUserSig = psbt.verifySignature(0, userXpub);
|
|
264
|
+
* ```
|
|
265
|
+
*/
|
|
266
|
+
verifySignature(inputIndex, key) {
|
|
267
|
+
if (isBIP32Arg(key)) {
|
|
268
|
+
return this.wasm.verify_ironwood_v6_signature_with_xpub(inputIndex, BIP32.from(key).wasm);
|
|
269
|
+
}
|
|
270
|
+
// Otherwise it's an ECPairArg (Uint8Array, ECPair, or WasmECPair)
|
|
271
|
+
const wasmECPair = ECPair.from(key).wasm;
|
|
272
|
+
return this.wasm.verify_ironwood_v6_signature_with_pub(inputIndex, wasmECPair);
|
|
273
|
+
}
|
|
237
274
|
/**
|
|
238
275
|
* Transaction Extractor role: given the external prover's `proof` bytes, finalize the
|
|
239
276
|
* transparent inputs, apply the shielded binding signature, and return the broadcast-ready v6
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ZcashBitGoPsbt, type ZcashNetworkName } from "./ZcashBitGoPsbt.js";
|
|
2
|
+
import { ZcashIronwoodBitGoPsbt } from "./ZcashIronwoodBitGoPsbt.js";
|
|
3
|
+
export type ZcashPsbtInstance = ZcashBitGoPsbt | ZcashIronwoodBitGoPsbt;
|
|
4
|
+
/** Factory for deserializing either supported Zcash PSBT format. */
|
|
5
|
+
export declare class ZcashPsbt {
|
|
6
|
+
private constructor();
|
|
7
|
+
/**
|
|
8
|
+
* Deserialize a Zcash PSBT and return the format-specific implementation.
|
|
9
|
+
*
|
|
10
|
+
* The version is read from the parsed Zcash metadata, so callers do not need to run a separate
|
|
11
|
+
* byte-level detector or choose a concrete parser before deserializing.
|
|
12
|
+
*/
|
|
13
|
+
static from(bytes: Uint8Array, network: ZcashNetworkName): ZcashPsbtInstance;
|
|
14
|
+
static fromBytes(bytes: Uint8Array, network: ZcashNetworkName): ZcashPsbtInstance;
|
|
15
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BitGoPsbt as WasmBitGoPsbt } from "../wasm/wasm_utxo.js";
|
|
2
|
+
import { ZcashBitGoPsbt } from "./ZcashBitGoPsbt.js";
|
|
3
|
+
import { ZcashIronwoodBitGoPsbt } from "./ZcashIronwoodBitGoPsbt.js";
|
|
4
|
+
/** Factory for deserializing either supported Zcash PSBT format. */
|
|
5
|
+
export class ZcashPsbt {
|
|
6
|
+
constructor() { }
|
|
7
|
+
/**
|
|
8
|
+
* Deserialize a Zcash PSBT and return the format-specific implementation.
|
|
9
|
+
*
|
|
10
|
+
* The version is read from the parsed Zcash metadata, so callers do not need to run a separate
|
|
11
|
+
* byte-level detector or choose a concrete parser before deserializing.
|
|
12
|
+
*/
|
|
13
|
+
static from(bytes, network) {
|
|
14
|
+
const parsed = ZcashBitGoPsbt.fromWasm(WasmBitGoPsbt.from_bytes(bytes, network));
|
|
15
|
+
return parsed.getVersion() === 6 ? ZcashIronwoodBitGoPsbt.fromWasm(parsed.wasm) : parsed;
|
|
16
|
+
}
|
|
17
|
+
static fromBytes(bytes, network) {
|
|
18
|
+
return ZcashPsbt.from(bytes, network);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -8,7 +8,8 @@ export { ChainCode, chainCodes, assertChainCode, type Scope } from "./chains.js"
|
|
|
8
8
|
export { requiresPrevTxForP2sh } from "./prevTx.js";
|
|
9
9
|
export { BitGoPsbt, getWalletKeysFromPsbt, type NetworkName, type ScriptId, type ParsedInput, type ParsedOutput, type ParsedTransaction, type SignPath, type CreateEmptyOptions, type AddInputOptions, type AddOutputOptions, type AddWalletInputOptions, type AddWalletOutputOptions, type ParseTransactionOptions, type ParseOutputsOptions, type HydrationUnspent, } from "./BitGoPsbt.js";
|
|
10
10
|
export { BitGoKeySubtype, type PsbtKvKey } from "./BitGoKeySubtype.js";
|
|
11
|
-
export { ZcashBitGoPsbt, type ZcashNetworkName, type ZcashParsedOutput, type CreateEmptyZcashOptions, IRONWOOD_VERSION_GROUP_ID, } from "./ZcashBitGoPsbt.js";
|
|
11
|
+
export { ZcashBitGoPsbt, type ZcashNetworkName, type ZcashParsedOutput, type ZcashTransactionVersion, type CreateEmptyZcashOptions, IRONWOOD_VERSION_GROUP_ID, } from "./ZcashBitGoPsbt.js";
|
|
12
|
+
export { ZcashPsbt, type ZcashPsbtInstance } from "./ZcashPsbt.js";
|
|
12
13
|
export { ZcashIronwoodBitGoPsbt, zip302NoMemo, type CreateEmptyIronwoodOptions, type CreateEmptyIronwoodWithConsensusBranchIdOptions, } from "./ZcashIronwoodBitGoPsbt.js";
|
|
13
14
|
export { ZcashUnifiedAddress } from "./ZcashUnifiedAddress.js";
|
|
14
15
|
export { ZcashV6Transaction } from "./ZcashV6Transaction.js";
|
|
@@ -12,6 +12,7 @@ export { BitGoPsbt, getWalletKeysFromPsbt, } from "./BitGoPsbt.js";
|
|
|
12
12
|
export { BitGoKeySubtype } from "./BitGoKeySubtype.js";
|
|
13
13
|
// Zcash-specific PSBT subclass
|
|
14
14
|
export { ZcashBitGoPsbt, IRONWOOD_VERSION_GROUP_ID, } from "./ZcashBitGoPsbt.js";
|
|
15
|
+
export { ZcashPsbt } from "./ZcashPsbt.js";
|
|
15
16
|
// Zcash v6 (Ironwood / NU6.3) shielding PSBT
|
|
16
17
|
export { ZcashIronwoodBitGoPsbt, zip302NoMemo, } from "./ZcashIronwoodBitGoPsbt.js";
|
|
17
18
|
// Zcash ZIP-316 Unified Address
|
package/dist/esm/js/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export { ECPair } from "./ecpair.js";
|
|
|
13
13
|
export { BIP32 } from "./bip32.js";
|
|
14
14
|
export { Dimensions } from "./fixedScriptWallet/Dimensions.js";
|
|
15
15
|
export { ZcashDimensions } from "./fixedScriptWallet/ZcashDimensions.js";
|
|
16
|
+
export { ZcashBitGoPsbt, ZcashPsbt, ZcashIronwoodBitGoPsbt, type ZcashPsbtInstance, type ZcashTransactionVersion, ZcashUnifiedAddress, ZcashV6Transaction, ZcashIronwoodWitness, } from "./fixedScriptWallet/index.js";
|
|
16
17
|
export type WasmUtxoVersionInfo = {
|
|
17
18
|
version: string;
|
|
18
19
|
gitHash: string;
|
package/dist/esm/js/index.js
CHANGED
|
@@ -21,6 +21,7 @@ export { ECPair } from "./ecpair.js";
|
|
|
21
21
|
export { BIP32 } from "./bip32.js";
|
|
22
22
|
export { Dimensions } from "./fixedScriptWallet/Dimensions.js";
|
|
23
23
|
export { ZcashDimensions } from "./fixedScriptWallet/ZcashDimensions.js";
|
|
24
|
+
export { ZcashBitGoPsbt, ZcashPsbt, ZcashIronwoodBitGoPsbt, ZcashUnifiedAddress, ZcashV6Transaction, ZcashIronwoodWitness, } from "./fixedScriptWallet/index.js";
|
|
24
25
|
export function getWasmUtxoVersion() {
|
|
25
26
|
return WasmUtxoNamespace.get_wasm_utxo_version();
|
|
26
27
|
}
|
|
@@ -813,6 +813,22 @@ export class BitGoPsbt {
|
|
|
813
813
|
*/
|
|
814
814
|
transparent_output_unified_address(index: number): string | undefined;
|
|
815
815
|
unsigned_tx_id(): string;
|
|
816
|
+
/**
|
|
817
|
+
* Verify if a valid signature exists for a given ECPair key at the specified input index,
|
|
818
|
+
* computed over the ZIP-244 v6 (Ironwood) transparent sighash — the v6 (Ironwood)
|
|
819
|
+
* counterpart to `verify_signature_with_pub`, which digests ZIP-243 (Sapling) and would
|
|
820
|
+
* report `Ok(false)` for a valid v6 signature. Only v6 (Ironwood) Zcash PSBTs are
|
|
821
|
+
* supported.
|
|
822
|
+
*/
|
|
823
|
+
verify_ironwood_v6_signature_with_pub(input_index: number, ecpair: WasmECPair): boolean;
|
|
824
|
+
/**
|
|
825
|
+
* Verify if a valid signature exists for an extended public key at the specified input
|
|
826
|
+
* index, computed over the ZIP-244 v6 (Ironwood) transparent sighash — the v6 (Ironwood)
|
|
827
|
+
* counterpart to `verify_signature_with_xpub`, which digests ZIP-243 (Sapling) and would
|
|
828
|
+
* report `Ok(false)` for a valid v6 signature. Only v6 (Ironwood) Zcash PSBTs are
|
|
829
|
+
* supported.
|
|
830
|
+
*/
|
|
831
|
+
verify_ironwood_v6_signature_with_xpub(input_index: number, xpub: WasmBIP32): boolean;
|
|
816
832
|
/**
|
|
817
833
|
* Verify if a replay protection input has a valid signature
|
|
818
834
|
*
|
|
@@ -2677,6 +2677,58 @@ export class BitGoPsbt {
|
|
|
2677
2677
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
2678
2678
|
}
|
|
2679
2679
|
}
|
|
2680
|
+
/**
|
|
2681
|
+
* Verify if a valid signature exists for a given ECPair key at the specified input index,
|
|
2682
|
+
* computed over the ZIP-244 v6 (Ironwood) transparent sighash — the v6 (Ironwood)
|
|
2683
|
+
* counterpart to `verify_signature_with_pub`, which digests ZIP-243 (Sapling) and would
|
|
2684
|
+
* report `Ok(false)` for a valid v6 signature. Only v6 (Ironwood) Zcash PSBTs are
|
|
2685
|
+
* supported.
|
|
2686
|
+
* @param {number} input_index
|
|
2687
|
+
* @param {WasmECPair} ecpair
|
|
2688
|
+
* @returns {boolean}
|
|
2689
|
+
*/
|
|
2690
|
+
verify_ironwood_v6_signature_with_pub(input_index, ecpair) {
|
|
2691
|
+
try {
|
|
2692
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2693
|
+
_assertClass(ecpair, WasmECPair);
|
|
2694
|
+
wasm.bitgopsbt_verify_ironwood_v6_signature_with_pub(retptr, this.__wbg_ptr, input_index, ecpair.__wbg_ptr);
|
|
2695
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2696
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2697
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
2698
|
+
if (r2) {
|
|
2699
|
+
throw takeObject(r1);
|
|
2700
|
+
}
|
|
2701
|
+
return r0 !== 0;
|
|
2702
|
+
} finally {
|
|
2703
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2704
|
+
}
|
|
2705
|
+
}
|
|
2706
|
+
/**
|
|
2707
|
+
* Verify if a valid signature exists for an extended public key at the specified input
|
|
2708
|
+
* index, computed over the ZIP-244 v6 (Ironwood) transparent sighash — the v6 (Ironwood)
|
|
2709
|
+
* counterpart to `verify_signature_with_xpub`, which digests ZIP-243 (Sapling) and would
|
|
2710
|
+
* report `Ok(false)` for a valid v6 signature. Only v6 (Ironwood) Zcash PSBTs are
|
|
2711
|
+
* supported.
|
|
2712
|
+
* @param {number} input_index
|
|
2713
|
+
* @param {WasmBIP32} xpub
|
|
2714
|
+
* @returns {boolean}
|
|
2715
|
+
*/
|
|
2716
|
+
verify_ironwood_v6_signature_with_xpub(input_index, xpub) {
|
|
2717
|
+
try {
|
|
2718
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2719
|
+
_assertClass(xpub, WasmBIP32);
|
|
2720
|
+
wasm.bitgopsbt_verify_ironwood_v6_signature_with_xpub(retptr, this.__wbg_ptr, input_index, xpub.__wbg_ptr);
|
|
2721
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2722
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2723
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
2724
|
+
if (r2) {
|
|
2725
|
+
throw takeObject(r1);
|
|
2726
|
+
}
|
|
2727
|
+
return r0 !== 0;
|
|
2728
|
+
} finally {
|
|
2729
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2730
|
+
}
|
|
2731
|
+
}
|
|
2680
2732
|
/**
|
|
2681
2733
|
* Verify if a replay protection input has a valid signature
|
|
2682
2734
|
*
|
|
Binary file
|
|
@@ -1,6 +1,34 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
+
export const __wbg_addressnamespace_free: (a: number, b: number) => void;
|
|
5
|
+
export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
|
|
6
|
+
export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
|
|
7
|
+
export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
8
|
+
export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
9
|
+
export const isInspectEnabled: () => number;
|
|
10
|
+
export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
11
|
+
export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
12
|
+
export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
13
|
+
export const wasmdimensions_empty: () => number;
|
|
14
|
+
export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
15
|
+
export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
|
|
16
|
+
export const wasmdimensions_from_output_script_length: (a: number) => number;
|
|
17
|
+
export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
|
|
18
|
+
export const wasmdimensions_from_psbt: (a: number, b: number) => void;
|
|
19
|
+
export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
|
|
20
|
+
export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
|
|
21
|
+
export const wasmdimensions_get_output_vsize: (a: number) => number;
|
|
22
|
+
export const wasmdimensions_get_output_weight: (a: number) => number;
|
|
23
|
+
export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
|
|
24
|
+
export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
|
|
25
|
+
export const wasmdimensions_has_segwit: (a: number) => number;
|
|
26
|
+
export const wasmdimensions_plus: (a: number, b: number) => number;
|
|
27
|
+
export const wasmdimensions_times: (a: number, b: number) => number;
|
|
28
|
+
export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
29
|
+
export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
30
|
+
export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
|
|
31
|
+
export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
|
|
4
32
|
export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
|
|
5
33
|
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
6
34
|
export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
|
|
@@ -23,42 +51,23 @@ export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d:
|
|
|
23
51
|
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
24
52
|
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
25
53
|
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
26
|
-
export const
|
|
27
|
-
export const __wbg_messagenamespace_free: (a: number, b: number) => void;
|
|
28
|
-
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
29
|
-
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
30
|
-
export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
31
|
-
export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
32
|
-
export const isInspectEnabled: () => number;
|
|
33
|
-
export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
|
|
34
|
-
export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
35
|
-
export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
36
|
-
export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
|
|
37
|
-
export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
|
|
38
|
-
export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
|
|
39
|
-
export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
|
|
40
|
-
export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
|
|
41
|
-
export const wasmecpair_private_key: (a: number) => number;
|
|
42
|
-
export const wasmecpair_public_key: (a: number) => number;
|
|
43
|
-
export const wasmecpair_to_wif: (a: number, b: number) => void;
|
|
44
|
-
export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
|
|
45
|
-
export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
|
|
46
|
-
export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
47
|
-
export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
|
|
48
|
-
export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
|
|
49
|
-
export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
50
|
-
export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
54
|
+
export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
|
|
51
55
|
export const __wbg_ironwoodwitness_free: (a: number, b: number) => void;
|
|
56
|
+
export const __wbg_messagenamespace_free: (a: number, b: number) => void;
|
|
52
57
|
export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
|
|
58
|
+
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
53
59
|
export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
|
|
54
|
-
export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
|
|
55
60
|
export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
|
|
56
61
|
export const __wbg_wrappsbt_free: (a: number, b: number) => void;
|
|
57
62
|
export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
|
|
58
63
|
export const __wbg_zcashv6transaction_free: (a: number, b: number) => void;
|
|
64
|
+
export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
65
|
+
export const inscriptionsnamespace_sign_reveal_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: bigint) => void;
|
|
59
66
|
export const ironwood_build_witness: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
60
67
|
export const ironwoodwitness_auth_path: (a: number, b: number) => void;
|
|
61
68
|
export const ironwoodwitness_position: (a: number) => number;
|
|
69
|
+
export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
|
|
70
|
+
export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
62
71
|
export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
63
72
|
export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
|
|
64
73
|
export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
|
|
@@ -69,6 +78,16 @@ export const wasmdashtransaction_lock_time: (a: number) => number;
|
|
|
69
78
|
export const wasmdashtransaction_output_count: (a: number) => number;
|
|
70
79
|
export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
|
|
71
80
|
export const wasmdashtransaction_version: (a: number) => number;
|
|
81
|
+
export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
|
|
82
|
+
export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
|
|
83
|
+
export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
|
|
84
|
+
export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
|
|
85
|
+
export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
|
|
86
|
+
export const wasmecpair_private_key: (a: number) => number;
|
|
87
|
+
export const wasmecpair_public_key: (a: number) => number;
|
|
88
|
+
export const wasmecpair_to_wif: (a: number, b: number) => void;
|
|
89
|
+
export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
|
|
90
|
+
export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
|
|
72
91
|
export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
73
92
|
export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
74
93
|
export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
|
|
@@ -81,7 +100,6 @@ export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c:
|
|
|
81
100
|
export const wasmtransaction_get_txid: (a: number, b: number) => void;
|
|
82
101
|
export const wasmtransaction_get_vsize: (a: number) => number;
|
|
83
102
|
export const wasmtransaction_to_bytes: (a: number, b: number) => void;
|
|
84
|
-
export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
|
|
85
103
|
export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
86
104
|
export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
|
|
87
105
|
export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
|
|
@@ -169,26 +187,11 @@ export const wasmzcashtransaction_lock_time: (a: number) => number;
|
|
|
169
187
|
export const wasmzcashtransaction_version: (a: number) => number;
|
|
170
188
|
export const wrappsbt_lock_time: (a: number) => number;
|
|
171
189
|
export const wrappsbt_version: (a: number) => number;
|
|
172
|
-
export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
|
|
173
|
-
export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
|
|
174
|
-
export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
175
|
-
export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
176
|
-
export const wasmdimensions_empty: () => number;
|
|
177
|
-
export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
178
|
-
export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
|
|
179
|
-
export const wasmdimensions_from_output_script_length: (a: number) => number;
|
|
180
|
-
export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
|
|
181
|
-
export const wasmdimensions_from_psbt: (a: number, b: number) => void;
|
|
182
|
-
export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
|
|
183
|
-
export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
|
|
184
|
-
export const wasmdimensions_get_output_vsize: (a: number) => number;
|
|
185
|
-
export const wasmdimensions_get_output_weight: (a: number) => number;
|
|
186
|
-
export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
|
|
187
|
-
export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
|
|
188
|
-
export const wasmdimensions_has_segwit: (a: number) => number;
|
|
189
|
-
export const wasmdimensions_plus: (a: number, b: number) => number;
|
|
190
|
-
export const wasmdimensions_times: (a: number, b: number) => number;
|
|
191
190
|
export const __wbg_bip322namespace_free: (a: number, b: number) => void;
|
|
191
|
+
export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
|
|
192
|
+
export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
|
|
193
|
+
export const __wbg_wasmbip32_free: (a: number, b: number) => void;
|
|
194
|
+
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
192
195
|
export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
|
|
193
196
|
export const bip322namespace_add_bip322_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
|
|
194
197
|
export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
|
|
@@ -196,15 +199,6 @@ export const bip322namespace_verify_bip322_psbt_input: (a: number, b: number, c:
|
|
|
196
199
|
export const bip322namespace_verify_bip322_psbt_input_with_pubkeys: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
|
|
197
200
|
export const bip322namespace_verify_bip322_tx_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
|
|
198
201
|
export const bip322namespace_verify_bip322_tx_input_with_pubkeys: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
|
|
199
|
-
export const wasmrootwalletkeys_backup_key: (a: number) => number;
|
|
200
|
-
export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
|
|
201
|
-
export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
|
|
202
|
-
export const wasmrootwalletkeys_user_key: (a: number) => number;
|
|
203
|
-
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;
|
|
204
|
-
export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
|
|
205
|
-
export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
|
|
206
|
-
export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
|
|
207
|
-
export const __wbg_wasmbip32_free: (a: number, b: number) => void;
|
|
208
202
|
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;
|
|
209
203
|
export const bitgopsbt_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number, j: number, k: number, l: number) => void;
|
|
210
204
|
export const bitgopsbt_add_ironwood_output: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
|
|
@@ -287,6 +281,8 @@ export const bitgopsbt_sign_with_privkey: (a: number, b: number, c: number, d: n
|
|
|
287
281
|
export const bitgopsbt_sign_with_xpriv: (a: number, b: number, c: number, d: number) => void;
|
|
288
282
|
export const bitgopsbt_transparent_output_unified_address: (a: number, b: number, c: number) => void;
|
|
289
283
|
export const bitgopsbt_unsigned_tx_id: (a: number, b: number) => void;
|
|
284
|
+
export const bitgopsbt_verify_ironwood_v6_signature_with_pub: (a: number, b: number, c: number, d: number) => void;
|
|
285
|
+
export const bitgopsbt_verify_ironwood_v6_signature_with_xpub: (a: number, b: number, c: number, d: number) => void;
|
|
290
286
|
export const bitgopsbt_verify_replay_protection_signature: (a: number, b: number, c: number, d: number) => void;
|
|
291
287
|
export const bitgopsbt_verify_signature_with_pub: (a: number, b: number, c: number, d: number) => void;
|
|
292
288
|
export const bitgopsbt_verify_signature_with_xpub: (a: number, b: number, c: number, d: number) => void;
|
|
@@ -302,8 +298,6 @@ export const fixedscriptwalletnamespace_output_script_with_network_str: (a: numb
|
|
|
302
298
|
export const fixedscriptwalletnamespace_p2sh_p2pk_output_script: (a: number, b: number, c: number) => void;
|
|
303
299
|
export const fixedscriptwalletnamespace_supports_script_type: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
304
300
|
export const fixedscriptwalletnamespace_to_wallet_keys: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
305
|
-
export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
306
|
-
export const inscriptionsnamespace_sign_reveal_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: bigint) => void;
|
|
307
301
|
export const wasmbip32_chain_code: (a: number) => number;
|
|
308
302
|
export const wasmbip32_depth: (a: number) => number;
|
|
309
303
|
export const wasmbip32_derive: (a: number, b: number, c: number) => void;
|
|
@@ -326,6 +320,14 @@ export const wasmbip32_private_key: (a: number) => number;
|
|
|
326
320
|
export const wasmbip32_public_key: (a: number) => number;
|
|
327
321
|
export const wasmbip32_to_base58: (a: number, b: number) => void;
|
|
328
322
|
export const wasmbip32_to_wif: (a: number, b: number) => void;
|
|
323
|
+
export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
324
|
+
export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
|
|
325
|
+
export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
|
|
326
|
+
export const wasmrootwalletkeys_backup_key: (a: number) => number;
|
|
327
|
+
export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
|
|
328
|
+
export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
|
|
329
|
+
export const wasmrootwalletkeys_user_key: (a: number) => number;
|
|
330
|
+
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;
|
|
329
331
|
export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
|
|
330
332
|
export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
|
|
331
333
|
export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
|