rain-sdk-v2 1.0.5 → 1.0.6
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 -1
- package/dist/api/priceData.js +1 -1
- package/dist/api/types.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -912,7 +912,11 @@ await rain.markNotificationAsRead({ notificationId: '...' }, accessToken);
|
|
|
912
912
|
|
|
913
913
|
```typescript
|
|
914
914
|
// Get price data for a pool
|
|
915
|
-
const prices = await rain.getPriceData({
|
|
915
|
+
const prices = await rain.getPriceData({
|
|
916
|
+
contractAddress: '0x...', // market contract address
|
|
917
|
+
side: 1, // 1 = YES, 2 = NO
|
|
918
|
+
filter: '1D', // '1H' | '6H' | '1D' | '1W' | '1M' | 'ALL'
|
|
919
|
+
});
|
|
916
920
|
```
|
|
917
921
|
|
|
918
922
|
### Pool Reviews
|
package/dist/api/priceData.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { buildHeaders, buildQuery, handleResponse } from './helpers.js';
|
|
2
2
|
export async function getPriceData(params, config) {
|
|
3
|
-
const qs = buildQuery({
|
|
3
|
+
const qs = buildQuery({ contractAddress: params.contractAddress, side: params.side, filter: params.filter });
|
|
4
4
|
const res = await fetch(`${config.apiUrl}/price-data/get-price-data${qs}`, {
|
|
5
5
|
method: 'GET',
|
|
6
6
|
headers: buildHeaders(config),
|
package/dist/api/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rain-sdk-v2",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Rain SDK V2 — TypeScript SDK for Rain prediction markets on Arbitrum. Market creation, trading, liquidity, order book, split/merge, dispute, and smart account support.",
|
|
6
6
|
"main": "dist/index.js",
|