jaelis-node 1.9.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 +147 -433
  2. package/bin/jaelis-node.js +79 -504
  3. package/lib/index.js +31 -2740
  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,520 +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
100
-
101
- ```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 |
125
-
126
- ## Wallet Commands
127
-
128
- JAELIS supports **any chain address** for receiving rewards. No staking. No lockups. Your keys, your wallet.
27
+ ### Run the Node
129
28
 
130
29
  ```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
30
+ # Start on testnet (default)
31
+ jaelis-node
136
32
 
137
- # List configured wallets
138
- jaelis-node wallet:list
33
+ # Start on mainnet
34
+ jaelis-node --network mainnet
139
35
 
140
- # Add additional wallets
141
- jaelis-node wallet:add "trading" 0x456...
36
+ # Custom RPC port
37
+ jaelis-node --port 8546
142
38
 
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)
43
+ ### Use with Your dApp
153
44
 
154
- ## Start Options
45
+ Once the node is running, connect your dApp to `http://localhost:8545`:
155
46
 
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
- ```
169
-
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
58
+ ## Architecture
190
59
 
191
- ```bash
192
- # Check sync status
193
- curl -X POST http://localhost:8545 \
194
- -H "Content-Type: application/json" \
195
- -d '{"jsonrpc":"2.0","method":"jaelis_syncing","params":[],"id":1}'
196
-
197
- # Response when syncing:
198
- {
199
- "currentBlock": "0x1a4",
200
- "highestBlock": "0x2f8",
201
- "syncedBlocks": 420,
202
- "remainingBlocks": 340,
203
- "percentComplete": "55.26%"
204
- }
205
-
206
- # Response when fully synced:
207
- false
60
+ ```
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
+ └───────────────────┘
208
74
  ```
209
75
 
210
- ### Node Registry & Lifetime Tracking
76
+ ## CLI Options
211
77
 
212
- When your node connects, it registers with the JAELIS network. Your contributions are tracked **forever** - even across restarts:
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 |
213
84
 
214
- ```bash
215
- # See all connected nodes (run on main RPC)
216
- curl -X POST https://rpc.jaelis.io \
217
- -H "Content-Type: application/json" \
218
- -d '{"jsonrpc":"2.0","method":"jaelis_node_getNodes","params":[],"id":1}'
85
+ ## Programmatic Usage
219
86
 
220
- # Get network-wide node stats
221
- curl -X POST https://rpc.jaelis.io \
222
- -H "Content-Type: application/json" \
223
- -d '{"jsonrpc":"2.0","method":"jaelis_node_getStats","params":[],"id":1}'
224
-
225
- # Response:
226
- {
227
- "lifetimeNodes": 142, # All nodes that EVER connected
228
- "activeNodes": 23, # Currently online
229
- "validators": 8, # Opted-in validators
230
- "totalUptime": "45d 12h", # Cumulative network uptime
231
- "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();
232
112
  }
233
- ```
234
-
235
- ## WebSocket Subscriptions
236
113
 
237
- Connect to the WebSocket endpoint for real-time updates:
238
-
239
- ```javascript
240
- const WebSocket = require('ws');
241
- const ws = new WebSocket('wss://rpc.jaelis.io/ws');
242
-
243
- ws.on('open', () => {
244
- // Subscribe to new block headers
245
- ws.send(JSON.stringify({
246
- jsonrpc: '2.0',
247
- method: 'jaelis_subscribe',
248
- params: ['newHeads'],
249
- id: 1
250
- }));
251
- });
252
-
253
- ws.on('message', (data) => {
254
- const msg = JSON.parse(data);
255
- if (msg.method === 'jaelis_subscription') {
256
- console.log('New block:', msg.params.result.number);
257
- }
258
- });
114
+ main();
259
115
  ```
260
116
 
261
- **Available Subscriptions:**
262
- | Subscription | Description |
263
- |--------------|-------------|
264
- | `newHeads` | New block headers as they're produced (real-time sync) |
265
- | `newPendingTransactions` | Transaction hashes entering mempool |
266
- | `logs` | Contract event logs (with filter options) |
267
- | `syncing` | Sync status changes |
268
-
269
- > **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.
270
-
271
- ## RPC Methods
272
-
273
- Your node exposes standard JSON-RPC plus JAELIS-specific methods:
117
+ ## RPC Methods Supported
274
118
 
