@exodus/ethereum-api 8.67.0 → 8.69.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.69.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.67.0...@exodus/ethereum-api@8.69.0) (2026-03-10)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+
12
+ * fix: pass `baseAsset` to `getExtraFeeForBump` instead of `baseAsset.name` (#7543)
13
+
14
+
15
+
16
+ ## [8.68.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.67.0...@exodus/ethereum-api@8.68.0) (2026-03-09)
17
+
18
+
19
+ ### Features
20
+
21
+
22
+ * feat: add assets-gateway enable for clarity-v2, enable bsc (#7480)
23
+
24
+
25
+
6
26
  ## [8.67.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.66.0...@exodus/ethereum-api@8.67.0) (2026-03-09)
7
27
 
8
28
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/ethereum-api",
3
- "version": "8.67.0",
3
+ "version": "8.69.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",
@@ -69,5 +69,5 @@
69
69
  "type": "git",
70
70
  "url": "git+https://github.com/ExodusMovement/assets.git"
71
71
  },
72
- "gitHead": "f27651709a0a2c70f3c0867afc543fcfa5cfd5c2"
72
+ "gitHead": "7da7b29b3177ad6155d5018c297e795cd4d3bda8"
73
73
  }
@@ -4,6 +4,8 @@ import assert from 'minimalistic-assert'
4
4
 
5
5
  import ClarityServer, { RPC_REQUEST_TIMEOUT } from './clarity.js'
6
6
 
7
+ const ASSETS_GATEWAY_URL = 'https://assets-gateway-clarity-api.a.exodus.io/assets'
8
+
7
9
  export const encodeCursor = (blockNumberBigInt, isLegacy = false) => {
8
10
  if (typeof blockNumberBigInt !== 'bigint') throw new Error('expected bigint')
9
11
 
@@ -93,16 +95,17 @@ const fetchHttpRequest = ({ baseApiPath, path, method, body }) => {
93
95
  export default class ClarityServerV2 extends ClarityServer {
94
96
  constructor({ baseAssetName, uri }) {
95
97
  super({ baseAssetName, uri })
96
- this.updateBaseApiPath()
98
+ this.updateBaseApiPath() // default to assets-gateway
97
99
  }
98
100
 
99
- updateBaseApiPath() {
100
- this.baseApiPath = this.uri + `/api/v2/${this.baseAssetName}`
101
+ updateBaseApiPath(uri) {
102
+ const base = uri || ASSETS_GATEWAY_URL
103
+ this.baseApiPath = new URL(`${base}/api/v2/${this.baseAssetName}`).toString()
101
104
  }
102
105
 
103
106
  setURI(uri) {
104
107
  super.setURI(uri)
105
- this.updateBaseApiPath()
108
+ this.updateBaseApiPath(uri) // pass in the uri from remote config to override assets-gateway
106
109
  }
107
110
 
108
111
  getTransactionsAtBlockNumber = async ({ address, blockNumber, withInput = true }) => {
@@ -16,6 +16,7 @@ export default class ClarityServer extends EventEmitter {
16
16
  super()
17
17
  this.baseAssetName = baseAssetName
18
18
  this.uri = uri
19
+ this.wsUri = uri
19
20
  this.defaultUri = uri
20
21
  this.baseNamespace = `/v1/${this.baseAssetName}`
21
22
  this.sockets = Object.create(null)
@@ -23,6 +24,12 @@ export default class ClarityServer extends EventEmitter {
23
24
  }
24
25
 
25
26
  setURI(uri) {
27
+ if (!uri.includes('assets-gateway')) {
28
+ // assets-gateway endpoint doesn't support legacy ws
29
+ // guard this against remote config override
30
+ this.wsUri = uri
31
+ }
32
+
26
33
  this.dispose()
27
34
  this.uri = uri
28
35
  }
@@ -59,7 +66,7 @@ export default class ClarityServer extends EventEmitter {
59
66
  }
60
67
 
61
68
  createSocket(namespace) {
62
- return io(`${this.uri}${namespace}`, {
69
+ return io(`${this.wsUri}${namespace}`, {
63
70
  transports: ['websocket', 'polling'],
64
71
  extraHeaders: { 'User-Agent': 'exodus' },
65
72
  reconnection: true,
package/src/get-fee.js CHANGED
@@ -109,13 +109,14 @@ export const getFeeFactory =
109
109
  return { ...maybeReturnTipGasPrice, fee, gasPrice, extraFeeData }
110
110
  }
111
111
 
112
- // TODO: sanity check this usage
113
112
  // Used in Mobile
114
- export const getExtraFeeForBump = ({ tx, feeData, balance, unconfirmedBalance }) => {
113
+ export const getExtraFeeForBump = ({ baseAsset, tx, feeData, balance, unconfirmedBalance }) => {
114
+ assert(baseAsset, 'expected baseAsset')
115
+
115
116
  if (!balance || !unconfirmedBalance) return null
116
117
  const { gasPrice: currentGasPrice, eip1559Enabled, baseFeePerGas: currentBaseFee } = feeData
117
118
  const { bumpedGasPrice } = calculateBumpedGasPrice({
118
- baseAsset: 'ethereum',
119
+ baseAsset,
119
120
  tx,
120
121
  currentGasPrice,
121
122
  currentBaseFee,