bitcoincash-oauth-client 0.2.0 → 0.2.10
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 +8 -0
- package/dist/index.browser.min.js +1 -1
- package/dist/index.cjs +35 -18
- package/dist/index.mjs +35 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -102,11 +102,19 @@ const client = new BitcoinCashOAuthClient({
|
|
|
102
102
|
const client = new BitcoinCashOAuthClient({
|
|
103
103
|
serverUrl: 'http://localhost:8000', // OAuth server URL
|
|
104
104
|
network: 'mainnet', // 'mainnet' or 'testnet'
|
|
105
|
+
authBasePath: '/auth', // Optional: base path for auth endpoints (default: '/auth')
|
|
105
106
|
secureStorage: localStorage, // Optional: storage for tokens
|
|
106
107
|
fetch: customFetch // Optional: custom fetch implementation
|
|
107
108
|
});
|
|
108
109
|
```
|
|
109
110
|
|
|
111
|
+
**Options:**
|
|
112
|
+
- `serverUrl` (string): The base URL of your OAuth server (default: `"http://localhost:8000"`)
|
|
113
|
+
- `network` (string): Network type - `'mainnet'` or `'testnet'` (default: `'mainnet'`)
|
|
114
|
+
- `authBasePath` (string): Base path for auth endpoints (default: `'/auth'`). Use `'/bch-auth'` for Watchtower API compatibility
|
|
115
|
+
- `secureStorage` (object): Storage interface for tokens (e.g., `localStorage` in browser)
|
|
116
|
+
- `fetch` (function): Custom fetch implementation (optional)
|
|
117
|
+
|
|
110
118
|
### Methods
|
|
111
119
|
|
|
112
120
|
#### `init()`
|