@ngraveio/ur-blockchain-commons
Version:
A JS implementation of Uniform Resources(UR) Registry specification from Blockchain Commons.
24 lines • 702 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Bytes = void 0;
const bc_ur_1 = require("@ngraveio/bc-ur");
class Bytes extends (0, bc_ur_1.registryItemFactory)({
tag: NaN, // This is just bytes, so no need to tag it for CBOR
URType: 'bytes',
CDDL: `bytes`,
}) {
constructor(psbt) {
super(psbt);
}
verifyInput(input) {
if (!(input instanceof Uint8Array)) {
return {
valid: false,
reasons: [new Error('Invalid data type for Bytes, data must be a Uint8Array')],
};
}
return { valid: true };
}
}
exports.Bytes = Bytes;
//# sourceMappingURL=Bytes.js.map