/** * @module nodeInteraction */ import { IDataEntry, TTx } from './transactions'; export declare type CancellablePromise = Promise & { cancel: () => void; }; export interface INodeRequestOptions { timeout?: number; apiBase?: string; } export declare const currentHeight: (apiBase: string) => Promise; export declare function waitForHeight(height: number, options?: INodeRequestOptions): Promise; /** * Resolves when specified txId is mined into block * @param txId - acryl address as base58 string * @param options */ export declare function waitForTx(txId: string, options?: INodeRequestOptions): Promise; export declare function waitForTxWithNConfirmations(txId: string, confirmations: number, options: INodeRequestOptions): Promise; export declare function waitNBlocks(blocksCount: number, options?: INodeRequestOptions): Promise; /** * Get account effective balance * @param address - acryl address as base58 string * @param nodeUrl - node address to ask balance from. E.g. https://nodes.acrylplatform.com/ */ export declare function balance(address: string, nodeUrl: string): Promise; /** * Retrieve full information about acryl account balance. Effective, generating etc * @param address - acryl address as base58 string * @param nodeUrl - node address to ask balance from. E.g. https://nodes.acrylplatform.com/ */ export declare function balanceDetails(address: string, nodeUrl: string): Promise; /** * Retrieve information about specific asset account balance * @param assetId - id of asset * @param address - acryl address as base58 string * @param nodeUrl - node address to ask balance from. E.g. https://nodes.acrylplatform.com/ */ export declare function assetBalance(assetId: string, address: string, nodeUrl: string): Promise; /** * Get full account dictionary * @param address - acryl address as base58 string * @param nodeUrl - node address to ask data from. E.g. https://nodes.acrylplatform.com/ */ export declare function accountData(address: string, nodeUrl: string): Promise>; /** * Get data from account dictionary by key * @param address - acryl address as base58 string * @param key - dictionary key * @param nodeUrl - node address to ask data from. E.g. https://nodes.acrylplatform.com/ */ export declare function accountDataByKey(key: string, address: string, nodeUrl: string): Promise; /** * Get account script info * @param address - acryl address as base58 string * @param nodeUrl - node address to ask data from. E.g. https://nodes.acrylplatform.com/ */ export declare function scriptInfo(address: string, nodeUrl: string): Promise; export interface IStateChangeResponse { data: IDataEntry[]; transfers: { address: string; amount: number; assetId: string | null; }[]; } /** * Get invokeScript tx state changes * @param transactionId - invokeScript transaction id as base58 string * @param nodeUrl - node address to ask data from. E.g. https://nodes.acrylplatform.com/ */ export declare function stateChanges(transactionId: string, nodeUrl: string): Promise; /** * Sends transaction to acryl node * @param tx - transaction to send * @param nodeUrl - node address to send tx to. E.g. https://nodes.acrylplatform.com/ */ export declare function broadcast(tx: TTx, nodeUrl: string): Promise;