@shippedcalls/sdk 0.1.0 → 0.3.0
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/dist/abi.d.ts +827 -0
- package/dist/abi.js +1060 -0
- package/dist/abi.js.map +1 -1
- package/dist/chain.d.ts +4 -2
- package/dist/chain.js +4 -2
- package/dist/chain.js.map +1 -1
- package/dist/cli.js +5 -1
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +45 -1
- package/dist/client.js +74 -5
- package/dist/client.js.map +1 -1
- package/dist/errors.js +7 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/odds.d.ts +3 -0
- package/dist/odds.js +3 -0
- package/dist/odds.js.map +1 -1
- package/dist/types.d.ts +116 -0
- package/package.json +1 -1
- package/skill/SKILL.md +2 -1
- package/skill/references/api.md +3 -2
- package/skill/references/rounds.md +47 -0
- package/skill/references/settlement.md +8 -2
- package/skill/references/write-path.md +4 -2
- package/skill/scripts/calls.sh +1 -1
- package/src/abi.ts +1061 -0
- package/src/chain.ts +4 -2
- package/src/cli.ts +6 -1
- package/src/client.ts +76 -6
- package/src/errors.ts +7 -0
- package/src/index.ts +4 -4
- package/src/odds.ts +3 -0
- package/src/types.ts +79 -1
package/README.md
CHANGED
|
@@ -57,9 +57,14 @@ Bring a private key or any viem account as `account`; reads need neither.
|
|
|
57
57
|
| | |
|
|
58
58
|
|---|---|
|
|
59
59
|
| From the API | `calls()` `call()` `bets()` `tape()` `leaderboard()` `player()` `agents()` `proof()` |
|
|
60
|
-
| From the chain | `quote()` `pool()` `status()` `odds()` `payoutOf()` `stake()` `balance()` `isCall()` |
|
|
60
|
+
| From the chain | `quote()` `pool()` `status()` `disputeWindow()` `odds()` `payoutOf()` `stake()` `balance()` `isCall()` |
|
|
61
61
|
| Both | `positions()` `verifySettlement()` |
|
|
62
62
|
| Writes | `bet()` `claim()` `claimOpener()` `finalize()` `dispute()` `open()` |
|
|
63
|
+
| Rounds | `rounds.markets()` `rounds.state()` `rounds.history()` `rounds.bet()` `rounds.claim()` |
|
|
64
|
+
|
|
65
|
+
Rounds are five-minute markets on whether ETH, BTC or SOL goes up or down: `calls.rounds.bet("ETH", "up", ethToWei("0.001"))` stakes on the round taking bets now, and `calls.rounds.claim()` collects everything the wallet is owed. A bet is refused while `rounds.markets()` answers `open: false`, because nothing is pricing rounds and the stake would wait an hour to come back.
|
|
66
|
+
|
|
67
|
+
A Call's result stays open to dispute for `disputeWindow` seconds after it settles: 1 hour on a Price Call, 24 hours on a Post or contract-read Call and on every Call opened on an earlier factory, none on a bond Call. `isCall()` and every write accept Calls of the earlier factories too.
|
|
63
68
|
|
|
64
69
|
The API follows the chain by up to a minute, and the chain reads are current to the block. `quote()` falls back to the API if no RPC endpoint answers.
|
|
65
70
|
|