Interface ProviderInterface

Hierarchy

  • ProviderInterface

Implemented by

Properties

call: (<T>(method: string, params: unknown) => Promise<T>)

Type declaration

    • <T>(method: string, params: unknown): Promise<T>
    • Type Parameters

      • T = unknown

      Parameters

      • method: string
      • params: unknown

      Returns Promise<T>

getAccountRc: ((account: string) => Promise<string>)

Type declaration

    • (account: string): Promise<string>
    • Parameters

      • account: string

      Returns Promise<string>

getBlock: ((height: number, opts?: GetBlockOptions) => Promise<{ block: BlockJson; block_height: string; block_id: string; receipt: BlockReceipt }>)

Type declaration

getBlocks: ((height: number, numBlocks?: number, idRef?: string, opts?: GetBlockOptions) => Promise<{ block: BlockJson; block_height: string; block_id: string; receipt: BlockReceipt }[]>)

Type declaration

    • (height: number, numBlocks?: number, idRef?: string, opts?: GetBlockOptions): Promise<{ block: BlockJson; block_height: string; block_id: string; receipt: BlockReceipt }[]>
    • Parameters

      • height: number
      • Optional numBlocks: number
      • Optional idRef: string
      • Optional opts: GetBlockOptions

      Returns Promise<{ block: BlockJson; block_height: string; block_id: string; receipt: BlockReceipt }[]>

getBlocksById: ((blockIds: string[], opts?: GetBlockOptions) => Promise<{ block_items: { block: BlockJson; block_height: string; block_id: string; receipt: BlockReceipt }[] }>)

Type declaration

getChainId: (() => Promise<string>)

Type declaration

    • (): Promise<string>
    • Returns Promise<string>

getForkHeads?: (() => Promise<{ fork_heads: BlockTopology[]; last_irreversible_block: BlockTopology }>)

Type declaration

getHeadInfo: (() => Promise<{ head_block_time: string; head_state_merkle_root: string; head_topology: BlockTopology; last_irreversible_block: string }>)

Type declaration

    • (): Promise<{ head_block_time: string; head_state_merkle_root: string; head_topology: BlockTopology; last_irreversible_block: string }>
    • Returns Promise<{ head_block_time: string; head_state_merkle_root: string; head_topology: BlockTopology; last_irreversible_block: string }>

getNextNonce: ((account: string) => Promise<string>)

Type declaration

    • (account: string): Promise<string>
    • Parameters

      • account: string

      Returns Promise<string>

getNonce: ((account: string, deserialize?: boolean) => Promise<string | number>)

Type declaration

    • (account: string, deserialize?: boolean): Promise<string | number>
    • Parameters

      • account: string
      • Optional deserialize: boolean

      Returns Promise<string | number>

getResourceLimits?: (() => Promise<{ resource_limit_data: { compute_bandwidth_cost: string; compute_bandwidth_limit: string; disk_storage_cost: string; disk_storage_limit: string; network_bandwidth_cost: string; network_bandwidth_limit: string } }>)

Type declaration

    • (): Promise<{ resource_limit_data: { compute_bandwidth_cost: string; compute_bandwidth_limit: string; disk_storage_cost: string; disk_storage_limit: string; network_bandwidth_cost: string; network_bandwidth_limit: string } }>
    • Returns Promise<{ resource_limit_data: { compute_bandwidth_cost: string; compute_bandwidth_limit: string; disk_storage_cost: string; disk_storage_limit: string; network_bandwidth_cost: string; network_bandwidth_limit: string } }>

getTransactionsById: ((transactionIds: string[]) => Promise<{ transactions: { containing_blocks: string[]; transaction: TransactionJson }[] }>)

Type declaration

    • (transactionIds: string[]): Promise<{ transactions: { containing_blocks: string[]; transaction: TransactionJson }[] }>
    • Parameters

      • transactionIds: string[]

      Returns Promise<{ transactions: { containing_blocks: string[]; transaction: TransactionJson }[] }>

invokeGetContractAddress?: ((name: string) => Promise<{ value: { address: string } }>)

Type declaration

    • (name: string): Promise<{ value: { address: string } }>
    • Parameters

      • name: string

      Returns Promise<{ value: { address: string } }>

invokeGetContractMetadata?: ((contractId: string) => Promise<{ value: { authorizes_call_contract: boolean; authorizes_transaction_application: boolean; authorizes_upload_contract: boolean; hash: string; system: boolean } }>)

Type declaration

    • (contractId: string): Promise<{ value: { authorizes_call_contract: boolean; authorizes_transaction_application: boolean; authorizes_upload_contract: boolean; hash: string; system: boolean } }>
    • Parameters

      • contractId: string

      Returns Promise<{ value: { authorizes_call_contract: boolean; authorizes_transaction_application: boolean; authorizes_upload_contract: boolean; hash: string; system: boolean } }>

invokeSystemCall: (<T>(serializer: Serializer, nameOrId: string | number, args: Record<string, unknown>, callerData?: { caller: string; caller_privilege: number }) => Promise<T>)

Type declaration

    • <T>(serializer: Serializer, nameOrId: string | number, args: Record<string, unknown>, callerData?: { caller: string; caller_privilege: number }): Promise<T>
    • Type Parameters

      • T = Record<string, unknown>

      Parameters

      • serializer: Serializer
      • nameOrId: string | number
      • args: Record<string, unknown>
      • Optional callerData: { caller: string; caller_privilege: number }
        • caller: string
        • caller_privilege: number

      Returns Promise<T>

readContract: ((operation: CallContractOperationJson) => Promise<{ logs: string; result: string }>)

Type declaration

sendTransaction: ((transaction: TransactionJson | TransactionJsonWait, broadcast?: boolean) => Promise<{ receipt: TransactionReceipt; transaction: TransactionJsonWait }>)

Type declaration

submitBlock?: ((block: BlockJson) => Promise<Record<string, never>>)

Type declaration

    • (block: BlockJson): Promise<Record<string, never>>
    • Parameters

      Returns Promise<Record<string, never>>

wait: ((txId: string, type?: "byBlock" | "byTransactionId", timeout?: number) => Promise<{ blockId: string; blockNumber?: number }>)

Type declaration

    • (txId: string, type?: "byBlock" | "byTransactionId", timeout?: number): Promise<{ blockId: string; blockNumber?: number }>
    • Parameters

      • txId: string
      • Optional type: "byBlock" | "byTransactionId"
      • Optional timeout: number

      Returns Promise<{ blockId: string; blockNumber?: number }>

Generated using TypeDoc