@debros/network-ts-sdk 0.1.4 → 0.1.5
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 +6 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @network
|
|
1
|
+
# @debros/network-ts-sdk - TypeScript SDK for DeBros Network
|
|
2
2
|
|
|
3
3
|
A modern, isomorphic TypeScript SDK for the DeBros Network gateway. Works seamlessly in both Node.js and browser environments with support for database operations, pub/sub messaging, and network management.
|
|
4
4
|
|
|
@@ -14,7 +14,7 @@ A modern, isomorphic TypeScript SDK for the DeBros Network gateway. Works seamle
|
|
|
14
14
|
## Installation
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
npm install @
|
|
17
|
+
npm install @debros/network-ts-sdk
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
## Quick Start
|
|
@@ -22,7 +22,7 @@ npm install @network/network-ts-sdk
|
|
|
22
22
|
### Initialize the Client
|
|
23
23
|
|
|
24
24
|
```typescript
|
|
25
|
-
import { createClient } from "@network
|
|
25
|
+
import { createClient } from "@debros/network-ts-sdk";
|
|
26
26
|
|
|
27
27
|
const client = createClient({
|
|
28
28
|
baseURL: "http://localhost:6001",
|
|
@@ -234,7 +234,7 @@ interface ClientConfig {
|
|
|
234
234
|
By default, credentials are stored in memory. For browser apps, use localStorage:
|
|
235
235
|
|
|
236
236
|
```typescript
|
|
237
|
-
import { createClient, LocalStorageAdapter } from "@network
|
|
237
|
+
import { createClient, LocalStorageAdapter } from "@debros/network-ts-sdk";
|
|
238
238
|
|
|
239
239
|
const client = createClient({
|
|
240
240
|
baseURL: "http://localhost:6001",
|
|
@@ -248,7 +248,7 @@ const client = createClient({
|
|
|
248
248
|
The SDK throws `SDKError` for all errors:
|
|
249
249
|
|
|
250
250
|
```typescript
|
|
251
|
-
import { SDKError } from "@network
|
|
251
|
+
import { SDKError } from "@debros/network-ts-sdk";
|
|
252
252
|
|
|
253
253
|
try {
|
|
254
254
|
await client.db.query("SELECT * FROM nonexistent");
|
|
@@ -268,7 +268,7 @@ The SDK works in browsers with minimal setup:
|
|
|
268
268
|
|
|
269
269
|
```typescript
|
|
270
270
|
// Browser example
|
|
271
|
-
import { createClient } from "@network
|
|
271
|
+
import { createClient } from "@debros/network-ts-sdk";
|
|
272
272
|
|
|
273
273
|
const client = createClient({
|
|
274
274
|
baseURL: "https://gateway.example.com",
|