- Add GETTING_STARTED.md with quick start guide and development modes - Add INSTALL.sh automated installation script - Add INSTALLATION_CHECKLIST.md, INSTALLATION_SUCCESS.md, and INSTALLATION_SUMMARY.md - Add QUICK_REFERENCE.md for common commands - Add SETUP_GUIDE.md with detailed setup instructions - Update README.md with improved project overview - Add did-wallet app dependencies and node_modules
23 lines
694 B
JavaScript
23 lines
694 B
JavaScript
'use strict';
|
|
|
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
|
const decodeErrPrefix = 'CBOR decode error:';
|
|
const encodeErrPrefix = 'CBOR encode error:';
|
|
const uintMinorPrefixBytes = [];
|
|
uintMinorPrefixBytes[23] = 1;
|
|
uintMinorPrefixBytes[24] = 2;
|
|
uintMinorPrefixBytes[25] = 3;
|
|
uintMinorPrefixBytes[26] = 5;
|
|
uintMinorPrefixBytes[27] = 9;
|
|
function assertEnoughData(data, pos, need) {
|
|
if (data.length - pos < need) {
|
|
throw new Error(`${ decodeErrPrefix } not enough data for type`);
|
|
}
|
|
}
|
|
|
|
exports.assertEnoughData = assertEnoughData;
|
|
exports.decodeErrPrefix = decodeErrPrefix;
|
|
exports.encodeErrPrefix = encodeErrPrefix;
|
|
exports.uintMinorPrefixBytes = uintMinorPrefixBytes;
|