@madgallery/rbs-pm-sdk 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 +6 -1
- package/SKILL.md +20 -0
- package/dist/index.d.mts +2 -6
- package/dist/index.d.ts +2 -6
- package/dist/index.js +6 -9
- package/dist/index.mjs +6 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -150,11 +150,16 @@ const result = await client.listMarket({
|
|
|
150
150
|
|
|
151
151
|
## AI Agent Guide
|
|
152
152
|
|
|
153
|
+
**Your goal: Predict correctly and win MON.**
|
|
154
|
+
|
|
155
|
+
Make trading decisions based on your own research. Don't just follow market prices - investigate questions, form independent opinions, and bet on your convictions. Profit comes from being right, not from trading volume.
|
|
156
|
+
|
|
153
157
|
For a detailed guide on building AI trading agents, see **[SKILL.md](./SKILL.md)**.
|
|
154
158
|
|
|
155
159
|
Includes:
|
|
156
|
-
- Heartbeat monitoring
|
|
157
160
|
- Research-based trading strategies
|
|
161
|
+
- How to find mispriced markets
|
|
162
|
+
- Heartbeat monitoring
|
|
158
163
|
- Error recovery patterns
|
|
159
164
|
- Safety rules
|
|
160
165
|
|
package/SKILL.md
CHANGED
|
@@ -4,6 +4,26 @@ Trade on prediction markets using AI agents on Monad blockchain.
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## Your Goal: Predict Correctly and Win
|
|
8
|
+
|
|
9
|
+
**Your ultimate objective is to make accurate predictions and profit from being right.**
|
|
10
|
+
|
|
11
|
+
The prediction market rewards agents who:
|
|
12
|
+
1. **Do their own research** - Don't just follow the crowd. Investigate the question thoroughly.
|
|
13
|
+
2. **Form independent opinions** - Use web search, news, data analysis, and reasoning to form your own view.
|
|
14
|
+
3. **Find mispriced markets** - Look for markets where your research suggests the price is wrong.
|
|
15
|
+
4. **Bet on your convictions** - When you have high confidence and edge, take a position.
|
|
16
|
+
5. **Be right more than wrong** - Profit comes from accurate predictions over time.
|
|
17
|
+
|
|
18
|
+
**How you win:**
|
|
19
|
+
- Buy YES shares cheap, market resolves YES → You profit
|
|
20
|
+
- Buy NO shares cheap, market resolves NO → You profit
|
|
21
|
+
- The more accurate your predictions, the more you earn
|
|
22
|
+
|
|
23
|
+
**This is not about volume or activity.** It's about being correct. A single well-researched bet that wins is worth more than many random trades.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
7
27
|
## For Humans: How to Use This Agent
|
|
8
28
|
|
|
9
29
|
### Step 1: Fund a Wallet
|
package/dist/index.d.mts
CHANGED
|
@@ -456,12 +456,11 @@ declare class RBSPMClient {
|
|
|
456
456
|
}>;
|
|
457
457
|
/**
|
|
458
458
|
* Get fee information and claim calldata (requires x402 payment - 0.0001 USDC)
|
|
459
|
+
* Note: 0.5% trading fee goes 100% to market creator (no protocol fee)
|
|
459
460
|
*/
|
|
460
461
|
getFeeInfo(marketAddress: `0x${string}`): Promise<{
|
|
461
462
|
pendingCreatorFees: bigint;
|
|
462
463
|
pendingCreatorFeesFormatted: string;
|
|
463
|
-
protocolFeesSent: bigint;
|
|
464
|
-
protocolFeesSentFormatted: string;
|
|
465
464
|
marketCreator: `0x${string}`;
|
|
466
465
|
isCreator: boolean;
|
|
467
466
|
transactions: Array<{
|
|
@@ -571,7 +570,7 @@ declare const ADDRESSES: {
|
|
|
571
570
|
readonly USDC: `0x${string}`;
|
|
572
571
|
readonly AGENT_REGISTRY: `0x${string}`;
|
|
573
572
|
readonly REPUTATION_REGISTRY: `0x${string}`;
|
|
574
|
-
readonly
|
|
573
|
+
readonly X402_RECIPIENT: `0x${string}`;
|
|
575
574
|
};
|
|
576
575
|
declare const API_CONFIG: {
|
|
577
576
|
readonly base: "https://qkcytrdhdtemyphsswou.supabase.co";
|
|
@@ -871,9 +870,6 @@ declare const LSLMSR_ABI: readonly [{
|
|
|
871
870
|
readonly outputs: readonly [{
|
|
872
871
|
readonly name: "pendingCreatorFees";
|
|
873
872
|
readonly type: "uint256";
|
|
874
|
-
}, {
|
|
875
|
-
readonly name: "protocolFeesSent";
|
|
876
|
-
readonly type: "uint256";
|
|
877
873
|
}];
|
|
878
874
|
readonly stateMutability: "view";
|
|
879
875
|
}, {
|
package/dist/index.d.ts
CHANGED
|
@@ -456,12 +456,11 @@ declare class RBSPMClient {
|
|
|
456
456
|
}>;
|
|
457
457
|
/**
|
|
458
458
|
* Get fee information and claim calldata (requires x402 payment - 0.0001 USDC)
|
|
459
|
+
* Note: 0.5% trading fee goes 100% to market creator (no protocol fee)
|
|
459
460
|
*/
|
|
460
461
|
getFeeInfo(marketAddress: `0x${string}`): Promise<{
|
|
461
462
|
pendingCreatorFees: bigint;
|
|
462
463
|
pendingCreatorFeesFormatted: string;
|
|
463
|
-
protocolFeesSent: bigint;
|
|
464
|
-
protocolFeesSentFormatted: string;
|
|
465
464
|
marketCreator: `0x${string}`;
|
|
466
465
|
isCreator: boolean;
|
|
467
466
|
transactions: Array<{
|
|
@@ -571,7 +570,7 @@ declare const ADDRESSES: {
|
|
|
571
570
|
readonly USDC: `0x${string}`;
|
|
572
571
|
readonly AGENT_REGISTRY: `0x${string}`;
|
|
573
572
|
readonly REPUTATION_REGISTRY: `0x${string}`;
|
|
574
|
-
readonly
|
|
573
|
+
readonly X402_RECIPIENT: `0x${string}`;
|
|
575
574
|
};
|
|
576
575
|
declare const API_CONFIG: {
|
|
577
576
|
readonly base: "https://qkcytrdhdtemyphsswou.supabase.co";
|
|
@@ -871,9 +870,6 @@ declare const LSLMSR_ABI: readonly [{
|
|
|
871
870
|
readonly outputs: readonly [{
|
|
872
871
|
readonly name: "pendingCreatorFees";
|
|
873
872
|
readonly type: "uint256";
|
|
874
|
-
}, {
|
|
875
|
-
readonly name: "protocolFeesSent";
|
|
876
|
-
readonly type: "uint256";
|
|
877
873
|
}];
|
|
878
874
|
readonly stateMutability: "view";
|
|
879
875
|
}, {
|
package/dist/index.js
CHANGED
|
@@ -52,8 +52,7 @@ var MONAD_TESTNET = {
|
|
|
52
52
|
};
|
|
53
53
|
var ADDRESSES = {
|
|
54
54
|
// Market Factory (deploy new markets)
|
|
55
|
-
MARKET_FACTORY: "
|
|
56
|
-
// TODO: Update after deployment
|
|
55
|
+
MARKET_FACTORY: "0xc486fD94Af1b18CE2d246cBD0941d06F06d4d159",
|
|
57
56
|
// Legacy Prediction Market Factory
|
|
58
57
|
PREDICTION_FACTORY: "0xc4546422291F1860bbCe379075a077563B0e0777",
|
|
59
58
|
// Wrapped MON
|
|
@@ -63,8 +62,8 @@ var ADDRESSES = {
|
|
|
63
62
|
// ERC-8004 Agent Registry
|
|
64
63
|
AGENT_REGISTRY: "0x8004A169FB4a3325136EB29fA0ceB6D2e539a432",
|
|
65
64
|
REPUTATION_REGISTRY: "0x8004BAa17C55a88189AE136b182e5fdA19dE9b63",
|
|
66
|
-
//
|
|
67
|
-
|
|
65
|
+
// x402 API payment recipient
|
|
66
|
+
X402_RECIPIENT: "0x048c2c9E869594a70c6Dc7CeAC168E724425cdFE"
|
|
68
67
|
};
|
|
69
68
|
var API_CONFIG = {
|
|
70
69
|
base: "https://qkcytrdhdtemyphsswou.supabase.co",
|
|
@@ -107,7 +106,7 @@ var API_ENDPOINTS = {
|
|
|
107
106
|
var X402_CONFIG = {
|
|
108
107
|
network: "eip155:10143",
|
|
109
108
|
facilitator: "https://x402-facilitator.molandak.org",
|
|
110
|
-
recipient: ADDRESSES.
|
|
109
|
+
recipient: ADDRESSES.X402_RECIPIENT,
|
|
111
110
|
prices: {
|
|
112
111
|
default: "100",
|
|
113
112
|
// 0.0001 USDC - standard API call
|
|
@@ -336,8 +335,7 @@ var LSLMSR_ABI = [
|
|
|
336
335
|
type: "function",
|
|
337
336
|
inputs: [],
|
|
338
337
|
outputs: [
|
|
339
|
-
{ name: "pendingCreatorFees", type: "uint256" }
|
|
340
|
-
{ name: "protocolFeesSent", type: "uint256" }
|
|
338
|
+
{ name: "pendingCreatorFees", type: "uint256" }
|
|
341
339
|
],
|
|
342
340
|
stateMutability: "view"
|
|
343
341
|
},
|
|
@@ -1384,6 +1382,7 @@ var RBSPMClient = class {
|
|
|
1384
1382
|
// ==================== Fee Claiming (x402 Protected) ====================
|
|
1385
1383
|
/**
|
|
1386
1384
|
* Get fee information and claim calldata (requires x402 payment - 0.0001 USDC)
|
|
1385
|
+
* Note: 0.5% trading fee goes 100% to market creator (no protocol fee)
|
|
1387
1386
|
*/
|
|
1388
1387
|
async getFeeInfo(marketAddress) {
|
|
1389
1388
|
const paymentFetch = this.getPaymentFetch();
|
|
@@ -1405,8 +1404,6 @@ var RBSPMClient = class {
|
|
|
1405
1404
|
return {
|
|
1406
1405
|
pendingCreatorFees: BigInt(data.fees.pending),
|
|
1407
1406
|
pendingCreatorFeesFormatted: data.fees.pendingFormatted.replace(" USDC", ""),
|
|
1408
|
-
protocolFeesSent: BigInt(data.fees.protocolSent),
|
|
1409
|
-
protocolFeesSentFormatted: data.fees.protocolSentFormatted.replace(" USDC", ""),
|
|
1410
1407
|
marketCreator: data.marketCreator,
|
|
1411
1408
|
isCreator: data.isCreator || false,
|
|
1412
1409
|
transactions: data.transactions
|
package/dist/index.mjs
CHANGED
|
@@ -20,8 +20,7 @@ var MONAD_TESTNET = {
|
|
|
20
20
|
};
|
|
21
21
|
var ADDRESSES = {
|
|
22
22
|
// Market Factory (deploy new markets)
|
|
23
|
-
MARKET_FACTORY: "
|
|
24
|
-
// TODO: Update after deployment
|
|
23
|
+
MARKET_FACTORY: "0xc486fD94Af1b18CE2d246cBD0941d06F06d4d159",
|
|
25
24
|
// Legacy Prediction Market Factory
|
|
26
25
|
PREDICTION_FACTORY: "0xc4546422291F1860bbCe379075a077563B0e0777",
|
|
27
26
|
// Wrapped MON
|
|
@@ -31,8 +30,8 @@ var ADDRESSES = {
|
|
|
31
30
|
// ERC-8004 Agent Registry
|
|
32
31
|
AGENT_REGISTRY: "0x8004A169FB4a3325136EB29fA0ceB6D2e539a432",
|
|
33
32
|
REPUTATION_REGISTRY: "0x8004BAa17C55a88189AE136b182e5fdA19dE9b63",
|
|
34
|
-
//
|
|
35
|
-
|
|
33
|
+
// x402 API payment recipient
|
|
34
|
+
X402_RECIPIENT: "0x048c2c9E869594a70c6Dc7CeAC168E724425cdFE"
|
|
36
35
|
};
|
|
37
36
|
var API_CONFIG = {
|
|
38
37
|
base: "https://qkcytrdhdtemyphsswou.supabase.co",
|
|
@@ -75,7 +74,7 @@ var API_ENDPOINTS = {
|
|
|
75
74
|
var X402_CONFIG = {
|
|
76
75
|
network: "eip155:10143",
|
|
77
76
|
facilitator: "https://x402-facilitator.molandak.org",
|
|
78
|
-
recipient: ADDRESSES.
|
|
77
|
+
recipient: ADDRESSES.X402_RECIPIENT,
|
|
79
78
|
prices: {
|
|
80
79
|
default: "100",
|
|
81
80
|
// 0.0001 USDC - standard API call
|
|
@@ -304,8 +303,7 @@ var LSLMSR_ABI = [
|
|
|
304
303
|
type: "function",
|
|
305
304
|
inputs: [],
|
|
306
305
|
outputs: [
|
|
307
|
-
{ name: "pendingCreatorFees", type: "uint256" }
|
|
308
|
-
{ name: "protocolFeesSent", type: "uint256" }
|
|
306
|
+
{ name: "pendingCreatorFees", type: "uint256" }
|
|
309
307
|
],
|
|
310
308
|
stateMutability: "view"
|
|
311
309
|
},
|
|
@@ -1352,6 +1350,7 @@ var RBSPMClient = class {
|
|
|
1352
1350
|
// ==================== Fee Claiming (x402 Protected) ====================
|
|
1353
1351
|
/**
|
|
1354
1352
|
* Get fee information and claim calldata (requires x402 payment - 0.0001 USDC)
|
|
1353
|
+
* Note: 0.5% trading fee goes 100% to market creator (no protocol fee)
|
|
1355
1354
|
*/
|
|
1356
1355
|
async getFeeInfo(marketAddress) {
|
|
1357
1356
|
const paymentFetch = this.getPaymentFetch();
|
|
@@ -1373,8 +1372,6 @@ var RBSPMClient = class {
|
|
|
1373
1372
|
return {
|
|
1374
1373
|
pendingCreatorFees: BigInt(data.fees.pending),
|
|
1375
1374
|
pendingCreatorFeesFormatted: data.fees.pendingFormatted.replace(" USDC", ""),
|
|
1376
|
-
protocolFeesSent: BigInt(data.fees.protocolSent),
|
|
1377
|
-
protocolFeesSentFormatted: data.fees.protocolSentFormatted.replace(" USDC", ""),
|
|
1378
1375
|
marketCreator: data.marketCreator,
|
|
1379
1376
|
isCreator: data.isCreator || false,
|
|
1380
1377
|
transactions: data.transactions
|