import { Network } from '@dcl/schemas/dist/dapps/network'; import { AuthIdentity } from 'decentraland-crypto-fetch'; import { PurchaseStatus, TransakConfig } from '../types'; import { CustomizationOptions, OrderData, OrderResponse, TransakOrderStatus } from './types'; export declare class Transak { private readonly pusher; private readonly marketplaceAPI; private sdk; constructor(config: TransakConfig, identity?: AuthIdentity); /** * Uses the sdk to suscribe to changes in the status of the transaction and dispatch an action depending on each different state. * * @param network - Network in which the trasanctions will be done */ private suscribeToEvents; getPurchaseStatus(status: TransakOrderStatus): PurchaseStatus; getItemIdFromUrl(url: string): string | undefined; getTokenIdFromUrl(url: string): string | undefined; /** * Given the data of the order and its status, returns an object with the relevant information of the purchase. * * @param orderData - Order entity that comes from the Transak SDK. * @param status - Status of the order. */ private createPurchase; /** * Uses redux-saga channels to emit a message every time a transaction changes its status. * * @param orderData - Order entity that comes from the Transak SDK. * @param status - Status of the order. * @param Network - Network in which the transaction will be done. */ emitPurchaseEvent(orderData: OrderData, network: Network): void; /** * Opens a widget using the init method of the Transak SDK. * * @param address - Address of the connected wallet. * @param network - Network in which the transaction will be done. */ openWidget(customizationOptions: Partial & { network: Network; }): Promise; /** * Given the order id, returns relevant data related to status changes (status & tx hash). * * @param orderId - Transak Order ID. */ getOrder(orderId: string): Promise; }