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
+13
View File
@@ -0,0 +1,13 @@
/// <reference types="node" />
import { PublicKey } from "./PublicKey";
export declare class PrivateKey {
static fromHex(hex: string): PrivateKey;
private readonly data;
readonly publicKey: PublicKey;
get secret(): Buffer;
constructor(secret?: Uint8Array);
toHex(): string;
encapsulate(pk: PublicKey): Uint8Array;
multiply(pk: PublicKey, compressed?: boolean): Uint8Array;
equals(other: PrivateKey): boolean;
}
+53
View File
@@ -0,0 +1,53 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PrivateKey = void 0;
var utils_1 = require("@noble/ciphers/utils");
var config_1 = require("../config");
var utils_2 = require("../utils");
var PublicKey_1 = require("./PublicKey");
var PrivateKey = /** @class */ (function () {
function PrivateKey(secret) {
var sk = secret === undefined ? (0, utils_2.getValidSecret)() : secret;
if (!(0, utils_2.isValidPrivateKey)(sk)) {
throw new Error("Invalid private key");
}
this.data = sk;
this.publicKey = new PublicKey_1.PublicKey((0, utils_2.getPublicKey)(sk));
}
PrivateKey.fromHex = function (hex) {
return new PrivateKey((0, utils_2.decodeHex)(hex));
};
Object.defineProperty(PrivateKey.prototype, "secret", {
get: function () {
// TODO: Uint8Array
return Buffer.from(this.data);
},
enumerable: false,
configurable: true
});
PrivateKey.prototype.toHex = function () {
return (0, utils_1.bytesToHex)(this.data);
};
PrivateKey.prototype.encapsulate = function (pk) {
var senderPoint;
var sharedPoint;
if ((0, config_1.isHkdfKeyCompressed)()) {
senderPoint = this.publicKey.compressed;
sharedPoint = this.multiply(pk, true);
}
else {
senderPoint = this.publicKey.uncompressed;
sharedPoint = this.multiply(pk, false);
}
return (0, utils_2.getSharedKey)(senderPoint, sharedPoint);
};
PrivateKey.prototype.multiply = function (pk, compressed) {
if (compressed === void 0) { compressed = false; }
return (0, utils_2.getSharedPoint)(this.data, pk.compressed, compressed);
};
PrivateKey.prototype.equals = function (other) {
return (0, utils_1.equalBytes)(this.data, other.data);
};
return PrivateKey;
}());
exports.PrivateKey = PrivateKey;
+12
View File
@@ -0,0 +1,12 @@
/// <reference types="node" />
import { PrivateKey } from "./PrivateKey";
export declare class PublicKey {
static fromHex(hex: string): PublicKey;
private readonly data;
get uncompressed(): Buffer;
get compressed(): Buffer;
constructor(data: Uint8Array);
toHex(compressed?: boolean): string;
decapsulate(sk: PrivateKey): Uint8Array;
equals(other: PublicKey): boolean;
}
+57
View File
@@ -0,0 +1,57 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PublicKey = void 0;
var utils_1 = require("@noble/ciphers/utils");
var config_1 = require("../config");
var utils_2 = require("../utils");
var PublicKey = /** @class */ (function () {
function PublicKey(data) {
this.data = (0, utils_2.convertPublicKeyFormat)(data, true);
}
PublicKey.fromHex = function (hex) {
return new PublicKey((0, utils_2.hexToPublicKey)(hex));
};
Object.defineProperty(PublicKey.prototype, "uncompressed", {
get: function () {
// TODO: Uint8Array
return Buffer.from((0, utils_2.convertPublicKeyFormat)(this.data, false));
},
enumerable: false,
configurable: true
});
Object.defineProperty(PublicKey.prototype, "compressed", {
get: function () {
// TODO: Uint8Array
return Buffer.from(this.data);
},
enumerable: false,
configurable: true
});
PublicKey.prototype.toHex = function (compressed) {
if (compressed === void 0) { compressed = true; }
if (compressed) {
return (0, utils_1.bytesToHex)(this.data);
}
else {
return (0, utils_1.bytesToHex)(this.uncompressed);
}
};
PublicKey.prototype.decapsulate = function (sk) {
var senderPoint;
var sharedPoint;
if ((0, config_1.isHkdfKeyCompressed)()) {
senderPoint = this.data;
sharedPoint = sk.multiply(this, true);
}
else {
senderPoint = this.uncompressed;
sharedPoint = sk.multiply(this, false);
}
return (0, utils_2.getSharedKey)(senderPoint, sharedPoint);
};
PublicKey.prototype.equals = function (other) {
return (0, utils_1.equalBytes)(this.data, other.data);
};
return PublicKey;
}());
exports.PublicKey = PublicKey;
+2
View File
@@ -0,0 +1,2 @@
export { PrivateKey } from "./PrivateKey";
export { PublicKey } from "./PublicKey";
+9
View File
@@ -0,0 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PublicKey = exports.PrivateKey = void 0;
// treat Buffer as Uint8array, i.e. no call of Buffer specific functions
// finally Uint8Array only
var PrivateKey_1 = require("./PrivateKey");
Object.defineProperty(exports, "PrivateKey", { enumerable: true, get: function () { return PrivateKey_1.PrivateKey; } });
var PublicKey_1 = require("./PublicKey");
Object.defineProperty(exports, "PublicKey", { enumerable: true, get: function () { return PublicKey_1.PublicKey; } });