payvra-sdk
Advanced tools
Comparing version 1.0.4 to 1.0.5
{ | ||
"name": "payvra-sdk", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Official TypeScript SDK for the Payvra API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -9,3 +9,3 @@ # Payvra SDK for Node.js and TypeScript | ||
``` | ||
```bash | ||
npm install payvra-sdk | ||
@@ -18,6 +18,6 @@ ``` | ||
``` | ||
import { createPayvraClient } from 'payvra-sdk'; | ||
```typescript | ||
import { PayvraClient } from 'payvra-sdk'; | ||
const client = createPayvraClient({ | ||
const client = new PayvraClient({ | ||
apiKey: 'YOUR_API_KEY', | ||
@@ -32,3 +32,3 @@ baseUrl: 'https://payvra.com/api/v1' // Optional, defaults to production URL | ||
``` | ||
```typescript | ||
const { currencies } = await client.fetchCurrencies(); | ||
@@ -38,3 +38,3 @@ ``` | ||
Success response: | ||
``` | ||
```json | ||
{ | ||
@@ -64,3 +64,3 @@ "currencies": [ | ||
``` | ||
```typescript | ||
const invoice = await client.createInvoice({ | ||
@@ -78,3 +78,3 @@ amount: 100, | ||
Success response: | ||
``` | ||
```json | ||
{ | ||
@@ -108,3 +108,3 @@ "id":"cm47930od4b9i11dknivo92u1", | ||
``` | ||
```typescript | ||
const invoice = await client.fetchInvoice({ | ||
@@ -119,3 +119,3 @@ invoiceId: 'cm47930od4b9i11dknivo92u1' | ||
``` | ||
```typescript | ||
const payout = await client.createPayout({ | ||
@@ -133,3 +133,3 @@ currency: 'LTC', | ||
``` | ||
```typescript | ||
const { pairs } = await client.fetchExchangePairs(); | ||
@@ -142,3 +142,3 @@ ``` | ||
``` | ||
```typescript | ||
import type { WebhookEvent } from 'payvra-sdk'; | ||
@@ -145,0 +145,0 @@ |
34637