import {IBalance, IChains, IGetBalanceParams, ITxDetails} from "../chains"; import {IReturnResult} from "../../config"; export interface IQitmeer extends IChains { readonly getKeyPair: (privateKey: string) => any // 获取 pkAddress readonly getPKAddress: (publicKey: string) => string // 获取手续费 readonly getFee: (utxoLength: number) => string // 获取单个余额 readonly getBalance: (address: string, params?: IGetBalanceParams) => Promise> // 发送交易 readonly sendTx: (value: string, params?: IQitmeerSendTxParams) => Promise> // 签名 evm交易 readonly signEvm: (privateKey: string, amount: string, params?: IQitmeerSignEvmParams) => Promise> // api readonly api: IApi } export type IQitmeerSignEvmParams = { toPublicKey?: string } export interface IApi { // 发送交易 readonly sendTx: (raw: string, address?: string, note?: string) => Promise // 获取余额 readonly getBalance: (address: string, contract?: string) => Promise // 获取交易记录 readonly getTxList: (type: string, address: string, contract?: string, size: number, page: number) => Promise // 获取锁定列表 readonly getLockList: (address: string, size: number, page: number) => Promise // 获取UTXO readonly getUTXO: (address: string, contract: string, amount: string, fee: string, type?: string) => Promise // 获取交易详细 readonly getTxDetails: (hash: string, address: string) => Promise // 获取合约列表 readonly getCoinIdList: () => Promise } export interface IQitmeerBalance extends IBalance { // 可划转余额 readonly reverseUsable: string // 需解锁后划转余额 readonly reverseLocked: string } // qitmeer 发送交易 export type IQitmeerSendTxParams = { note?: string, address?: string, }