275
- ### Universal VM Methods
276
- | Method | Description |
277
- |--------|-------------|
278
- | `jaelis_getSupportedLanguages` | Returns: `['solidity', 'rust', 'move', 'func', 'cairo', 'vyper']` |
279
- | `jaelis_deployUnified` | Deploy unified bundle (multiple languages → ONE bytecode!) |
280
- | `jaelis_deployContract` | Deploy single contract in any supported language |
281
- | `jaelis_executeContract` | Execute contract method |
282
- | `jaelis_crossContractCall` | Call between contracts of different languages (NO BRIDGES!) |
283
-
284
- ### Cross-Chain Settlement Methods
285
- | Method | Description |
286
- |--------|-------------|
287
- | `jaelis_crossChain_getChains` | List all 30+ registered chains |
288
- | `jaelis_crossChain_getChainInfo` | Get chain metadata (name, RPC, block time) |
289
- | `jaelis_crossChain_readState` | Read settled external chain state |
290
- | `jaelis_crossChain_settleState` | Submit proof and settle state |
291
- | `jaelis_crossChain_getStateDiff` | Compare state across chains |
292
- | `jaelis_crossChain_getLightClientStatus` | Check light client sync status |
293
-
294
- ### Wallet Standard Methods (ERC-5792, EIP-7702)
295
- | Method | Description |
296
- |--------|-------------|
297
- | `jaelis_wallet_getCapabilities` | Get wallet capabilities |
298
- | `jaelis_wallet_sendCalls` | Atomic batch transactions |
299
- | `jaelis_wallet_getCallsStatus` | Check batch status |
300
- | `jaelis_wallet_grantPermissions` | Grant session permissions |
301
- | `jaelis_validateAddressSafety` | Anti-phishing check |
302
- | `jaelis_checkDustAttacks` | Detect address poisoning |
303
-
304
- ### Multi-Ecosystem Compatibility Layers
305
-
306
- 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.
307
-
308
- #### Ethereum (eth_*)
309
- | Method | Description |
310
- |--------|-------------|
311
- | `eth_blockNumber` | Get latest block number |
312
- | `eth_getBalance` | Get account balance |
313
- | `eth_sendTransaction` | Send transaction |
314
- | `eth_call` | Call contract (read-only) |
315
- | `eth_getTransactionReceipt` | Get transaction receipt |
119
+ JAELIS uses the `jaelis_*` namespace for all RPC methods:
316
120
 
317
- #### Solana (solana_*)
121
+ ### Chain Info
318
122
  | Method | Description |
319
123
  |--------|-------------|
320
- | `solana_getBalance` | Get account balance (lamports format) |
321
- | `solana_getSlot` | Get current slot (block height) |
322
- | `solana_getLatestBlockhash` | Get recent blockhash |
323
- | `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 |
324
127
 
325
- #### Bitcoin (btc_*)
326
- | Method | Description |
327
- |--------|-------------|
328
- | `btc_getbalance` | Get balance (BTC decimals) |
329
- | `btc_getblockcount` | Get block height |
330
- | `btc_getblock` | Get block by hash |
331
- | `btc_gettransaction` | Get transaction |
332
- | `btc_getblockchaininfo` | Chain info |
333
- | `btc_estimatesmartfee` | Returns 0 (zero fees!) |
334
-
335
- #### Move/Aptos/Sui (move_*)
128
+ ### Block Queries
336
129
  | Method | Description |
337
130
  |--------|-------------|
338
- | `move_getLedgerInfo` | Get ledger info |
339
- | `move_getAccountResource` | Get account resource |
340
- | `move_getAccountModule` | Get account module |
131
+ | `jaelis_getBlockByNumber` | Get block by number |
132
+ | `jaelis_getBlockByHash` | Get block by hash |
341
133
 
342
- #### TON/Telegram (ton_*)
134
+ ### Transaction Queries
343
135
  | Method | Description |
344
136
  |--------|-------------|
345
- | `ton_getAddressBalance` | Get balance |
346
- | `ton_getMasterchainInfo` | Get masterchain info |
347
- | `ton_getAccountState` | Get account state |
348
- | `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) |
349
140
 
