Add comprehensive installation and setup documentation

- 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
This commit is contained in:
Dorian
2026-01-27 17:18:21 +00:00
parent a81f655133
commit 0d073fa89e
22658 changed files with 4494151 additions and 6 deletions
+3
View File
@@ -0,0 +1,3 @@
(function (root, factory) {(typeof module === 'object' && module.exports) ? module.exports = factory() : root.Uint8Varint = factory()}(typeof self !== 'undefined' ? self : this, function () {
"use strict";var Uint8Varint=(()=>{var x=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var M=Object.prototype.hasOwnProperty;var T=(r,t)=>{for(var n in t)x(r,n,{get:t[n],enumerable:!0})},l=(r,t,n,e)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of N(t))!M.call(r,o)&&o!==n&&x(r,o,{get:()=>t[o],enumerable:!(e=E(t,o))||e.enumerable});return r};var m=r=>l(x({},"__esModule",{value:!0}),r);var C={};T(C,{decode:()=>_,decodeUint8Array:()=>U,decodeUint8ArrayList:()=>y,encode:()=>S,encodeUint8Array:()=>p,encodeUint8ArrayList:()=>A,encodingLength:()=>F});function d(r){return globalThis.Buffer!=null?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):r}function g(r=0){return globalThis.Buffer?.allocUnsafe!=null?d(globalThis.Buffer.allocUnsafe(r)):new Uint8Array(r)}var B=Math.pow(2,7),R=Math.pow(2,14),L=Math.pow(2,21),a=Math.pow(2,28),h=Math.pow(2,35),s=Math.pow(2,42),w=Math.pow(2,49),i=128,c=127;function F(r){if(r<B)return 1;if(r<R)return 2;if(r<L)return 3;if(r<a)return 4;if(r<h)return 5;if(r<s)return 6;if(r<w)return 7;if(Number.MAX_SAFE_INTEGER!=null&&r>Number.MAX_SAFE_INTEGER)throw new RangeError("Could not encode varint");return 8}function p(r,t,n=0){switch(F(r)){case 8:t[n++]=r&255|i,r/=128;case 7:t[n++]=r&255|i,r/=128;case 6:t[n++]=r&255|i,r/=128;case 5:t[n++]=r&255|i,r/=128;case 4:t[n++]=r&255|i,r>>>=7;case 3:t[n++]=r&255|i,r>>>=7;case 2:t[n++]=r&255|i,r>>>=7;case 1:{t[n++]=r&255,r>>>=7;break}default:throw new Error("unreachable")}return t}function A(r,t,n=0){switch(F(r)){case 8:t.set(n++,r&255|i),r/=128;case 7:t.set(n++,r&255|i),r/=128;case 6:t.set(n++,r&255|i),r/=128;case 5:t.set(n++,r&255|i),r/=128;case 4:t.set(n++,r&255|i),r>>>=7;case 3:t.set(n++,r&255|i),r>>>=7;case 2:t.set(n++,r&255|i),r>>>=7;case 1:{t.set(n++,r&255),r>>>=7;break}default:throw new Error("unreachable")}return t}function U(r,t){let n=r[t],e=0;if(e+=n&c,n<i||(n=r[t+1],e+=(n&c)<<7,n<i)||(n=r[t+2],e+=(n&c)<<14,n<i)||(n=r[t+3],e+=(n&c)<<21,n<i)||(n=r[t+4],e+=(n&c)*a,n<i)||(n=r[t+5],e+=(n&c)*h,n<i)||(n=r[t+6],e+=(n&c)*s,n<i)||(n=r[t+7],e+=(n&c)*w,n<i))return e;throw new RangeError("Could not decode varint")}function y(r,t){let n=r.get(t),e=0;if(e+=n&c,n<i||(n=r.get(t+1),e+=(n&c)<<7,n<i)||(n=r.get(t+2),e+=(n&c)<<14,n<i)||(n=r.get(t+3),e+=(n&c)<<21,n<i)||(n=r.get(t+4),e+=(n&c)*a,n<i)||(n=r.get(t+5),e+=(n&c)*h,n<i)||(n=r.get(t+6),e+=(n&c)*s,n<i)||(n=r.get(t+7),e+=(n&c)*w,n<i))return e;throw new RangeError("Could not decode varint")}function S(r,t,n=0){return t==null&&(t=g(F(r))),t instanceof Uint8Array?p(r,t,n):A(r,t,n)}function _(r,t=0){return r instanceof Uint8Array?U(r,t):y(r,t)}return m(C);})();
return Uint8Varint}));
+11
View File
@@ -0,0 +1,11 @@
import type { Uint8ArrayList } from 'uint8arraylist';
export declare function encodingLength(value: number): number;
export declare function encodeUint8Array(value: number, buf: Uint8Array, offset?: number): Uint8Array;
export declare function encodeUint8ArrayList(value: number, buf: Uint8ArrayList, offset?: number): Uint8ArrayList;
export declare function decodeUint8Array(buf: Uint8Array, offset: number): number;
export declare function decodeUint8ArrayList(buf: Uint8ArrayList, offset: number): number;
export declare function encode(value: number): Uint8Array;
export declare function encode(value: number, buf: Uint8Array, offset?: number): Uint8Array;
export declare function encode(value: number, buf: Uint8ArrayList, offset?: number): Uint8ArrayList;
export declare function decode(buf: Uint8ArrayList | Uint8Array, offset?: number): number;
//# sourceMappingURL=index.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAepD,wBAAgB,cAAc,CAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAkCrD;AAED,wBAAgB,gBAAgB,CAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,GAAE,MAAU,GAAG,UAAU,CAsChG;AAED,wBAAgB,oBAAoB,CAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,GAAE,MAAU,GAAG,cAAc,CAsC5G;AAED,wBAAgB,gBAAgB,CAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAoDzE;AAED,wBAAgB,oBAAoB,CAAE,GAAG,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAoDjF;AAED,wBAAgB,MAAM,CAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAAA;AAClD,wBAAgB,MAAM,CAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,CAAA;AACpF,wBAAgB,MAAM,CAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,cAAc,CAAA;AAY5F,wBAAgB,MAAM,CAAE,GAAG,EAAE,cAAc,GAAG,UAAU,EAAE,MAAM,GAAE,MAAU,GAAG,MAAM,CAMpF"}
+226
View File
@@ -0,0 +1,226 @@
/* eslint-disable no-fallthrough */
import { allocUnsafe } from 'uint8arrays/alloc';
const N1 = Math.pow(2, 7);
const N2 = Math.pow(2, 14);
const N3 = Math.pow(2, 21);
const N4 = Math.pow(2, 28);
const N5 = Math.pow(2, 35);
const N6 = Math.pow(2, 42);
const N7 = Math.pow(2, 49);
/** Most significant bit of a byte */
const MSB = 0x80;
/** Rest of the bits in a byte */
const REST = 0x7f;
export function encodingLength(value) {
if (value < N1) {
return 1;
}
if (value < N2) {
return 2;
}
if (value < N3) {
return 3;
}
if (value < N4) {
return 4;
}
if (value < N5) {
return 5;
}
if (value < N6) {
return 6;
}
if (value < N7) {
return 7;
}
if (Number.MAX_SAFE_INTEGER != null && value > Number.MAX_SAFE_INTEGER) {
throw new RangeError('Could not encode varint');
}
return 8;
}
export function encodeUint8Array(value, buf, offset = 0) {
switch (encodingLength(value)) {
case 8: {
buf[offset++] = (value & 0xFF) | MSB;
value /= 128;
}
case 7: {
buf[offset++] = (value & 0xFF) | MSB;
value /= 128;
}
case 6: {
buf[offset++] = (value & 0xFF) | MSB;
value /= 128;
}
case 5: {
buf[offset++] = (value & 0xFF) | MSB;
value /= 128;
}
case 4: {
buf[offset++] = (value & 0xFF) | MSB;
value >>>= 7;
}
case 3: {
buf[offset++] = (value & 0xFF) | MSB;
value >>>= 7;
}
case 2: {
buf[offset++] = (value & 0xFF) | MSB;
value >>>= 7;
}
case 1: {
buf[offset++] = (value & 0xFF);
value >>>= 7;
break;
}
default: throw new Error('unreachable');
}
return buf;
}
export function encodeUint8ArrayList(value, buf, offset = 0) {
switch (encodingLength(value)) {
case 8: {
buf.set(offset++, (value & 0xFF) | MSB);
value /= 128;
}
case 7: {
buf.set(offset++, (value & 0xFF) | MSB);
value /= 128;
}
case 6: {
buf.set(offset++, (value & 0xFF) | MSB);
value /= 128;
}
case 5: {
buf.set(offset++, (value & 0xFF) | MSB);
value /= 128;
}
case 4: {
buf.set(offset++, (value & 0xFF) | MSB);
value >>>= 7;
}
case 3: {
buf.set(offset++, (value & 0xFF) | MSB);
value >>>= 7;
}
case 2: {
buf.set(offset++, (value & 0xFF) | MSB);
value >>>= 7;
}
case 1: {
buf.set(offset++, (value & 0xFF));
value >>>= 7;
break;
}
default: throw new Error('unreachable');
}
return buf;
}
export function decodeUint8Array(buf, offset) {
let b = buf[offset];
let res = 0;
res += b & REST;
if (b < MSB) {
return res;
}
b = buf[offset + 1];
res += (b & REST) << 7;
if (b < MSB) {
return res;
}
b = buf[offset + 2];
res += (b & REST) << 14;
if (b < MSB) {
return res;
}
b = buf[offset + 3];
res += (b & REST) << 21;
if (b < MSB) {
return res;
}
b = buf[offset + 4];
res += (b & REST) * N4;
if (b < MSB) {
return res;
}
b = buf[offset + 5];
res += (b & REST) * N5;
if (b < MSB) {
return res;
}
b = buf[offset + 6];
res += (b & REST) * N6;
if (b < MSB) {
return res;
}
b = buf[offset + 7];
res += (b & REST) * N7;
if (b < MSB) {
return res;
}
throw new RangeError('Could not decode varint');
}
export function decodeUint8ArrayList(buf, offset) {
let b = buf.get(offset);
let res = 0;
res += b & REST;
if (b < MSB) {
return res;
}
b = buf.get(offset + 1);
res += (b & REST) << 7;
if (b < MSB) {
return res;
}
b = buf.get(offset + 2);
res += (b & REST) << 14;
if (b < MSB) {
return res;
}
b = buf.get(offset + 3);
res += (b & REST) << 21;
if (b < MSB) {
return res;
}
b = buf.get(offset + 4);
res += (b & REST) * N4;
if (b < MSB) {
return res;
}
b = buf.get(offset + 5);
res += (b & REST) * N5;
if (b < MSB) {
return res;
}
b = buf.get(offset + 6);
res += (b & REST) * N6;
if (b < MSB) {
return res;
}
b = buf.get(offset + 7);
res += (b & REST) * N7;
if (b < MSB) {
return res;
}
throw new RangeError('Could not decode varint');
}
export function encode(value, buf, offset = 0) {
if (buf == null) {
buf = allocUnsafe(encodingLength(value));
}
if (buf instanceof Uint8Array) {
return encodeUint8Array(value, buf, offset);
}
else {
return encodeUint8ArrayList(value, buf, offset);
}
}
export function decode(buf, offset = 0) {
if (buf instanceof Uint8Array) {
return decodeUint8Array(buf, offset);
}
else {
return decodeUint8ArrayList(buf, offset);
}
}
//# sourceMappingURL=index.js.map
File diff suppressed because one or more lines are too long
+16
View File
@@ -0,0 +1,16 @@
{
"decode": "https://achingbrain.github.io/uint8-varint/functions/decode.html",
".:decode": "https://achingbrain.github.io/uint8-varint/functions/decode.html",
"decodeUint8Array": "https://achingbrain.github.io/uint8-varint/functions/decodeUint8Array.html",
".:decodeUint8Array": "https://achingbrain.github.io/uint8-varint/functions/decodeUint8Array.html",
"decodeUint8ArrayList": "https://achingbrain.github.io/uint8-varint/functions/decodeUint8ArrayList.html",
".:decodeUint8ArrayList": "https://achingbrain.github.io/uint8-varint/functions/decodeUint8ArrayList.html",
"encode": "https://achingbrain.github.io/uint8-varint/functions/encode.html",
".:encode": "https://achingbrain.github.io/uint8-varint/functions/encode.html",
"encodeUint8Array": "https://achingbrain.github.io/uint8-varint/functions/encodeUint8Array.html",
".:encodeUint8Array": "https://achingbrain.github.io/uint8-varint/functions/encodeUint8Array.html",
"encodeUint8ArrayList": "https://achingbrain.github.io/uint8-varint/functions/encodeUint8ArrayList.html",
".:encodeUint8ArrayList": "https://achingbrain.github.io/uint8-varint/functions/encodeUint8ArrayList.html",
"encodingLength": "https://achingbrain.github.io/uint8-varint/functions/encodingLength.html",
".:encodingLength": "https://achingbrain.github.io/uint8-varint/functions/encodingLength.html"
}