bulk-keychain-wasm 0.1.30 → 0.1.32
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 +12 -2
- package/bulk_keychain_wasm.js +23 -2
- package/bulk_keychain_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/bulk_keychain_wasm.d.ts
CHANGED
|
@@ -251,8 +251,9 @@ export class WasmSigner {
|
|
|
251
251
|
* @param toPubkey - destination account pubkey (base58)
|
|
252
252
|
* @param marginAmount - amount to transfer
|
|
253
253
|
* @param nonce - optional nonce
|
|
254
|
+
* @param symbol - optional isolated perpetual symbol; `to` is its parent account
|
|
254
255
|
*/
|
|
255
|
-
signTransfer(kind: string | null | undefined, from_pubkey: string, to_pubkey: string, margin_amount: number, nonce?: string | null): any;
|
|
256
|
+
signTransfer(kind: string | null | undefined, from_pubkey: string, to_pubkey: string, margin_amount: number, nonce?: string | null, symbol?: string | null): any;
|
|
256
257
|
/**
|
|
257
258
|
* Sign a liquidator config update (`liq`)
|
|
258
259
|
*/
|
|
@@ -337,6 +338,14 @@ export function finalizeWalletMessage(wallet: WasmWalletPreparedMessage, signatu
|
|
|
337
338
|
*/
|
|
338
339
|
export function init(): void;
|
|
339
340
|
|
|
341
|
+
/**
|
|
342
|
+
* Prepare an ordered top-level action batch as one signed transaction.
|
|
343
|
+
*
|
|
344
|
+
* @param actions - Ordered array of top-level action objects
|
|
345
|
+
* @param options - { account: string, signer?: string, nonce?: string }
|
|
346
|
+
*/
|
|
347
|
+
export function prepareActionGroup(actions: any, options: any): WasmPreparedMessage;
|
|
348
|
+
|
|
340
349
|
/**
|
|
341
350
|
* Prepare agent wallet creation for external signing
|
|
342
351
|
*
|
|
@@ -564,6 +573,7 @@ export interface InitOutput {
|
|
|
564
573
|
readonly finalizeTransaction: (a: any, b: number, c: number) => [number, number, number];
|
|
565
574
|
readonly finalizeWalletMessage: (a: number, b: number, c: number) => [number, number, number];
|
|
566
575
|
readonly init: () => void;
|
|
576
|
+
readonly prepareActionGroup: (a: any, b: any) => [number, number, number];
|
|
567
577
|
readonly prepareAgentWallet: (a: number, b: number, c: number, d: any) => [number, number, number];
|
|
568
578
|
readonly prepareAll: (a: any, b: any) => [number, number, number, number];
|
|
569
579
|
readonly prepareApproveBuilderCode: (a: number, b: number, c: number, d: any) => [number, number, number];
|
|
@@ -642,7 +652,7 @@ export interface InitOutput {
|
|
|
642
652
|
readonly wasmsigner_signRenameSubAccount: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number];
|
|
643
653
|
readonly wasmsigner_signRevokeBuilderCode: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
644
654
|
readonly wasmsigner_signRevokeCommissionFee: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
645
|
-
readonly wasmsigner_signTransfer: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number, number];
|
|
655
|
+
readonly wasmsigner_signTransfer: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => [number, number, number];
|
|
646
656
|
readonly wasmsigner_signUpdateLiquidatorConfig: (a: number, b: any, c: number, d: number) => [number, number, number];
|
|
647
657
|
readonly wasmsigner_signUpdateMultisigPolicy: (a: number, b: number, c: number, d: any, e: number, f: number, g: number, h: number, i: number) => [number, number, number];
|
|
648
658
|
readonly wasmsigner_signUserSettings: (a: number, b: any, c: number, d: number) => [number, number, number];
|
package/bulk_keychain_wasm.js
CHANGED
|
@@ -817,14 +817,16 @@ export class WasmSigner {
|
|
|
817
817
|
* @param toPubkey - destination account pubkey (base58)
|
|
818
818
|
* @param marginAmount - amount to transfer
|
|
819
819
|
* @param nonce - optional nonce
|
|
820
|
+
* @param symbol - optional isolated perpetual symbol; `to` is its parent account
|
|
820
821
|
* @param {string | null | undefined} kind
|
|
821
822
|
* @param {string} from_pubkey
|
|
822
823
|
* @param {string} to_pubkey
|
|
823
824
|
* @param {number} margin_amount
|
|
824
825
|
* @param {string | null} [nonce]
|
|
826
|
+
* @param {string | null} [symbol]
|
|
825
827
|
* @returns {any}
|
|
826
828
|
*/
|
|
827
|
-
signTransfer(kind, from_pubkey, to_pubkey, margin_amount, nonce) {
|
|
829
|
+
signTransfer(kind, from_pubkey, to_pubkey, margin_amount, nonce, symbol) {
|
|
828
830
|
var ptr0 = isLikeNone(kind) ? 0 : passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
829
831
|
var len0 = WASM_VECTOR_LEN;
|
|
830
832
|
const ptr1 = passStringToWasm0(from_pubkey, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -833,7 +835,9 @@ export class WasmSigner {
|
|
|
833
835
|
const len2 = WASM_VECTOR_LEN;
|
|
834
836
|
var ptr3 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
835
837
|
var len3 = WASM_VECTOR_LEN;
|
|
836
|
-
|
|
838
|
+
var ptr4 = isLikeNone(symbol) ? 0 : passStringToWasm0(symbol, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
839
|
+
var len4 = WASM_VECTOR_LEN;
|
|
840
|
+
const ret = wasm.wasmsigner_signTransfer(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, margin_amount, ptr3, len3, ptr4, len4);
|
|
837
841
|
if (ret[2]) {
|
|
838
842
|
throw takeFromExternrefTable0(ret[1]);
|
|
839
843
|
}
|
|
@@ -1205,6 +1209,23 @@ export function init() {
|
|
|
1205
1209
|
wasm.init();
|
|
1206
1210
|
}
|
|
1207
1211
|
|
|
1212
|
+
/**
|
|
1213
|
+
* Prepare an ordered top-level action batch as one signed transaction.
|
|
1214
|
+
*
|
|
1215
|
+
* @param actions - Ordered array of top-level action objects
|
|
1216
|
+
* @param options - { account: string, signer?: string, nonce?: string }
|
|
1217
|
+
* @param {any} actions
|
|
1218
|
+
* @param {any} options
|
|
1219
|
+
* @returns {WasmPreparedMessage}
|
|
1220
|
+
*/
|
|
1221
|
+
export function prepareActionGroup(actions, options) {
|
|
1222
|
+
const ret = wasm.prepareActionGroup(actions, options);
|
|
1223
|
+
if (ret[2]) {
|
|
1224
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1225
|
+
}
|
|
1226
|
+
return WasmPreparedMessage.__wrap(ret[0]);
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1208
1229
|
/**
|
|
1209
1230
|
* Prepare agent wallet creation for external signing
|
|
1210
1231
|
*
|
|
Binary file
|
package/package.json
CHANGED