350
- #### WASM/CosmWasm (wasm_*)
141
+ ### Account Queries (Relayed to Main Network)
351
142
  | Method | Description |
352
143
  |--------|-------------|
353
- | `wasm_call` | Call contract |
354
- | `wasm_query` | Query contract state |
355
- | `wasm_deploy` | Deploy WASM contract |
356
- | `wasm_execute` | Execute contract |
357
- | `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) |
358
149
 
359
- #### StarkNet/Cairo (starknet_*)
150
+ ### SIGIL Compute (Zero Gas Fees!)
360
151
  | Method | Description |
361
152
  |--------|-------------|
362
- | `starknet_chainId` | Get chain ID |
363
- | `starknet_blockNumber` | Get block number |
364
- | `starknet_call` | Call contract |
365
- | `starknet_estimateFee` | Returns 0 (zero fees!) |
366
- | `starknet_getTransactionByHash` | Get transaction |
367
- | `starknet_addInvokeTransaction` | Send invoke transaction |
153
+ | `jaelis_estimateSigil` | Estimate SIGIL compute for transaction |
154
+ | `jaelis_getSigil` | Get available SIGIL allocation |
368
155
 
369
- ## Programmatic Usage
156
+ > **Note:** JAELIS has ZERO gas fees. SIGIL represents compute allocation from XAI Colossus exaflops - it's not purchased, it's allocated.
370
157
 
371
- ```javascript
372
- const { JaelisNode, BootstrapNode } = require('jaelis-node');
373
-
374
- // Create and start a node
375
- const node = new JaelisNode({
376
- network: 'testnet',
377
- rpcPort: 8545,
378
- p2pPort: 30303,
379
- dataDir: './my-node-data',
380
- rewardRecipient: '0xYourAddress' // Any chain address
381
- });
382
-
383
- await node.start();
384
-
385
- // Get node status
386
- const status = node.getStatus();
387
- console.log('Chain ID:', status.chainId); // 4545 (testnet) or 4547 (mainnet)
388
- console.log('Peers:', status.peerCount);
389
- console.log('Block:', status.blockNumber);
390
-
391
- // Listen for events
392
- node.on('peer:connect', (peerCount) => {
393
- console.log(`Connected peers: ${peerCount}`);
394
- });
395
-
396
- node.on('block:new', (block) => {
397
- console.log(`New block: ${block.number}`);
398
- });
399
-
400
- // Stop the node
401
- await node.stop();
402
- ```
158
+ ## Network Info
403
159
 
404
- ## 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 |
405
164
 
406
- | Network | Chain ID | RPC URL | Status |
407
- |---------|----------|---------|--------|
408
- | Testnet | 4545 | https://rpc.jaelis.io | **Active** |
409
- | Mainnet | 4547 | https://mainnet.jaelis.io | Coming Soon |
165
+ ## Why Run Your Own Node?
410
166
 
411
- ## 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
412
171
 
413
- JAELIS rewards node operators based on:
414
- - **Uptime** - Keep your node running
415
- - **Transactions Processed** - Help validate transactions
416
- - **Bandwidth Provided** - Serve data to the network
417
- - **Validator Mode** - Opt-in for bonus rewards
172
+ ## System Requirements
418
173
 
419
- **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
420
178
 
421
- **No staking required.** JAELIS never holds your funds. Use any wallet from any chain.
179
+ ## Data Storage
422
180
 
423
- ```bash
424
- # Set reward wallet (can do before or after starting node)
425
- jaelis-node wallet:set-recipient 0xYourAddress
181
+ The node stores synced blocks in LevelDB:
426
182
 
427
- # Check your node's contribution stats
428
- jaelis-node status
183
+ ```
184
+ ./jaelis-data/
185
+ └── testnet/
186
+ └── blocks/ # LevelDB database
429
187
  ```
430
188
 
431
- ## System Requirements
189
+ To reset, simply delete the data directory and restart.
432
190
 
