butterjs-sdk
Version:
Butter Network SDK
52 lines (51 loc) • 1.35 kB
TypeScript
import { BaseCurrency } from '../entities';
import { PromiEvent, TransactionReceipt as Web3TransactionReceipt } from 'web3-core';
import { AccountView } from 'near-api-js/lib/providers/provider';
import { Log } from '@ethersproject/abstract-provider';
export interface ButterTransactionReceipt {
to: string;
from: string;
gasUsed: string;
transactionHash: string;
logs: Array<Log> | string[];
blockHash?: string;
blockNumber?: number;
success?: boolean;
}
export interface ButterTransactionResponse {
hash?: string;
wait?: () => Promise<ButterTransactionReceipt>;
promiReceipt?: PromiEvent<Web3TransactionReceipt>;
}
export declare type ButterFeeRate = {
lowest: string;
highest: string;
rate: string;
};
export interface ButterFee {
feeToken: BaseCurrency;
amount: string;
feeRate: ButterFeeRate;
feeDistribution?: ButterFeeDistribution;
}
export declare type ButterFeeDistribution = {
protocol: string;
relayer: string;
lp: string;
};
export declare type NearAccountState = {
isValid: boolean;
state?: AccountView;
errMsg?: string;
};
export interface VaultBalance {
token: BaseCurrency;
balance: string;
isMintable: boolean;
}
export declare type RouteResponse = {
data?: string;
msg: string;
code: number;
status: number;
};