@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.
Files changed (44) hide show
  1. package/dist/src/abis/EmberDepositParkingLot.json +899 -0
  2. package/dist/src/abis/EmberProtocolConfig.json +20 -2
  3. package/dist/src/abis/EmberVault.json +143 -2
  4. package/dist/src/api/v2/apis/accounts-api.d.ts +114 -0
  5. package/dist/src/api/v2/apis/accounts-api.js +211 -0
  6. package/dist/src/api/v2/apis/vaults-api.d.ts +34 -0
  7. package/dist/src/api/v2/apis/vaults-api.js +70 -0
  8. package/dist/src/api/v2/models/account-parking-lot-claimable.d.ts +36 -0
  9. package/dist/src/api/v2/models/account-parking-lot-claimable.js +14 -0
  10. package/dist/src/api/v2/models/account-pending-deposit.d.ts +111 -0
  11. package/dist/src/api/v2/models/account-pending-deposit.js +19 -0
  12. package/dist/src/api/v2/models/account-transaction-transaction-data.d.ts +2 -1
  13. package/dist/src/api/v2/models/account-transaction.d.ts +4 -0
  14. package/dist/src/api/v2/models/account-transaction.js +4 -0
  15. package/dist/src/api/v2/models/chain-vault-details.d.ts +6 -0
  16. package/dist/src/api/v2/models/evm-contracts.d.ts +25 -0
  17. package/dist/src/api/v2/models/evm-deposit-parking-lot.d.ts +66 -0
  18. package/dist/src/api/v2/models/evm-deposit-parking-lot.js +14 -0
  19. package/dist/src/api/v2/models/evm-timelock.d.ts +60 -0
  20. package/dist/src/api/v2/models/evm-timelock.js +14 -0
  21. package/dist/src/api/v2/models/evm-vault-validator.d.ts +60 -0
  22. package/dist/src/api/v2/models/evm-vault-validator.js +14 -0
  23. package/dist/src/api/v2/models/evm-vault.d.ts +6 -0
  24. package/dist/src/api/v2/models/index.d.ts +7 -0
  25. package/dist/src/api/v2/models/index.js +7 -0
  26. package/dist/src/api/v2/models/parking-lot-deposit-transaction.d.ts +68 -0
  27. package/dist/src/api/v2/models/parking-lot-deposit-transaction.js +14 -0
  28. package/dist/src/api/v2/models/vault-detail.d.ts +6 -0
  29. package/dist/src/api/v2/models/vault-parking-lot-info.d.ts +60 -0
  30. package/dist/src/api/v2/models/vault-parking-lot-info.js +14 -0
  31. package/dist/src/evm-vaults/interfaces/index.d.ts +35 -0
  32. package/dist/src/evm-vaults/on-chain-calls/operator.d.ts +9 -0
  33. package/dist/src/evm-vaults/on-chain-calls/operator.js +13 -0
  34. package/dist/src/evm-vaults/on-chain-calls/tx-builder.d.ts +58 -0
  35. package/dist/src/evm-vaults/on-chain-calls/tx-builder.js +122 -0
  36. package/dist/src/evm-vaults/on-chain-calls/user.d.ts +14 -0
  37. package/dist/src/evm-vaults/on-chain-calls/user.js +30 -0
  38. package/dist/src/evm-vaults/on-chain-calls/vault-admin.d.ts +28 -0
  39. package/dist/src/evm-vaults/on-chain-calls/vault-admin.js +42 -0
  40. package/dist/src/evm-vaults/on-chain-calls/vault-reader.d.ts +25 -1
  41. package/dist/src/evm-vaults/on-chain-calls/vault-reader.js +53 -0
  42. package/dist/src/evm-vaults/utils/deployment-parser.d.ts +16 -0
  43. package/dist/src/evm-vaults/utils/deployment-parser.js +27 -0
  44. 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)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ember-finance/sdk",
3
3
  "description": "Ember Protocol SDK",
4
- "version": "2.1.3",
4
+ "version": "2.2.0-rc.1",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",
7
7
  "main": "./dist/index.js",