433
- | Requirement | Minimum | Recommended |
434
- |-------------|---------|-------------|
435
- | Node.js | v18.0.0 | v20.x LTS |
436
- | RAM | 4 GB | 8+ GB |
437
- | Storage | 50 GB SSD | 200+ GB SSD |
438
- | CPU | 2 cores | 4+ cores |
439
- | Network | 10 Mbps | 100+ Mbps |
191
+ ## Updates
440
192
 
441
- ## Data Directory Structure
193
+ The node checks for updates on startup. To update:
442
194
 
195
+ ```bash
196
+ npm update -g jaelis-node
443
197
  ```
444
- jaelis-data/
445
- ├── blockchain/ # Block and state data (LevelDB)
446
- │ ├── state/ # Account states, contract storage
447
- │ ├── blocks/ # Block headers and transactions
448
- │ └── index/ # Chain indexes
449
- ├── node-registry/ # Node tracking and statistics
450
- ├── wallet-config/ # Wallet configuration
451
- ├── peers/ # Peer database
452
- ├── keys/ # Node identity keys
453
- └── logs/ # Node logs
454
- ```
455
-
456
- **State Persistence:** All VM state (accounts, contracts, storage) persists to LevelDB. Your node's state survives restarts - no data loss.
457
-
458
- ## Environment Variables
459
198
 
460
- | Variable | Description | Default |
461
- |----------|-------------|---------|
462
- | `JAELIS_NETWORK` | Network (testnet/mainnet) | `testnet` |
463
- | `JAELIS_DATA_DIR` | Data directory | `./jaelis-data` |
464
- | `JAELIS_RPC_PORT` | RPC port | `8545` |
465
- | `JAELIS_P2P_PORT` | P2P port | `30303` |
466
- | `JAELIS_REWARD_ADDRESS` | Reward wallet address | - |
199
+ ## Troubleshooting
467
200
 
468
- ## Docker
201
+ ### Connection Issues
469
202
 
470
203
  ```bash
471
- # Run a full node
472
- docker run -d \
473
- --name jaelis-node \
474
- -p 8545:8545 \
475
- -p 30303:30303 \
476
- -v jaelis-data:/data \
477
- -e JAELIS_REWARD_ADDRESS=0xYourAddress \
478
- 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":[]}'
479
208
  ```
480
209
 
481
- ## Technical Highlights
482
-
483
- ### Patent-Pending Technology
484
- JAELIS implements three patent-pending systems:
485
- 1. **Universal VM Architecture** - Multi-language contract execution
486
- 2. **Cross-Chain Light Client Protocol** - Trustless external state verification
487
- 3. **LODE Computation Model** - Zero-fee transaction processing
488
-
489
- ### Security
490
- - Real libp2p P2P networking (same protocol as Ethereum 2.0, Filecoin, IPFS)
491
- - Automatic peer discovery and DHT routing
492
- - Built-in MEV protection
493
- - Address poisoning detection
494
- - No trusted setup for privacy features
210
+ ### Port Already in Use
495
211
 
496
- ## AI Integration (MCP)
212
+ ```bash
213
+ # Use a different port
214
+ jaelis-node --port 8546
215
+ ```
497
216
 
498
- JAELIS is AI-native. Claude Desktop users can interact with the blockchain through MCP (Model Context Protocol):
217
+ ### Clear and Resync
499
218
 
500
- ```json
501
- {
502
- "mcpServers": {
503
- "jaelis": {
504
- "url": "https://mcp.jaelis.io/sse"
505
- }
506
- }
507
- }
219
+ ```bash
220
+ # Delete data directory and restart
221
+ rm -rf ./jaelis-data
222
+ jaelis-node
508
223
  ```
509
224
 
510
- Add this to your Claude Desktop config and get 274+ JAELIS tools automatically - create wallets, send transactions, deploy contracts, query balances, and more.
511
-
512
225
  ## Links
513
226
 
514
- - SDK: [npmjs.com/package/jaelis.js](https://www.npmjs.com/package/jaelis.js)
515
- - Website: [jaelis.io](https://jaelis.io)
516
- - Documentation: [docs.jaelis.io](https://docs.jaelis.io)
517
- - 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)
518
232
 
519
233
  ## License
520
234