Skip to content

Commit

Permalink
fix: show correct snippet for nodejs sdk (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega authored Jan 31, 2024
1 parent 35a9030 commit ee9ff72
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions pages/nodejs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,27 @@ The UtxoRpc Node.js SDK is a comprehensive toolkit for building clients and serv

## Prerequisites

- Node.js 14.0 or higher
- Node.js 16.0 or higher
- `npm`, the Node.js package manager

## Installation

To add the UtxoRpc Node.js SDK to your project, run the following command:

```bash
npm install utxorpc --save
npm install @utxorpc/sdk --save
```

## Usage

To use the UtxoRpc Node.js SDK, simply import the library and initialize the client:

```javascript
const UtxoRpc = require("utxorpc");
import { CardanoClientV1Alpha } from "@utxorpc/sdk";

// Initialize the UtxoRpc client
const client = new UtxoRpc.Client({
// Configuration options
});
const client = new CardanoClientV1Alpha("https://utxorpcserver.example");

// make any of the available calls
const chainPage1 = await client.chainSync.dumpHistory();
```

0 comments on commit ee9ff72

Please sign in to comment.