import { TSeedTypes } from './types'; import { TSignedData } from './requests/custom-data'; import { ExchangeTransactionOrder, SignedIExchangeTransactionOrder, SignedTransaction, Transaction } from '@waves/ts-types'; import { IAuthParams, ICancelOrder, TTransaction, TTxParams, WithProofs, WithSender, WithTxType } from './transactions'; declare type TLong = string | number; export declare const txTypeMap: { [type: number]: { sign: (tx: Transaction | (TTxParams & WithTxType), seed: TSeedTypes) => SignedTransaction>; }; }; /** * Signs arbitrary transaction. Can also create signed transaction if provided params have type field * @param tx * @param seed */ export declare function signTx(tx: Transaction | TTxParams & WithTxType, seed: TSeedTypes): SignedTransaction; /** * Converts transaction or order object to Uint8Array * @param obj transaction or order */ export declare function serialize(obj: Transaction | SignedIExchangeTransactionOrder): Uint8Array; /** * Verifies signature of transaction or order * @param obj * @param proofN - proof index. Takes first proof by default * @param publicKey - takes senderPublicKey by default */ export declare function verify(obj: (TTransaction & WithProofs) | SignedIExchangeTransactionOrder, proofN?: number, publicKey?: string): boolean; export declare function verifyCustomData(data: TSignedData): boolean; export declare function verifyAuthData(authData: { signature: string; publicKey: string; address: string; }, params: IAuthParams, chainId?: string | number): boolean; export declare function verifyWavesAuthData(authData: { signature: string; publicKey: string; address: string; timestamp: number; }, params: { publicKey: string; timestamp: number; }, chainId?: string | number): boolean; /** * Sends order to matcher * @param ord - transaction to send * @param options - matcher address to send order to. E.g. https://matcher.waves.exchange/. Optional 'market' flag to send market order */ export declare function submitOrder(ord: ExchangeTransactionOrder & WithProofs & WithSender, options: { matcherUrl: string; market?: boolean; }): Promise; /** * Sends order to matcher * @param ord - transaction to send * @param matcherUrl - matcher address to send order to. E.g. https://matcher.waves.exchange/ */ export declare function submitOrder(ord: ExchangeTransactionOrder & WithProofs & WithSender, matcherUrl: string): Promise; /** * Sends cancel order command to matcher. Since matcher api requires amountAsset and priceAsset in request url, * this function requires them as params * @param co - signed cancelOrder object * @param amountAsset - amount asset of the order to be canceled * @param priceAsset - price asset of the order to be canceled * @param matcherUrl - matcher address to send order cancel to. E.g. https://matcher.waves.exchange/ */ export declare function cancelSubmittedOrder(co: ICancelOrder, amountAsset: string | null, priceAsset: string | null, matcherUrl: string): Promise; export {};