chainlist-rpcs 0.0.1 → 0.1.2
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/README.md +3 -3
- package/package.json +2 -2
- package/.npmrc.bak +0 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Unofficial chainlist RPC npm module
|
|
2
2
|
|
|
3
|
-
Installation: `npm install -S `
|
|
3
|
+
Installation: `npm install -S chainlist-rpcs`
|
|
4
4
|
|
|
5
5
|
NOTE: This module is unofficial and not maintained by Chainlist. If you want to add RPC urls, please refer to the [DefiLlama/chainlist](https://github.com/DefiLlama/chainlist) repository.
|
|
6
6
|
|
|
@@ -11,7 +11,7 @@ NOTE 2: Keep in mind these RPCs are public and may have rate limits and imperfed
|
|
|
11
11
|
The module exports constants that are objects you can access. The `rpcs` and `chains_by_id` constants which equal the chainlist sources [in this folder of their repository](https://github.com/DefiLlama/chainlist/tree/main/constants). The `chains_by_name` constant is an object that maps chain names to their id.
|
|
12
12
|
|
|
13
13
|
```js
|
|
14
|
-
import { rpcs, chains_by_id, chains_by_name } from 'chainlist-
|
|
14
|
+
import { rpcs, chains_by_id, chains_by_name } from 'chainlist-rpcs'
|
|
15
15
|
|
|
16
16
|
console.log( chains[1] ) // Output: "ethereum"
|
|
17
17
|
console.log( rpcs[1] ) // { rpcs: [ { url: String, tracking: String, trackingDetauls: String } ] }
|
|
@@ -51,7 +51,7 @@ export function get_rcpcs_for_chains( { chain_ids=[], chain_names=[], allowed_tr
|
|
|
51
51
|
Example usage:
|
|
52
52
|
|
|
53
53
|
```js
|
|
54
|
-
import { get_rcpcs_for_chain, get_rcpcs_for_chains } from 'chainlist-
|
|
54
|
+
import { get_rcpcs_for_chain, get_rcpcs_for_chains } from 'chainlist-rpcs'
|
|
55
55
|
|
|
56
56
|
const single_chain_by_id = get_rcpcs_for_chain( { chain_id: 1 } ) // Output: [ { url: String, tracking: String, trackingDetauls: String } ]
|
|
57
57
|
const single_chain_by_name = get_rcpcs_for_chain( { chain_name: "ethereum" } ) // Output: [ { url: String, tracking: String, trackingDetauls: String } ]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chainlist-rpcs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Wrapper around the rpcs as published by DefiLlama/chainlist.",
|
|
6
6
|
"main": "app.js",
|
|
@@ -29,4 +29,4 @@
|
|
|
29
29
|
"husky": "^9.1.6",
|
|
30
30
|
"vitest": "^2.1.5"
|
|
31
31
|
}
|
|
32
|
-
}
|
|
32
|
+
}
|
package/.npmrc.bak
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//registry.npmjs.org/:_authToken=${NPM_ACCESS_TOKEN}
|