@neuraiproject/neurai-rpc 0.4.1 → 0.4.3
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/LICENSE +1 -1
- package/README.md +6 -5
- package/createDocs.mjs +2 -2
- package/dist/index.cjs +4525 -0
- package/dist/index.cjs.map +1 -0
- package/{neurai_methods.md → dist/index.mjs} +784 -845
- package/dist/index.mjs.map +1 -0
- package/dist/types.d.ts +178 -0
- package/dist/types.d.ts.map +1 -0
- package/docs.json +164 -163
- package/docs.ts +1729 -1015
- package/index.ts +2 -2
- package/package.json +3 -3
- package/test-getpubkey.js +149 -0
- package/test.js +56 -0
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# neurai-rpc
|
|
2
2
|
|
|
3
|
-
A package that will help you do RPC calls from Node.js to your
|
|
3
|
+
A package that will help you do RPC calls from Node.js to your Neurai node, that is your full Neurai node.
|
|
4
4
|
|
|
5
|
-
URLs for locally installed
|
|
5
|
+
URLs for locally installed Neurai nodes.
|
|
6
6
|
|
|
7
7
|
- http://127.0.0.1:19001 for mainnet
|
|
8
8
|
- http://127.0.0.1:19101 for testnet
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Neurai as a service, you don't need your own node
|
|
11
11
|
|
|
12
12
|
- https://rpc-main.neurai.org/rpc for mainnet
|
|
13
13
|
- https://rpc-testnet.neurai.org/rpc for testnet
|
|
@@ -20,7 +20,7 @@ npm install @neuraiproject/neurai-rpc
|
|
|
20
20
|
|
|
21
21
|
# Example using ES modules
|
|
22
22
|
|
|
23
|
-
This example uses
|
|
23
|
+
This example uses Neurai as a service from https://rpc-main.neurai.org.
|
|
24
24
|
|
|
25
25
|
In node.js you need to give the file the ending .mjs for modular JavaScript.
|
|
26
26
|
Like `example.mjs`
|
|
@@ -107,7 +107,7 @@ function writeToFile(list){
|
|
|
107
107
|
|
|
108
108
|
Here is a list of all method/commands [All methods](neurai_methods.md)
|
|
109
109
|
|
|
110
|
-
In your local
|
|
110
|
+
In your local Neurai wallet, you can go to
|
|
111
111
|
|
|
112
112
|
help > debug window > console
|
|
113
113
|
|
|
@@ -207,6 +207,7 @@ getconnectioncount
|
|
|
207
207
|
getnettotals
|
|
208
208
|
getnetworkinfo
|
|
209
209
|
getpeerinfo
|
|
210
|
+
getpubkey "address"
|
|
210
211
|
listbanned
|
|
211
212
|
ping
|
|
212
213
|
setban "subnet" "add|remove" (bantime) (absolute)
|
package/createDocs.mjs
CHANGED
|
@@ -46,7 +46,7 @@ export const methods:IMethods ={
|
|
|
46
46
|
//Create neurai_method.md
|
|
47
47
|
{
|
|
48
48
|
const result = [];
|
|
49
|
-
result.push("#
|
|
49
|
+
result.push("# Neurai remote procedure calls/methods");
|
|
50
50
|
result.push("\r\n[Home](README.md)");
|
|
51
51
|
for (let key of keys) {
|
|
52
52
|
if (!key) {
|
|
@@ -58,4 +58,4 @@ export const methods:IMethods ={
|
|
|
58
58
|
result.push(`\r\n <br/> ${doc} `);
|
|
59
59
|
}
|
|
60
60
|
fs.writeFileSync("./neurai_methods.md", result.join(""));
|
|
61
|
-
}
|
|
61
|
+
}
|