@arkiv-network/sdk 0.6.1-dev.1 → 0.6.1
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 +8 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -94,11 +94,11 @@ You can now use Arkiv's public client to query data. Paste the following in `rea
|
|
|
94
94
|
|
|
95
95
|
```typescript
|
|
96
96
|
import { createPublicClient, http } from "@arkiv-network/sdk"
|
|
97
|
-
import {
|
|
97
|
+
import { kaolin } from "@arkiv-network/sdk/chains"
|
|
98
98
|
import { eq } from "@arkiv-network/sdk/query"
|
|
99
99
|
|
|
100
100
|
const publicClient = createPublicClient({
|
|
101
|
-
chain:
|
|
101
|
+
chain: kaolin, // "kaolin" is Arkiv's testnet
|
|
102
102
|
transport: http(),
|
|
103
103
|
});
|
|
104
104
|
|
|
@@ -172,17 +172,17 @@ Create a file named `write_example.ts` with the following content:
|
|
|
172
172
|
```typescript
|
|
173
173
|
import { createPublicClient, createWalletClient, http } from "@arkiv-network/sdk"
|
|
174
174
|
import { privateKeyToAccount } from "@arkiv-network/sdk/accounts"
|
|
175
|
-
import {
|
|
175
|
+
import { kaolin } from "@arkiv-network/sdk/chains"
|
|
176
176
|
import { ExpirationTime, jsonToPayload } from "@arkiv-network/sdk/utils"
|
|
177
177
|
|
|
178
178
|
// Create a public client
|
|
179
179
|
const publicClient = createPublicClient({
|
|
180
|
-
chain:
|
|
180
|
+
chain: kaolin, // kaolin is the Arkiv testnet
|
|
181
181
|
transport: http(),
|
|
182
182
|
})
|
|
183
183
|
// Create a wallet client with an account
|
|
184
184
|
const client = createWalletClient({
|
|
185
|
-
chain:
|
|
185
|
+
chain: kaolin,
|
|
186
186
|
transport: http(),
|
|
187
187
|
account: privateKeyToAccount('0x...'), // Replace with your private key
|
|
188
188
|
});
|
|
@@ -193,7 +193,7 @@ const { entityKey, txHash } = await client.createEntity({
|
|
|
193
193
|
entity: {
|
|
194
194
|
entityType: 'document',
|
|
195
195
|
entityId: 'doc-123',
|
|
196
|
-
entityContent: "Hello from DevConnect Hackathon 2025! Arkiv
|
|
196
|
+
entityContent: "Hello from DevConnect Hackathon 2025! Arkiv chain wishes you all the best!"
|
|
197
197
|
},
|
|
198
198
|
}),
|
|
199
199
|
contentType: 'application/json',
|
|
@@ -231,8 +231,8 @@ Now you can run it in the same way as in the previous example:
|
|
|
231
231
|
**Note:**
|
|
232
232
|
You must provide your own private key with a minimum balance on the Arkiv L3 network.
|
|
233
233
|
You can generate a private key using any tool, for example: https://vanity-eth.tk/
|
|
234
|
-
Once you have a key, you can paste it into the example above and fund its address using the Arkiv
|
|
235
|
-
https://
|
|
234
|
+
Once you have a key, you can paste it into the example above and fund its address using the Arkiv Kaolin testnet faucet at:
|
|
235
|
+
https://kaolin.hoodi.arkiv.network/faucet/
|
|
236
236
|
|
|
237
237
|
For quick testing, you may use this example key:
|
|
238
238
|
```
|