1.0.1 • Published 6 months ago

@kaas-devteam/ts-requester v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

ts-requester

Request Transfer Sequencer over websocket

Install

$ npm install @kaas-devteam/ts-requester
$ yarn add @kaas-devteam/ts-requester

Usage

import Requester from "@kaas-devteam/ts-requester"

const requeter = new Requester("ws://<YOUR_ENDPOINT>")

async function start() {
    // Asynchronously send message through Websocket and asynchronously retrieve the result
    // The library internally establishes the correspondence between requests and responses
    const data = await requester.send({req: "tx.detail", arg: {txId: "<TX_ID>"}})
    return data
}

start()