bulk-keychain-wasm 0.1.21 → 0.1.22
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/bulk_keychain_wasm.d.ts
CHANGED
|
@@ -116,11 +116,11 @@ export class WasmSigner {
|
|
|
116
116
|
/**
|
|
117
117
|
* Create a signer from base58-encoded secret key
|
|
118
118
|
*/
|
|
119
|
-
static fromBase58(s: string): WasmSigner;
|
|
119
|
+
static fromBase58(s: string, signature_domain: string): WasmSigner;
|
|
120
120
|
/**
|
|
121
121
|
* Create a new signer from a keypair
|
|
122
122
|
*/
|
|
123
|
-
constructor(keypair: WasmKeypair);
|
|
123
|
+
constructor(keypair: WasmKeypair, signature_domain: string);
|
|
124
124
|
/**
|
|
125
125
|
* Enable/disable batch order ID computation for multi-order transactions.
|
|
126
126
|
*/
|
|
@@ -264,7 +264,7 @@ export class WasmSigner {
|
|
|
264
264
|
/**
|
|
265
265
|
* Create a signer with nonce management
|
|
266
266
|
*/
|
|
267
|
-
static withNonceManager(keypair: WasmKeypair, strategy: string): WasmSigner;
|
|
267
|
+
static withNonceManager(keypair: WasmKeypair, strategy: string, signature_domain: string): WasmSigner;
|
|
268
268
|
/**
|
|
269
269
|
* Get the signer's public key
|
|
270
270
|
*/
|
|
@@ -560,8 +560,8 @@ export interface InitOutput {
|
|
|
560
560
|
readonly wasmpreparedmessage_signer: (a: number) => [number, number];
|
|
561
561
|
readonly wasmsigner_computesBatchOrderIds: (a: number) => number;
|
|
562
562
|
readonly wasmsigner_computesOrderId: (a: number) => number;
|
|
563
|
-
readonly wasmsigner_fromBase58: (a: number, b: number) => [number, number, number];
|
|
564
|
-
readonly wasmsigner_new: (a: number) => number;
|
|
563
|
+
readonly wasmsigner_fromBase58: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
564
|
+
readonly wasmsigner_new: (a: number, b: number, c: number) => [number, number, number];
|
|
565
565
|
readonly wasmsigner_pubkey: (a: number) => [number, number];
|
|
566
566
|
readonly wasmsigner_setComputeBatchOrderIds: (a: number, b: number) => void;
|
|
567
567
|
readonly wasmsigner_setComputeOrderId: (a: number, b: number) => void;
|
|
@@ -591,7 +591,7 @@ export interface InitOutput {
|
|
|
591
591
|
readonly wasmsigner_signUpdateMultisigPolicy: (a: number, b: number, c: number, d: any, e: number, f: number, g: number, h: number, i: number) => [number, number, number];
|
|
592
592
|
readonly wasmsigner_signUserSettings: (a: number, b: any, c: number, d: number) => [number, number, number];
|
|
593
593
|
readonly wasmsigner_signWhitelistFaucet: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
594
|
-
readonly wasmsigner_withNonceManager: (a: number, b: number, c: number) => [number, number, number];
|
|
594
|
+
readonly wasmsigner_withNonceManager: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
595
595
|
readonly init: () => void;
|
|
596
596
|
readonly wasmsigner_signApproveCommissionFee: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
597
597
|
readonly prepareApproveCommissionFee: (a: number, b: number, c: number, d: any) => [number, number, number];
|
package/bulk_keychain_wasm.js
CHANGED
|
@@ -333,12 +333,15 @@ export class WasmSigner {
|
|
|
333
333
|
/**
|
|
334
334
|
* Create a signer from base58-encoded secret key
|
|
335
335
|
* @param {string} s
|
|
336
|
+
* @param {string} signature_domain
|
|
336
337
|
* @returns {WasmSigner}
|
|
337
338
|
*/
|
|
338
|
-
static fromBase58(s) {
|
|
339
|
+
static fromBase58(s, signature_domain) {
|
|
339
340
|
const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
340
341
|
const len0 = WASM_VECTOR_LEN;
|
|
341
|
-
const
|
|
342
|
+
const ptr1 = passStringToWasm0(signature_domain, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
343
|
+
const len1 = WASM_VECTOR_LEN;
|
|
344
|
+
const ret = wasm.wasmsigner_fromBase58(ptr0, len0, ptr1, len1);
|
|
342
345
|
if (ret[2]) {
|
|
343
346
|
throw takeFromExternrefTable0(ret[1]);
|
|
344
347
|
}
|
|
@@ -347,11 +350,17 @@ export class WasmSigner {
|
|
|
347
350
|
/**
|
|
348
351
|
* Create a new signer from a keypair
|
|
349
352
|
* @param {WasmKeypair} keypair
|
|
353
|
+
* @param {string} signature_domain
|
|
350
354
|
*/
|
|
351
|
-
constructor(keypair) {
|
|
355
|
+
constructor(keypair, signature_domain) {
|
|
352
356
|
_assertClass(keypair, WasmKeypair);
|
|
353
|
-
const
|
|
354
|
-
|
|
357
|
+
const ptr0 = passStringToWasm0(signature_domain, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
358
|
+
const len0 = WASM_VECTOR_LEN;
|
|
359
|
+
const ret = wasm.wasmsigner_new(keypair.__wbg_ptr, ptr0, len0);
|
|
360
|
+
if (ret[2]) {
|
|
361
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
362
|
+
}
|
|
363
|
+
this.__wbg_ptr = ret[0];
|
|
355
364
|
WasmSignerFinalization.register(this, this.__wbg_ptr, this);
|
|
356
365
|
return this;
|
|
357
366
|
}
|
|
@@ -846,13 +855,16 @@ export class WasmSigner {
|
|
|
846
855
|
* Create a signer with nonce management
|
|
847
856
|
* @param {WasmKeypair} keypair
|
|
848
857
|
* @param {string} strategy
|
|
858
|
+
* @param {string} signature_domain
|
|
849
859
|
* @returns {WasmSigner}
|
|
850
860
|
*/
|
|
851
|
-
static withNonceManager(keypair, strategy) {
|
|
861
|
+
static withNonceManager(keypair, strategy, signature_domain) {
|
|
852
862
|
_assertClass(keypair, WasmKeypair);
|
|
853
863
|
const ptr0 = passStringToWasm0(strategy, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
854
864
|
const len0 = WASM_VECTOR_LEN;
|
|
855
|
-
const
|
|
865
|
+
const ptr1 = passStringToWasm0(signature_domain, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
866
|
+
const len1 = WASM_VECTOR_LEN;
|
|
867
|
+
const ret = wasm.wasmsigner_withNonceManager(keypair.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
856
868
|
if (ret[2]) {
|
|
857
869
|
throw takeFromExternrefTable0(ret[1]);
|
|
858
870
|
}
|
|
Binary file
|
package/package.json
CHANGED