@exodus/ethereum-api 8.26.1 → 8.28.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.
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,26 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [8.28.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.27.0...@exodus/ethereum-api@8.28.0) (2025-01-23)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
* feat(eth-like,btc-like): make broadcastTx compatible with rawTx (#4911)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [8.27.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.26.1...@exodus/ethereum-api@8.27.0) (2025-01-22)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
* feat: add activity txs for ethereum (#4875)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
6
26
|
## [8.26.1](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.26.0...@exodus/ethereum-api@8.26.1) (2025-01-22)
|
|
7
27
|
|
|
8
28
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/ethereum-api",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.28.0",
|
|
4
4
|
"description": "Transaction monitors, fee monitors, RPC with the blockchain node, and other networking code for Ethereum and EVM-based blockchains",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@exodus/bip44-constants": "^195.0.0",
|
|
29
29
|
"@exodus/crypto": "^1.0.0-rc.13",
|
|
30
30
|
"@exodus/currency": "^6.0.1",
|
|
31
|
-
"@exodus/ethereum-lib": "^5.
|
|
31
|
+
"@exodus/ethereum-lib": "^5.9.0",
|
|
32
32
|
"@exodus/ethereum-meta": "^2.1.5",
|
|
33
33
|
"@exodus/ethereumholesky-meta": "^2.0.0",
|
|
34
34
|
"@exodus/ethereumjs": "^1.0.0",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"type": "git",
|
|
65
65
|
"url": "git+https://github.com/ExodusMovement/assets.git"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "1f116146a725da6f3c98abdf233261512a6333fc"
|
|
68
68
|
}
|
package/src/create-asset.js
CHANGED
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
DEFAULT_FEE_MONITOR_INTERVAL,
|
|
9
9
|
encodePrivate,
|
|
10
10
|
encodePublicFactory,
|
|
11
|
+
getActivityTxs,
|
|
11
12
|
hasChecksum,
|
|
12
13
|
signHardwareFactory,
|
|
13
14
|
signMessage,
|
|
@@ -243,6 +244,7 @@ export const createAssetFactory = ({
|
|
|
243
244
|
: originalGetFee
|
|
244
245
|
|
|
245
246
|
const api = {
|
|
247
|
+
getActivityTxs,
|
|
246
248
|
addressHasHistory,
|
|
247
249
|
broadcastTx: (...args) => server.sendRawTransaction(...args),
|
|
248
250
|
createAccountState: () => accountStateClass,
|
package/src/etherscan/proxy.js
CHANGED
|
@@ -4,7 +4,8 @@ const isValidResponseCheck = (x) => x.result !== undefined
|
|
|
4
4
|
const _request = async (...args) => request(isValidResponseCheck, 'proxy', ...args)
|
|
5
5
|
|
|
6
6
|
export async function sendRawTransaction(data) {
|
|
7
|
-
const
|
|
7
|
+
const _data = data instanceof Uint8Array ? Buffer.from(data).toString('hex') : data
|
|
8
|
+
const txhash = await _request('eth_sendRawTransaction', { hex: '0x' + _data })
|
|
8
9
|
|
|
9
10
|
const isValidTxHash = /^0x[\dA-Fa-f]{64}$/.test(txhash)
|
|
10
11
|
if (!isValidTxHash) throw new Error(`Invalid tx hash: ${txhash}`)
|
|
@@ -91,7 +91,8 @@ export default class ApiCoinNodesServer extends EventEmitter {
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
sendRawTransactionRequest(data) {
|
|
94
|
-
const
|
|
94
|
+
const _data = data instanceof Uint8Array ? Buffer.from(data).toString('hex') : data
|
|
95
|
+
const hex = _data.startsWith('0x') ? _data : '0x' + _data
|
|
95
96
|
return this.buildRequest({ method: 'eth_sendRawTransaction', params: [hex] })
|
|
96
97
|
}
|
|
97
98
|
|
|
@@ -162,7 +162,8 @@ export function create(defaultURL, ensAssetName) {
|
|
|
162
162
|
},
|
|
163
163
|
|
|
164
164
|
async sendRawTransaction(data) {
|
|
165
|
-
const
|
|
165
|
+
const _data = data instanceof Uint8Array ? Buffer.from(data).toString('hex') : data
|
|
166
|
+
const hex = _data.startsWith('0x') ? _data : '0x' + _data
|
|
166
167
|
return requestWithRetry(
|
|
167
168
|
'proxy',
|
|
168
169
|
{ method: 'eth_sendRawTransaction', params: [hex] },
|
|
@@ -224,7 +224,8 @@ export default class ClarityServer extends EventEmitter {
|
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
sendRawTransactionRequest(data) {
|
|
227
|
-
const
|
|
227
|
+
const _data = data instanceof Uint8Array ? Buffer.from(data).toString('hex') : data
|
|
228
|
+
const hex = _data.startsWith('0x') ? _data : '0x' + _data
|
|
228
229
|
return this.buildRequest({ method: 'eth_sendRawTransaction', params: [hex] })
|
|
229
230
|
}
|
|
230
231
|
|