@msafe/sui3-sdk 0.0.49-pre-74b5d1d.0 → 0.0.49
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 +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/core/MSafeClient.ts +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@msafe/sui3-sdk",
|
|
3
|
-
"version": "0.0.49
|
|
3
|
+
"version": "0.0.49",
|
|
4
4
|
"description": "SDK for MSafe SUI V3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@msafe/sui-wallet": "^0.0.67-pre-3d37348.0",
|
|
25
|
-
"@msafe/sui3-utils": "^3.1.
|
|
25
|
+
"@msafe/sui3-utils": "^3.1.60",
|
|
26
26
|
"axios": "^1.6.6",
|
|
27
27
|
"buffer": "^6.0.3"
|
|
28
28
|
},
|
package/src/core/MSafeClient.ts
CHANGED
|
@@ -30,7 +30,7 @@ export class MSafeClient {
|
|
|
30
30
|
return new MSafeClient(globals);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
async connectWallet(input: { wallet: IWallet; jwtToken?: JWTToken }): Promise<JWTToken> {
|
|
33
|
+
async connectWallet(input: { wallet: IWallet; jwtToken?: JWTToken; mockAddress?: string }): Promise<JWTToken> {
|
|
34
34
|
if (input.jwtToken) {
|
|
35
35
|
const verified = await this.backend.verifyToken(input.jwtToken);
|
|
36
36
|
if (verified) {
|
|
@@ -45,7 +45,7 @@ export class MSafeClient {
|
|
|
45
45
|
return jwt;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
private async authSign(wallet: IWallet): Promise<JWTToken> {
|
|
48
|
+
private async authSign(wallet: IWallet, mockAddress?: string): Promise<JWTToken> {
|
|
49
49
|
const messageStr = SigningMessageHelper.loginMessageWithTimestamp(new Date().toUTCString());
|
|
50
50
|
const sig = await wallet.signPersonalMessage({
|
|
51
51
|
messageStr,
|
|
@@ -55,6 +55,7 @@ export class MSafeClient {
|
|
|
55
55
|
message: messageStr,
|
|
56
56
|
signature: sig.signature,
|
|
57
57
|
walletType: wallet.walletType,
|
|
58
|
+
mockAddress,
|
|
58
59
|
});
|
|
59
60
|
}
|
|
60
61
|
|