jaelis-node 1.10.0 → 2.0.0

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.
Files changed (173) hide show
  1. package/README.md +146 -445
  2. package/bin/jaelis-node.js +79 -504
  3. package/lib/index.js +31 -2840
  4. package/lib/node.js +271 -0
  5. package/lib/rpc.js +315 -0
  6. package/lib/storage.js +198 -0
  7. package/lib/sync.js +366 -0
  8. package/package.json +19 -53
  9. package/config/default.json +0 -74
  10. package/config/mainnet.json +0 -30
  11. package/config/testnet.json +0 -26
  12. package/lib/JAELIS-VM/lib/adapters/evm-adapter.js +0 -454
  13. package/lib/JAELIS-VM/lib/adapters/index.js +0 -411
  14. package/lib/JAELIS-VM/lib/adapters/svm-adapter.js +0 -457
  15. package/lib/JAELIS-VM/lib/compiler/jir-compiler.js +0 -1097
  16. package/lib/JAELIS-VM/lib/execution/engine.js +0 -1183
  17. package/lib/JAELIS-VM/lib/index.js +0 -440
  18. package/lib/JAELIS-VM/lib/integration/jaelis-integration.js +0 -543
  19. package/lib/JAELIS-VM/lib/serialization/serializer.js +0 -819
  20. package/lib/JAELIS-VM/lib/state/state-manager.js +0 -1116
  21. package/lib/JAELIS-VM/lib/translator/bytecode-translator.js +0 -1222
  22. package/lib/JAELIS-VM/lib/unified/cross-chain-deploy.js +0 -1678
  23. package/lib/JAELIS-VM/lib/unified/cross-chain-state.js +0 -836
  24. package/lib/JAELIS-VM/lib/unified/dynamic-contracts.js +0 -1127
  25. package/lib/JAELIS-VM/lib/unified/index.js +0 -456
  26. package/lib/JAELIS-VM/lib/unified/jaelis-abi.js +0 -1150
  27. package/lib/JAELIS-VM/lib/unified/unified-compiler.js +0 -1350
  28. package/lib/JAELIS-VM/node_modules/.bin/download-cbor-prebuilds +0 -12
  29. package/lib/JAELIS-VM/node_modules/.bin/download-cbor-prebuilds.cmd +0 -17
  30. package/lib/JAELIS-VM/node_modules/.bin/download-cbor-prebuilds.ps1 +0 -28
  31. package/lib/JAELIS-VM/node_modules/.bin/download-msgpackr-prebuilds +0 -12
  32. package/lib/JAELIS-VM/node_modules/.bin/download-msgpackr-prebuilds.cmd +0 -17
  33. package/lib/JAELIS-VM/node_modules/.bin/download-msgpackr-prebuilds.ps1 +0 -28
  34. package/lib/JAELIS-VM/node_modules/.bin/node-gyp-build-optional-packages +0 -12
  35. package/lib/JAELIS-VM/node_modules/.bin/node-gyp-build-optional-packages-optional +0 -12
  36. package/lib/JAELIS-VM/node_modules/.bin/node-gyp-build-optional-packages-optional.cmd +0 -17
  37. package/lib/JAELIS-VM/node_modules/.bin/node-gyp-build-optional-packages-optional.ps1 +0 -28
  38. package/lib/JAELIS-VM/node_modules/.bin/node-gyp-build-optional-packages-test +0 -12
  39. package/lib/JAELIS-VM/node_modules/.bin/node-gyp-build-optional-packages-test.cmd +0 -17
  40. package/lib/JAELIS-VM/node_modules/.bin/node-gyp-build-optional-packages-test.ps1 +0 -28
  41. package/lib/JAELIS-VM/node_modules/.bin/node-gyp-build-optional-packages.cmd +0 -17
  42. package/lib/JAELIS-VM/node_modules/.bin/node-gyp-build-optional-packages.ps1 +0 -28
  43. package/lib/JAELIS-VM/node_modules/.package-lock.json +0 -127
  44. package/lib/JAELIS-VM/node_modules/@cbor-extract/cbor-extract-win32-x64/README.md +0 -1
  45. package/lib/JAELIS-VM/node_modules/@cbor-extract/cbor-extract-win32-x64/index.js +0 -0
  46. package/lib/JAELIS-VM/node_modules/@cbor-extract/cbor-extract-win32-x64/node.abi115.node +0 -0
  47. package/lib/JAELIS-VM/node_modules/@cbor-extract/cbor-extract-win32-x64/node.napi.node +0 -0
  48. package/lib/JAELIS-VM/node_modules/@cbor-extract/cbor-extract-win32-x64/package.json +0 -17
  49. package/lib/JAELIS-VM/node_modules/@msgpackr-extract/msgpackr-extract-win32-x64/README.md +0 -1
  50. package/lib/JAELIS-VM/node_modules/@msgpackr-extract/msgpackr-extract-win32-x64/index.js +0 -0
  51. package/lib/JAELIS-VM/node_modules/@msgpackr-extract/msgpackr-extract-win32-x64/node.abi115.node +0 -0
  52. package/lib/JAELIS-VM/node_modules/@msgpackr-extract/msgpackr-extract-win32-x64/node.napi.node +0 -0
  53. package/lib/JAELIS-VM/node_modules/@msgpackr-extract/msgpackr-extract-win32-x64/package.json +0 -17
  54. package/lib/JAELIS-VM/node_modules/cbor-extract/LICENSE +0 -21
  55. package/lib/JAELIS-VM/node_modules/cbor-extract/README.md +0 -5
  56. package/lib/JAELIS-VM/node_modules/cbor-extract/bin/download-prebuilds.js +0 -11
  57. package/lib/JAELIS-VM/node_modules/cbor-extract/binding.gyp +0 -60
  58. package/lib/JAELIS-VM/node_modules/cbor-extract/index.js +0 -1
  59. package/lib/JAELIS-VM/node_modules/cbor-extract/package.json +0 -50
  60. package/lib/JAELIS-VM/node_modules/cbor-extract/src/extract.cpp +0 -198
  61. package/lib/JAELIS-VM/node_modules/cbor-x/LICENSE +0 -21
  62. package/lib/JAELIS-VM/node_modules/cbor-x/README.md +0 -380
  63. package/lib/JAELIS-VM/node_modules/cbor-x/SECURITY.md +0 -11
  64. package/lib/JAELIS-VM/node_modules/cbor-x/benchmark.md +0 -73
  65. package/lib/JAELIS-VM/node_modules/cbor-x/browser.js +0 -11
  66. package/lib/JAELIS-VM/node_modules/cbor-x/decode.d.ts +0 -2
  67. package/lib/JAELIS-VM/node_modules/cbor-x/decode.js +0 -1300
  68. package/lib/JAELIS-VM/node_modules/cbor-x/dist/decode-no-eval.cjs +0 -1244
  69. package/lib/JAELIS-VM/node_modules/cbor-x/dist/decode-no-eval.cjs.map +0 -1
  70. package/lib/JAELIS-VM/node_modules/cbor-x/dist/index-no-eval.cjs +0 -2509
  71. package/lib/JAELIS-VM/node_modules/cbor-x/dist/index-no-eval.cjs.map +0 -1
  72. package/lib/JAELIS-VM/node_modules/cbor-x/dist/index-no-eval.min.js +0 -2
  73. package/lib/JAELIS-VM/node_modules/cbor-x/dist/index-no-eval.min.js.map +0 -1
  74. package/lib/JAELIS-VM/node_modules/cbor-x/dist/index.js +0 -2508
  75. package/lib/JAELIS-VM/node_modules/cbor-x/dist/index.js.map +0 -1
  76. package/lib/JAELIS-VM/node_modules/cbor-x/dist/index.min.js +0 -2
  77. package/lib/JAELIS-VM/node_modules/cbor-x/dist/index.min.js.map +0 -1
  78. package/lib/JAELIS-VM/node_modules/cbor-x/dist/node.cjs +0 -2629
  79. package/lib/JAELIS-VM/node_modules/cbor-x/dist/node.cjs.map +0 -1
  80. package/lib/JAELIS-VM/node_modules/cbor-x/dist/test.js +0 -3343
  81. package/lib/JAELIS-VM/node_modules/cbor-x/dist/test.js.map +0 -1
  82. package/lib/JAELIS-VM/node_modules/cbor-x/encode.d.ts +0 -1
  83. package/lib/JAELIS-VM/node_modules/cbor-x/encode.js +0 -1231
  84. package/lib/JAELIS-VM/node_modules/cbor-x/index.d.ts +0 -79
  85. package/lib/JAELIS-VM/node_modules/cbor-x/index.js +0 -3
  86. package/lib/JAELIS-VM/node_modules/cbor-x/iterators.js +0 -85
  87. package/lib/JAELIS-VM/node_modules/cbor-x/node-index.js +0 -24
  88. package/lib/JAELIS-VM/node_modules/cbor-x/package.json +0 -94
  89. package/lib/JAELIS-VM/node_modules/cbor-x/rollup.config.js +0 -88
  90. package/lib/JAELIS-VM/node_modules/cbor-x/stream.js +0 -61
  91. package/lib/JAELIS-VM/node_modules/cbor-x/webpack.config.js +0 -19
  92. package/lib/JAELIS-VM/node_modules/detect-libc/LICENSE +0 -201
  93. package/lib/JAELIS-VM/node_modules/detect-libc/README.md +0 -163
  94. package/lib/JAELIS-VM/node_modules/detect-libc/index.d.ts +0 -14
  95. package/lib/JAELIS-VM/node_modules/detect-libc/lib/detect-libc.js +0 -313
  96. package/lib/JAELIS-VM/node_modules/detect-libc/lib/elf.js +0 -39
  97. package/lib/JAELIS-VM/node_modules/detect-libc/lib/filesystem.js +0 -51
  98. package/lib/JAELIS-VM/node_modules/detect-libc/lib/process.js +0 -24
  99. package/lib/JAELIS-VM/node_modules/detect-libc/package.json +0 -44
  100. package/lib/JAELIS-VM/node_modules/msgpackr/LICENSE +0 -21
  101. package/lib/JAELIS-VM/node_modules/msgpackr/README.md +0 -372
  102. package/lib/JAELIS-VM/node_modules/msgpackr/SECURITY.md +0 -11
  103. package/lib/JAELIS-VM/node_modules/msgpackr/benchmark.md +0 -67
  104. package/lib/JAELIS-VM/node_modules/msgpackr/dist/index-no-eval.cjs +0 -2407
  105. package/lib/JAELIS-VM/node_modules/msgpackr/dist/index-no-eval.cjs.map +0 -1
  106. package/lib/JAELIS-VM/node_modules/msgpackr/dist/index-no-eval.min.js +0 -2
  107. package/lib/JAELIS-VM/node_modules/msgpackr/dist/index-no-eval.min.js.map +0 -1
  108. package/lib/JAELIS-VM/node_modules/msgpackr/dist/index.js +0 -2406
  109. package/lib/JAELIS-VM/node_modules/msgpackr/dist/index.js.map +0 -1
  110. package/lib/JAELIS-VM/node_modules/msgpackr/dist/index.min.js +0 -2
  111. package/lib/JAELIS-VM/node_modules/msgpackr/dist/index.min.js.map +0 -1
  112. package/lib/JAELIS-VM/node_modules/msgpackr/dist/node.cjs +0 -3320
  113. package/lib/JAELIS-VM/node_modules/msgpackr/dist/node.cjs.map +0 -1
  114. package/lib/JAELIS-VM/node_modules/msgpackr/dist/test.js +0 -4540
  115. package/lib/JAELIS-VM/node_modules/msgpackr/dist/test.js.map +0 -1
  116. package/lib/JAELIS-VM/node_modules/msgpackr/dist/unpack-no-eval.cjs +0 -1250
  117. package/lib/JAELIS-VM/node_modules/msgpackr/dist/unpack-no-eval.cjs.map +0 -1
  118. package/lib/JAELIS-VM/node_modules/msgpackr/index.d.cts +0 -91
  119. package/lib/JAELIS-VM/node_modules/msgpackr/index.d.ts +0 -91
  120. package/lib/JAELIS-VM/node_modules/msgpackr/index.js +0 -5
  121. package/lib/JAELIS-VM/node_modules/msgpackr/iterators.js +0 -87
  122. package/lib/JAELIS-VM/node_modules/msgpackr/node-index.js +0 -25
  123. package/lib/JAELIS-VM/node_modules/msgpackr/pack.d.cts +0 -1
  124. package/lib/JAELIS-VM/node_modules/msgpackr/pack.d.ts +0 -1
  125. package/lib/JAELIS-VM/node_modules/msgpackr/pack.js +0 -1141
  126. package/lib/JAELIS-VM/node_modules/msgpackr/package.json +0 -104
  127. package/lib/JAELIS-VM/node_modules/msgpackr/rollup.config.js +0 -88
  128. package/lib/JAELIS-VM/node_modules/msgpackr/stream.js +0 -57
  129. package/lib/JAELIS-VM/node_modules/msgpackr/struct.js +0 -815
  130. package/lib/JAELIS-VM/node_modules/msgpackr/test-worker.js +0 -3
  131. package/lib/JAELIS-VM/node_modules/msgpackr/unpack.d.cts +0 -2
  132. package/lib/JAELIS-VM/node_modules/msgpackr/unpack.d.ts +0 -2
  133. package/lib/JAELIS-VM/node_modules/msgpackr/unpack.js +0 -1221
  134. package/lib/JAELIS-VM/node_modules/msgpackr-extract/LICENSE +0 -21
  135. package/lib/JAELIS-VM/node_modules/msgpackr-extract/README.md +0 -5
  136. package/lib/JAELIS-VM/node_modules/msgpackr-extract/bin/download-prebuilds.js +0 -13
  137. package/lib/JAELIS-VM/node_modules/msgpackr-extract/binding.gyp +0 -63
  138. package/lib/JAELIS-VM/node_modules/msgpackr-extract/index.js +0 -1
  139. package/lib/JAELIS-VM/node_modules/msgpackr-extract/node_modules/.bin/node-gyp-build-optional-packages +0 -12
  140. package/lib/JAELIS-VM/node_modules/msgpackr-extract/node_modules/.bin/node-gyp-build-optional-packages-optional +0 -12
  141. package/lib/JAELIS-VM/node_modules/msgpackr-extract/node_modules/.bin/node-gyp-build-optional-packages-optional.cmd +0 -17
  142. package/lib/JAELIS-VM/node_modules/msgpackr-extract/node_modules/.bin/node-gyp-build-optional-packages-optional.ps1 +0 -28
  143. package/lib/JAELIS-VM/node_modules/msgpackr-extract/node_modules/.bin/node-gyp-build-optional-packages-test +0 -12
  144. package/lib/JAELIS-VM/node_modules/msgpackr-extract/node_modules/.bin/node-gyp-build-optional-packages-test.cmd +0 -17
  145. package/lib/JAELIS-VM/node_modules/msgpackr-extract/node_modules/.bin/node-gyp-build-optional-packages-test.ps1 +0 -28
  146. package/lib/JAELIS-VM/node_modules/msgpackr-extract/node_modules/.bin/node-gyp-build-optional-packages.cmd +0 -17
  147. package/lib/JAELIS-VM/node_modules/msgpackr-extract/node_modules/.bin/node-gyp-build-optional-packages.ps1 +0 -28
  148. package/lib/JAELIS-VM/node_modules/msgpackr-extract/node_modules/node-gyp-build-optional-packages/LICENSE +0 -21
  149. package/lib/JAELIS-VM/node_modules/msgpackr-extract/node_modules/node-gyp-build-optional-packages/README.md +0 -58
  150. package/lib/JAELIS-VM/node_modules/msgpackr-extract/node_modules/node-gyp-build-optional-packages/bin.js +0 -82
  151. package/lib/JAELIS-VM/node_modules/msgpackr-extract/node_modules/node-gyp-build-optional-packages/build-test.js +0 -19
  152. package/lib/JAELIS-VM/node_modules/msgpackr-extract/node_modules/node-gyp-build-optional-packages/index.js +0 -6
  153. package/lib/JAELIS-VM/node_modules/msgpackr-extract/node_modules/node-gyp-build-optional-packages/node-gyp-build.js +0 -236
  154. package/lib/JAELIS-VM/node_modules/msgpackr-extract/node_modules/node-gyp-build-optional-packages/optional.js +0 -7
  155. package/lib/JAELIS-VM/node_modules/msgpackr-extract/node_modules/node-gyp-build-optional-packages/package.json +0 -32
  156. package/lib/JAELIS-VM/node_modules/msgpackr-extract/package.json +0 -50
  157. package/lib/JAELIS-VM/node_modules/msgpackr-extract/src/extract.cpp +0 -274
  158. package/lib/JAELIS-VM/node_modules/node-gyp-build-optional-packages/LICENSE +0 -21
  159. package/lib/JAELIS-VM/node_modules/node-gyp-build-optional-packages/README.md +0 -58
  160. package/lib/JAELIS-VM/node_modules/node-gyp-build-optional-packages/bin.js +0 -77
  161. package/lib/JAELIS-VM/node_modules/node-gyp-build-optional-packages/build-test.js +0 -19
  162. package/lib/JAELIS-VM/node_modules/node-gyp-build-optional-packages/index.js +0 -224
  163. package/lib/JAELIS-VM/node_modules/node-gyp-build-optional-packages/optional.js +0 -7
  164. package/lib/JAELIS-VM/node_modules/node-gyp-build-optional-packages/package.json +0 -32
  165. package/lib/JAELIS-VM/package-lock.json +0 -284
  166. package/lib/JAELIS-VM/package.json +0 -38
  167. package/lib/JAELIS-VM/test/comprehensive.test.js +0 -267
  168. package/lib/JAELIS-VM/test/cross-chain-test.js +0 -470
  169. package/lib/JAELIS-VM/test/unified-vm-test.js +0 -459
  170. package/lib/JAELIS-VM/test/unified.test.js +0 -166
  171. package/lib/JAELIS-VM/test/vm.test.js +0 -599
  172. package/lib/settlement-server.js +0 -999
  173. package/lib/vm/index.js +0 -397
