rain-sdk-v2 1.0.7 → 1.0.9
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 +26 -4
- package/dist/abi/CreateMarketAbi.d.ts +87 -1125
- package/dist/abi/CreateMarketAbi.js +1 -1
- package/dist/api/dispute.js +8 -2
- package/dist/api/types.d.ts +8 -6
- package/dist/config/environments.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -973,12 +973,34 @@ const burn = await rain.getBurnPerPool({ poolId: '...' });
|
|
|
973
973
|
### Dispute
|
|
974
974
|
|
|
975
975
|
```typescript
|
|
976
|
-
// Create dispute message (
|
|
976
|
+
// Create dispute message (text)
|
|
977
|
+
await rain.createDisputeMessage({
|
|
978
|
+
pool: '...', // Parent pool document ID
|
|
979
|
+
subPool: '...', // SubPool document ID
|
|
980
|
+
role: 'disputer', // 'creator' | 'disputer' | 'proposer'
|
|
981
|
+
messageType: 'text', // 'text' | 'image' | 'video' | 'file' | 'youtube' | 'mixed'
|
|
982
|
+
evidence: {
|
|
983
|
+
options: ['Yes', 'No'], // required, at least 2
|
|
984
|
+
evidenceType: 'photo', // 'photo' | 'video' | 'pdf' | 'youtube' | 'mixed'
|
|
985
|
+
question: 'Did the event happen?', // optional
|
|
986
|
+
description: 'Screenshot of result', // optional
|
|
987
|
+
source: 'https://espn.com/result', // optional
|
|
988
|
+
youtubeUrls: ['https://youtube.com/watch?v=abc123'], // optional
|
|
989
|
+
urls: ['https://example.com/proof'], // optional
|
|
990
|
+
},
|
|
991
|
+
}, accessToken);
|
|
992
|
+
|
|
993
|
+
// Create dispute message with file attachments (image/video/pdf)
|
|
977
994
|
await rain.createDisputeMessage({
|
|
978
995
|
pool: '...',
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
996
|
+
subPool: '...',
|
|
997
|
+
role: 'creator',
|
|
998
|
+
messageType: 'image', // set to 'file' for PDF
|
|
999
|
+
files: [fileObject], // File[] — required for image/video/file/mixed types, max 25MB each
|
|
1000
|
+
evidence: {
|
|
1001
|
+
options: ['Yes', 'No'],
|
|
1002
|
+
evidenceType: 'photo', // use 'pdf' for PDF files
|
|
1003
|
+
},
|
|
982
1004
|
}, accessToken);
|
|
983
1005
|
|
|
984
1006
|
// Get dispute conversation for a sub-pool
|