@invisi-labs/primitives 1.3.4 → 1.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,169 +0,0 @@
1
- import {
2
- validateClueKey
3
- } from "./chunk-VXBZSY4Y.js";
4
-
5
- // src/address/address.ts
6
- import { secp256k1 } from "@noble/curves/secp256k1";
7
- import { keccak_256 } from "@noble/hashes/sha3";
8
- import { bytesToHex, concatBytes, hexToBytes, utf8ToBytes } from "@noble/hashes/utils";
9
- import { getAddress } from "ethers";
10
- var ALPHABET = "qpzry9x8gf2tvdw0s3jn54khce6mua7l";
11
- function identityBytes(value) {
12
- if (typeof value !== "bigint" && (typeof value !== "string" || !/^0x[0-9a-fA-F]{40}$/.test(value)))
13
- throw new Error("invalid owner address encoding");
14
- const n = BigInt(value);
15
- if (n <= 0n || n >= 1n << 160n)
16
- throw new RangeError("owner address must be a nonzero EVM owner address");
17
- return hexToBytes(n.toString(16).padStart(40, "0"));
18
- }
19
- function receivingKeys(keys) {
20
- const publicKey = keys.viewingPublicKey;
21
- if (!(publicKey instanceof Uint8Array) || publicKey.length !== 33 || publicKey[0] !== 2 && publicKey[0] !== 3)
22
- throw new Error("invalid compressed viewing public key");
23
- secp256k1.ProjectivePoint.fromHex(publicKey).assertValidity();
24
- validateClueKey(keys.clueKey);
25
- return { viewingPublicKey: Uint8Array.from(publicKey), clueKey: Uint8Array.from(keys.clueKey) };
26
- }
27
- function checkedText(prefix, data) {
28
- const digest = keccak_256(utf8ToBytes("Invisi.AddressCaseChecksum.v1:" + prefix + data));
29
- return prefix + Array.from(
30
- data,
31
- (character, i) => digest[i >> 3] >> 7 - (i & 7) & 1 ? character.toUpperCase() : character
32
- ).join("");
33
- }
34
- function encode(prefix, payload) {
35
- let buffer = 0, bits = 0, data = "";
36
- for (const byte of payload) {
37
- buffer = buffer << 8 | byte;
38
- bits += 8;
39
- while (bits >= 5) {
40
- bits -= 5;
41
- data += ALPHABET[buffer >>> bits & 31];
42
- }
43
- buffer &= (1 << bits) - 1;
44
- }
45
- if (bits) data += ALPHABET[buffer << 5 - bits & 31];
46
- return checkedText(prefix, data);
47
- }
48
- function encodeLongAddress(recipient) {
49
- const identity = identityBytes(recipient.ownerAddress), keys = receivingKeys(recipient);
50
- return encode("0i", concatBytes(identity, keys.viewingPublicKey, keys.clueKey));
51
- }
52
- function encodeShortAddress(ownerAddress) {
53
- const identity = identityBytes(ownerAddress);
54
- return getAddress(
55
- typeof ownerAddress === "string" ? ownerAddress : `0x${bytesToHex(identity)}`
56
- );
57
- }
58
- function decodeAddress(address) {
59
- if (typeof address !== "string") throw new TypeError("address must be text");
60
- if (address.startsWith("0x")) {
61
- const owner = getAddress(address);
62
- return { kind: "short", ownerAddress: `0x${bytesToHex(identityBytes(owner))}` };
63
- }
64
- if (!address.startsWith("0i")) throw new Error("invalid Invisi address prefix");
65
- const prefix = "0i";
66
- if (address.length !== 138) throw new Error("invalid address length");
67
- const data = address.slice(prefix.length).toLowerCase();
68
- if (Array.from(data).some((character) => !ALPHABET.includes(character)))
69
- throw new Error("invalid address alphabet");
70
- if (checkedText(prefix, data) !== address) throw new Error("invalid address case checksum");
71
- let buffer = 0, bits = 0;
72
- const payload = [];
73
- for (const character of data) {
74
- buffer = buffer << 5 | ALPHABET.indexOf(character);
75
- bits += 5;
76
- if (bits >= 8) {
77
- bits -= 8;
78
- payload.push(buffer >>> bits & 255);
79
- }
80
- buffer &= (1 << bits) - 1;
81
- }
82
- if (bits !== 0 || buffer !== 0) throw new Error("noncanonical address padding");
83
- const raw = Uint8Array.from(payload);
84
- const ownerAddress = `0x${bytesToHex(identityBytes(`0x${bytesToHex(raw.subarray(0, 20))}`))}`;
85
- return {
86
- kind: "long",
87
- ownerAddress,
88
- ...receivingKeys({ viewingPublicKey: raw.slice(20, 53), clueKey: raw.slice(53) })
89
- };
90
- }
91
-
92
- // src/errors.ts
93
- var MissingCapabilityError = class extends Error {
94
- constructor(capability) {
95
- super(`Missing ${capability} capability`);
96
- this.capability = capability;
97
- this.name = "MissingCapabilityError";
98
- }
99
- code = "MISSING_CAPABILITY";
100
- };
101
-
102
- // src/address/receiving-address.ts
103
- var ReceivingAddress = class _ReceivingAddress {
104
- #text;
105
- constructor(text) {
106
- const decoded = decodeAddress(text);
107
- this.#text = decoded.kind === "short" ? encodeShortAddress(decoded.ownerAddress) : text;
108
- Object.freeze(this);
109
- }
110
- static parse(text) {
111
- return new _ReceivingAddress(text);
112
- }
113
- static from(recipient) {
114
- return new _ReceivingAddress(encodeLongAddress(recipient));
115
- }
116
- static fromIdentity(identity) {
117
- return new _ReceivingAddress(encodeShortAddress(identity));
118
- }
119
- get ownerAddress() {
120
- return decodeAddress(this.#text).ownerAddress;
121
- }
122
- get kind() {
123
- return decodeAddress(this.#text).kind;
124
- }
125
- getReceivingKeys() {
126
- const decoded = decodeAddress(this.#text);
127
- if (decoded.kind === "short") {
128
- throw new MissingCapabilityError("resolved receiving keys");
129
- }
130
- return { viewingPublicKey: decoded.viewingPublicKey, clueKey: decoded.clueKey };
131
- }
132
- async resolve(lookup) {
133
- if (this.kind === "long") {
134
- return this;
135
- }
136
- if (!lookup) {
137
- throw new MissingCapabilityError("explicit registry lookup");
138
- }
139
- const keys = await lookup(this.ownerAddress);
140
- if (!keys) {
141
- throw new Error("owner address is not registered");
142
- }
143
- return _ReceivingAddress.from({
144
- ownerAddress: this.ownerAddress,
145
- viewingPublicKey: keys.viewingPublicKey,
146
- clueKey: keys.clueKey
147
- });
148
- }
149
- get viewingPublicKey() {
150
- return this.getReceivingKeys().viewingPublicKey;
151
- }
152
- get clueKey() {
153
- return this.getReceivingKeys().clueKey;
154
- }
155
- toString() {
156
- return this.#text;
157
- }
158
- toJSON() {
159
- return this.#text;
160
- }
161
- };
162
-
163
- export {
164
- encodeLongAddress,
165
- decodeAddress,
166
- MissingCapabilityError,
167
- ReceivingAddress
168
- };
169
- //# sourceMappingURL=chunk-5KF55DN7.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/address/address.ts","../src/errors.ts","../src/address/receiving-address.ts"],"sourcesContent":["import { secp256k1 } from \"@noble/curves/secp256k1\";\nimport { keccak_256 } from \"@noble/hashes/sha3\";\nimport { bytesToHex, concatBytes, hexToBytes, utf8ToBytes } from \"@noble/hashes/utils\";\nimport { getAddress } from \"ethers\";\nimport { validateClueKey } from \"../fmd/fmd\";\n\nexport interface ReceivingAddress {\n ownerAddress: `0x${string}`;\n viewingPublicKey: Uint8Array;\n clueKey: Uint8Array;\n}\nexport type DecodedAddress =\n ({ kind: \"long\" } & ReceivingAddress) | { kind: \"short\"; ownerAddress: `0x${string}` };\nexport type ReceivingKeyLookup = (\n ownerAddress: `0x${string}`\n) => Promise<Pick<ReceivingAddress, \"viewingPublicKey\" | \"clueKey\"> | null | undefined>;\nconst ALPHABET = \"qpzry9x8gf2tvdw0s3jn54khce6mua7l\";\ntype Identity = bigint | `0x${string}`;\n\nfunction identityBytes(value: Identity): Uint8Array {\n if (\n typeof value !== \"bigint\" &&\n (typeof value !== \"string\" || !/^0x[0-9a-fA-F]{40}$/.test(value))\n )\n throw new Error(\"invalid owner address encoding\");\n const n = BigInt(value);\n if (n <= 0n || n >= 1n << 160n)\n throw new RangeError(\"owner address must be a nonzero EVM owner address\");\n return hexToBytes(n.toString(16).padStart(40, \"0\"));\n}\nfunction receivingKeys(keys: Pick<ReceivingAddress, \"viewingPublicKey\" | \"clueKey\">) {\n const publicKey = keys.viewingPublicKey;\n if (\n !(publicKey instanceof Uint8Array) ||\n publicKey.length !== 33 ||\n (publicKey[0] !== 2 && publicKey[0] !== 3)\n )\n throw new Error(\"invalid compressed viewing public key\");\n secp256k1.ProjectivePoint.fromHex(publicKey).assertValidity();\n validateClueKey(keys.clueKey);\n return { viewingPublicKey: Uint8Array.from(publicKey), clueKey: Uint8Array.from(keys.clueKey) };\n}\nfunction checkedText(prefix: string, data: string): string {\n const digest = keccak_256(utf8ToBytes(\"Invisi.AddressCaseChecksum.v1:\" + prefix + data));\n return (\n prefix +\n Array.from(data, (character, i) =>\n (digest[i >> 3]! >> (7 - (i & 7))) & 1 ? character.toUpperCase() : character\n ).join(\"\")\n );\n}\nfunction encode(prefix: string, payload: Uint8Array): string {\n let buffer = 0,\n bits = 0,\n data = \"\";\n for (const byte of payload) {\n buffer = (buffer << 8) | byte;\n bits += 8;\n while (bits >= 5) {\n bits -= 5;\n data += ALPHABET[(buffer >>> bits) & 31];\n }\n buffer &= (1 << bits) - 1;\n }\n if (bits) data += ALPHABET[(buffer << (5 - bits)) & 31];\n return checkedText(prefix, data);\n}\n\n/** 138 characters: 0i plus the complete offline receiving materials. */\nexport function encodeLongAddress(recipient: ReceivingAddress): string {\n const identity = identityBytes(recipient.ownerAddress),\n keys = receivingKeys(recipient);\n return encode(\"0i\", concatBytes(identity, keys.viewingPublicKey, keys.clueKey));\n}\n/** The owner's 42-character checksummed EVM address; receiving keys require a chosen registry. */\nexport function encodeShortAddress(ownerAddress: Identity): string {\n const identity = identityBytes(ownerAddress);\n return getAddress(\n typeof ownerAddress === \"string\" ? ownerAddress : `0x${bytesToHex(identity)}`\n );\n}\n\n/** Standard EVM short addresses or a full 0i address with a strict custom Base32 case checksum. */\nexport function decodeAddress(address: string): DecodedAddress {\n if (typeof address !== \"string\") throw new TypeError(\"address must be text\");\n if (address.startsWith(\"0x\")) {\n const owner = getAddress(address) as `0x${string}`;\n return { kind: \"short\", ownerAddress: `0x${bytesToHex(identityBytes(owner))}` };\n }\n if (!address.startsWith(\"0i\")) throw new Error(\"invalid Invisi address prefix\");\n const prefix = \"0i\";\n if (address.length !== 138) throw new Error(\"invalid address length\");\n const data = address.slice(prefix.length).toLowerCase();\n if (Array.from(data).some((character) => !ALPHABET.includes(character)))\n throw new Error(\"invalid address alphabet\");\n if (checkedText(prefix, data) !== address) throw new Error(\"invalid address case checksum\");\n let buffer = 0,\n bits = 0;\n const payload: number[] = [];\n for (const character of data) {\n buffer = (buffer << 5) | ALPHABET.indexOf(character);\n bits += 5;\n if (bits >= 8) {\n bits -= 8;\n payload.push((buffer >>> bits) & 255);\n }\n buffer &= (1 << bits) - 1;\n }\n if (bits !== 0 || buffer !== 0) throw new Error(\"noncanonical address padding\");\n const raw = Uint8Array.from(payload);\n const ownerAddress =\n `0x${bytesToHex(identityBytes(`0x${bytesToHex(raw.subarray(0, 20))}`))}` as const;\n return {\n kind: \"long\",\n ownerAddress,\n ...receivingKeys({ viewingPublicKey: raw.slice(20, 53), clueKey: raw.slice(53) }),\n };\n}\n\n/** Normalize either address into the same payment input. Long addresses never query. */\nexport async function resolveAddress(\n address: string,\n options: { lookup?: ReceivingKeyLookup } = {}\n): Promise<ReceivingAddress> {\n const decoded = decodeAddress(address);\n if (decoded.kind === \"long\")\n return {\n ownerAddress: decoded.ownerAddress,\n viewingPublicKey: decoded.viewingPublicKey,\n clueKey: decoded.clueKey,\n };\n if (!options.lookup) throw new Error(\"short address requires an explicit registry lookup\");\n const keys = await options.lookup(decoded.ownerAddress);\n if (!keys) throw new Error(\"owner address is not registered\");\n return { ownerAddress: decoded.ownerAddress, ...receivingKeys(keys) };\n}\n","/** A requested permission was not explicitly supplied to this component. */\nexport class MissingCapabilityError extends Error {\n readonly code = \"MISSING_CAPABILITY\";\n constructor(readonly capability: string) {\n super(`Missing ${capability} capability`);\n this.name = \"MissingCapabilityError\";\n }\n}\n","import { MissingCapabilityError } from \"../errors\";\nimport type { ReceivingKeys } from \"../types\";\nimport {\n decodeAddress,\n encodeLongAddress,\n encodeShortAddress,\n type ReceivingAddress as ReceivingData,\n type ReceivingKeyLookup,\n} from \"./address\";\n\n/** Validated public receiving material. A short address requires an explicit resolver. */\nexport class ReceivingAddress {\n readonly #text: string;\n\n private constructor(text: string) {\n const decoded = decodeAddress(text);\n this.#text = decoded.kind === \"short\" ? encodeShortAddress(decoded.ownerAddress) : text;\n Object.freeze(this);\n }\n\n static parse(text: string): ReceivingAddress {\n return new ReceivingAddress(text);\n }\n\n static from(recipient: ReceivingData): ReceivingAddress {\n return new ReceivingAddress(encodeLongAddress(recipient));\n }\n\n static fromIdentity(identity: bigint | `0x${string}`): ReceivingAddress {\n return new ReceivingAddress(encodeShortAddress(identity));\n }\n\n get ownerAddress(): `0x${string}` {\n return decodeAddress(this.#text).ownerAddress;\n }\n\n get kind(): \"long\" | \"short\" {\n return decodeAddress(this.#text).kind;\n }\n\n getReceivingKeys(): ReceivingKeys {\n const decoded = decodeAddress(this.#text);\n if (decoded.kind === \"short\") {\n throw new MissingCapabilityError(\"resolved receiving keys\");\n }\n return { viewingPublicKey: decoded.viewingPublicKey, clueKey: decoded.clueKey };\n }\n\n async resolve(lookup?: ReceivingKeyLookup): Promise<ReceivingAddress> {\n if (this.kind === \"long\") {\n return this;\n }\n if (!lookup) {\n throw new MissingCapabilityError(\"explicit registry lookup\");\n }\n const keys = await lookup(this.ownerAddress);\n if (!keys) {\n throw new Error(\"owner address is not registered\");\n }\n return ReceivingAddress.from({\n ownerAddress: this.ownerAddress,\n viewingPublicKey: keys.viewingPublicKey,\n clueKey: keys.clueKey,\n });\n }\n\n get viewingPublicKey(): Uint8Array {\n return this.getReceivingKeys().viewingPublicKey;\n }\n\n get clueKey(): Uint8Array {\n return this.getReceivingKeys().clueKey;\n }\n\n toString(): string {\n return this.#text;\n }\n\n toJSON(): string {\n return this.#text;\n }\n}\n"],"mappings":";;;;;AAAA,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,SAAS,YAAY,aAAa,YAAY,mBAAmB;AACjE,SAAS,kBAAkB;AAa3B,IAAM,WAAW;AAGjB,SAAS,cAAc,OAA6B;AAChD,MACI,OAAO,UAAU,aAChB,OAAO,UAAU,YAAY,CAAC,sBAAsB,KAAK,KAAK;AAE/D,UAAM,IAAI,MAAM,gCAAgC;AACpD,QAAM,IAAI,OAAO,KAAK;AACtB,MAAI,KAAK,MAAM,KAAK,MAAM;AACtB,UAAM,IAAI,WAAW,mDAAmD;AAC5E,SAAO,WAAW,EAAE,SAAS,EAAE,EAAE,SAAS,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