UNPKG

@ledgerhq/coin-filecoin

Version:
14 lines 557 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.broadcast = broadcast; const api_1 = require("../../network/api"); // The input tx is a JSON-serialised BroadcastTransactionRequest produced by combine(). async function broadcast(tx, _broadcastConfig) { const request = JSON.parse(tx); const resp = await (0, api_1.broadcastTx)(request); if (!resp.hash) { throw new Error("Broadcast succeeded but returned an empty transaction hash"); } return resp.hash; } //# sourceMappingURL=broadcast.js.map