@onchaindb/sdk 2.0.0 → 2.0.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 CHANGED
@@ -1,6 +1,6 @@
1
- # OnChainDB TypeScript SDK
1
+ # OnDB TypeScript SDK
2
2
 
3
- A TypeScript SDK for OnChainDB — the decentralized database built on Celestia with x402 payment protocol integration.
3
+ A TypeScript SDK for OnDB — the decentralized database built on Celestia with x402 payment protocol integration.
4
4
 
5
5
  ## Installation
6
6
 
@@ -22,7 +22,7 @@ const db = createClient({
22
22
  // Store data
23
23
  await db.store({
24
24
  collection: 'messages',
25
- data: [{ message: 'Hello OnChainDB!', author: 'alice' }]
25
+ data: [{ message: 'Hello OnDB!', author: 'alice' }]
26
26
  });
27
27
 
28
28
  // Query data
@@ -39,8 +39,8 @@ console.log(result.records);
39
39
  ## Configuration
40
40
 
41
41
  ```typescript
42
- interface OnChainDBConfig {
43
- endpoint: string; // OnChainDB server endpoint
42
+ interface OnDBConfig {
43
+ endpoint: string; // OnDB server endpoint
44
44
  appId?: string; // Application ID
45
45
  appKey?: string; // App key for write operations (X-App-Key header)
46
46
  userKey?: string; // User key for Auto-Pay (X-User-Key header)
@@ -568,20 +568,20 @@ const quote = await db.getPricingQuote({
568
568
  ## Error Handling
569
569
 
570
570
  ```typescript
571
- import { OnChainDBError, ValidationError, PaymentRequiredError } from '@onchaindb/sdk';
571
+ import { OnDBError, ValidationError, PaymentRequiredError } from '@onchaindb/sdk';
572
572
 
573
573
  try {
574
574
  await db.store({ collection: 'test', data: [{ value: 1 }] });
575
575
  } catch (error) {
576
576
  if (error instanceof ValidationError) console.log('Validation:', error.message);
577
577
  if (error instanceof PaymentRequiredError) console.log('Quote:', error.quote);
578
- if (error instanceof OnChainDBError) console.log(error.code, error.message);
578
+ if (error instanceof OnDBError) console.log(error.code, error.message);
579
579
  }
580
580
  ```
581
581
 
582
582
  ## API Reference
583
583
 
584
- ### OnChainDBClient
584
+ ### OnDBClient
585
585
 
586
586
  | Method | Description |
587
587
  |--------|-------------|
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onchaindb/sdk",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "TypeScript SDK for OnChainDB - Decentralized database built on Celestia",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/client.ts CHANGED
@@ -955,7 +955,7 @@ export class OnDBClient extends EventEmitter<TransactionEvents> {
955
955
  /**
956
956
  * Create a fluent query builder instance
957
957
  *
958
- * @returns OnChainQueryBuilder instance for building complex queries
958
+ * @returns QueryBuilder instance for building complex queries
959
959
  *
960
960
  * @example
961
961
  * ```typescript