@noosphere/contracts 0.2.0-alpha.1 → 0.2.1-alpha.1
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 -5
- package/dist/index.cjs +1480 -655
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2003 -1029
- package/dist/index.d.ts +2003 -1029
- package/dist/index.js +1480 -656
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
- package/src/abis/Coordinator.abi.json +25 -120
- package/src/abis/IRouter.abi.json +739 -0
- package/src/abis/Router.abi.json +225 -42
- package/src/abis/SubscriptionBatchReader.abi.json +1 -11
- package/src/abis/Wallet.abi.json +13 -78
package/README.md
CHANGED
|
@@ -34,9 +34,10 @@ const coordinator = new CoordinatorContract(
|
|
|
34
34
|
const subscription = await router.getComputeSubscription(1n);
|
|
35
35
|
console.log('Subscription:', subscription);
|
|
36
36
|
|
|
37
|
-
// Check
|
|
38
|
-
const
|
|
39
|
-
|
|
37
|
+
// Check if request has commitment
|
|
38
|
+
const commitmentHash = await coordinator.requestCommitments('0x123...');
|
|
39
|
+
const hasCommitment = commitmentHash !== '0x' + '0'.repeat(64);
|
|
40
|
+
console.log('Has commitment:', hasCommitment);
|
|
40
41
|
```
|
|
41
42
|
|
|
42
43
|
### SubscriptionBatchReader
|
|
@@ -137,8 +138,7 @@ console.log('Transaction confirmed:', tx.hash);
|
|
|
137
138
|
|
|
138
139
|
**Read Methods:**
|
|
139
140
|
- `getCommitment(subscriptionId, interval)` - Get commitment
|
|
140
|
-
- `
|
|
141
|
-
- `requestCommitments(requestId)` - Get request ID
|
|
141
|
+
- `requestCommitments(requestId)` - Get commitment hash for request
|
|
142
142
|
|
|
143
143
|
**Write Methods:**
|
|
144
144
|
- `startRequest(...)` - Start new request
|