refactor: move brother_node development artifact to dev/test-nodes subdirectory
Development Artifact Cleanup: ✅ BROTHER_NODE REORGANIZATION: Moved development test node to appropriate location - dev/test-nodes/brother_node/: Moved from root directory for better organization - Contains development configuration, test logs, and test chain data - No impact on production systems - purely development/testing artifact ✅ DEVELOPMENT ARTIFACTS IDENTIFIED: - Chain ID: aitbc-brother-chain (test/development chain) - Ports: 8010 (P2P) and 8011 (RPC) - different from production - Environment: .env file with test configuration - Logs: rpc.log and node.log from development testing session (March 15, 2026) ✅ ROOT DIRECTORY CLEANUP: Removed development clutter from production directory - brother_node/ moved to dev/test-nodes/brother_node/ - Root directory now contains only production-ready components - Development artifacts properly organized in dev/ subdirectory DIRECTORY STRUCTURE IMPROVEMENT: 📁 dev/test-nodes/: Development and testing node configurations 🏗️ Root Directory: Clean production structure with only essential components 🧪 Development Isolation: Test environments separated from production BENEFITS: ✅ Clean Production Directory: No development artifacts in root ✅ Better Organization: Development nodes grouped in dev/ subdirectory ✅ Clear Separation: Production vs development environments clearly distinguished ✅ Maintainability: Easier to identify and manage development components RESULT: Successfully moved brother_node development artifact to dev/test-nodes/ subdirectory, cleaning up the root directory while preserving development testing environment for future use.
This commit is contained in:
21
dev/env/node_modules/@adraffy/ens-normalize/LICENSE
generated
vendored
Executable file
21
dev/env/node_modules/@adraffy/ens-normalize/LICENSE
generated
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Andrew Raffensperger
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
206
dev/env/node_modules/@adraffy/ens-normalize/README.md
generated
vendored
Executable file
206
dev/env/node_modules/@adraffy/ens-normalize/README.md
generated
vendored
Executable file
@@ -0,0 +1,206 @@
|
||||
# ens-normalize.js
|
||||
0-dependancy [Ethereum Name Service](https://ens.domains/) (ENS) Name Normalizer.
|
||||
|
||||
* 🏛️ Follows [ENSIP-15: ENS Name Normalization Standard](https://docs.ens.domains/ens-improvement-proposals/ensip-15-normalization-standard)
|
||||
* Other implementations:
|
||||
* Python — [namehash/ens-normalize-python](https://github.com/namehash/ens-normalize-python)
|
||||
* C# — [adraffy/ENSNormalize.cs](https://github.com/adraffy/ENSNormalize.cs)
|
||||
* Java — [adraffy/ENSNormalize.java](https://github.com/adraffy/ENSNormalize.java)
|
||||
* Javascript — [ensdomains/eth-ens-namehash](https://github.com/ensdomains/eth-ens-namehash)
|
||||
* [Breakdown Reports from ENSIP-1](https://adraffy.github.io/ens-norm-tests/test-breakdown/output-20230226/)
|
||||
* ✅️ Passes **100%** [ENSIP-15 Validation Tests](https://adraffy.github.io/ens-normalize.js/test/validate.html)
|
||||
* ✅️ Passes **100%** [Unicode Normalization Tests](https://adraffy.github.io/ens-normalize.js/test/report-nf.html)
|
||||
* Minified File Sizes:
|
||||
* [`28KB`](./dist/index-xnf.min.js) — native `NFC` via [nf-native.js](./src/nf-native.js) using `String.normalize()` ⚠️
|
||||
* [`37KB` **Default**](./dist/index.min.js) — custom `NFC` via [nf.js](./src/nf.js)
|
||||
* [`43KB`](./dist/all.min.js) *Everything!* — custom `NFC` + sub-libraries: [parts.js](./src/parts.js), [utils.js](./src/utils.js)
|
||||
* Included Apps:
|
||||
* [**Resolver Demo**](https://adraffy.github.io/ens-normalize.js/test/resolver.html) ⭐
|
||||
* [Supported Emoji](https://adraffy.github.io/ens-normalize.js/test/emoji.html)
|
||||
* [Character Viewer](https://adraffy.github.io/ens-normalize.js/test/chars.html)
|
||||
* [Confused Explainer](https://adraffy.github.io/ens-normalize.js/test/confused.html)
|
||||
* Related Projects:
|
||||
* [Recent .eth Registrations](https://raffy.antistupid.com/eth/ens-regs.html) • [.eth Renews](https://raffy.antistupid.com/eth/ens-renews.html)
|
||||
* [.eth Expirations](https://raffy.antistupid.com/eth/ens-exp.html)
|
||||
* [Emoji Frequency Explorer](https://raffy.antistupid.com/eth/ens-emoji-freq.html)
|
||||
* [ENS+NFT Matcher](https://raffy.antistupid.com/eth/ens-nft-matcher.html)
|
||||
* [Batch Resolver](https://raffy.antistupid.com/eth/ens-batch-resolver.html)
|
||||
* [Label Database](https://github.com/adraffy/ens-labels/) • [Labelhash⁻¹](https://adraffy.github.io/ens-labels/demo.html)
|
||||
* [adraffy/punycode.js](https://github.com/adraffy/punycode.js/) • [Punycode Coder](https://adraffy.github.io/punycode.js/test/demo.html)
|
||||
* [adraffy/keccak.js](https://github.com/adraffy/keccak.js/) • [Keccak Hasher](https://adraffy.github.io/keccak.js/test/demo.html)
|
||||
* [adraffy/emoji.js](https://github.com/adraffy/emoji.js/) • [Emoji Parser](https://adraffy.github.io/emoji.js/test/demo.html)
|
||||
|
||||
```js
|
||||
import {ens_normalize} from '@adraffy/ens-normalize'; // or require()
|
||||
// npm i @adraffy/ens-normalize
|
||||
// browser: https://cdn.jsdelivr.net/npm/@adraffy/ens-normalize@latest/dist/index.min.mjs (or .cjs)
|
||||
|
||||
// *** ALL errors thrown by this library are safe to print ***
|
||||
// - characters are shown as {HEX} if should_escape()
|
||||
// - potentially different bidi directions inside "quotes"
|
||||
// - 200E is used near "quotes" to prevent spillover
|
||||
// - an "error type" can be extracted by slicing up to the first (:)
|
||||
// - labels are middle-truncated with ellipsis (…) at 63 cps
|
||||
|
||||
// string -> string
|
||||
// throws on invalid names
|
||||
// output ready for namehash
|
||||
let normalized = ens_normalize('RaFFY🚴♂️.eTh');
|
||||
// => "raffy🚴♂.eth"
|
||||
|
||||
// note: does not enforce .eth registrar 3-character minimum
|
||||
```
|
||||
|
||||
Format names with fully-qualified emoji:
|
||||
```js
|
||||
// works like ens_normalize()
|
||||
// output ready for display
|
||||
let pretty = ens_beautify('1⃣2⃣.eth');
|
||||
// => "1️⃣2️⃣.eth"
|
||||
|
||||
// note: normalization is unchanged:
|
||||
// ens_normalize(ens_beautify(x)) == ens_normalize(x)
|
||||
```
|
||||
|
||||
Normalize name fragments for [substring search](./test/fragment.js):
|
||||
```js
|
||||
// these fragments fail ens_normalize()
|
||||
// but will normalize fine as fragments
|
||||
let frag1 = ens_normalize_fragment('AB--'); // expected error: label ext
|
||||
let frag2 = ens_normalize_fragment('\u{303}'); // expected error: leading cm
|
||||
let frag3 = ens_normalize_fragment('οо'); // expected error: mixture
|
||||
```
|
||||
|
||||
Input-based tokenization:
|
||||
```js
|
||||
// string -> Token[]
|
||||
// never throws
|
||||
let tokens = ens_tokenize('_R💩\u{FE0F}a\u{FE0F}\u{304}\u{AD}./');
|
||||
// [
|
||||
// { type: 'valid', cp: [ 95 ] }, // valid (as-is)
|
||||
// {
|
||||
// type: 'mapped',
|
||||
// cp: 82, // input
|
||||
// cps: [ 114 ] // output
|
||||
// },
|
||||
// {
|
||||
// type: 'emoji',
|
||||
// input: Emoji(2) [ 128169, 65039 ], // input
|
||||
// emoji: [ 128169, 65039 ], // fully-qualified
|
||||
// cps: Emoji(1) [ 128169 ] // output (normalized)
|
||||
// },
|
||||
// {
|
||||
// type: 'nfc',
|
||||
// input: [ 97, 772 ], // input (before nfc)
|
||||
// tokens0: [ // tokens (before nfc)
|
||||
// { type: 'valid', cps: [ 97 ] },
|
||||
// { type: 'ignored', cp: 65039 },
|
||||
// { type: 'valid', cps: [ 772 ] }
|
||||
// ],
|
||||
// cps: [ 257 ], // output (after nfc)
|
||||
// tokens: [ // tokens (after nfc)
|
||||
// { type: 'valid', cps: [ 257 ] }
|
||||
// ]
|
||||
// },
|
||||
// { type: 'ignored', cp: 173 },
|
||||
// { type: 'stop', cp: 46 },
|
||||
// { type: 'disallowed', cp: 47 }
|
||||
// ]
|
||||
|
||||
// note: if name is normalizable, then:
|
||||
// ens_normalize(ens_tokenize(name).map(token => {
|
||||
// ** convert valid/mapped/nfc/stop to string **
|
||||
// }).join('')) == ens_normalize(name)
|
||||
```
|
||||
|
||||
Output-based tokenization:
|
||||
```js
|
||||
// string -> Label[]
|
||||
// never throws
|
||||
let labels = ens_split('💩Raffy.eth_');
|
||||
// [
|
||||
// {
|
||||
// input: [ 128169, 82, 97, 102, 102, 121 ],
|
||||
// offset: 0, // index of codepoint, not substring index!
|
||||
// // (corresponding length can be inferred from input)
|
||||
// tokens: [
|
||||
// Emoji(2) [ 128169, 65039 ], // emoji
|
||||
// [ 114, 97, 102, 102, 121 ] // nfc-text
|
||||
// ],
|
||||
// output: [ 128169, 114, 97, 102, 102, 121 ],
|
||||
// emoji: true,
|
||||
// type: 'Latin'
|
||||
// },
|
||||
// {
|
||||
// input: [ 101, 116, 104, 95 ],
|
||||
// offset: 7,
|
||||
// tokens: [ [ 101, 116, 104, 95 ] ],
|
||||
// output: [ 101, 116, 104, 95 ],
|
||||
// error: Error('underscore allowed only at start')
|
||||
// }
|
||||
// ]
|
||||
```
|
||||
|
||||
Generate a sorted array of (beautified) supported emoji codepoints:
|
||||
```js
|
||||
// () -> number[][]
|
||||
let emojis = ens_emoji();
|
||||
// [
|
||||
// [ 2764 ],
|
||||
// [ 128169, 65039 ],
|
||||
// [ 128105, 127997, 8205, 9877, 65039 ],
|
||||
// ...
|
||||
// ]
|
||||
```
|
||||
|
||||
Determine if a character shouldn't be printed directly:
|
||||
```js
|
||||
// number -> bool
|
||||
should_escape(0x202E); // eg. RIGHT-TO-LEFT OVERRIDE => true
|
||||
```
|
||||
|
||||
Determine if a character is a combining mark:
|
||||
```js
|
||||
// number -> bool
|
||||
is_combining_mark(0x20E3); // eg. COMBINING ENCLOSING KEYCAP => true
|
||||
```
|
||||
|
||||
Format codepoints as print-safe string:
|
||||
```js
|
||||
// number[] -> string
|
||||
safe_str_from_cps([0x300, 0, 32, 97]); // "◌̀{00} a"
|
||||
safe_str_from_cps(Array(100).fill(97), 4); // "aa…aa" => middle-truncated
|
||||
```
|
||||
|
||||
## Build
|
||||
|
||||
* `git clone` this repo, then `npm install`
|
||||
* Follow instructions in [/derive/](./derive/) to generate data files
|
||||
* `npm run derive`
|
||||
* [spec.json](./derive/output/spec.json)
|
||||
* [nf.json](./derive/output/nf.json)
|
||||
* [nf-tests.json](./derive/output/nf-tests.json)
|
||||
* `npm run make` — compress data files from [/derive/output/](./derive/output/)
|
||||
* [include-ens.js](./src/include-ens.js)
|
||||
* [include-nf.js](./src/include-nf.js)
|
||||
* [include-versions.js](./src/include-versions.js)
|
||||
* Follow instructions in [/validate/](./validate/) to generate validation tests
|
||||
* `npm run validate`
|
||||
* [tests.json](./validate/tests.json)
|
||||
* `npm run test` — perform validation tests
|
||||
* `npm run build` — create [/dist/](./dist/)
|
||||
* `npm run rebuild` — run all the commands above
|
||||
* `npm run order` — create optimal group ordering and rebuild again
|
||||
|
||||
### Publishing to NPM
|
||||
|
||||
This project uses `.js` instead of `.mjs` so [package.json](./package.json) uses `type: module`. To avoid bundling issues, `type` is [dropped during packing](./src/prepost.js). `pre/post` hooks aren't used because they're buggy.
|
||||
* `npm run pack` instead of `npm pack`
|
||||
* `npm run pub` instead of `npm publish`
|
||||
|
||||
## Security
|
||||
|
||||
* [Build](#build) and compare against [include-versions.js](./src/include-versions.js)
|
||||
* `spec_hash` — SHA-256 of [spec.json](./derive/output/spec.json) bytes
|
||||
* `base64_ens_hash` — SHA-256 of [include-ens.js](./src/include-ens.js) base64 literal
|
||||
* `base64_nf_hash` — SHA-256 of [include-nf.js](./src/include-nf.js) base64 literal
|
||||
1611
dev/env/node_modules/@adraffy/ens-normalize/dist/all.js
generated
vendored
Executable file
1611
dev/env/node_modules/@adraffy/ens-normalize/dist/all.js
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
1
dev/env/node_modules/@adraffy/ens-normalize/dist/all.min.js
generated
vendored
Executable file
1
dev/env/node_modules/@adraffy/ens-normalize/dist/all.min.js
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
1077
dev/env/node_modules/@adraffy/ens-normalize/dist/index-xnf.cjs
generated
vendored
Executable file
1077
dev/env/node_modules/@adraffy/ens-normalize/dist/index-xnf.cjs
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
1
dev/env/node_modules/@adraffy/ens-normalize/dist/index-xnf.min.js
generated
vendored
Executable file
1
dev/env/node_modules/@adraffy/ens-normalize/dist/index-xnf.min.js
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
1065
dev/env/node_modules/@adraffy/ens-normalize/dist/index-xnf.mjs
generated
vendored
Executable file
1065
dev/env/node_modules/@adraffy/ens-normalize/dist/index-xnf.mjs
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
1252
dev/env/node_modules/@adraffy/ens-normalize/dist/index.cjs
generated
vendored
Executable file
1252
dev/env/node_modules/@adraffy/ens-normalize/dist/index.cjs
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
59
dev/env/node_modules/@adraffy/ens-normalize/dist/index.d.ts
generated
vendored
Executable file
59
dev/env/node_modules/@adraffy/ens-normalize/dist/index.d.ts
generated
vendored
Executable file
@@ -0,0 +1,59 @@
|
||||
interface DisallowedToken {
|
||||
type: 'disallowed';
|
||||
cp: number;
|
||||
}
|
||||
interface IgnoredToken {
|
||||
type: 'ignored';
|
||||
cp: number;
|
||||
}
|
||||
interface ValidToken {
|
||||
type: 'valid';
|
||||
cps: number[];
|
||||
}
|
||||
interface MappedToken {
|
||||
type: 'mapped';
|
||||
cp: number;
|
||||
cps: number[];
|
||||
}
|
||||
type TextToken = DisallowedToken | IgnoredToken | ValidToken | MappedToken;
|
||||
interface EmojiToken {
|
||||
type: 'emoji';
|
||||
input: number[];
|
||||
emoji: number[];
|
||||
cps: number[];
|
||||
}
|
||||
interface NFCToken {
|
||||
type: 'nfc';
|
||||
input: number[];
|
||||
cps: number[];
|
||||
tokens: TextToken[];
|
||||
}
|
||||
interface StopToken {
|
||||
type: 'stop';
|
||||
}
|
||||
type Token = TextToken | EmojiToken | NFCToken | StopToken;
|
||||
|
||||
interface Label {
|
||||
input: number[];
|
||||
offset: number;
|
||||
error?: Error;
|
||||
tokens?: number[][];
|
||||
output?: number[];
|
||||
emoji?: boolean;
|
||||
type?: string;
|
||||
}
|
||||
|
||||
export function ens_normalize(name: string): string;
|
||||
export function ens_normalize_fragment(frag: string, decompose?: boolean): string;
|
||||
export function ens_beautify(name: string): string;
|
||||
export function ens_tokenize(name: string, options?: {nf?: boolean}): Token[];
|
||||
export function ens_split(name: string, preserve_emoji?: boolean): Label[];
|
||||
|
||||
export function ens_emoji(): number[][];
|
||||
|
||||
export function should_escape(cp: number): boolean;
|
||||
export function is_combining_mark(cp: number): boolean;
|
||||
export function safe_str_from_cps(cps: number[]): string;
|
||||
|
||||
export function nfd(cps: number[]): number[];
|
||||
export function nfc(cps: number[]): number[];
|
||||
1
dev/env/node_modules/@adraffy/ens-normalize/dist/index.min.js
generated
vendored
Executable file
1
dev/env/node_modules/@adraffy/ens-normalize/dist/index.min.js
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
1240
dev/env/node_modules/@adraffy/ens-normalize/dist/index.mjs
generated
vendored
Executable file
1240
dev/env/node_modules/@adraffy/ens-normalize/dist/index.mjs
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
1
dev/env/node_modules/@adraffy/ens-normalize/dist/nf.min.js
generated
vendored
Executable file
1
dev/env/node_modules/@adraffy/ens-normalize/dist/nf.min.js
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
76
dev/env/node_modules/@adraffy/ens-normalize/package.json
generated
vendored
Executable file
76
dev/env/node_modules/@adraffy/ens-normalize/package.json
generated
vendored
Executable file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"name": "@adraffy/ens-normalize",
|
||||
"version": "1.10.1",
|
||||
"description": "Ethereum Name Service (ENS) Name Normalizer",
|
||||
"keywords": [
|
||||
"ENS",
|
||||
"ENSIP-1",
|
||||
"ENSIP-15",
|
||||
"Ethereum",
|
||||
"UTS-46",
|
||||
"UTS-51",
|
||||
"IDNA",
|
||||
"Name",
|
||||
"Normalize",
|
||||
"Normalization",
|
||||
"NFC",
|
||||
"NFD"
|
||||
],
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.mjs",
|
||||
"default": "./dist/index.cjs"
|
||||
},
|
||||
"./xnf": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index-xnf.mjs",
|
||||
"default": "./dist/index-xnf.cjs"
|
||||
}
|
||||
},
|
||||
"types": "./dist/index.d.ts",
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"*": [
|
||||
"./dist/index.d.ts"
|
||||
]
|
||||
}
|
||||
},
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.mjs",
|
||||
"files": [
|
||||
"./dist"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/adraffy/ens-normalize.js.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/adraffy/ens-normalize.js/issues"
|
||||
},
|
||||
"homepage": "https://github.com/adraffy/ens-normalize.js#readme",
|
||||
"author": {
|
||||
"name": "raffy.eth",
|
||||
"email": "raffy@me.com",
|
||||
"url": "http://raffy.antistupid.com"
|
||||
},
|
||||
"scripts": {
|
||||
"unicode": "node derive/download.js",
|
||||
"labels": "node validate/download-labels.js",
|
||||
"derive": "node derive/make.js",
|
||||
"make": "node src/make.js",
|
||||
"validate": "node validate/make.js",
|
||||
"test": "node test/coder.js && node test/nf.js && node test/validate.js && node test/init.js",
|
||||
"build": "rollup -c",
|
||||
"rebuild": "npm run derive && npm run make && npm run validate && npm run test && npm run build",
|
||||
"order": "node validate/dump-group-order.js save && npm run rebuild",
|
||||
"pack": "node ./src/prepost.js pack",
|
||||
"pub": "node ./src/prepost.js publish"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-alias": "^5.0.0",
|
||||
"@rollup/plugin-terser": "^0.4.0",
|
||||
"rollup": "^3.24.1"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user