@getpara/viem-v2-integration 3.5.0 → 3.6.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.
@@ -83,19 +83,19 @@ function resolveExternalSigner(signer) {
83
83
  publicKey: "0x",
84
84
  source: "custom",
85
85
  type: "local",
86
- sign: (_0) => __async(this, [_0], function* ({ hash }) {
86
+ sign: (_0) => __async(null, [_0], function* ({ hash }) {
87
87
  return signer.signMessage({ account: account.address, message: { raw: hash } });
88
88
  }),
89
- signMessage: (_0) => __async(this, [_0], function* ({ message }) {
89
+ signMessage: (_0) => __async(null, [_0], function* ({ message }) {
90
90
  return signer.signMessage({ account: account.address, message });
91
91
  }),
92
- signTransaction: (tx) => __async(this, null, function* () {
92
+ signTransaction: (tx) => __async(null, null, function* () {
93
93
  return signer.signTransaction(__spreadProps(__spreadValues({}, tx), { account }));
94
94
  }),
95
- signTypedData: (typedData) => __async(this, null, function* () {
95
+ signTypedData: (typedData) => __async(null, null, function* () {
96
96
  return signer.signTypedData(__spreadProps(__spreadValues({}, typedData), { account: account.address }));
97
97
  }),
98
- signAuthorization: () => __async(this, null, function* () {
98
+ signAuthorization: () => __async(null, null, function* () {
99
99
  throw new Error(
100
100
  "EIP-7702 account delegation (signAuthorization) is not supported with external wallets. External wallets add an EIP-191 prefix to all signatures, which is incompatible with the raw ecrecover required by EIP-7702. Use an embedded Para wallet for 7702 mode, or use 4337 mode which works with any wallet."
101
101
  );
package/dist/cjs/index.js CHANGED
@@ -12,9 +12,9 @@ var __copyProps = (to, from, except, desc) => {
12
12
  };
13
13
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
14
14
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
- var src_exports = {};
16
- module.exports = __toCommonJS(src_exports);
17
- __reExport(src_exports, require("./viemWalletClient.js"), module.exports);
15
+ var index_exports = {};
16
+ module.exports = __toCommonJS(index_exports);
17
+ __reExport(index_exports, require("./viemWalletClient.js"), module.exports);
18
18
  // Annotate the CommonJS export names for ESM import in node:
19
19
  0 && (module.exports = {
20
20
  ...require("./viemWalletClient.js")
@@ -103,7 +103,7 @@ function createParaViemAccount(paraOrOptions, walletAddress) {
103
103
  source: "custom",
104
104
  type: "local",
105
105
  /** Signs a raw hash directly. */
106
- sign: (_0) => __async(this, [_0], function* ({ hash }) {
106
+ sign: (_0) => __async(null, [_0], function* ({ hash }) {
107
107
  const res = yield para.signMessage({
108
108
  walletId: currentWallet.id,
109
109
  messageBase64: (0, import_core_sdk.hexStringToBase64)(hash)
@@ -112,14 +112,14 @@ function createParaViemAccount(paraOrOptions, walletAddress) {
112
112
  return normalizeSignature(signature);
113
113
  }),
114
114
  /** Signs an EIP-191 personal message (prefixed and hashed). */
115
- signMessage: (_0) => __async(this, [_0], function* ({ message }) {
115
+ signMessage: (_0) => __async(null, [_0], function* ({ message }) {
116
116
  const hashedMessage = (0, import_viem.hashMessage)(message);
117
117
  const res = yield para.signMessage({ walletId: currentWallet.id, messageBase64: (0, import_core_sdk.hexStringToBase64)(hashedMessage) });
118
118
  const signature = res.signature;
119
119
  return normalizeSignature(signature);
120
120
  }),
121
121
  /** Signs and serializes an Ethereum transaction. */
122
- signTransaction: (transaction, args) => __async(this, null, function* () {
122
+ signTransaction: (transaction, args) => __async(null, null, function* () {
123
123
  let { serializer } = args || {};
124
124
  if (!serializer) {
125
125
  serializer = import_viem.serializeTransaction;
@@ -145,7 +145,7 @@ function createParaViemAccount(paraOrOptions, walletAddress) {
145
145
  });
146
146
  }),
147
147
  /** Signs EIP-712 typed data. */
148
- signTypedData: (typedDataDefinition) => __async(this, null, function* () {
148
+ signTypedData: (typedDataDefinition) => __async(null, null, function* () {
149
149
  const res = yield para.signMessage({
150
150
  walletId: currentWallet.id,
151
151
  messageBase64: (0, import_core_sdk.hexStringToBase64)((0, import_viem.hashTypedData)(typedDataDefinition))
@@ -157,7 +157,7 @@ function createParaViemAccount(paraOrOptions, walletAddress) {
157
157
  * Signs an EIP-7702 authorization for account delegation.
158
158
  * Returns yParity (0/1) per EIP-7702, not legacy v (27/28).
159
159
  */
160
- signAuthorization: (authorization) => __async(this, null, function* () {
160
+ signAuthorization: (authorization) => __async(null, null, function* () {
161
161
  var _a;
162
162
  const address = (_a = authorization.contractAddress) != null ? _a : authorization.address;
163
163
  const hash = (0, import_utils.hashAuthorization)({ address, chainId: authorization.chainId, nonce: authorization.nonce });
@@ -23,19 +23,19 @@ function resolveExternalSigner(signer) {
23
23
  publicKey: "0x",
24
24
  source: "custom",
25
25
  type: "local",
26
- sign: (_0) => __async(this, [_0], function* ({ hash }) {
26
+ sign: (_0) => __async(null, [_0], function* ({ hash }) {
27
27
  return signer.signMessage({ account: account.address, message: { raw: hash } });
28
28
  }),
29
- signMessage: (_0) => __async(this, [_0], function* ({ message }) {
29
+ signMessage: (_0) => __async(null, [_0], function* ({ message }) {
30
30
  return signer.signMessage({ account: account.address, message });
31
31
  }),
32
- signTransaction: (tx) => __async(this, null, function* () {
32
+ signTransaction: (tx) => __async(null, null, function* () {
33
33
  return signer.signTransaction(__spreadProps(__spreadValues({}, tx), { account }));
34
34
  }),
35
- signTypedData: (typedData) => __async(this, null, function* () {
35
+ signTypedData: (typedData) => __async(null, null, function* () {
36
36
  return signer.signTypedData(__spreadProps(__spreadValues({}, typedData), { account: account.address }));
37
37
  }),
38
- signAuthorization: () => __async(this, null, function* () {
38
+ signAuthorization: () => __async(null, null, function* () {
39
39
  throw new Error(
40
40
  "EIP-7702 account delegation (signAuthorization) is not supported with external wallets. External wallets add an EIP-191 prefix to all signatures, which is incompatible with the raw ecrecover required by EIP-7702. Use an embedded Para wallet for 7702 mode, or use 4337 mode which works with any wallet."
41
41
  );
@@ -45,7 +45,7 @@ function createParaViemAccount(paraOrOptions, walletAddress) {
45
45
  source: "custom",
46
46
  type: "local",
47
47
  /** Signs a raw hash directly. */
48
- sign: (_0) => __async(this, [_0], function* ({ hash }) {
48
+ sign: (_0) => __async(null, [_0], function* ({ hash }) {
49
49
  const res = yield para.signMessage({
50
50
  walletId: currentWallet.id,
51
51
  messageBase64: hexStringToBase64(hash)
@@ -54,14 +54,14 @@ function createParaViemAccount(paraOrOptions, walletAddress) {
54
54
  return normalizeSignature(signature);
55
55
  }),
56
56
  /** Signs an EIP-191 personal message (prefixed and hashed). */
57
- signMessage: (_0) => __async(this, [_0], function* ({ message }) {
57
+ signMessage: (_0) => __async(null, [_0], function* ({ message }) {
58
58
  const hashedMessage = hashMessage(message);
59
59
  const res = yield para.signMessage({ walletId: currentWallet.id, messageBase64: hexStringToBase64(hashedMessage) });
60
60
  const signature = res.signature;
61
61
  return normalizeSignature(signature);
62
62
  }),
63
63
  /** Signs and serializes an Ethereum transaction. */
64
- signTransaction: (transaction, args) => __async(this, null, function* () {
64
+ signTransaction: (transaction, args) => __async(null, null, function* () {
65
65
  let { serializer } = args || {};
66
66
  if (!serializer) {
67
67
  serializer = serializeTransaction;
@@ -87,7 +87,7 @@ function createParaViemAccount(paraOrOptions, walletAddress) {
87
87
  });
88
88
  }),
89
89
  /** Signs EIP-712 typed data. */
90
- signTypedData: (typedDataDefinition) => __async(this, null, function* () {
90
+ signTypedData: (typedDataDefinition) => __async(null, null, function* () {
91
91
  const res = yield para.signMessage({
92
92
  walletId: currentWallet.id,
93
93
  messageBase64: hexStringToBase64(hashTypedData(typedDataDefinition))
@@ -99,7 +99,7 @@ function createParaViemAccount(paraOrOptions, walletAddress) {
99
99
  * Signs an EIP-7702 authorization for account delegation.
100
100
  * Returns yParity (0/1) per EIP-7702, not legacy v (27/28).
101
101
  */
102
- signAuthorization: (authorization) => __async(this, null, function* () {
102
+ signAuthorization: (authorization) => __async(null, null, function* () {
103
103
  var _a;
104
104
  const address = (_a = authorization.contractAddress) != null ? _a : authorization.address;
105
105
  const hash = hashAuthorization({ address, chainId: authorization.chainId, nonce: authorization.nonce });
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@getpara/viem-v2-integration",
3
- "version": "3.5.0",
3
+ "version": "3.6.0",
4
4
  "dependencies": {
5
- "@getpara/core-sdk": "3.5.0"
5
+ "@getpara/core-sdk": "3.6.0"
6
6
  },
7
7
  "devDependencies": {
8
8
  "typescript": "^5.8.3",
@@ -24,7 +24,7 @@
24
24
  "dist",
25
25
  "package.json"
26
26
  ],
27
- "gitHead": "2e70485f8f206ff50f58b339ebf0922fd259858f",
27
+ "gitHead": "565535ab0cf38d65f6996fc9f1ede52d133ddac0",
28
28
  "main": "dist/cjs/index.js",
29
29
  "module": "dist/esm/index.js",
30
30
  "peerDependencies": {