@pokertools/sdk 1.0.4 → 1.0.7
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 +3 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/index.cjs +18 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -3
- package/dist/index.d.ts +20 -3
- package/dist/index.js +18 -6
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +12 -4
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +6 -0
- package/dist/react/index.d.ts +6 -0
- package/dist/react/index.js +12 -4
- package/dist/react/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -13,6 +13,7 @@ The official TypeScript SDK for the **PokerTools** platform. Build real-time Tex
|
|
|
13
13
|
- 🛡️ **Type-Safe**: Full TypeScript support with shared types from the core engine.
|
|
14
14
|
- 🔄 **State Management**: Automatic synchronization of game state (snapshots + delta updates).
|
|
15
15
|
- 💰 **Financials**: Deposit, withdrawal, and chip management utilities.
|
|
16
|
+
- 🔐 **Replay-safe Withdrawals**: Helpers generate nonce/timestamp withdrawal messages for the current API contract.
|
|
16
17
|
|
|
17
18
|
## 📦 Installation
|
|
18
19
|
|
|
@@ -110,6 +111,8 @@ The SDK bridges your frontend application with the PokerTools API and Real-time
|
|
|
110
111
|
| `PokerProvider` | React Context provider that initializes the client and socket. |
|
|
111
112
|
| `useTable` | Hook that subscribes to a specific table's updates. |
|
|
112
113
|
|
|
114
|
+
`STATE_UPDATE` WebSocket events are lightweight version notifications. Use `getTableVersion(tableId)` to inspect the latest server version and fetch full state via REST when the version advances beyond your cached snapshot.
|
|
115
|
+
|
|
113
116
|
## 🔑 Authentication (SIWE)
|
|
114
117
|
|
|
115
118
|
The SDK uses Sign-In with Ethereum. Here is a typical flow:
|