UNPKG

@mutants/cardano-tx-builder

Version:

A package that provides utility functions to build and destructure a cardano transaction

12 lines (11 loc) 480 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getSignedDataPayload = void 0; const cbor_1 = require("cbor"); const cardano_utils_1 = require("@mutants/cardano-utils"); const getSignedDataPayload = (signature) => { const decodedSignature = (0, cbor_1.decode)(signature); const payload = decodedSignature[2].toString("hex"); return (0, cardano_utils_1.hexToString)(payload); }; exports.getSignedDataPayload = getSignedDataPayload;