@exodus/ethereum-api 8.27.0 → 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,16 @@
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
+
6
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)
7
17
 
8
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/ethereum-api",
3
- "version": "8.27.0",
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",
@@ -64,5 +64,5 @@
64
64
  "type": "git",
65
65
  "url": "git+https://github.com/ExodusMovement/assets.git"
66
66
  },
67
- "gitHead": "92c1dbc059594e5a127d9052012a4422fc0f1a12"
67
+ "gitHead": "1f116146a725da6f3c98abdf233261512a6333fc"
68
68
  }
@@ -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 txhash = await _request('eth_sendRawTransaction', { hex: '0x' + data })
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 hex = data.startsWith('0x') ? data : '0x' + data
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 hex = data.startsWith('0x') ? data : '0x' + data
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 hex = data.startsWith('0x') ? data : '0x' + data
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