You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# DIG SDK v2 Example: Coin Indexer with L1PeerService
1
+
# DIG SDK v2 – Chia Coin Indexer Example
2
2
3
-
This example demonstrates how to use the CoinIndexer and L1PeerService to sync and monitor coins from the Chia blockchain using the DIG SDK v2.
3
+
This project demonstrates how to use the DIG SDK v2 to index, monitor, and interact with Chia blockchain coins using the `CoinIndexer`, `ChiaWallet`, `ChiaColdWallet`, and `WalletService` abstractions.
4
4
5
5
## Prerequisites
6
6
7
7
-**Node.js** (v18+ recommended)
8
8
-**npm** (v9+ recommended)
9
9
- Access to the Chia testnet or mainnet (for real blockchain data)
10
-
- The following files in your project root:
11
-
-`ca.crt` and `ca.key` (Chia network certificates, required for peer connections)
12
-
13
-
## Setup
10
+
## Setup for local example
14
11
15
12
1.**Install dependencies**
16
13
17
14
```sh
18
15
npm install
19
16
```
20
17
21
-
2.**Build the project**
22
-
23
-
```sh
24
-
npm run build
25
-
```
26
-
27
-
3.**Configure your wallet**
18
+
2.**Configure your wallets**
28
19
29
20
- Open `test/L1PeerServiceWithIndexer.example.ts`.
30
-
- Set `testnetMnemonic` to your testnet mnemonic phrase.
31
-
- Set `testnetWalletAddress` to a unique name for your wallet (e.g., `"dev"`).
32
-
- Ensure `ca.crt` and `ca.key` are present in your project root, or update the paths in the example file.
21
+
- Set `testnetMnemonic` to your testnet mnemonic phrase (for hot wallet).
22
+
- Set `testnetWalletAddressName` to a unique name for your wallet (e.g., `"dev"`).
23
+
- Set `testnetWalletAddress` to your Chia address (for cold wallet).
24
+
- Optionally, set `coldWalletName` for your cold wallet entry.
0 commit comments