/// import BigNumber from 'bignumber.js'; import { JsonRPCRequest } from '../../../basic/request/json-rpc'; import { CoinInfo } from '../../../types/chain'; import { AddressInfo, ClientInfo, FeePricePerUnit, TransactionStatus } from '../../../types/provider'; import { SimpleClient } from '../../abc'; declare type NearAccessKey = { type: 'FullAccess' | 'FunctionCall'; pubkey: string; pubkeyHex: string; nonce: number; functionCall?: { allowance: string; receiverId: string; methodNames: string[]; }; }; declare function parseJsonFromRawResponse(response: Uint8Array): any; declare function bytesJsonStringify(input: any): Buffer; export declare type GasCostConfig = { send_sir: number; send_not_sir: number; execution: number; }; declare class NearCli extends SimpleClient { readonly defaultFinality: 'optimistic' | 'final'; readonly rpc: JsonRPCRequest; constructor(url: string, defaultFinality?: 'optimistic' | 'final'); getInfo(): Promise; getTxCostConfig(): Promise>; getBestBlock(): Promise<{ blockNumber: number; blockHash: string; }>; getAddress(address: string): Promise; getAccessKeys(address: string): Promise; getBalance(address: string, coin: Partial): Promise; getFeePricePerUnit(): Promise; getTransactionStatus(txid: string): Promise; callContract(contract: string, methodName: string, args?: any, { parse, stringify }?: { parse?: typeof parseJsonFromRawResponse | undefined; stringify?: typeof bytesJsonStringify | undefined; }): Promise; broadcastTransaction(rawTx: string): Promise; } export { NearCli, NearAccessKey };