import { Expand } from '../utils/typeUtils'; import { Account, ApplicationLog, Argument, Attribute, Block, Invocation, Nep17Balance, Networks, ProviderInformation, Signer, Transaction } from '../utils/types'; export type GetProviderResult = Expand; export type GetNetworksResult = Expand; export type GetAccountResult = Expand; export type GetBlockCountParams = Expand<{ network?: string; }>; export type GetBlockCountResult = number; export type GetBlockParams = Expand<{ blockIndex: number; network?: string; }>; export type GetBlockResult = Expand; export type GetTransactionParams = Expand<{ txid: string; network?: string; }>; export type GetTransactionResult = Expand; export type GetApplicationLogParams = Expand<{ txid: string; network?: string; }>; export type GetApplicationLogResult = Expand; export type GetNep17BalancesParams = Expand<{ address: string; network?: string; }>; export type GetNep17BalancesResult = Expand; export type InvokeReadParams = Expand<{ scriptHash: string; operation: string; args?: Argument[]; signers?: Signer[]; network?: string; }>; export type InvokeReadResult = Expand<{ script: string; state: string; exception: string | null; gasConsumed: string; stack: Argument[]; }>; export type InvokeReadMultiParams = Expand<{ invocations: Invocation[]; signers?: Signer[]; network?: string; }>; export type InvokeReadMultiResult = Expand<{ script: string; state: string; exception: string | null; gasConsumed: string; stack: Argument[]; }>; export type InvokeParams = Expand<{ scriptHash: string; operation: string; args?: Argument[]; attributes?: Attribute[]; signers?: Signer[]; network?: string; extraSystemFee?: string; extraNetworkFee?: string; broadcastOverride?: boolean; }>; export type InvokeResult = Expand<{ txid: string; nodeUrl?: string; signedTx?: string; }>; export type InvokeMultiParams = Expand<{ invocations: Invocation[]; attributes?: Attribute[]; signers?: Signer[]; network?: string; extraSystemFee?: string; extraNetworkFee?: string; broadcastOverride?: boolean; }>; export type InvokeMultiResult = Expand<{ txid: string; nodeUrl?: string; signedTx?: string; }>; export type SignMessageParams = Expand<{ message: string; }>; export type SignMessageResult = Expand<{ salt: string; signature: string; publicKey: string; }>; export type SignMessageWithoutSaltParams = Expand<{ message: string; }>; export type SignMessageWithoutSaltResult = Expand<{ signature: string; publicKey: string; }>; export type SignTransactionParams = Expand<{ version: number; nonce: number; systemFee: string; networkFee: string; validUntilBlock: number; script: string; invocations?: Invocation[]; attributes?: Attribute[]; signers?: Signer[]; network?: string; }>; export type SignTransactionResult = Expand<{ signature: string; publicKey: string; }>; export type BroadcastTransactionParams = Expand<{ signedTx: string; network?: string; }>; export type BroadcastTransactionResult = Expand<{ txid: string; nodeUrl: string; }>; export interface Dapi { getProvider(): Promise; getNetworks(): Promise; getAccount(): Promise; getBlockCount(params: GetBlockCountParams): Promise; getBlock(params: GetBlockParams): Promise; getTransaction(params: GetTransactionParams): Promise; getApplicationLog(params: GetApplicationLogParams): Promise; getNep17Balances(params: GetNep17BalancesParams): Promise; invokeRead(params: InvokeReadParams): Promise; invokeReadMulti(params: InvokeReadMultiParams): Promise; invoke(params: InvokeParams): Promise; invokeMulti(params: InvokeMultiParams): Promise; signMessage(params: SignMessageParams): Promise; signMessageWithoutSalt(params: SignMessageWithoutSaltParams): Promise; signTransaction(params: SignTransactionParams): Promise; broadcastTransaction(params: BroadcastTransactionParams): Promise; }