burok-sdk 1.0.97 → 1.0.98
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 +70 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,76 @@
|
|
|
1
1
|
# BUROK SDK
|
|
2
2
|
|
|
3
|
-
SDK officiel pour l
|
|
3
|
+
SDK officiel TypeScript / JavaScript pour l’API **BUROK** : wallets, paiements, crypto multichain, abonnements, webhooks, et le reste de la plateforme.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/burok-sdk)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install burok-sdk
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Démarrage rapide
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { BurokClient } from 'burok-sdk';
|
|
18
|
+
|
|
19
|
+
const client = new BurokClient({
|
|
20
|
+
apiKey: process.env.BUROK_API_KEY!,
|
|
21
|
+
baseUrl: 'https://api.burok.app',
|
|
22
|
+
autoRefreshToken: true,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
client.setAuthToken(userJwt);
|
|
26
|
+
|
|
27
|
+
const session = await client.auth.getSession();
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Documentation
|
|
31
|
+
|
|
32
|
+
| Document | Contenu |
|
|
33
|
+
|----------|---------|
|
|
34
|
+
| [ALL_README_TS/README_BUROK_SDK.md](./ALL_README_TS/README_BUROK_SDK.md) | Installation, auth, erreurs, modules principaux |
|
|
35
|
+
| [ALL_README_TS/crypto/multichain/README_multichain.md](./ALL_README_TS/crypto/multichain/README_multichain.md) | Crypto multichain : `sameChain`, `crossChain`, `bridge`, `swap`, etc. |
|
|
36
|
+
| [ALL_README_TS/crypto/multichain/README_same-chain.md](./ALL_README_TS/crypto/multichain/README_same-chain.md) | Transferts même chaîne (Solana / EVM, groupes) |
|
|
37
|
+
| [ALL_README_TS/crypto/multichain/README_cross-chain.md](./ALL_README_TS/crypto/multichain/README_cross-chain.md) | Transferts cross-chain (quote / execute) |
|
|
38
|
+
| [ALL_README_TS/crypto/multichain/README_bridge.md](./ALL_README_TS/crypto/multichain/README_bridge.md) | Module pont (`/api/crypto/bridge`) |
|
|
39
|
+
| Autres fichiers sous `ALL_README_TS/` | Paiements, QR, parrainage, marketplace, etc. |
|
|
40
|
+
|
|
41
|
+
La documentation détaillée est découpée par domaine dans **`ALL_README_TS/`** pour rester lisible et à jour.
|
|
42
|
+
|
|
43
|
+
## Exemples crypto (multichain)
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
// Transfert same-chain Solana
|
|
47
|
+
await client.crypto.sameChain.solana({
|
|
48
|
+
from_burok_user_id: '...',
|
|
49
|
+
to_burok_user_id: '...',
|
|
50
|
+
amount: 0.25,
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
// Devis cross-chain
|
|
54
|
+
const quote = await client.crypto.crossChain.getQuote({
|
|
55
|
+
source_chain_type: 'evm',
|
|
56
|
+
destination_chain_type: 'solana',
|
|
57
|
+
isBridge: true,
|
|
58
|
+
amount: '1000000',
|
|
59
|
+
chain: 'base',
|
|
60
|
+
from_burok_user_id: '...',
|
|
61
|
+
to_burok_user_id: '...',
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
// Pont (même logique serveur, préfixe /bridge)
|
|
65
|
+
await client.crypto.bridge.getQuote({ /* mêmes params */ });
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Prérequis
|
|
69
|
+
|
|
70
|
+
- **Node.js** 18+ (ou environnement compatible ES modules selon ton bundler)
|
|
71
|
+
- **Clé API** BUROK (tableau de bord développeur)
|
|
72
|
+
- **JWT** utilisateur pour les opérations sensibles (transferts, profil, etc.)
|
|
73
|
+
|
|
74
|
+
## Licence
|
|
75
|
+
|
|
76
|
+
MIT
|