import { ILeaseTransaction, TRANSACTION_TYPE, TTx, TTxParams, WithId } from './transactions'; import { TSeedTypes } from './types'; export interface WithTxType { type: TRANSACTION_TYPE; } export declare const txTypeMap: { [type: number]: { sign: (tx: TTx | TTxParams & WithTxType, seed: TSeedTypes) => TTx; }; }; /** * Signs arbitrary transaction. Can also create signed transaction if provided params have type field * @param tx * @param seed */ export declare function signTx(tx: TTx | TTxParams & WithTxType, seed: TSeedTypes): TTx; /** * Converts transaction to Uint8Array * @param obj transaction or order */ export declare function serialize(obj: TTx): Uint8Array; /** * Verifies signature of transaction * @param obj * @param proofN - proof index. Takes first proof by default * @param publicKey - takes senderPublicKey by default */ export declare function verify(obj: TTx, proofN?: number, publicKey?: string): boolean; /** * Sends transaction to lto node * @param tx - transaction to send * @param nodeUrl - node address to send tx to. E.g. https://nodes.lto.network/ */ export declare function broadcast(tx: TTx, nodeUrl: string): Promise; /** * Retrieve information about lto account balance * @param address - lto address as base58 string * @param nodeUrl - node address to ask balance from. E.g. https://nodes.lto.network/ */ export declare function addressBalance(address: string, nodeUrl: string): Promise; /** * Retrieve all the active leases of an address * @param address - lto address as base58 string * @param nodeUrl - node address to ask balance from. E.g. https://nodes.lto.network/ */ export declare function activeLeases(address: string, nodeUrl: string): Promise<(ILeaseTransaction & WithId)[]>; /** * Get data from account dictionary by key * @param address - lto address as base58 string * @param key - dictionary key * @param nodeUrl - node address to ask balance from. E.g. https://nodes.lto.network/ */ export declare function addressDataByKey(address: string, key: string, nodeUrl: string): Promise; /** * Compile a script * @param script the uncompiled script * @param nodeUrl - node address to ask balance from. E.g. https://nodes.lto.network/ */ export declare function compile(script: string, nodeUrl: string): Promise;