@msafe/sui3-sdk 0.0.52-pre-3eeb6fb.0 → 0.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -20
- package/dist/index.js.map +1 -1
- package/package.json +7 -4
- package/src/core/MSafeAccount.ts +2 -14
package/dist/index.js
CHANGED
|
@@ -42939,11 +42939,7 @@ import {
|
|
|
42939
42939
|
isSameAddress as isSameAddress2
|
|
42940
42940
|
} from "@msafe/sui3-utils";
|
|
42941
42941
|
import { TransactionBlock as TransactionBlock13 } from "@mysten/sui.js/transactions";
|
|
42942
|
-
import {
|
|
42943
|
-
|
|
42944
|
-
// node_modules/@mysten/wallet-standard/dist/esm/chains.js
|
|
42945
|
-
var SUI_TESTNET_CHAIN = "sui:testnet";
|
|
42946
|
-
var SUI_MAINNET_CHAIN = "sui:mainnet";
|
|
42942
|
+
import { normalizeStructTag as normalizeStructTag3, toHEX } from "@mysten/sui.js/utils";
|
|
42947
42943
|
|
|
42948
42944
|
// src/simulate/simulator.ts
|
|
42949
42945
|
import { TransactionBlock as TransactionBlock12 } from "@mysten/sui.js/transactions";
|
|
@@ -43455,10 +43451,7 @@ var MSafeAccount = class _MSafeAccount {
|
|
|
43455
43451
|
txSubType: request.txSubType,
|
|
43456
43452
|
suiClient: this.globals.suiClient,
|
|
43457
43453
|
account: {
|
|
43458
|
-
address: this.address
|
|
43459
|
-
publicKey: fromHEX(this.address),
|
|
43460
|
-
chains: [SUI_MAINNET_CHAIN, SUI_TESTNET_CHAIN],
|
|
43461
|
-
features: []
|
|
43454
|
+
address: this.address
|
|
43462
43455
|
}
|
|
43463
43456
|
});
|
|
43464
43457
|
return this.simulator.simulate({ txb, sender: this.address });
|
|
@@ -43490,17 +43483,12 @@ var MSafeAccount = class _MSafeAccount {
|
|
|
43490
43483
|
txSubType: input.txSubType,
|
|
43491
43484
|
suiClient: this.globals.suiClient,
|
|
43492
43485
|
account: {
|
|
43493
|
-
address: this.address
|
|
43494
|
-
publicKey: fromHEX(this.address),
|
|
43495
|
-
chains: [SUI_MAINNET_CHAIN, SUI_TESTNET_CHAIN],
|
|
43496
|
-
features: []
|
|
43486
|
+
address: this.address
|
|
43497
43487
|
}
|
|
43498
43488
|
});
|
|
43499
|
-
const userAddress = await this.wallet.address();
|
|
43500
|
-
console.log("\u{1F680} ~ MSafeAccount ~ userAddress:", userAddress);
|
|
43501
43489
|
txb.setGasPrice(input.gasPrice);
|
|
43502
43490
|
txb.setGasBudget(input.gasBudget);
|
|
43503
|
-
txb.setSender(
|
|
43491
|
+
txb.setSender(this.address);
|
|
43504
43492
|
const payload = await txb.build({ client: this.globals.suiClient });
|
|
43505
43493
|
const digest = await txb.getDigest({ client: this.globals.suiClient });
|
|
43506
43494
|
const signature = await this.wallet.signTransactionBlock({ transactionBlock: payload });
|
|
@@ -43640,10 +43628,7 @@ var MSafeAccount = class _MSafeAccount {
|
|
|
43640
43628
|
txSubType: intention.txSubType,
|
|
43641
43629
|
suiClient: this.globals.suiClient,
|
|
43642
43630
|
account: {
|
|
43643
|
-
address: this.address
|
|
43644
|
-
publicKey: fromHEX(this.address),
|
|
43645
|
-
chains: [SUI_MAINNET_CHAIN, SUI_TESTNET_CHAIN],
|
|
43646
|
-
features: []
|
|
43631
|
+
address: this.address
|
|
43647
43632
|
}
|
|
43648
43633
|
});
|
|
43649
43634
|
return this.simulator.simulate({ txb, sender: this.address });
|