UNPKG

@tatumio/tatum-v1

Version:

Tatum API client allows browsers and Node.js clients to interact with Tatum API.

35 lines 3.41 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.algorandGetTransaction = exports.algorandGetAccountBalance = exports.algorandGetBlock = exports.algorandGetCurrentBlock = exports.algorandGetTransactionsCount = exports.algorandBroadcast = void 0; const tatum_1 = require("../connector/tatum"); /** * For more details, see <a href="https://apidoc.tatum.io/#operation/AlgorandBroadcast" target="_blank">Tatum API documentation</a> */ const algorandBroadcast = async (txData, signatureId) => tatum_1.post(`/v3/algorand/broadcast`, { txData, signatureId }); exports.algorandBroadcast = algorandBroadcast; /** * For more details, see <a href="https://apidoc.tatum.io/#operation/AlgorandGetTransactionCount" target="_blank">Tatum API documentation</a> */ const algorandGetTransactionsCount = async (address) => tatum_1.get(`/v3/algorand/transaction/count/${address}`); exports.algorandGetTransactionsCount = algorandGetTransactionsCount; /** * For more details, see <a href="https://apidoc.tatum.io/#operation/AlgorandGetCurrentBlock" target="_blank">Tatum API documentation</a> */ const algorandGetCurrentBlock = async () => tatum_1.get(`/v3/algorand/block/current`); exports.algorandGetCurrentBlock = algorandGetCurrentBlock; /** * For more details, see <a href="https://apidoc.tatum.io/#operation/AlgorandGetBlock" target="_blank">Tatum API documentation</a> */ const algorandGetBlock = async (roundNumber) => tatum_1.get(`/v3/algorand/block/${roundNumber}`); exports.algorandGetBlock = algorandGetBlock; /** * For more details, see <a href="https://apidoc.tatum.io/#operation/AlgorandGetBalance" target="_blank">Tatum API documentation</a> */ const algorandGetAccountBalance = async (address) => tatum_1.get(`/v3/algorand/account/balance/${address}`); exports.algorandGetAccountBalance = algorandGetAccountBalance; /** * For more details, see <a href="https://apidoc.tatum.io/#operation/AlgorandGetTransaction" target="_blank">Tatum API documentation</a> */ const algorandGetTransaction = async (txid) => tatum_1.get(`/v3/algorand/transaction/${txid}`); exports.algorandGetTransaction = algorandGetTransaction; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uI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