UNPKG

@firefly-exchange/library-sui

Version:

Sui library housing helper methods, classes to interact with Bluefin protocol(s) deployed on Sui

36 lines (35 loc) 1.94 kB
import { TransactionObjectArgument } from "@mysten/sui/transactions"; import { BigNumberable, OnChainCallResponse } from "../../types"; import { IBluefinV3OptionalParams } from "../interfaces"; import { SupportedAssets } from "../types"; import { OnChainCalls } from "./on-chain-calls"; export declare class UserCalls extends OnChainCalls { /** * Allows users to deposit coins into the external bank * @param assetSymbol name of the asset to be deposited * @param amountE9 quantity of USDC to be deposited. Should be in 6 decimal places for USDC * @param options Optional tx execution params AND * - asset: the name of the asset to be deposited - defaults to USDC * - account: the address of the account to deposit money into. `Alice` can deposit funds to `Bob`'s account * - coinId: the id of supported USDC coin to be used for deposits. Please ensure that the coin has enough balance. * @returns OnChainCallResponse */ depositToAssetBank(assetSymbol: SupportedAssets, amount: BigNumberable, options?: IBluefinV3OptionalParams & { asset?: SupportedAssets; account?: string; coinId?: string; }): Promise<OnChainCallResponse>; /** * Allows users to deposit provided coin into the external bank (This function is used for PTB) * @param assetSymbol name of the asset to be deposited * @param coin the coin to be deposited * @param options Optional tx execution params AND * - asset: the name of the asset to be deposited - defaults to USDC * - account: the address of the account to deposit money into. `Alice` can deposit funds to `Bob`'s account * @returns OnChainCallResponse */ depositAllFromCoinToAssetBank(assetSymbol: SupportedAssets, coin: TransactionObjectArgument, options?: IBluefinV3OptionalParams & { asset?: SupportedAssets; account?: string; }): Promise<OnChainCallResponse>; }