@neuraiproject/neurai-rpc 0.4.5 → 0.4.7

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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,131 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.4.6] - 2025-12-10
9
+
10
+ ### Fixed
11
+ - Clarified the DePIN documentation to distinguish between:
12
+ - the messaging token configured in `depintoken`, which can be any asset
13
+ - the dedicated DePIN asset type used by asset-management RPCs, which uses the `&` prefix in current core
14
+ - Corrected examples for the dedicated DePIN asset-management RPCs.
15
+
16
+ ### Changed
17
+ - Documented the dedicated DePIN asset behavior for package consumers as enabled on mainnet and testnet, with `units=0` on issue/reissue.
18
+ - Added missing RPC documentation for `listdepinaddresses` and `listpqaddresses`.
19
+
20
+ ## [0.4.5] - 2025-12-09
21
+
22
+ ### Added
23
+ - 13 new RPC commands for the DePIN (Decentralized Physical Infrastructure Networks) system:
24
+
25
+ **DePIN Asset Management:**
26
+ - `checkdepinvalidity` - Verify whether a DePIN asset is valid for an address
27
+ - `listdepinholders` - List all holders of a DePIN asset with their validity status
28
+ - `freezedepin` - Freeze a DePIN asset for an address (owner only)
29
+ - `unfreezedepin` - Unfreeze a DePIN asset (owner only)
30
+ - `selfrevokedepin` - Self-revoke a DePIN asset (holder)
31
+
32
+ **DePIN Messaging System:**
33
+ - `depingetmsginfo` - Get messaging system information
34
+ - `depinsendmsg` - Send encrypted messages through a remote gateway (challenge/response)
35
+ - `depinsubmitmsg` - Submit pre-encrypted messages to the local pool
36
+ - `depingetmsg` - Retrieve and decrypt DePIN messages
37
+ - `depinclearmsg` - Remove messages from the pool
38
+ - `depingetpoolcontent` - Inspect the message pool
39
+ - `depinpoolstats` - Get message pool statistics
40
+
41
+ **AI/MCP Worker:**
42
+ - `depinmcpstatus` - MCP (Model Context Protocol) worker status
43
+
44
+ ### Changed
45
+ - TypeScript configuration updated with `tsconfig.json`.
46
+ - Targeting ES2015 for full Promise/Buffer/startsWith support.
47
+ - Parcel package versions consolidated to 2.16.3.
48
+
49
+ ### Fixed
50
+ - Removed TypeScript compilation warnings.
51
+ - Resolved version conflicts in Parcel dependencies.
52
+
53
+ ### Documentation
54
+ - Added `DEPIN_IMPLEMENTATION_GUIDE.md` - full technical guide to implement DePIN in web wallets.
55
+ - Detailed documentation of the dual-port architecture (8766 RPC + 19002 DePIN).
56
+ - Complete code examples with `DePINClient` and `DePINChat` classes.
57
+ - Documentation of the shared ECIES encryption protocol.
58
+ - Documentation of the challenge/response authentication protocol.
59
+
60
+ ## [0.4.4] - 2025-12-08
61
+
62
+ ### Added
63
+ - `getpubkey` command - Retrieve the public key associated with an address
64
+ - Specific documentation in `GETPUBKEY.md`
65
+ - Test scripts: `test-getpubkey.js` with CLI argument support
66
+
67
+ ### Changed
68
+ - Added `@types/node` as a development dependency
69
+
70
+ ## Previous Versions
71
+
72
+ See repository commits for the full history of changes.
73
+
74
+ ---
75
+
76
+ ## Migration Notes
77
+
78
+ ### From 0.4.5 to 0.4.6
79
+
80
+ **IMPORTANT**: Distinguish between DePIN messaging tokens and dedicated DePIN assets:
81
+
82
+ ❌ **Incorrect (treating them as the same thing):**
83
+ ```javascript
84
+ const token = 'FRANCE';
85
+ await rpc('checkdepinvalidity', [token, address]);
86
+ ```
87
+
88
+ ✅ **Correct (0.4.6+):**
89
+ ```javascript
90
+ const messagingToken = 'FRANCE';
91
+ const depinAsset = '&FRANCE';
92
+
93
+ // Messaging token for depinmsg can be any asset.
94
+ // Dedicated DePIN asset-management commands use the &-prefixed DePIN asset type.
95
+ const validity = await rpc('checkdepinvalidity', [depinAsset, address]);
96
+ if (!validity.has_asset || validity.valid === 0) {
97
+ throw new Error('Invalid DePIN asset for this address');
98
+ }
99
+ ```
100
+
101
+ **Updated examples:**
102
+ - Messaging token: `FRANCE` can still be any asset
103
+ - Dedicated DePIN asset: `&FRANCE`
104
+ - Owner token for a dedicated DePIN asset: `&FRANCE!`
105
+
106
+ ### Node configuration
107
+
108
+ Ensure the following in `neurai.conf`:
109
+
110
+ ```ini
111
+ # DePIN Messaging
112
+ depinmsg=1
113
+ depintoken=YOUR_TOKEN_HERE # Messaging token, can be any valid asset
114
+ depinport=19002
115
+ depinmaxmessagesize=1024
116
+ depinmessageexpiry=168
117
+ depinmaxpoolsize=100
118
+
119
+ # Asset indexes (required for listdepinholders/listdepinaddresses)
120
+ assetindex=1
121
+ pubkeyindex=1
122
+ ```
123
+
124
+ ---
125
+
126
+ ## Links
127
+
128
+ - [GitHub repository](https://github.com/NeuraiProject/neurai-rpc)
129
+ - [NPM Package](https://www.npmjs.com/package/@neuraiproject/neurai-rpc)
130
+ - [DePIN documentation](./DEPIN_IMPLEMENTATION_GUIDE.md)
131
+ - [Issues & Support](https://github.com/NeuraiProject/neurai-rpc/issues)