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
+8
View File
@@ -0,0 +1,8 @@
export interface BaseConverter {
encode(buffer: Uint8Array | number[]): string;
decodeUnsafe(string: string): Uint8Array | undefined;
decode(string: string): Uint8Array;
}
export default function base(ALPHABET: string, name: string): BaseConverter
+127
View File
@@ -0,0 +1,127 @@
// base-x encoding / decoding
// Copyright (c) 2018 base-x contributors
// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
// Distributed under the MIT software license, see the accompanying
// file LICENSE or http://www.opensource.org/licenses/mit-license.php.
function base (ALPHABET, name) {
if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
var BASE_MAP = new Uint8Array(256);
for (var j = 0; j < BASE_MAP.length; j++) {
BASE_MAP[j] = 255;
}
for (var i = 0; i < ALPHABET.length; i++) {
var x = ALPHABET.charAt(i);
var xc = x.charCodeAt(0);
if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
BASE_MAP[xc] = i;
}
var BASE = ALPHABET.length;
var LEADER = ALPHABET.charAt(0);
var FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
var iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
function encode (source) {
if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) {
source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
} else if (Array.isArray(source)) {
source = Uint8Array.from(source);
}
if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }
if (source.length === 0) { return '' }
// Skip & count leading zeroes.
var zeroes = 0;
var length = 0;
var pbegin = 0;
var pend = source.length;
while (pbegin !== pend && source[pbegin] === 0) {
pbegin++;
zeroes++;
}
// Allocate enough space in big-endian base58 representation.
var size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
var b58 = new Uint8Array(size);
// Process the bytes.
while (pbegin !== pend) {
var carry = source[pbegin];
// Apply "b58 = b58 * 256 + ch".
var i = 0;
for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
carry += (256 * b58[it1]) >>> 0;
b58[it1] = (carry % BASE) >>> 0;
carry = (carry / BASE) >>> 0;
}
if (carry !== 0) { throw new Error('Non-zero carry') }
length = i;
pbegin++;
}
// Skip leading zeroes in base58 result.
var it2 = size - length;
while (it2 !== size && b58[it2] === 0) {
it2++;
}
// Translate the result into a string.
var str = LEADER.repeat(zeroes);
for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
return str
}
function decodeUnsafe (source) {
if (typeof source !== 'string') { throw new TypeError('Expected String') }
if (source.length === 0) { return new Uint8Array() }
var psz = 0;
// Skip leading spaces.
if (source[psz] === ' ') { return }
// Skip and count leading '1's.
var zeroes = 0;
var length = 0;
while (source[psz] === LEADER) {
zeroes++;
psz++;
}
// Allocate enough space in big-endian base256 representation.
var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
var b256 = new Uint8Array(size);
// Process the characters.
while (source[psz]) {
// Decode character
var carry = BASE_MAP[source.charCodeAt(psz)];
// Invalid character
if (carry === 255) { return }
var i = 0;
for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
carry += (BASE * b256[it3]) >>> 0;
b256[it3] = (carry % 256) >>> 0;
carry = (carry / 256) >>> 0;
}
if (carry !== 0) { throw new Error('Non-zero carry') }
length = i;
psz++;
}
// Skip trailing spaces.
if (source[psz] === ' ') { return }
// Skip leading zeroes in b256.
var it4 = size - length;
while (it4 !== size && b256[it4] === 0) {
it4++;
}
var vch = new Uint8Array(zeroes + (size - it4));
var j = zeroes;
while (it4 !== size) {
vch[j++] = b256[it4++];
}
return vch
}
function decode (string) {
var buffer = decodeUnsafe(string);
if (buffer) { return buffer }
throw new Error(`Non-${name} character`)
}
return {
encode: encode,
decodeUnsafe: decodeUnsafe,
decode: decode
}
}
var src = base;
var _brrp__multiformats_scope_baseX = src;
export default _brrp__multiformats_scope_baseX;
+49
View File
@@ -0,0 +1,49 @@
// Type definitions for varint 5.0
// Project: https://github.com/chrisdickinson/varint#readme
// Definitions by: David Brockman Smoliansky <https://github.com/dbrockman>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface Varint {
encode: {
/**
* Encodes `num` into `buffer` starting at `offset`. returns `buffer`, with the encoded varint written into it.
* `varint.encode.bytes` will now be set to the number of bytes modified.
*/
(num: number, buffer: Uint8Array, offset?: number): Buffer;
/**
* Encodes `num` into `array` starting at `offset`. returns `array`, with the encoded varint written into it.
* If `array` is not provided, it will default to a new array.
* `varint.encode.bytes` will now be set to the number of bytes modified.
*/
(num: number, array?: number[], offset?: number): number[]
/**
* Similar to `decode.bytes` when encoding a number it can be useful to know how many bytes where written (especially if you pass an output array).
* You can access this via `varint.encode.bytes` which holds the number of bytes written in the last encode.
*/
bytes: number
},
decode: {
/**
* Decodes `data`, which can be either a buffer or array of integers, from position `offset` or default 0 and returns the decoded original integer.
* Throws a `RangeError` when `data` does not represent a valid encoding.
*/
(buf: Uint8Array | number[], offset?: number): number
/**
* If you also require the length (number of bytes) that were required to decode the integer you can access it via `varint.decode.bytes`.
* This is an integer property that will tell you the number of bytes that the last .decode() call had to use to decode.
*/
bytes: number
},
/**
* returns the number of bytes this number will be encoded as, up to a maximum of 8.
*/
encodingLength(num: number): number
}
declare const varint:Varint
export default varint
+91
View File
@@ -0,0 +1,91 @@
var encode_1 = encode;
var MSB = 0x80
, REST = 0x7F
, MSBALL = ~REST
, INT = Math.pow(2, 31);
function encode(num, out, offset) {
out = out || [];
offset = offset || 0;
var oldOffset = offset;
while(num >= INT) {
out[offset++] = (num & 0xFF) | MSB;
num /= 128;
}
while(num & MSBALL) {
out[offset++] = (num & 0xFF) | MSB;
num >>>= 7;
}
out[offset] = num | 0;
encode.bytes = offset - oldOffset + 1;
return out
}
var decode = read;
var MSB$1 = 0x80
, REST$1 = 0x7F;
function read(buf, offset) {
var res = 0
, offset = offset || 0
, shift = 0
, counter = offset
, b
, l = buf.length;
do {
if (counter >= l) {
read.bytes = 0;
throw new RangeError('Could not decode varint')
}
b = buf[counter++];
res += shift < 28
? (b & REST$1) << shift
: (b & REST$1) * Math.pow(2, shift);
shift += 7;
} while (b >= MSB$1)
read.bytes = counter - offset;
return res
}
var N1 = Math.pow(2, 7);
var N2 = Math.pow(2, 14);
var N3 = Math.pow(2, 21);
var N4 = Math.pow(2, 28);
var N5 = Math.pow(2, 35);
var N6 = Math.pow(2, 42);
var N7 = Math.pow(2, 49);
var N8 = Math.pow(2, 56);
var N9 = Math.pow(2, 63);
var length = function (value) {
return (
value < N1 ? 1
: value < N2 ? 2
: value < N3 ? 3
: value < N4 ? 4
: value < N5 ? 5
: value < N6 ? 6
: value < N7 ? 7
: value < N8 ? 8
: value < N9 ? 9
: 10
)
};
var varint = {
encode: encode_1
, decode: decode
, encodingLength: length
};
var _brrp_varint = varint;
export default _brrp_varint;