import { TxStatus } from "@renproject/interfaces"; import { Shard } from "./shard"; import { BurnArgsArray, MintArgsArray, TxAutogen, TxBurnReturnedInputs, TxResponseOutputs } from "./transaction"; import { Fees, RenVMArgs, RenVMType, RenVMValue } from "./value"; export declare enum RPCMethod { MethodSubmitTx = "ren_submitTx", MethodQueryTx = "ren_queryTx", MethodQueryTxs = "ren_queryTxs", MethodQueryBlock = "ren_queryBlock", MethodQueryBlocks = "ren_queryBlocks", MethodQueryNumPeers = "ren_queryNumPeers", MethodQueryPeers = "ren_queryPeers", MethodQueryShards = "ren_queryShards", MethodQueryStat = "ren_queryStat", MethodQueryFees = "ren_queryFees" } export interface ParamsQueryTxs { txStatus?: TxStatus; page: RenVMValue; pageSize?: RenVMValue; tags: Array>; } export interface ParamsQueryBlock { blockHeight: number; } export interface ParamsQueryBlocks { blockHeight: number; n: number; } interface ParamsSubmitTx { tx: { to: string; in: T; }; tags: Array>; } export declare type ParamsSubmitMint = ParamsSubmitTx; export declare type ParamsSubmitBurn = ParamsSubmitTx; export interface ParamsQueryTx { txHash: string; } export interface ParamsQueryNumPeers { } export interface ParamsQueryPeers { } export interface ParamsQueryShards { } export interface ParamsQueryStat { } export interface ParamsQueryFees { } export interface RenVMBlock { data: Array; hash: string; header: { baseHash: string; height: number; kind: number; parentHash: string; planRef: string; prevStateRef: string; round: number; signatories: unknown[]; timestamp: number; txsRef: string; }; prevState: Array<{ name: string; type: string; value: [ { amount: string; ghash: string; scriptPubKey: string; txHash: string; vOut: string; } ]; }>; } export interface ResponseQueryBlock { block: RenVMBlock; } export interface ResponseQueryBlocks { blocks: RenVMBlock[]; } export interface ResponseSubmitTx { tx: { hash: string; to: string; args: MintArgsArray; }; } export interface ResponseQueryTx { tx: { hash: string; to: string; in: RenVMArgs; autogen?: RenVMArgs; out?: RenVMArgs; }; txStatus: TxStatus; } export interface ResponseQueryTxs { txs: Array<{ hash: string; to: string; in: RenVMArgs; autogen?: RenVMArgs; out?: RenVMArgs; }>; } export interface ResponseQueryMintTx extends ResponseQueryTx { tx: { hash: string; to: string; in: MintArgsArray; autogen: TxAutogen; out?: TxResponseOutputs; }; txStatus: TxStatus; } export interface ResponseQueryBurnTx extends ResponseQueryTx { tx: { hash: string; to: string; in: TxBurnReturnedInputs; }; txStatus: TxStatus; } export interface ResponseQueryNumPeers { numPeers: number; } export interface ResponseQueryPeers { peers: string[]; } export interface ResponseQueryShards { shards: Shard[]; } export interface ResponseQueryEpoch { } export interface ResponseQueryStat { version: string; multiAddress: string; cpus: Array<{ cores: number; clockRate: number; cacheSize: number; modelName: string; }>; memory: number; memoryUsed: number; memoryFree: number; disk: number; diskUsed: number; diskFree: number; systemUptime: number; serviceUptime: number; } export interface ResponseQueryFees { [token: string]: Fees; } export declare type RenVMParams = { [RPCMethod.MethodQueryBlock]: ParamsQueryBlock; [RPCMethod.MethodQueryBlocks]: ParamsQueryBlocks; [RPCMethod.MethodSubmitTx]: ParamsSubmitBurn | ParamsSubmitMint; [RPCMethod.MethodQueryTx]: ParamsQueryTx; [RPCMethod.MethodQueryTxs]: ParamsQueryTxs; [RPCMethod.MethodQueryNumPeers]: ParamsQueryNumPeers; [RPCMethod.MethodQueryPeers]: ParamsQueryPeers; [RPCMethod.MethodQueryShards]: ParamsQueryShards; [RPCMethod.MethodQueryStat]: ParamsQueryStat; [RPCMethod.MethodQueryFees]: ParamsQueryFees; }; export declare type RenVMResponses = { [RPCMethod.MethodQueryBlock]: ResponseQueryBlock; [RPCMethod.MethodQueryBlocks]: ResponseQueryBlocks; [RPCMethod.MethodSubmitTx]: ResponseSubmitTx; [RPCMethod.MethodQueryTx]: ResponseQueryTx; [RPCMethod.MethodQueryTxs]: ResponseQueryTxs; [RPCMethod.MethodQueryNumPeers]: ResponseQueryNumPeers; [RPCMethod.MethodQueryPeers]: ResponseQueryPeers; [RPCMethod.MethodQueryShards]: ResponseQueryShards; [RPCMethod.MethodQueryStat]: ResponseQueryStat; [RPCMethod.MethodQueryFees]: ResponseQueryFees; }; export {};