https://github.com/damartripamungkas/client-blockchain-rpc
⛓️ Simple client blockchain rpc
https://github.com/damartripamungkas/client-blockchain-rpc
arbitrum blockchain blockchain-rpc client-blockchain-rpc ethereum jsonrpc solana
Last synced: 5 months ago
JSON representation
⛓️ Simple client blockchain rpc
- Host: GitHub
- URL: https://github.com/damartripamungkas/client-blockchain-rpc
- Owner: damartripamungkas
- License: mit
- Created: 2023-12-30T14:26:48.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-01T05:45:32.000Z (7 months ago)
- Last Synced: 2024-11-16T16:42:31.493Z (5 months ago)
- Topics: arbitrum, blockchain, blockchain-rpc, client-blockchain-rpc, ethereum, jsonrpc, solana
- Language: TypeScript
- Homepage: https://npmjs.com/package/client-blockchain-rpc
- Size: 150 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
CLIENT-BLOCKCHAIN-RPC
### 📖 Description :
This very light package was created for those of you who want to interact directly with the EVM, SOLANA, and other blockchain.
- support network http
- support network websocket
- support network ipc### 💻 Step to install :
```
npm install client-blockchain-rpc
```### ✏️ Example :
```javascript
import { provider } from "client-blockchain-rpc";
const init = provider({
urlRpc: "https://bscrpc.com",
});
```#### Usage
```javascript
const { provider } = require("..");const init = provider({
urlRpc: "https://bscrpc.com",
});(async () => {
// single request
const chainId = await init.send({
method: "eth_chainId",
params: [],
formatReturn: parseInt,
});// batch request
const resBatch = await init.sendBatch([
{
method: "eth_chainId",
params: [],
formatReturn: BigInt,
},
{
method: "eth_gasPrice",
params: [],
formatReturn: BigInt,
},
]);
})();
```full example see [here](./test)
### 🧾 Pre-Requisistes :
```
node.js >= 18
```### 📝 License :
Licensed under the [MIT License](./LICENSE).