UNPKG

@tangany/waas

Version:

node.js SDK for Tangany Wallet as a Service API

26 lines (25 loc) 1.5 kB
import { EthTransactionEvent } from "../eth-transaction-event"; import { IHateoasLink } from "../interfaces/common"; import { IEventSearchResponse } from "../interfaces/ethereum-contract"; import { IMonitorSearchResponse } from "../interfaces/monitor"; import { Monitor } from "../monitor"; import { Waas } from "../waas"; /** * Converts a single item that is a result of a monitor search into the associated SDK object that can be used to address that monitor endpoint. * @param item - API search response item * @param waas - Current WaaS instance * @param [wallet] - If set, this wallet name will be assigned to all initialized monitor objects. So this option should be used carefully. */ export declare function convertToMonitor(item: IMonitorSearchResponse["list"][0], waas: Waas, wallet?: string): Monitor; /** * Converts a single item that is a result of a Ethereum event search into the associated SDK object that can be used to address that event endpoint. * @param item - API search response item * @param waas - Current WaaS instance */ export declare function convertToEthEvent(item: IEventSearchResponse["list"][0], waas: Waas): EthTransactionEvent; /** * Tries to find the HATEOAS GET link to retrieve further details. * @param links - Array of HATEOAS links returned by the API * @param expectedRelation - Name of the resource to which the GET link should point */ export declare function findHateoasGetLink(links: IHateoasLink<string>[], expectedRelation: string): string;