import { TxStatus } from "@renproject/interfaces"; import { ParamsQueryBlockState, ResponseQueryBlockState } from "./methods/ren_queryBlockState"; import { TypedPackValue } from "./pack/pack"; import { BurnTransactionInput, MintTransactionInput, SubmitGatewayInput } from "./transaction"; import { RenVMType, RenVMValue } from "./value"; export declare enum RPCMethod { SubmitGateway = "ren_submitGateway", SubmitTx = "ren_submitTx", QueryTx = "ren_queryTx", QueryTxs = "ren_queryTxs", QueryBlock = "ren_queryBlock", QueryBlocks = "ren_queryBlocks", QueryConfig = "ren_queryConfig", QueryState = "ren_queryState", QueryBlockState = "ren_queryBlockState" } export interface ParamsQueryTxs { txStatus?: TxStatus; page: RenVMValue; pageSize?: RenVMValue; tags: Array>; } export declare type ParamsSubmitGateway = { gateway: string; tx: SubmitGatewayInput; }; export interface ParamsSubmitTx { tx: T; } export declare type ParamsSubmitMint = ParamsSubmitTx; export declare type ParamsSubmitBurn = ParamsSubmitTx; export interface ParamsQueryTx { txHash: string; } export interface ParamsQueryBlock { blockHeight: number; } export interface ParamsQueryBlocks { blockHeight: number; n: number; } export interface ParamsQueryConfig { } export interface ParamsQueryState { } export interface ResponseSubmitTx { } export interface ResponseSubmitTx { tx: { hash: string; to: string; in: TypedPackValue; }; } export interface ResponseSubmitGateway { } export interface ResponseQueryTx { tx: { version: "0" | "1"; hash: string; selector: string; in: TypedPackValue; out?: TypedPackValue; }; txStatus: TxStatus; } export interface ResponseQueryTxs { txs: Array<{ hash: string; to: string; in: TypedPackValue; out?: TypedPackValue; }>; } export interface ResponseQueryBlock { block: any; } export interface ResponseQueryBlocks { blocks: any; } export interface ResponseQueryConfig { confirmations: { [chain: string]: RenVMValue; }; whitelist: string[]; } export interface ResponseQueryState { state: { [chain: string]: { address: string; gasCap: string; gasLimit: string; gasPrice: string; latestChainHash: string; latestChainHeight: string; minimumAmount: string; pubKey: string; } & { output?: { outpoint: { hash: string; index: string; }; pubKeyScript: string; value: string; }; } & { nonce?: string; }; }; } export declare type RenVMParams = { [RPCMethod.SubmitTx]: ParamsSubmitBurn | ParamsSubmitMint; [RPCMethod.SubmitGateway]: ParamsSubmitGateway; [RPCMethod.QueryTx]: ParamsQueryTx; [RPCMethod.QueryTxs]: ParamsQueryTxs; [RPCMethod.QueryBlock]: ParamsQueryBlock; [RPCMethod.QueryBlocks]: ParamsQueryBlocks; [RPCMethod.QueryConfig]: ParamsQueryConfig; [RPCMethod.QueryState]: ParamsQueryState; [RPCMethod.QueryBlockState]: ParamsQueryBlockState; }; export declare type RenVMResponses = { [RPCMethod.SubmitTx]: ResponseSubmitTx; [RPCMethod.SubmitGateway]: ResponseSubmitGateway; [RPCMethod.QueryTx]: ResponseQueryTx; [RPCMethod.QueryTxs]: ResponseQueryTxs; [RPCMethod.QueryBlock]: ResponseQueryBlock; [RPCMethod.QueryBlocks]: ResponseQueryBlocks; [RPCMethod.QueryConfig]: ResponseQueryConfig; [RPCMethod.QueryState]: ResponseQueryState; [RPCMethod.QueryBlockState]: ResponseQueryBlockState; };