@opencardsdk/sdk 0.1.0 → 0.1.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 +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @opencardsdk/sdk
|
|
2
2
|
|
|
3
3
|
Client SDK for OpenCard — create virtual cards with USDC payments via the x402 protocol.
|
|
4
4
|
|
|
@@ -7,13 +7,13 @@ Wraps the raw x402 flow (402 → parse challenge → pay USDC → retry with pro
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm install @
|
|
10
|
+
npm install @opencardsdk/sdk viem
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## Quick Start
|
|
14
14
|
|
|
15
15
|
```typescript
|
|
16
|
-
import { OpenCardClient } from '@
|
|
16
|
+
import { OpenCardClient } from '@opencardsdk/sdk';
|
|
17
17
|
|
|
18
18
|
const client = new OpenCardClient({
|
|
19
19
|
privateKey: '0x...', // or pass a viem WalletClient
|
|
@@ -86,7 +86,7 @@ import {
|
|
|
86
86
|
PaymentError,
|
|
87
87
|
ApiError,
|
|
88
88
|
TimeoutError,
|
|
89
|
-
} from '@
|
|
89
|
+
} from '@opencardsdk/sdk';
|
|
90
90
|
|
|
91
91
|
try {
|
|
92
92
|
const card = await client.createCard({ ... });
|
|
@@ -114,7 +114,7 @@ import {
|
|
|
114
114
|
executePayment,
|
|
115
115
|
buildPaymentProof,
|
|
116
116
|
handleX402Payment,
|
|
117
|
-
} from '@
|
|
117
|
+
} from '@opencardsdk/sdk';
|
|
118
118
|
```
|
|
119
119
|
|
|
120
120
|
## How It Works
|