@ember-finance/sdk 2.1.3 → 2.2.0-rc.1
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/src/abis/EmberDepositParkingLot.json +899 -0
- package/dist/src/abis/EmberProtocolConfig.json +20 -2
- package/dist/src/abis/EmberVault.json +143 -2
- package/dist/src/api/v2/apis/accounts-api.d.ts +114 -0
- package/dist/src/api/v2/apis/accounts-api.js +211 -0
- package/dist/src/api/v2/apis/vaults-api.d.ts +34 -0
- package/dist/src/api/v2/apis/vaults-api.js +70 -0
- package/dist/src/api/v2/models/account-parking-lot-claimable.d.ts +36 -0
- package/dist/src/api/v2/models/account-parking-lot-claimable.js +14 -0
- package/dist/src/api/v2/models/account-pending-deposit.d.ts +111 -0
- package/dist/src/api/v2/models/account-pending-deposit.js +19 -0
- package/dist/src/api/v2/models/account-transaction-transaction-data.d.ts +2 -1
- package/dist/src/api/v2/models/account-transaction.d.ts +4 -0
- package/dist/src/api/v2/models/account-transaction.js +4 -0
- package/dist/src/api/v2/models/chain-vault-details.d.ts +6 -0
- package/dist/src/api/v2/models/evm-contracts.d.ts +25 -0
- package/dist/src/api/v2/models/evm-deposit-parking-lot.d.ts +66 -0
- package/dist/src/api/v2/models/evm-deposit-parking-lot.js +14 -0
- package/dist/src/api/v2/models/evm-timelock.d.ts +60 -0
- package/dist/src/api/v2/models/evm-timelock.js +14 -0
- package/dist/src/api/v2/models/evm-vault-validator.d.ts +60 -0
- package/dist/src/api/v2/models/evm-vault-validator.js +14 -0
- package/dist/src/api/v2/models/evm-vault.d.ts +6 -0
- package/dist/src/api/v2/models/index.d.ts +7 -0
- package/dist/src/api/v2/models/index.js +7 -0
- package/dist/src/api/v2/models/parking-lot-deposit-transaction.d.ts +68 -0
- package/dist/src/api/v2/models/parking-lot-deposit-transaction.js +14 -0
- package/dist/src/api/v2/models/vault-detail.d.ts +6 -0
- package/dist/src/api/v2/models/vault-parking-lot-info.d.ts +60 -0
- package/dist/src/api/v2/models/vault-parking-lot-info.js +14 -0
- package/dist/src/evm-vaults/interfaces/index.d.ts +35 -0
- package/dist/src/evm-vaults/on-chain-calls/operator.d.ts +9 -0
- package/dist/src/evm-vaults/on-chain-calls/operator.js +13 -0
- package/dist/src/evm-vaults/on-chain-calls/tx-builder.d.ts +58 -0
- package/dist/src/evm-vaults/on-chain-calls/tx-builder.js +122 -0
- package/dist/src/evm-vaults/on-chain-calls/user.d.ts +14 -0
- package/dist/src/evm-vaults/on-chain-calls/user.js +30 -0
- package/dist/src/evm-vaults/on-chain-calls/vault-admin.d.ts +28 -0
- package/dist/src/evm-vaults/on-chain-calls/vault-admin.js +42 -0
- package/dist/src/evm-vaults/on-chain-calls/vault-reader.d.ts +25 -1
- package/dist/src/evm-vaults/on-chain-calls/vault-reader.js +53 -0
- package/dist/src/evm-vaults/utils/deployment-parser.d.ts +16 -0
- package/dist/src/evm-vaults/utils/deployment-parser.js +27 -0
- package/package.json +1 -1
|
@@ -157,6 +157,33 @@ export class EVMDeploymentParser {
|
|
|
157
157
|
getReceiptTokenSymbols() {
|
|
158
158
|
return Object.keys(this.deployment.contracts?.receiptTokens ?? {});
|
|
159
159
|
}
|
|
160
|
+
/**
|
|
161
|
+
* Finds the deposit parking lot address serving a given vault, from
|
|
162
|
+
* deployment info (async deposits). Returns undefined if the vault has no
|
|
163
|
+
* parking lot configured.
|
|
164
|
+
* @param vaultAddress The vault's proxy address
|
|
165
|
+
*/
|
|
166
|
+
getParkingLotAddressByVaultAddress(vaultAddress) {
|
|
167
|
+
const entry = Object.values(this.deployment.contracts?.depositParkingLots ?? {}).find(parkingLot => parkingLot.vault?.toLowerCase() === vaultAddress.toLowerCase());
|
|
168
|
+
return entry?.proxyAddress;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Resolves the deposit parking lot address for a vault from deployment info:
|
|
172
|
+
* returns the caller override if given, otherwise looks it up in
|
|
173
|
+
* `contracts.depositParkingLots`.
|
|
174
|
+
* @param vaultAddress The vault whose parking lot to resolve
|
|
175
|
+
* @param override Optional explicit parking lot address (skips the lookup)
|
|
176
|
+
* @throws if no override is given and the deployment has no parking lot for the vault
|
|
177
|
+
*/
|
|
178
|
+
resolveParkingLotAddress(vaultAddress, override) {
|
|
179
|
+
if (override)
|
|
180
|
+
return override;
|
|
181
|
+
const parkingLot = this.getParkingLotAddressByVaultAddress(vaultAddress);
|
|
182
|
+
if (!parkingLot) {
|
|
183
|
+
throw new Error(`No parking lot configured for vault ${vaultAddress} in deployment info (async deposits not enabled, or the protocol info is stale — pass options.parkingLotAddress to override).`);
|
|
184
|
+
}
|
|
185
|
+
return parkingLot;
|
|
186
|
+
}
|
|
160
187
|
/**
|
|
161
188
|
* Finds the OFT adapter entry for a given vault address.
|
|
162
189
|
* @param vaultAddress The vault address (receipt token address in EVM deployment data)
|