UNPKG

@ledgerhq/coin-filecoin

Version:
11 lines 450 B
import { broadcastTx } from "../../network/api"; // The input tx is a JSON-serialised BroadcastTransactionRequest produced by combine(). export async function broadcast(tx, _broadcastConfig) { const request = JSON.parse(tx); const resp = await broadcastTx(request); if (!resp.hash) { throw new Error("Broadcast succeeded but returned an empty transaction hash"); } return resp.hash; } //# sourceMappingURL=broadcast.js.map