@getpara/viem-v1-integration 3.15.0 → 3.17.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.
|
@@ -85,7 +85,7 @@ function createParaAccount(para, walletAddress) {
|
|
|
85
85
|
signMessage: (_0) => __async(null, [_0], function* ({ message }) {
|
|
86
86
|
const hashedMessage = (0, import_viem.hashMessage)(message);
|
|
87
87
|
const res = yield para.signMessage({ walletId: currentWallet.id, messageBase64: (0, import_core_sdk.hexStringToBase64)(hashedMessage) });
|
|
88
|
-
const signature = res
|
|
88
|
+
const signature = (0, import_core_sdk.requireSuccessfulSignature)(res);
|
|
89
89
|
return `0x${signature}`;
|
|
90
90
|
}),
|
|
91
91
|
signTransaction: (transaction, args) => __async(null, null, function* () {
|
|
@@ -103,7 +103,7 @@ function createParaAccount(para, walletAddress) {
|
|
|
103
103
|
rlpEncodedTxBase64: (0, import_core_sdk.hexStringToBase64)(serializedTx.substring(2)),
|
|
104
104
|
chainId: `${transaction.chainId}`
|
|
105
105
|
});
|
|
106
|
-
const signature = res
|
|
106
|
+
const signature = (0, import_core_sdk.requireSuccessfulSignature)(res);
|
|
107
107
|
const formattedSig = (0, import_core_sdk.hexToSignature)(`0x${signature}`);
|
|
108
108
|
formattedSig.v += BigInt(27);
|
|
109
109
|
return serializer(transaction, formattedSig);
|
|
@@ -113,7 +113,7 @@ function createParaAccount(para, walletAddress) {
|
|
|
113
113
|
walletId: currentWallet.id,
|
|
114
114
|
messageBase64: (0, import_core_sdk.hexStringToBase64)((0, import_viem.hashTypedData)(typedData))
|
|
115
115
|
});
|
|
116
|
-
const signature = res
|
|
116
|
+
const signature = (0, import_core_sdk.requireSuccessfulSignature)(res);
|
|
117
117
|
return `0x${signature}`;
|
|
118
118
|
})
|
|
119
119
|
};
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
hashTypedData
|
|
42
42
|
} from "viem";
|
|
43
43
|
import * as viemChains from "viem/chains";
|
|
44
|
-
import { hexStringToBase64, hexToSignature } from "@getpara/core-sdk";
|
|
44
|
+
import { hexStringToBase64, hexToSignature, requireSuccessfulSignature } from "@getpara/core-sdk";
|
|
45
45
|
function createParaAccount(para, walletAddress) {
|
|
46
46
|
let currentWallet;
|
|
47
47
|
if (walletAddress) {
|
|
@@ -58,7 +58,7 @@ function createParaAccount(para, walletAddress) {
|
|
|
58
58
|
signMessage: (_0) => __async(null, [_0], function* ({ message }) {
|
|
59
59
|
const hashedMessage = hashMessage(message);
|
|
60
60
|
const res = yield para.signMessage({ walletId: currentWallet.id, messageBase64: hexStringToBase64(hashedMessage) });
|
|
61
|
-
const signature = res
|
|
61
|
+
const signature = requireSuccessfulSignature(res);
|
|
62
62
|
return `0x${signature}`;
|
|
63
63
|
}),
|
|
64
64
|
signTransaction: (transaction, args) => __async(null, null, function* () {
|
|
@@ -76,7 +76,7 @@ function createParaAccount(para, walletAddress) {
|
|
|
76
76
|
rlpEncodedTxBase64: hexStringToBase64(serializedTx.substring(2)),
|
|
77
77
|
chainId: `${transaction.chainId}`
|
|
78
78
|
});
|
|
79
|
-
const signature = res
|
|
79
|
+
const signature = requireSuccessfulSignature(res);
|
|
80
80
|
const formattedSig = hexToSignature(`0x${signature}`);
|
|
81
81
|
formattedSig.v += BigInt(27);
|
|
82
82
|
return serializer(transaction, formattedSig);
|
|
@@ -86,7 +86,7 @@ function createParaAccount(para, walletAddress) {
|
|
|
86
86
|
walletId: currentWallet.id,
|
|
87
87
|
messageBase64: hexStringToBase64(hashTypedData(typedData))
|
|
88
88
|
});
|
|
89
|
-
const signature = res
|
|
89
|
+
const signature = requireSuccessfulSignature(res);
|
|
90
90
|
return `0x${signature}`;
|
|
91
91
|
})
|
|
92
92
|
};
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/viem-v1-integration",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.17.0",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@getpara/core-sdk": "3.
|
|
5
|
+
"@getpara/core-sdk": "3.17.0"
|
|
6
6
|
},
|
|
7
7
|
"devDependencies": {
|
|
8
8
|
"typescript": "^5.8.3",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"dist",
|
|
20
20
|
"package.json"
|
|
21
21
|
],
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "4e85077724ede8b0e09a8784cb01a898340635cd",
|
|
23
23
|
"main": "dist/cjs/index.js",
|
|
24
24
|
"module": "dist/esm/index.js",
|
|
25
25
|
"peerDependencies": {
|