@axonfi/sdk 0.15.1 → 0.16.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/dist/index.cjs +15 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +35 -1
- package/dist/index.d.ts +35 -1
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -134,6 +134,8 @@ var RELAYER_API = {
|
|
|
134
134
|
protocolCheck: (vault, protocol, chainId) => `/v1/vault/${vault}/protocol/${protocol}?chainId=${chainId}`,
|
|
135
135
|
rebalanceTokens: (vault, chainId) => `/v1/vault/${vault}/rebalance-tokens?chainId=${chainId}`,
|
|
136
136
|
rebalanceTokenCheck: (vault, token, chainId) => `/v1/vault/${vault}/rebalance-token/${token}?chainId=${chainId}`,
|
|
137
|
+
// Vault value endpoint
|
|
138
|
+
vaultValue: (vault, chainId) => `/v1/vault/${vault}/value?chainId=${chainId}`,
|
|
137
139
|
// TOS endpoints
|
|
138
140
|
tosStatus: (wallet) => `/v1/tos/status?wallet=${wallet}`,
|
|
139
141
|
TOS_ACCEPT: "/v1/tos/accept"
|
|
@@ -4189,6 +4191,19 @@ var AxonClient = class {
|
|
|
4189
4191
|
return this._get(path);
|
|
4190
4192
|
}
|
|
4191
4193
|
// ============================================================================
|
|
4194
|
+
// getVaultValue() — via relayer
|
|
4195
|
+
// ============================================================================
|
|
4196
|
+
/**
|
|
4197
|
+
* Returns the total USD value of the vault with a per-token breakdown (via relayer).
|
|
4198
|
+
*
|
|
4199
|
+
* Includes all ERC-20 holdings with non-zero balances, their USD prices,
|
|
4200
|
+
* and the aggregate vault value.
|
|
4201
|
+
*/
|
|
4202
|
+
async getVaultValue() {
|
|
4203
|
+
const path = RELAYER_API.vaultValue(this.vaultAddress, this.chainId);
|
|
4204
|
+
return this._get(path);
|
|
4205
|
+
}
|
|
4206
|
+
// ============================================================================
|
|
4192
4207
|
// canPayTo() — via relayer
|
|
4193
4208
|
// ============================================================================
|
|
4194
4209
|
/**
|