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
+200
View File
@@ -0,0 +1,200 @@
/* jshint esversion: 6 */
/* jslint node: true */
'use strict';
JSON.canonicalize = require('../');
const test = require('ava');
test('empty array', t => {
const input = [];
const expected = '[]';
const actual = JSON.canonicalize(input);
t.is(actual, expected);
});
test('one element array', t => {
const input = [123];
const expected = '[123]';
const actual = JSON.canonicalize(input);
t.is(actual, expected);
});
test('multi element array', t => {
const input = [123, 456, 'hello'];
const expected = '[123,456,"hello"]';
const actual = JSON.canonicalize(input);
t.is(actual, expected);
});
test('null and undefined values in array', t => {
const input = [null, undefined, 'hello'];
const expected = '[null,null,"hello"]';
const actual = JSON.canonicalize(input);
t.is(actual, expected);
});
test('NaN in array', t => {
try {
const input = [NaN];
JSON.canonicalize(input);
t.fail();
} catch (error) {
t.is(error.message, 'NaN is not allowed');
t.pass();
}
});
test('NaN in object', t => {
try {
const input = { key: NaN };
JSON.canonicalize(input);
t.fail();
} catch (error) {
t.is(error.message, 'NaN is not allowed');
t.pass();
}
});
test('NaN single value', t => {
try {
const input = NaN;
JSON.canonicalize(input);
t.fail();
} catch (error) {
t.is(error.message, 'NaN is not allowed');
t.pass();
}
});
test('Infinity in array', t => {
try {
const input = [Infinity];
JSON.canonicalize(input);
t.fail();
} catch (error) {
t.is(error.message, 'Infinity is not allowed');
t.pass();
}
});
test('Infinity in object', t => {
try {
const input = { key: Infinity };
JSON.canonicalize(input);
t.fail();
} catch (error) {
t.is(error.message, 'Infinity is not allowed');
t.pass();
}
});
test('Infinity single value', t => {
try {
const input = -Infinity;
JSON.canonicalize(input);
t.fail();
} catch (error) {
t.is(error.message, 'Infinity is not allowed');
t.pass();
}
});
test('object in array', t => {
const input = [{ b: 123, a: 'string' }];
const expected = '[{"a":"string","b":123}]';
const actual = JSON.canonicalize(input);
t.is(actual, expected);
});
test('empty object', t => {
const input = {};
const expected = '{}';
const actual = JSON.canonicalize(input);
t.is(actual, expected);
});
test('object with undefined value', t => {
const input = { test: undefined };
const expected = '{}';
const actual = JSON.canonicalize(input);
t.is(actual, expected);
});
test('object with null value', t => {
const input = { test: null };
const expected = '{"test":null}';
const actual = JSON.canonicalize(input);
t.is(actual, expected);
});
test('object with one property', t => {
const input = { hello: 'world' };
const expected = '{"hello":"world"}';
const actual = JSON.canonicalize(input);
t.is(actual, expected);
});
test('object with more than one property', t => {
const input = { hello: 'world', number: 123 };
const expected = '{"hello":"world","number":123}';
const actual = JSON.canonicalize(input);
t.is(actual, expected);
});
test('undefined', t => {
const input = undefined;
const expected = undefined;
const actual = JSON.canonicalize(input);
t.is(actual, expected);
});
test('null', t => {
const input = null;
const expected = 'null';
const actual = JSON.canonicalize(input);
t.is(actual, expected);
});
test('symbol', t => {
const input = Symbol('hello world');
const expected = undefined;
const actual = JSON.canonicalize(input);
t.is(actual, expected);
});
test('object with symbol value', t => {
const input = { test: Symbol('hello world') };
const expected = '{}';
const actual = JSON.canonicalize(input);
t.is(actual, expected);
});
test('object with number key', t => {
const input = { 42: 'foo' };
const expected = '{"42":"foo"}';
const actual = JSON.canonicalize(input);
t.is(actual, expected);
});
test('object with symbol key', t => {
const input = { [Symbol('hello world')]: 'foo' };
const expected = '{}';
const actual = JSON.canonicalize(input);
t.is(actual, expected);
});
test('object with toJSON', t => {
const input = {
a: 123,
b: 456,
toJSON: function () {
return {
b: this.b,
a: this.a
};
}
};
const expected = '{"a":123,"b":456}';
const actual = JSON.canonicalize(input);
t.is(actual, expected);
});
+43
View File
@@ -0,0 +1,43 @@
/* jshint esversion: 6 */
/* jslint node: true */
'use strict';
JSON.canonicalize = require('../');
const test = require('ava');
const jsonfile = require('jsonfile');
const fs = require('fs');
test('arrays', t => {
const input = jsonfile.readFileSync('test/testdata/input/arrays.json');
const expected = fs.readFileSync('test/testdata/output/arrays.json', 'utf8').trim();
const actual = JSON.canonicalize(input);
t.is(actual, expected);
});
test('french', t => {
const input = jsonfile.readFileSync('test/testdata/input/french.json');
const expected = fs.readFileSync('test/testdata/output/french.json', 'utf8').trim();
const actual = JSON.canonicalize(input);
t.is(actual, expected);
});
test('structures', t => {
const input = jsonfile.readFileSync('test/testdata/input/structures.json');
const expected = fs.readFileSync('test/testdata/output/structures.json', 'utf8').trim();
const actual = JSON.canonicalize(input);
t.is(actual, expected);
});
test('values', t => {
const input = jsonfile.readFileSync('test/testdata/input/values.json');
const expected = fs.readFileSync('test/testdata/output/values.json', 'utf8').trim();
const actual = JSON.canonicalize(input);
t.is(actual, expected);
});
test('weird', t => {
const input = jsonfile.readFileSync('test/testdata/input/weird.json');
const expected = fs.readFileSync('test/testdata/output/weird.json', 'utf8').trim();
const actual = JSON.canonicalize(input);
t.is(actual, expected);
});
+8
View File
@@ -0,0 +1,8 @@
[
56,
{
"d": true,
"10": null,
"1": [ ]
}
]
+6
View File
@@ -0,0 +1,6 @@
{
"peach": "This sorting order",
"péché": "is wrong according to French",
"pêche": "but canonicalization MUST",
"sin": "ignore locale"
}
+8
View File
@@ -0,0 +1,8 @@
{
"1": {"f": {"f": "hi","F": 5} ,"\n": 56.0},
"10": { },
"": "empty",
"a": { },
"111": [ {"e": "yes","E": "no" } ],
"A": {"b": "123"}
}
+5
View File
@@ -0,0 +1,5 @@
{
"numbers": [333333333.33333329, 1E30, 4.50, 2e-3, 0.000000000000000000000000001],
"string": "\u20ac$\u000F\u000aA'\u0042\u0022\u005c\\\"\/",
"literals": [null, true, false]
}
+9
View File
@@ -0,0 +1,9 @@
{
"€": "Euro Sign",
"1": "One",
"\u0080": "Control",
"\ud83d\ude02": "Smiley",
"ö": "Latin Small Letter O With Diaeresis",
"דּ": "Hebrew Letter Dalet With Dagesh",
"</script>": "Browser Challenge"
}
+1
View File
@@ -0,0 +1 @@
[56,{"1":[],"10":null,"d":true}]
+1
View File
@@ -0,0 +1 @@
{"peach":"This sorting order","péché":"is wrong according to French","pêche":"but canonicalization MUST","sin":"ignore locale"}
+1
View File
@@ -0,0 +1 @@
{"":"empty","1":{"\n":56,"f":{"F":5,"f":"hi"}},"10":{},"111":[{"E":"no","e":"yes"}],"A":{"b":"123"},"a":{}}
+1
View File
@@ -0,0 +1 @@
{"literals":[null,true,false],"numbers":[333333333.3333333,1e+30,4.5,0.002,1e-27],"string":"€$\u000f\nA'B\"\\\\\"/"}
+1
View File
@@ -0,0 +1 @@
{"1":"One","</script>":"Browser Challenge","€":"Control","ö":"Latin Small Letter O With Diaeresis","€":"Euro Sign","😂":"Smiley","דּ":"Hebrew Letter Dalet With Dagesh"}