@msafe/sui3-sdk 0.0.51 → 0.0.52-pre-84992c2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +16 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -4
- package/dist/index.js.map +1 -1
- package/package.json +4 -7
- package/src/core/MSafeAccount.ts +11 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@msafe/sui3-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.52-pre-84992c2.0",
|
|
4
4
|
"description": "SDK for MSafe SUI V3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"author": "MSafe <admin@m-safe.io>",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@msafe/sui-wallet": "^0.0.
|
|
25
|
-
"@msafe/sui3-utils": "^3.1.
|
|
24
|
+
"@msafe/sui-wallet": "^0.0.68",
|
|
25
|
+
"@msafe/sui3-utils": "^3.1.63",
|
|
26
|
+
"@mysten/sui.js": "0.53.0",
|
|
26
27
|
"axios": "^1.6.6",
|
|
27
28
|
"buffer": "^6.0.3"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
31
|
"@msafe/mpay-sdk-sui": "^1.0.25",
|
|
31
|
-
"@mysten/sui.js": "^0.50.1",
|
|
32
32
|
"@types/jest": "^29.5.8",
|
|
33
33
|
"@types/node": "^20.9.2",
|
|
34
34
|
"@typescript-eslint/eslint-plugin": "^6.5.0",
|
|
@@ -62,8 +62,5 @@
|
|
|
62
62
|
"build": "yarn clean && tsup --platform browser --format cjs,esm --dts",
|
|
63
63
|
"build-yalc": "yarn build && yalc publish --private",
|
|
64
64
|
"prerelease": "yarn build && chmod +x ./scripts/prerelease.sh && ./scripts/prerelease.sh"
|
|
65
|
-
},
|
|
66
|
-
"peerDependencies": {
|
|
67
|
-
"@mysten/sui.js": ">0.46.0"
|
|
68
65
|
}
|
|
69
66
|
}
|
package/src/core/MSafeAccount.ts
CHANGED
|
@@ -19,7 +19,8 @@ import {
|
|
|
19
19
|
import { SuiObjectData, SuiObjectResponse } from '@mysten/sui.js/client';
|
|
20
20
|
import { SerializedSignature } from '@mysten/sui.js/cryptography';
|
|
21
21
|
import { TransactionBlock } from '@mysten/sui.js/transactions';
|
|
22
|
-
import { normalizeStructTag, toHEX } from '@mysten/sui.js/utils';
|
|
22
|
+
import { fromHEX, normalizeStructTag, toHEX } from '@mysten/sui.js/utils';
|
|
23
|
+
import { SUI_MAINNET_CHAIN, SUI_TESTNET_CHAIN } from '@mysten/wallet-standard';
|
|
23
24
|
|
|
24
25
|
import { MSafeGlobals } from '@/globals/MSafeGlobals';
|
|
25
26
|
import { Simulator } from '@/simulate/simulator';
|
|
@@ -144,6 +145,9 @@ export class MSafeAccount {
|
|
|
144
145
|
suiClient: this.globals.suiClient,
|
|
145
146
|
account: {
|
|
146
147
|
address: this.address,
|
|
148
|
+
publicKey: fromHEX(this.address),
|
|
149
|
+
chains: [SUI_MAINNET_CHAIN, SUI_TESTNET_CHAIN],
|
|
150
|
+
features: [],
|
|
147
151
|
},
|
|
148
152
|
});
|
|
149
153
|
return this.simulator.simulate({ txb, sender: this.address });
|
|
@@ -182,6 +186,9 @@ export class MSafeAccount {
|
|
|
182
186
|
suiClient: this.globals.suiClient,
|
|
183
187
|
account: {
|
|
184
188
|
address: this.address,
|
|
189
|
+
publicKey: fromHEX(this.address),
|
|
190
|
+
chains: [SUI_MAINNET_CHAIN, SUI_TESTNET_CHAIN],
|
|
191
|
+
features: [],
|
|
185
192
|
},
|
|
186
193
|
});
|
|
187
194
|
txb.setGasPrice(input.gasPrice);
|
|
@@ -347,6 +354,9 @@ export class MSafeAccount {
|
|
|
347
354
|
suiClient: this.globals.suiClient,
|
|
348
355
|
account: {
|
|
349
356
|
address: this.address,
|
|
357
|
+
publicKey: fromHEX(this.address),
|
|
358
|
+
chains: [SUI_MAINNET_CHAIN, SUI_TESTNET_CHAIN],
|
|
359
|
+
features: [],
|
|
350
360
|
},
|
|
351
361
|
});
|
|
352
362
|
return this.simulator.simulate({ txb, sender: this.address });
|