interbtc-api
interbtc-api copied to clipboard
interBTC TypeScript SDK
The skipped test in `redeem.test.ts` needs a rewrite: We want to ban one vault (one specific collateral currency), and check that the other currency for a vault with the same...
Replace existing percentage values of `number` type with custom `Percentage` type to be more explicit about the represented value. **Additional context** https://github.com/interlay/interbtc-api/pulls#discussion_r1130947961
Somewhat expensive but can be optimized (see https://github.com/interlay/interbtc-api/issues/593). Implemented because I saw it was still referenced in the UI code, not sure if we can remove it.
The methods that call this function read only from the finalized head but when parsing the requests we check the latest unfinalized state, this shouldn't be an issue in practice...
We introduced a bug when refactoring some work as getting staked rewards called the incorrect palette’s withdrawRewards() function (ie. `escrow` rather than `escrowAnnuity`). The method making the call: [EscrowAPI.buildWithdrawRewardsExtrinsic()](https://github.com/interlay/interbtc-api/blob/d987b57b73aa1a008037dab6d653f302ba560584/src/parachain/escrow.ts#L179) Add...
Optimizes storage reads since they will be done in a single RPC call, see the docs here: https://polkadot.js.org/docs/api/start/api.query.multi#multi-queries-distinct-types
There are many methods exposed on the public interfaces such as the staking methods on the `RewardsAPI` that can be removed since they have no use downstream.
The api documentation page at https://docs.interlay.io/interbtc-api/ is returning a 404 error.
The rejection message in `DefaultAssetRegistryAPI.getForeignAsset(...)` should include the id. https://github.com/interlay/interbtc-api/blob/d987b57b73aa1a008037dab6d653f302ba560584/src/parachain/asset-registry.ts#L99
We should be able to refactor some of our integration tests to use dryRun where the tests do not rely on a changed state for follow up actions. The approach...