@aurigami/sdk 1.5.7 → 1.5.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/dist/SDK.d.ts +1 -0
- package/dist/sdk.cjs.development.js +54 -18
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +54 -18
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/SDK.ts +11 -5
package/package.json
CHANGED
package/src/SDK.ts
CHANGED
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
ALL_STAKING_POOLS,
|
|
16
16
|
BORROW_LIMIT_BUFFER,
|
|
17
17
|
DECIMAL_PRECISION,
|
|
18
|
+
INF,
|
|
18
19
|
networkAddresses,
|
|
19
20
|
} from './constants';
|
|
20
21
|
import { decimalFactor, isSameAddress } from './helpers';
|
|
@@ -319,15 +320,20 @@ export class SdkReadWrite extends SdkRead {
|
|
|
319
320
|
* Claim PLY reward in all markets + staking pools
|
|
320
321
|
*/
|
|
321
322
|
public async claim(): Promise<TransactionResponse> {
|
|
322
|
-
return this.
|
|
323
|
+
return this._comptroller
|
|
323
324
|
.connect(this._networkConnection.signer!)
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
this.
|
|
327
|
-
ALL_STAKING_POOLS
|
|
325
|
+
['claimReward(uint8,address)'](
|
|
326
|
+
0,
|
|
327
|
+
await this._networkConnection.signer!.getAddress()
|
|
328
328
|
);
|
|
329
329
|
}
|
|
330
330
|
|
|
331
|
+
public async claimLpRewards(): Promise<TransactionResponse> {
|
|
332
|
+
return this._auriFairLaunch
|
|
333
|
+
.connect(this._networkConnection.signer!)
|
|
334
|
+
.harvest(await this._networkConnection.signer!.getAddress(), 0, INF);
|
|
335
|
+
}
|
|
336
|
+
|
|
331
337
|
public async stake(amount: TokenAmount): Promise<TransactionResponse> {
|
|
332
338
|
return new StakingReadWrite(this._networkConnection).stake(amount);
|
|
333
339
|
}
|