@ledgerhq/coin-filecoin
Version:
Ledger Filecoin Coin integration
11 lines • 450 B
JavaScript
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