UNPKG

@ledgerhq/hw-app-solana

Version:
12 lines 451 B
function buildTLV(tag, value) { const length = value.length; if (length > 0xff) { throw new Error("Value length exceeds 255 bytes"); } return Buffer.concat([tag, new Uint8Array([length]), value]); } export function buildDescriptor({ data, signature }) { const SIGNATURE_TAG = Buffer.from(new Uint8Array([0x08])); return Buffer.concat([data, buildTLV(SIGNATURE_TAG, signature)]); } //# sourceMappingURL=descriptor.js.map