import { AccountId, Hash } from "@polkadot/types/interfaces"; import Big from "big.js"; import { EventRecord } from "@polkadot/types/interfaces/system"; import { ApiTypes, AugmentedEvent } from "@polkadot/api/types"; import type { AnyTuple } from "@polkadot/types/types"; import { ApiPromise } from "@polkadot/api"; /** * @param events The EventRecord array returned after sending a transaction * @param methodToCheck The name of the event method whose existence to check * @returns The id associated with the transaction. If the EventRecord array does not * contain required events, the function throws an error. */ export declare function getRequestIdsFromEvents(events: EventRecord[], eventToFind: AugmentedEvent, api: ApiPromise): Hash[]; /** * Given a list of vaults with availabilities (e.g. collateral for issue, tokens * for redeem) and an amount to allocate, selects one or more vaults to fulfil * the request. * If the amount cannot be allocated by a single vault, greedily selects the vault * with highest available amount and tries again for the remainder. If at leaast * one vault can fulfil a request alone, a random one among them is selected. **/ export declare function allocateAmountsToVaults(vaultsWithAvailableAmounts: Map, amountToAllocate: Big): Map;