@aurigami/sdk 1.5.0-dummy-1 → 1.5.0-dummy-2
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/Papermill.d.ts +1 -1
- package/dist/sdk.cjs.development.js +41 -22
- 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 +41 -22
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +3 -3
- package/src/Papermill.ts +8 -7
package/dist/Papermill.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare class PapermillRead extends BlockchainEntityRead {
|
|
|
17
17
|
getPulpBalance(userAddress: Address): Promise<TokenAmount>;
|
|
18
18
|
getUnclaimedPlyReward(userAddress: Address): Promise<TokenAmount>;
|
|
19
19
|
getLockingDetails(userAddress: Address): Promise<UserLockingDetails>;
|
|
20
|
-
getTimestampToUnlock(userAddress: Address, targetUnlockPortion: number): number
|
|
20
|
+
getTimestampToUnlock(userAddress: Address, targetUnlockPortion: number): Promise<number>;
|
|
21
21
|
}
|
|
22
22
|
export declare class PapermillReadWrite extends PapermillRead {
|
|
23
23
|
constructor(networkConnection: NetworkConnection);
|
|
@@ -3557,15 +3557,34 @@ var PapermillRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
3557
3557
|
return getLockingDetails;
|
|
3558
3558
|
}();
|
|
3559
3559
|
|
|
3560
|
-
_proto.getTimestampToUnlock = function
|
|
3561
|
-
var
|
|
3560
|
+
_proto.getTimestampToUnlock = /*#__PURE__*/function () {
|
|
3561
|
+
var _getTimestampToUnlock = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5(userAddress, targetUnlockPortion) {
|
|
3562
|
+
var weekId;
|
|
3563
|
+
return runtime_1.wrap(function _callee5$(_context5) {
|
|
3564
|
+
while (1) {
|
|
3565
|
+
switch (_context5.prev = _context5.next) {
|
|
3566
|
+
case 0:
|
|
3567
|
+
_context5.next = 2;
|
|
3568
|
+
return this._auriLens.getWeekToUnlock(this._pulp.address, userAddress, targetUnlockPortion * 100);
|
|
3562
3569
|
|
|
3563
|
-
|
|
3564
|
-
|
|
3570
|
+
case 2:
|
|
3571
|
+
weekId = _context5.sent;
|
|
3572
|
+
return _context5.abrupt("return", REWARD_CLAIM_START + ONE_WEEK * weekId.toNumber());
|
|
3573
|
+
|
|
3574
|
+
case 4:
|
|
3575
|
+
case "end":
|
|
3576
|
+
return _context5.stop();
|
|
3577
|
+
}
|
|
3578
|
+
}
|
|
3579
|
+
}, _callee5, this);
|
|
3580
|
+
}));
|
|
3581
|
+
|
|
3582
|
+
function getTimestampToUnlock(_x5, _x6) {
|
|
3583
|
+
return _getTimestampToUnlock.apply(this, arguments);
|
|
3565
3584
|
}
|
|
3566
3585
|
|
|
3567
|
-
return
|
|
3568
|
-
};
|
|
3586
|
+
return getTimestampToUnlock;
|
|
3587
|
+
}();
|
|
3569
3588
|
|
|
3570
3589
|
return PapermillRead;
|
|
3571
3590
|
}(BlockchainEntityRead);
|
|
@@ -3579,22 +3598,22 @@ var PapermillReadWrite = /*#__PURE__*/function (_PapermillRead) {
|
|
|
3579
3598
|
var _proto2 = PapermillReadWrite.prototype;
|
|
3580
3599
|
|
|
3581
3600
|
_proto2.redeem = /*#__PURE__*/function () {
|
|
3582
|
-
var _redeem = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function
|
|
3583
|
-
return runtime_1.wrap(function
|
|
3601
|
+
var _redeem = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(recipient, amount) {
|
|
3602
|
+
return runtime_1.wrap(function _callee6$(_context6) {
|
|
3584
3603
|
while (1) {
|
|
3585
|
-
switch (
|
|
3604
|
+
switch (_context6.prev = _context6.next) {
|
|
3586
3605
|
case 0:
|
|
3587
|
-
return
|
|
3606
|
+
return _context6.abrupt("return", this._pulp.connect(this._networkConnection.signer).redeem(recipient, amount.rawAmount()));
|
|
3588
3607
|
|
|
3589
3608
|
case 1:
|
|
3590
3609
|
case "end":
|
|
3591
|
-
return
|
|
3610
|
+
return _context6.stop();
|
|
3592
3611
|
}
|
|
3593
3612
|
}
|
|
3594
|
-
},
|
|
3613
|
+
}, _callee6, this);
|
|
3595
3614
|
}));
|
|
3596
3615
|
|
|
3597
|
-
function redeem(
|
|
3616
|
+
function redeem(_x7, _x8) {
|
|
3598
3617
|
return _redeem.apply(this, arguments);
|
|
3599
3618
|
}
|
|
3600
3619
|
|
|
@@ -3602,28 +3621,28 @@ var PapermillReadWrite = /*#__PURE__*/function (_PapermillRead) {
|
|
|
3602
3621
|
}();
|
|
3603
3622
|
|
|
3604
3623
|
_proto2.selfRedeem = /*#__PURE__*/function () {
|
|
3605
|
-
var _selfRedeem = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function
|
|
3624
|
+
var _selfRedeem = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(amount) {
|
|
3606
3625
|
var msgSender;
|
|
3607
|
-
return runtime_1.wrap(function
|
|
3626
|
+
return runtime_1.wrap(function _callee7$(_context7) {
|
|
3608
3627
|
while (1) {
|
|
3609
|
-
switch (
|
|
3628
|
+
switch (_context7.prev = _context7.next) {
|
|
3610
3629
|
case 0:
|
|
3611
|
-
|
|
3630
|
+
_context7.next = 2;
|
|
3612
3631
|
return this._networkConnection.signer.getAddress();
|
|
3613
3632
|
|
|
3614
3633
|
case 2:
|
|
3615
|
-
msgSender =
|
|
3616
|
-
return
|
|
3634
|
+
msgSender = _context7.sent;
|
|
3635
|
+
return _context7.abrupt("return", this.redeem(msgSender, amount));
|
|
3617
3636
|
|
|
3618
3637
|
case 4:
|
|
3619
3638
|
case "end":
|
|
3620
|
-
return
|
|
3639
|
+
return _context7.stop();
|
|
3621
3640
|
}
|
|
3622
3641
|
}
|
|
3623
|
-
},
|
|
3642
|
+
}, _callee7, this);
|
|
3624
3643
|
}));
|
|
3625
3644
|
|
|
3626
|
-
function selfRedeem(
|
|
3645
|
+
function selfRedeem(_x9) {
|
|
3627
3646
|
return _selfRedeem.apply(this, arguments);
|
|
3628
3647
|
}
|
|
3629
3648
|
|