UNPKG

@mutants/cardano-tx-builder

Version:

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

12 lines (11 loc) 502 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.encodeOutputDatum = void 0; const cbor_1 = require("cbor"); const types_1 = require("./types"); const encodeOutputDatum = (encodedDatum, option) => { return option === types_1.DatumOption.Inline ? [types_1.DatumOption.Inline, new cbor_1.Tagged(24, Buffer.from(encodedDatum, "hex"))] : [types_1.DatumOption.Hash, Buffer.from(encodedDatum, "hex")]; }; exports.encodeOutputDatum = encodeOutputDatum;