package/README.md CHANGED
@@ -1,533 +1,234 @@
1
1
  # jaelis-node
2
2
 
3
- Official node software for the **JAELIS Blockchain** - the first unified multi-language smart contract platform with cross-chain settlement.
3
+ Official external node software for the **JAELIS Blockchain** network. Run your own node to sync with the network, contribute to decentralization, and expose a local RPC endpoint for your dApps.
4
4
 
5
5
  [![npm version](https://badge.fury.io/js/jaelis-node.svg)](https://www.npmjs.com/package/jaelis-node)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
7
 
8
- ## What is JAELIS?
8
+ ## What is This?
9
9
 
10
- JAELIS is a next-generation blockchain with a **Universal Virtual Machine** that natively executes smart contracts written in 6 different languages - all on the same chain, with direct cross-contract calls between them. No bridges. No wrapped tokens. No translation layers.
10
+ `jaelis-node` is a **lightweight external node** that:
11
11
 
12
- **One chain. Six languages. Direct interoperability.**
12
+ - Connects to the JAELIS network via WebSocket
13
+ - Syncs and stores blocks locally (LevelDB)
14
+ - Exposes a local JSON-RPC server for your dApps
15
+ - Relays transactions to the network
13
16
 
14
- ## Universal VM - Core Innovation
17
+ This is similar to running `geth --syncmode light` for Ethereum.
15
18
 
16
- JAELIS provides **TWO deployment systems** for maximum flexibility:
17
-
18
- ### Option 1: Unified VM (Cross-Language Magic)
19
-
20
- Compile **MULTIPLE contracts from MULTIPLE languages** into **ONE unified bytecode bundle** with **ONE ABI**:
21
-
22
- ```javascript
23
- // Deploy unified bundle - ALL languages compile to ONE bytecode!
24
- const result = await jaelis.deployUnified({
25
- from: '0x...',
26
- sources: [
27
- { code: solidityCode, language: 'solidity', name: 'Token' },
28
- { code: rustCode, language: 'rust', name: 'DeFi' },
29
- { code: moveCode, language: 'move', name: 'NFT' }
30
- ]
31
- });
32
- // ALL contracts share memory and can call each other DIRECTLY!
33
- ```
34
-
35
- ### Option 2: Multi-VM (Native Compatibility)
36
-
37
- Deploy to **native VMs** for exact compatibility with original chain behavior:
38
-
39
- ```javascript
40
- await jaelis.deploySolanaProgram({ bytecode, programId, owner }); // → SVM
41
- await jaelis.deployMoveModule({ bytecode, moduleName, owner }); // → MoveVM
42
- await jaelis.deployTonContract({ code, data, owner }); // → TVM
43
- ```
44
-
45
- ### Language Support Matrix
46
-
47
- | Language | Ecosystem | Status |
48
- |----------|-----------|--------|
49
- | **Solidity** | Ethereum, Polygon, Arbitrum, Base, etc. | Production |
50
- | **Rust** | Solana, NEAR, Polkadot | Production |
51
- | **Move** | Aptos, Sui, Movement | Production |
52
- | **FunC** | TON (Telegram's 900M+ users) | Production |
53
- | **Cairo** | StarkNet | Production |
54
- | **Vyper** | Ethereum (Python-like) | Production |
55
-
56
- ### Cross-Language Contract Calls (NO BRIDGES!)
57
-
58
- ```javascript
59
- // Solidity → Rust call - DIRECT, no bridges needed!
60
- await jaelis.crossContractCall({
61
- from: solidityContract,
62
- to: rustProgram,
63
- method: 'process_payment',
64
- args: [amount, recipient]
65
- });
66
- ```
67
-
68
- ## Cross-Chain Settlement (30+ Chains)
69
-
70
- JAELIS nodes run light clients for 30+ external blockchains, enabling trustless state verification:
71
-
72
- - **EVM Chains**: Ethereum, Polygon, Arbitrum, Optimism, Base, BSC, Avalanche, Fantom
73
- - **Non-EVM**: Solana, Cosmos, NEAR, Polkadot, Cardano, Algorand
74
- - **Bitcoin L2**: Lightning, Liquid, Stacks
75
- - **Emerging**: Aptos, Sui, TON, StarkNet, zkSync
76
-
77
- Read external chain state directly in your JAELIS contracts - no oracles needed.
78
-
79
- ## Features
80
-
81
- - **Universal VM** - 6 languages, one chain, direct interop
82
- - **Cross-Chain Settlement** - Read state from 30+ chains trustlessly
83
- - **Zero Gas Fees** - LODE-based computational metering (users pay $0)
84
- - **Multi-Chain Wallets** - Receive rewards to ANY chain address
85
- - **No Staking Required** - JAELIS never holds your funds
86
- - **AI-Native** - Built-in MCP server and x402 payment protocol
87
- - **ERC-5792** - Atomic batch transactions
88
- - **EIP-7702** - Account abstraction (EOA → Smart Account)
89
- - **Address Safety** - Anti-phishing and poisoning protection
90
- - **Real P2P** - libp2p networking (same as Ethereum 2.0, IPFS)
91
- - **Lifetime Node Tracking** - Your contributions are recorded forever
19
+ ## Quick Start
92
20
 
93
- ## Installation
21
+ ### Install Globally
94
22
 
95
23
  ```bash
96
24
  npm install -g jaelis-node
97
25
  ```
98
26
 
99
- ## Quick Start
27
+ ### Run the Node
100
28
 
101
29
  ```bash
102
- # Start a node (zero config - auto-connects to testnet)
103
- # Works without a reward address - add one anytime to start earning!
104
- jaelis-node start
105
-
106
- # Or start with your reward wallet (use ANY chain address!)
107
- jaelis-node start --reward-recipient 0xYourEthAddress
108
- jaelis-node start --reward-recipient 9WzDX...YourSolanaAddress
109
- jaelis-node start --reward-recipient bc1q...YourBitcoinAddress
110
-
111
- # Add a reward wallet later (no restart needed for new nodes)
112
- jaelis-node wallet:set-recipient 0xYourAddress
113
- ```
114
-
115
- ## Commands
116
-
117
- | Command | Description |
118
- |---------|-------------|
119
- | `start` | Start a full JAELIS node |
120
- | `validator` | Run as a validator node (bonus rewards) |
121
- | `bootstrap` | Run as a bootstrap/seed node |
122
- | `status` | Check local node status |
123
- | `peers` | List connected peers |
124
- | `info` | Display node and network information |
30
+ # Start on testnet (default)
31
+ jaelis-node
125
32
 
126
- ## Wallet Commands
33
+ # Start on mainnet
34
+ jaelis-node --network mainnet
127
35
 
128
- JAELIS supports **any chain address** for receiving rewards. No staking. No lockups. Your keys, your wallet.
36
+ # Custom RPC port
37
+ jaelis-node --port 8546
129
38
 
130
- ```bash
131
- # Set your reward wallet (accepts ANY chain format)
132
- jaelis-node wallet:set-recipient 0x742d35cc6634C0532925a3b844Bc454e4438f44e # EVM
133
- jaelis-node wallet:set-recipient 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM # Solana
134
- jaelis-node wallet:set-recipient bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh # Bitcoin
135
- jaelis-node wallet:set-recipient EQDrLq-X6jKZNHAScgghh0h1iog3StK71zn8dcmrOj0n # TON
136
-
137
- # List configured wallets
138
- jaelis-node wallet:list
139
-
140
- # Add additional wallets
141
- jaelis-node wallet:add "trading" 0x456...
142
-
143
- # View node identity
144
- jaelis-node wallet:identity
39
+ # Custom data directory
40
+ jaelis-node --data-dir ./my-jaelis-data
145
41
  ```
146
42
 
147
- **Supported Address Formats:**
148
- - EVM (Ethereum, Polygon, Arbitrum, Base, Optimism, etc.)
149
- - Solana (base58)
150
- - Bitcoin (Legacy: 1..., SegWit: 3..., Native SegWit: bc1...)
151
- - TON (base64url)
152
- - Move (Aptos/Sui: 0x + 64 hex chars)
153
-
154
- ## Start Options
43
+ ### Use with Your dApp
155
44
 
156
- ```bash
157
- jaelis-node start [options]
158
-
159
- Options:
160
- -n, --network <network> Network: testnet or mainnet (default: testnet)
161
- -r, --rpc-port <port> RPC server port (default: 8545)
162
- -p, --p2p-port <port> P2P network port (default: 30303)
163
- -d, --data-dir <path> Data directory (default: ./jaelis-data)
164
- --rpc-host <host> RPC host (default: 0.0.0.0)
165
- --no-rpc Disable RPC server
166
- --sync-mode <mode> Sync mode: full, light, archive (default: full)
167
- --reward-recipient <address> Wallet address for node rewards (ANY chain!)
168
- ```
45
+ Once the node is running, connect your dApp to `http://localhost:8545`:
169
46
 
170
- ## Block Sync & Node Status
47
+ ```javascript
48
+ const Jaelis = require('jaelis.js');
171
49
 
172
- Your node automatically syncs with the JAELIS network using **WebSocket push notifications** (like Ethereum's `newHeads` subscription) for real-time updates:
50
+ // Connect to your local node
51
+ const jaelis = new Jaelis.Provider('http://localhost:8545');
173
52
 
174
- ```
175
- [SYNC] Starting sync from https://rpc.jaelis.io
176
- [SYNC] Syncing 25 blocks (1 25)
177
- [SYNC] Local height: 25/139
178
- [SYNC] Syncing 25 blocks (26 → 50)
179
- ...
180
- [SYNC] Local height: 139/139
181
- [SYNC] WebSocket connected! Subscribing to newHeads...
182
- [SYNC] ✓ Subscribed to newHeads (id: 0x1)
183
- [SYNC] Listening for new blocks via WebSocket...
53
+ // Now all RPC calls go through your local node
54
+ const blockNumber = await jaelis.getBlockNumber();
55
+ const balance = await jaelis.getBalance('jae1qwertyuiop...'); // JAELIS native address
184
56
  ```
185
57
 
186
- **Sync Features:**
187
- - **Smart batching** - 25 blocks during initial sync, reduces as you get closer
188
- - **WebSocket subscriptions** - Real-time block notifications (no polling!)
189
- - **Automatic fallback** - Falls back to HTTP polling if WebSocket unavailable
190
- - **Auto-update checker** - Notifies when a new version is available on npm
58
+ ## Architecture
191
59
 
192
- **Update Notifications:**
193
60
  ```
194
- ╔════════════════════════════════════════════════════════════════╗
195
- 📦 UPDATE AVAILABLE ║
196
- ╠════════════════════════════════════════════════════════════════╣
197
- Current: v1.9.0 → Latest: v1.10.0 ║
198
- ║ ║
199
- Run: npm update -g jaelis-node ║
200
- Or: npx jaelis-node@latest start ║
201
- ╚════════════════════════════════════════════════════════════════╝
61
+ ┌─────────────────┐ WebSocket ┌───────────────────┐
62
+ JAELIS │ ◄───────────────── │ Your Local Node │
63
+ │ Main Network │ │ (jaelis-node) │
64
+ rpc.jaelis.io │ ───────────────► │ │
65
+ └─────────────────┘ newHeads │ ┌─────────────┐ │
66
+ subscription │ │ LevelDB │ │
67
+ Storage │ │
68
+ ┌─────────────────┐ JSON-RPC │ └─────────────┘ │
69
+ │ Your dApp │ ◄───────────────── │ │
70
+ │ (browser/node) │ localhost:8545 │ ┌─────────────┐ │
71
+ └─────────────────┘ │ │ RPC Server │ │
72
+ │ └─────────────┘ │
73
+ └───────────────────┘
202
74
  ```
203
75
 
204
- ```bash
205
- # Check sync status
206
- curl -X POST http://localhost:8545 \
207
- -H "Content-Type: application/json" \
208
- -d '{"jsonrpc":"2.0","method":"jaelis_syncing","params":[],"id":1}'
209
-
210
- # Response when syncing:
211
- {
212
- "currentBlock": "0x1a4",
213
- "highestBlock": "0x2f8",
214
- "syncedBlocks": 420,
215
- "remainingBlocks": 340,
216
- "percentComplete": "55.26%"
217
- }
218
-
219
- # Response when fully synced:
220
- false
221
- ```
76
+ ## CLI Options
222
77
 
223
- ### Node Registry & Lifetime Tracking
78
+ | Option | Description | Default |
79
+ |--------|-------------|---------|
80
+ | `-n, --network <network>` | Network to connect to (`testnet` or `mainnet`) | `testnet` |
81
+ | `-p, --port <port>` | Local RPC server port | `8545` |
82
+ | `-d, --data-dir <dir>` | Data directory for block storage | `./jaelis-data/<network>` |
83
+ | `--no-rpc` | Disable local RPC server | Enabled |
224
84
 
225
- When your node connects, it registers with the JAELIS network. Your contributions are tracked **forever** - even across restarts:
226
-
227
- ```bash
228
- # See all connected nodes (run on main RPC)
229
- curl -X POST https://rpc.jaelis.io \
230
- -H "Content-Type: application/json" \
231
- -d '{"jsonrpc":"2.0","method":"jaelis_node_getNodes","params":[],"id":1}'
85
+ ## Programmatic Usage
232
86
 
233
- # Get network-wide node stats
234
- curl -X POST https://rpc.jaelis.io \
235
- -H "Content-Type: application/json" \
236
- -d '{"jsonrpc":"2.0","method":"jaelis_node_getStats","params":[],"id":1}'
237
-
238
- # Response:
239
- {
240
- "lifetimeNodes": 142, # All nodes that EVER connected
241
- "activeNodes": 23, # Currently online
242
- "validators": 8, # Opted-in validators
243
- "totalUptime": "45d 12h", # Cumulative network uptime
244
- "byAddressType": { "evm": 89, "solana": 31, "bitcoin": 22 }
87
+ ```javascript
88
+ const { JaelisNode } = require('jaelis-node');
89
+
90
+ async function main() {
91
+ const node = new JaelisNode({
92
+ network: 'testnet',
93
+ rpcPort: 8545,
94
+ dataDir: './my-jaelis-data',
95
+ enableRpc: true
96
+ });
97
+
98
+ // Event listeners
99
+ node.on('connected', () => console.log('Connected to network'));
100
+ node.on('block', (block) => console.log('New block:', block.number));
101
+ node.on('synced', () => console.log('Fully synced!'));
102
+
103
+ // Start the node
104
+ await node.start();
105
+
106
+ // Get status
107
+ const status = node.getStatus();
108
+ console.log('Status:', status);
109
+
110
+ // Stop the node (graceful shutdown)
111
+ // await node.stop();
245
112
  }
246
- ```
247
-
248
- ## WebSocket Subscriptions
249
113
 
250
- Connect to the WebSocket endpoint for real-time updates:
251
-
252
- ```javascript
253
- const WebSocket = require('ws');
254
- const ws = new WebSocket('wss://rpc.jaelis.io/ws');
255
-
256
- ws.on('open', () => {
257
- // Subscribe to new block headers
258
- ws.send(JSON.stringify({
259
- jsonrpc: '2.0',
260
- method: 'jaelis_subscribe',
261
- params: ['newHeads'],
262
- id: 1
263
- }));
264
- });
265
-
266
- ws.on('message', (data) => {
267
- const msg = JSON.parse(data);
268
- if (msg.method === 'jaelis_subscription') {
269
- console.log('New block:', msg.params.result.number);
270
- }
271
- });
114
+ main();
272
115
  ```
273
116
 
274
- **Available Subscriptions:**
275
- | Subscription | Description |
276
- |--------------|-------------|
277
- | `newHeads` | New block headers as they're produced (real-time sync) |
278
- | `newPendingTransactions` | Transaction hashes entering mempool |
279
- | `logs` | Contract event logs (with filter options) |
280
- | `syncing` | Sync status changes |
281
-
282
- > **Note:** JAELIS uses Proof of Efficient Consensus (PoEC), not mining. Blocks are produced by validators, not mined. The `newHeads` subscription keeps your node synced in real-time.
283
-
284
- ## RPC Methods
285
-
286
- Your node exposes standard JSON-RPC plus JAELIS-specific methods:
117
+ ## RPC Methods Supported
287
118
 
288
- ### Universal VM Methods
289
- | Method | Description |
290
- |--------|-------------|
291
- | `jaelis_getSupportedLanguages` | Returns: `['solidity', 'rust', 'move', 'func', 'cairo', 'vyper']` |
292
- | `jaelis_deployUnified` | Deploy unified bundle (multiple languages → ONE bytecode!) |
293
- | `jaelis_deployContract` | Deploy single contract in any supported language |
294
- | `jaelis_executeContract` | Execute contract method |
295
- | `jaelis_crossContractCall` | Call between contracts of different languages (NO BRIDGES!) |
296
-
297
- ### Cross-Chain Settlement Methods
298
- | Method | Description |
299
- |--------|-------------|
300
- | `jaelis_crossChain_getChains` | List all 30+ registered chains |
301
- | `jaelis_crossChain_getChainInfo` | Get chain metadata (name, RPC, block time) |
302
- | `jaelis_crossChain_readState` | Read settled external chain state |
303
- | `jaelis_crossChain_settleState` | Submit proof and settle state |
304
- | `jaelis_crossChain_getStateDiff` | Compare state across chains |
305
- | `jaelis_crossChain_getLightClientStatus` | Check light client sync status |
306
-
307
- ### Wallet Standard Methods (ERC-5792, EIP-7702)
308
- | Method | Description |
309
- |--------|-------------|
310
- | `jaelis_wallet_getCapabilities` | Get wallet capabilities |
311
- | `jaelis_wallet_sendCalls` | Atomic batch transactions |
312
- | `jaelis_wallet_getCallsStatus` | Check batch status |
313
- | `jaelis_wallet_grantPermissions` | Grant session permissions |
314
- | `jaelis_validateAddressSafety` | Anti-phishing check |
315
- | `jaelis_checkDustAttacks` | Detect address poisoning |
316
-
317
- ### Multi-Ecosystem Compatibility Layers
318
-
319
- JAELIS nodes support RPC methods from **every major blockchain ecosystem**. Developers can use their familiar method names - they all proxy to native `jaelis_*` methods under the hood.
320
-
321
- #### Ethereum (eth_*)
322
- | Method | Description |
323
- |--------|-------------|
324
- | `eth_blockNumber` | Get latest block number |
325
- | `eth_getBalance` | Get account balance |
326
- | `eth_sendTransaction` | Send transaction |
327
- | `eth_call` | Call contract (read-only) |
328
- | `eth_getTransactionReceipt` | Get transaction receipt |
119
+ JAELIS uses the `jaelis_*` namespace for all RPC methods:
329
120
 
330
- #### Solana (solana_*)
121
+ ### Chain Info
331
122
  | Method | Description |
332
123
  |--------|-------------|
333
- | `solana_getBalance` | Get account balance (lamports format) |
334
- | `solana_getSlot` | Get current slot (block height) |
335
- | `solana_getLatestBlockhash` | Get recent blockhash |
336
- | `solana_getHealth` | Check node health |
124
+ | `jaelis_chainId` | Get chain ID (4547 mainnet, 4545 testnet) |
125
+ | `jaelis_blockNumber` | Get latest block number |
126
+ | `jaelis_syncing` | Get sync status |
337
127
 
338
- #### Bitcoin (btc_*)
339
- | Method | Description |
340
- |--------|-------------|
341
- | `btc_getbalance` | Get balance (BTC decimals) |
342
- | `btc_getblockcount` | Get block height |
343
- | `btc_getblock` | Get block by hash |
344
- | `btc_gettransaction` | Get transaction |
345
- | `btc_getblockchaininfo` | Chain info |
346
- | `btc_estimatesmartfee` | Returns 0 (zero fees!) |
347
-
348
- #### Move/Aptos/Sui (move_*)
128
+ ### Block Queries
349
129
  | Method | Description |
350
130
  |--------|-------------|
351
- | `move_getLedgerInfo` | Get ledger info |
352
- | `move_getAccountResource` | Get account resource |
353
- | `move_getAccountModule` | Get account module |
131
+ | `jaelis_getBlockByNumber` | Get block by number |
132
+ | `jaelis_getBlockByHash` | Get block by hash |
354
133
 
355
- #### TON/Telegram (ton_*)
134
+ ### Transaction Queries
356
135
  | Method | Description |
357
136
  |--------|-------------|
358
- | `ton_getAddressBalance` | Get balance |
359
- | `ton_getMasterchainInfo` | Get masterchain info |
360
- | `ton_getAccountState` | Get account state |
361
- | `ton_runGetMethod` | Run get method |
137
+ | `jaelis_getTransactionByHash` | Get transaction |
138
+ | `jaelis_getTransactionReceipt` | Get receipt |
139
+ | `jaelis_sendRawTransaction` | Submit signed tx (uses ENE, not nonces) |
362
140
 
363
- #### WASM/CosmWasm (wasm_*)
141
+ ### Account Queries (Relayed to Main Network)
364
142
  | Method | Description |
365
143
  |--------|-------------|
366
- | `wasm_call` | Call contract |
367
- | `wasm_query` | Query contract state |
368
- | `wasm_deploy` | Deploy WASM contract |
369
- | `wasm_execute` | Execute contract |
370
- | `wasm_getCode` | Get contract code |
144
+ | `jaelis_getBalance` | Get account balance |
145
+ | `jaelis_getENE` | Get ENE (Ephemeral Network Entropy) for transaction ordering |
146
+ | `jaelis_getSigil` | Get account SIGIL allocation |
147
+ | `jaelis_getCode` | Get contract code |
148
+ | `jaelis_call` | Call contract (read-only) |
371
149
 
372
- #### StarkNet/Cairo (starknet_*)
150
+ ### SIGIL Compute (Zero Gas Fees!)
373
151
  | Method | Description |
374
152
  |--------|-------------|
375
- | `starknet_chainId` | Get chain ID |
376
- | `starknet_blockNumber` | Get block number |
377
- | `starknet_call` | Call contract |
378
- | `starknet_estimateFee` | Returns 0 (zero fees!) |
379
- | `starknet_getTransactionByHash` | Get transaction |
380
- | `starknet_addInvokeTransaction` | Send invoke transaction |
153
+ | `jaelis_estimateSigil` | Estimate SIGIL compute for transaction |
154
+ | `jaelis_getSigil` | Get available SIGIL allocation |
381
155
 
382
- ## Programmatic Usage
156
+ > **Note:** JAELIS has ZERO gas fees. SIGIL represents compute allocation from XAI Colossus exaflops - it's not purchased, it's allocated.
383
157
 
384
- ```javascript
385
- const { JaelisNode, BootstrapNode } = require('jaelis-node');
386
-
387
- // Create and start a node
388
- const node = new JaelisNode({
389
- network: 'testnet',
390
- rpcPort: 8545,
391
- p2pPort: 30303,
392
- dataDir: './my-node-data',
393
- rewardRecipient: '0xYourAddress' // Any chain address
394
- });
395
-
396
- await node.start();
397
-
398
- // Get node status
399
- const status = node.getStatus();
400
- console.log('Chain ID:', status.chainId); // 4545 (testnet) or 4547 (mainnet)
401
- console.log('Peers:', status.peerCount);
402
- console.log('Block:', status.blockNumber);
403
-
404
- // Listen for events
405
- node.on('peer:connect', (peerCount) => {
406
- console.log(`Connected peers: ${peerCount}`);
407
- });
408
-
409
- node.on('block:new', (block) => {
410
- console.log(`New block: ${block.number}`);
411
- });
412
-
413
- // Stop the node
414
- await node.stop();
415
- ```
158
+ ## Network Info
416
159
 
417
- ## Network Configuration
160
+ | Network | Chain ID | Main RPC | WebSocket |
161
+ |---------|----------|----------|-----------|
162
+ | Testnet | 4545 | https://rpc.jaelis.io | wss://rpc.jaelis.io/ws |
163
+ | Mainnet | 4547 | https://mainnet.jaelis.io | wss://mainnet.jaelis.io/ws |
418
164
 
419
- | Network | Chain ID | RPC URL | Status |
420
- |---------|----------|---------|--------|
421
- | Testnet | 4545 | https://rpc.jaelis.io | **Active** |
422
- | Mainnet | 4547 | https://mainnet.jaelis.io | Coming Soon |
165
+ ## Why Run Your Own Node?
423
166
 
424
- ## Node Rewards
167
+ 1. **Privacy** - RPC requests don't go through public endpoints
168
+ 2. **Speed** - Local reads are instant (no network latency)
169
+ 3. **Decentralization** - More nodes = stronger network
170
+ 4. **Reliability** - No dependency on public RPC availability
425
171
 
426
- JAELIS rewards node operators based on:
427
- - **Uptime** - Keep your node running
428
- - **Transactions Processed** - Help validate transactions
429
- - **Bandwidth Provided** - Serve data to the network
430
- - **Validator Mode** - Opt-in for bonus rewards
172
+ ## System Requirements
431
173
 
432
- **Reward wallet is optional.** Start your node anytime - add a wallet when you're ready to earn.
174
+ - **Node.js** 18.0.0 or higher
175
+ - **Disk Space** - ~1GB for testnet, ~10GB for mainnet (grows over time)
176
+ - **Memory** - 512MB minimum, 1GB recommended
177
+ - **Network** - Stable internet connection
433
178
 
434
- **No staking required.** JAELIS never holds your funds. Use any wallet from any chain.
179
+ ## Data Storage
435
180
 
436
- ```bash
437
- # Set reward wallet (can do before or after starting node)
438
- jaelis-node wallet:set-recipient 0xYourAddress
181
+ The node stores synced blocks in LevelDB:
439
182
 
440
- # Check your node's contribution stats
441
- jaelis-node status
183
+ ```
184
+ ./jaelis-data/
185
+ └── testnet/
186
+ └── blocks/ # LevelDB database
442
187
  ```
443
188
 
444
- ## System Requirements
189
+ To reset, simply delete the data directory and restart.
445
190
 
446
- | Requirement | Minimum | Recommended |
447
- |-------------|---------|-------------|
448
- | Node.js | v18.0.0 | v20.x LTS |
449
- | RAM | 4 GB | 8+ GB |
450
- | Storage | 50 GB SSD | 200+ GB SSD |
451
- | CPU | 2 cores | 4+ cores |
452
- | Network | 10 Mbps | 100+ Mbps |
191
+ ## Updates
453
192
 
454
- ## Data Directory Structure
193
+ The node checks for updates on startup. To update:
455
194
 
195
+ ```bash
196
+ npm update -g jaelis-node
456
197
  ```
457
- jaelis-data/
458
- ├── blockchain/ # Block and state data (LevelDB)
459
- │ ├── state/ # Account states, contract storage
460
- │ ├── blocks/ # Block headers and transactions
461
- │ └── index/ # Chain indexes
462
- ├── node-registry/ # Node tracking and statistics
463
- ├── wallet-config/ # Wallet configuration
464
- ├── peers/ # Peer database
465
- ├── keys/ # Node identity keys
466
- └── logs/ # Node logs
467
- ```
468
-
469
- **State Persistence:** All VM state (accounts, contracts, storage) persists to LevelDB. Your node's state survives restarts - no data loss.
470
-
471
- ## Environment Variables
472
198
 
473
- | Variable | Description | Default |
474
- |----------|-------------|---------|
475
- | `JAELIS_NETWORK` | Network (testnet/mainnet) | `testnet` |
476
- | `JAELIS_DATA_DIR` | Data directory | `./jaelis-data` |
477
- | `JAELIS_RPC_PORT` | RPC port | `8545` |
478
- | `JAELIS_P2P_PORT` | P2P port | `30303` |
479
- | `JAELIS_REWARD_ADDRESS` | Reward wallet address | - |
199
+ ## Troubleshooting
480
200
 
481
- ## Docker
201
+ ### Connection Issues
482
202
 
483
203
  ```bash
484
- # Run a full node
485
- docker run -d \
486
- --name jaelis-node \
487
- -p 8545:8545 \
488
- -p 30303:30303 \
489
- -v jaelis-data:/data \
490
- -e JAELIS_REWARD_ADDRESS=0xYourAddress \
491
- jaelis/node start --network testnet
204
+ # Check if main network is reachable
205
+ curl https://rpc.jaelis.io -X POST \
206
+ -H "Content-Type: application/json" \
207
+ -d '{"jsonrpc":"2.0","id":1,"method":"jaelis_blockNumber","params":[]}'
492
208
  ```
493
209
 
494
- ## Technical Highlights
495
-
496
- ### Patent-Pending Technology
497
- JAELIS implements three patent-pending systems:
498
- 1. **Universal VM Architecture** - Multi-language contract execution
499
- 2. **Cross-Chain Light Client Protocol** - Trustless external state verification
500
- 3. **LODE Computation Model** - Zero-fee transaction processing
501
-
502
- ### Security
503
- - Real libp2p P2P networking (same protocol as Ethereum 2.0, Filecoin, IPFS)
504
- - Automatic peer discovery and DHT routing
505
- - Built-in MEV protection
506
- - Address poisoning detection
507
- - No trusted setup for privacy features
210
+ ### Port Already in Use
508
211
 
509
- ## AI Integration (MCP)
212
+ ```bash
213
+ # Use a different port
214
+ jaelis-node --port 8546
215
+ ```
510
216
 
511
- JAELIS is AI-native. Claude Desktop users can interact with the blockchain through MCP (Model Context Protocol):
217
+ ### Clear and Resync
512
218
 
513
- ```json
514
- {
515
- "mcpServers": {
516
- "jaelis": {
517
- "url": "https://mcp.jaelis.io/sse"
518
- }
519
- }
520
- }
219
+ ```bash
220
+ # Delete data directory and restart
221
+ rm -rf ./jaelis-data
222
+ jaelis-node
521
223
  ```
522
224
 
523
- Add this to your Claude Desktop config and get 274+ JAELIS tools automatically - create wallets, send transactions, deploy contracts, query balances, and more.
524
-
525
225
  ## Links
526
226
 
527
- - SDK: [npmjs.com/package/jaelis.js](https://www.npmjs.com/package/jaelis.js)
528
- - Website: [jaelis.io](https://jaelis.io)
529
- - Documentation: [docs.jaelis.io](https://docs.jaelis.io)
530
- - GitHub: [github.com/jaelis-foundation](https://github.com/jaelis-foundation)
227
+ - **SDK:** [npmjs.com/package/jaelis.js](https://www.npmjs.com/package/jaelis.js)
228
+ - **Website:** [jaelis.io](https://jaelis.io)
229
+ - **Documentation:** [docs.jaelis.io](https://docs.jaelis.io)
230
+ - **Explorer:** [explorer.jaelis.io](https://explorer.jaelis.io)
231
+ - **GitHub:** [github.com/jaelis-foundation](https://github.com/jaelis-foundation)
531
232
 
532
233
  ## License
533
234