@argonprotocol/mainchain 1.1.0 → 1.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 CHANGED
@@ -32,14 +32,9 @@ Or you can subscribe to changes (for instance, to track a series of valid cpi ad
32
32
  ```javascript
33
33
  const { WageProtector } = require('@argonprotocol/mainchain');
34
34
  const basePrice = 1_000_000n; // 1 Argon
35
- const { unsubscribe } = await WageProtector.subscribe(
36
- client,
37
- protectedPrice => {
38
- console.log(
39
- `Protected price: ${protectedPrice.getProtectedWage(basePrice)}`,
40
- );
41
- },
42
- );
35
+ const { unsubscribe } = await WageProtector.subscribe(client, protectedPrice => {
36
+ console.log(`Protected price: ${protectedPrice.getProtectedWage(basePrice)}`);
37
+ });
43
38
  ```
44
39
 
45
40
  Each `WageProtector` instance has the details of the Argon Target Price and USD price at the time of creation.
@@ -111,7 +106,7 @@ import { CohortBidder } from '@argonprotocol/mainchain';
111
106
 
112
107
  // on new bidding
113
108
  const subaccounts = await accountset.getAvailableMinerAccounts(5);
114
- const cohortBidder = new CohortBidder(accountset, cohortId, subaccounts, {
109
+ const cohortBidder = new CohortBidder(accountset, cohortFrameId, subaccounts, {
115
110
  maxSeats: 5,
116
111
  // a budget not to exceed
117
112
  maxBudget: 100_000_000,
@@ -133,10 +128,10 @@ import { MiningBids } from '@argonprotocol/mainchain';
133
128
 
134
129
  const miningBids = new MiningBids(client);
135
130
  const { unsubscribe } = await miningBids.onCohortChange({
136
- async onBiddingStart(cohortId) {
131
+ async onBiddingStart(cohortFrameId) {
137
132
  // ...
138
133
  },
139
- async onBiddingEnd(cohortId) {
134
+ async onBiddingEnd(cohortFrameId) {
140
135
  // ...
141
136
  },
142
137
  });