@injectivelabs/wallet-turnkey 1.16.13-alpha.5 → 1.16.13-alpha.6
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.
|
@@ -122,7 +122,29 @@ class CustomEip1193Provider {
|
|
|
122
122
|
transport: (0, viem_1.http)(),
|
|
123
123
|
});
|
|
124
124
|
const client = this.getClient();
|
|
125
|
-
const
|
|
125
|
+
const parseHexValue = (value) => {
|
|
126
|
+
if (typeof value === 'string') {
|
|
127
|
+
const hexValue = value.startsWith('0x') ? value : `0x${value}`;
|
|
128
|
+
return BigInt(hexValue);
|
|
129
|
+
}
|
|
130
|
+
return BigInt(value);
|
|
131
|
+
};
|
|
132
|
+
const txData = args.params[0];
|
|
133
|
+
const processedTransaction = { ...txData };
|
|
134
|
+
const hexFields = [
|
|
135
|
+
'value',
|
|
136
|
+
'gas',
|
|
137
|
+
'gasLimit',
|
|
138
|
+
'gasPrice',
|
|
139
|
+
'maxFeePerGas',
|
|
140
|
+
'maxPriorityFeePerGas',
|
|
141
|
+
];
|
|
142
|
+
for (const field of hexFields) {
|
|
143
|
+
if (processedTransaction[field] !== undefined) {
|
|
144
|
+
processedTransaction[field] = parseHexValue(processedTransaction[field]);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
const preparedTransaction = await accountClient.prepareTransactionRequest(processedTransaction);
|
|
126
148
|
const signedTransaction = await this.signTransaction(preparedTransaction);
|
|
127
149
|
const tx = await client.sendRawTransaction({
|
|
128
150
|
serializedTransaction: signedTransaction,
|
|
@@ -116,7 +116,29 @@ class TurnkeyWalletStrategy extends wallet_base_1.BaseConcreteStrategy {
|
|
|
116
116
|
},
|
|
117
117
|
transport: (0, viem_1.http)(url),
|
|
118
118
|
});
|
|
119
|
-
const
|
|
119
|
+
const parseHexValue = (value) => {
|
|
120
|
+
if (typeof value === 'string') {
|
|
121
|
+
const hexValue = value.startsWith('0x') ? value : `0x${value}`;
|
|
122
|
+
return BigInt(hexValue);
|
|
123
|
+
}
|
|
124
|
+
return BigInt(value);
|
|
125
|
+
};
|
|
126
|
+
const txData = transaction;
|
|
127
|
+
const processedTransaction = { ...txData };
|
|
128
|
+
const hexFields = [
|
|
129
|
+
'value',
|
|
130
|
+
'gas',
|
|
131
|
+
'gasLimit',
|
|
132
|
+
'gasPrice',
|
|
133
|
+
'maxFeePerGas',
|
|
134
|
+
'maxPriorityFeePerGas',
|
|
135
|
+
];
|
|
136
|
+
for (const field of hexFields) {
|
|
137
|
+
if (processedTransaction[field] !== undefined) {
|
|
138
|
+
processedTransaction[field] = parseHexValue(processedTransaction[field]);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
const preparedTransaction = await accountClient.prepareTransactionRequest(processedTransaction);
|
|
120
142
|
delete preparedTransaction.account;
|
|
121
143
|
const signedTransaction = await accountClient.signTransaction(preparedTransaction);
|
|
122
144
|
const tx = await accountClient.sendRawTransaction({
|
|
@@ -85,7 +85,29 @@ class CustomEip1193Provider {
|
|
|
85
85
|
transport: http(),
|
|
86
86
|
});
|
|
87
87
|
const client = this.getClient();
|
|
88
|
-
const
|
|
88
|
+
const parseHexValue = (value) => {
|
|
89
|
+
if (typeof value === 'string') {
|
|
90
|
+
const hexValue = value.startsWith('0x') ? value : `0x${value}`;
|
|
91
|
+
return BigInt(hexValue);
|
|
92
|
+
}
|
|
93
|
+
return BigInt(value);
|
|
94
|
+
};
|
|
95
|
+
const txData = args.params[0];
|
|
96
|
+
const processedTransaction = { ...txData };
|
|
97
|
+
const hexFields = [
|
|
98
|
+
'value',
|
|
99
|
+
'gas',
|
|
100
|
+
'gasLimit',
|
|
101
|
+
'gasPrice',
|
|
102
|
+
'maxFeePerGas',
|
|
103
|
+
'maxPriorityFeePerGas',
|
|
104
|
+
];
|
|
105
|
+
for (const field of hexFields) {
|
|
106
|
+
if (processedTransaction[field] !== undefined) {
|
|
107
|
+
processedTransaction[field] = parseHexValue(processedTransaction[field]);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
const preparedTransaction = await accountClient.prepareTransactionRequest(processedTransaction);
|
|
89
111
|
const signedTransaction = await this.signTransaction(preparedTransaction);
|
|
90
112
|
const tx = await client.sendRawTransaction({
|
|
91
113
|
serializedTransaction: signedTransaction,
|
|
@@ -113,7 +113,29 @@ export class TurnkeyWalletStrategy extends BaseConcreteStrategy {
|
|
|
113
113
|
},
|
|
114
114
|
transport: http(url),
|
|
115
115
|
});
|
|
116
|
-
const
|
|
116
|
+
const parseHexValue = (value) => {
|
|
117
|
+
if (typeof value === 'string') {
|
|
118
|
+
const hexValue = value.startsWith('0x') ? value : `0x${value}`;
|
|
119
|
+
return BigInt(hexValue);
|
|
120
|
+
}
|
|
121
|
+
return BigInt(value);
|
|
122
|
+
};
|
|
123
|
+
const txData = transaction;
|
|
124
|
+
const processedTransaction = { ...txData };
|
|
125
|
+
const hexFields = [
|
|
126
|
+
'value',
|
|
127
|
+
'gas',
|
|
128
|
+
'gasLimit',
|
|
129
|
+
'gasPrice',
|
|
130
|
+
'maxFeePerGas',
|
|
131
|
+
'maxPriorityFeePerGas',
|
|
132
|
+
];
|
|
133
|
+
for (const field of hexFields) {
|
|
134
|
+
if (processedTransaction[field] !== undefined) {
|
|
135
|
+
processedTransaction[field] = parseHexValue(processedTransaction[field]);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
const preparedTransaction = await accountClient.prepareTransactionRequest(processedTransaction);
|
|
117
139
|
delete preparedTransaction.account;
|
|
118
140
|
const signedTransaction = await accountClient.signTransaction(preparedTransaction);
|
|
119
141
|
const tx = await accountClient.sendRawTransaction({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@injectivelabs/wallet-turnkey",
|
|
3
3
|
"description": "Turnkey wallet strategy for use with @injectivelabs/wallet-core.",
|
|
4
|
-
"version": "1.16.13-alpha.
|
|
4
|
+
"version": "1.16.13-alpha.6",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
"start": "node dist/index.js"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@injectivelabs/exceptions": "1.16.13-alpha.
|
|
63
|
-
"@injectivelabs/sdk-ts": "1.16.13-alpha.
|
|
64
|
-
"@injectivelabs/ts-types": "1.16.13-alpha.
|
|
65
|
-
"@injectivelabs/utils": "1.16.13-alpha.
|
|
66
|
-
"@injectivelabs/wallet-base": "1.16.13-alpha.
|
|
62
|
+
"@injectivelabs/exceptions": "1.16.13-alpha.6",
|
|
63
|
+
"@injectivelabs/sdk-ts": "1.16.13-alpha.6",
|
|
64
|
+
"@injectivelabs/ts-types": "1.16.13-alpha.6",
|
|
65
|
+
"@injectivelabs/utils": "1.16.13-alpha.6",
|
|
66
|
+
"@injectivelabs/wallet-base": "1.16.13-alpha.6",
|
|
67
67
|
"@turnkey/sdk-browser": "5.2.3",
|
|
68
68
|
"@turnkey/viem": "^0.9.10",
|
|
69
69
|
"viem": "^2.33.2"
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"tsconfig-paths": "^4.2.0",
|
|
78
78
|
"typescript": "^5.0.0"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "4239109ab41807561f8ed8fcb98339387bfc8547"
|
|
81
81
|
}
|