@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
11 lines • 563 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.genericBroadcast = void 0;
const operation_1 = require("../../operation");
const alpaca_1 = require("./alpaca");
const genericBroadcast = (network, kind) => async ({ signedOperation: { signature, operation }, account }) => {
const hash = await (0, alpaca_1.getAlpacaApi)(account.currency.id, kind).broadcast(signature);
return (0, operation_1.patchOperationWithHash)(operation, hash);
};
exports.genericBroadcast = genericBroadcast;
//# sourceMappingURL=broadcast.js.map