@msafe/sui3-sdk 0.0.47-pre-e1a0d17.0 → 0.0.48
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 +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +7 -3
- package/src/backend/BackendImpl.ts +2 -5
- package/src/core/MSafeAccount.ts +1 -1
- package/src/globals/const.ts +0 -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.48",
|
|
4
4
|
"description": "SDK for MSafe SUI V3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -22,13 +22,16 @@
|
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@msafe/sui-wallet": "^0.0.41",
|
|
25
|
-
"@msafe/sui3-utils": "^3.1.
|
|
25
|
+
"@msafe/sui3-utils": "^3.1.55",
|
|
26
26
|
"axios": "^1.6.6",
|
|
27
|
-
"buffer": "^6.0.3"
|
|
27
|
+
"buffer": "^6.0.3",
|
|
28
|
+
"json-bigint": "^1.0.0"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
31
|
+
"@msafe/mpay-sdk-sui": "^1.0.25",
|
|
30
32
|
"@mysten/sui.js": "^0.50.1",
|
|
31
33
|
"@types/jest": "^29.5.8",
|
|
34
|
+
"@types/json-bigint": "^1.0.4",
|
|
32
35
|
"@types/node": "^20.9.2",
|
|
33
36
|
"@typescript-eslint/eslint-plugin": "^6.5.0",
|
|
34
37
|
"@typescript-eslint/parser": "^6.5.0",
|
|
@@ -54,6 +57,7 @@
|
|
|
54
57
|
},
|
|
55
58
|
"scripts": {
|
|
56
59
|
"test": "jest",
|
|
60
|
+
"test:e2e": "jest test/unit/core/msafe-e2e.test.ts",
|
|
57
61
|
"unit": "TEST_ENV=UNIT jest",
|
|
58
62
|
"clean": "rm -rf ./dist",
|
|
59
63
|
"lint": "eslint . --ext .ts,.tsx",
|
|
@@ -40,6 +40,7 @@ import {
|
|
|
40
40
|
} from '@msafe/sui3-utils';
|
|
41
41
|
import { SerializedSignature, PublicKey } from '@mysten/sui.js/cryptography';
|
|
42
42
|
import axios, { AxiosError, AxiosRequestConfig, AxiosRequestTransformer, AxiosResponse } from 'axios';
|
|
43
|
+
import * as JSONBig from 'json-bigint';
|
|
43
44
|
|
|
44
45
|
import { IBackend } from '@/backend/interface';
|
|
45
46
|
import { addPrefix } from '@/utils';
|
|
@@ -333,11 +334,7 @@ export class BackendImpl implements IBackend {
|
|
|
333
334
|
transformRequests = [transformRequest];
|
|
334
335
|
}
|
|
335
336
|
|
|
336
|
-
return [
|
|
337
|
-
(d: any) =>
|
|
338
|
-
JSON.parse(JSON.stringify(d, (_, value) => (typeof value === 'bigint' ? `${value.toString()}n` : value))),
|
|
339
|
-
...transformRequests,
|
|
340
|
-
];
|
|
337
|
+
return [(d: any) => JSONBig.parse(JSONBig.stringify(d)), ...transformRequests];
|
|
341
338
|
}
|
|
342
339
|
}
|
|
343
340
|
|
package/src/core/MSafeAccount.ts
CHANGED
|
@@ -385,7 +385,7 @@ export class MSafeAccount {
|
|
|
385
385
|
return this.suiClient.executeTransactionBlock({
|
|
386
386
|
transactionBlock: HexToUint8Array(payload),
|
|
387
387
|
signature: multiSignature,
|
|
388
|
-
options: { showEffects: true },
|
|
388
|
+
options: { showEffects: true, showEvents: true },
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
391
|
|
package/src/globals/const.ts
CHANGED
|
@@ -26,7 +26,6 @@ export interface MSafeConfigOptions {
|
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
// export const TESTNET_RPC_URL = 'https://sui-testnet.blockvision.org/v1/2Sgk89ivT64MnKdcGzjmyjY2ndD';
|
|
30
29
|
export const TESTNET_RPC_URL = 'https://fullnode.testnet.sui.io';
|
|
31
30
|
export const MAINNET_RPC_URL = 'https://fullnode.mainnet.sui.io';
|
|
32
31
|
|