@dripfi/drip-sdk 1.4.34 → 1.4.35-beta
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/PerqApi.js +8 -11
- package/dist/PerqSdk.d.ts +4 -4
- package/dist/PerqSdk.js +66 -48
- package/dist/abi/index.js +17 -22
- package/dist/constants.js +2 -5
- package/dist/contracts/BaseContract.js +3 -6
- package/dist/contracts/BridgeMainnetPerqToSonicContract.js +5 -11
- package/dist/contracts/BridgeSonicPerqToMainnetContract.js +5 -11
- package/dist/contracts/ERC20TokenContract.js +4 -10
- package/dist/contracts/SlotBurnTokenContract.js +5 -11
- package/dist/contracts/index.js +9 -22
- package/dist/contracts/perq/PerqSwapAndRecyclerContract.js +7 -13
- package/dist/contracts/perq/PerqTokenContract.js +5 -11
- package/dist/contracts/perq/PerqTokenRecyclerContract.js +6 -12
- package/dist/contracts/perq/PerqVestingContract.js +5 -11
- package/dist/index.js +7 -28
- package/dist/subpackages/BridgePerqPackage.js +26 -29
- package/dist/subpackages/LitePackage.js +49 -41
- package/dist/subpackages/LoyaltyCardsPackage.js +16 -22
- package/dist/subpackages/PoolsPackage.js +1 -4
- package/dist/subpackages/RecyclerPackage.js +17 -23
- package/dist/subpackages/SignHandlerPackage.js +1 -4
- package/dist/subpackages/SiloPackage.js +3 -6
- package/dist/subpackages/SiloVaultOperations.js +4 -8
- package/dist/subpackages/TokenUtilsPackage.js +14 -20
- package/dist/subpackages/UserPackage.js +1 -4
- package/dist/subpackages/VaultHandlerPackage.js +5 -8
- package/dist/subpackages/VestingPackage.js +5 -8
- package/dist/subpackages/YelayVaultOperations.js +3 -7
- package/dist/types/Asset.js +1 -2
- package/dist/types/BeanEntry.js +1 -2
- package/dist/types/BeansBalance.js +1 -2
- package/dist/types/BridgePerq.js +1 -2
- package/dist/types/ChainId.js +6 -9
- package/dist/types/ClaimSpecialEditionLoyaltyCardPayload.js +1 -2
- package/dist/types/DeployedProject.js +1 -2
- package/dist/types/DeployedVault.js +1 -2
- package/dist/types/DepositToken.js +1 -2
- package/dist/types/DetailedProjectData.js +1 -2
- package/dist/types/DistributionToken.js +1 -2
- package/dist/types/ELoyaltyCardTier.js +1 -3
- package/dist/types/Earnings.js +1 -2
- package/dist/types/LinkWalletPayload.js +1 -2
- package/dist/types/LinkedPodWallets.js +1 -2
- package/dist/types/LoyaltyCard.js +1 -2
- package/dist/types/MigrationOption.js +1 -2
- package/dist/types/MyPerqData.js +1 -2
- package/dist/types/NFTBoost.js +1 -2
- package/dist/types/OverallStats.js +1 -2
- package/dist/types/PerqConfig.js +9 -12
- package/dist/types/PerqToBeansSwapInfo.js +1 -2
- package/dist/types/ProjectHistoricalTvl.js +1 -2
- package/dist/types/QLFastRedeem.js +1 -2
- package/dist/types/ReducedProjectData.js +1 -2
- package/dist/types/SdkType.js +1 -2
- package/dist/types/SignedPayload.js +1 -2
- package/dist/types/SlotMachineSpinCost.js +1 -2
- package/dist/types/SpecialEditionLoyaltyCard.js +1 -2
- package/dist/types/Strategy.js +1 -2
- package/dist/types/StretchGoal.js +1 -2
- package/dist/types/SwapInfo.js +1 -2
- package/dist/types/UpgradeLoyaltyCardPayload.js +1 -2
- package/dist/types/UserRewards.js +1 -2
- package/dist/types/VaultData.js +1 -2
- package/dist/types/VaultOperationParams.js +1 -2
- package/dist/types/VaultReward.js +1 -4
- package/dist/types/VaultStats.js +1 -2
- package/dist/types/VaultType.js +1 -4
- package/dist/types/VestingInfo.js +1 -2
- package/dist/types/YelayVersion.js +1 -2
- package/dist/types/index.js +2 -8
- package/package.json +7 -7
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
class UserPackage {
|
|
1
|
+
export default class UserPackage {
|
|
4
2
|
perqSdk;
|
|
5
3
|
constructor(perqSdk) {
|
|
6
4
|
this.perqSdk = perqSdk;
|
|
@@ -40,4 +38,3 @@ class UserPackage {
|
|
|
40
38
|
return this.perqSdk.perqApi.getPodWallets(walletAddr);
|
|
41
39
|
}
|
|
42
40
|
}
|
|
43
|
-
exports.default = UserPackage;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const SiloVaultOperations_1 = require("./SiloVaultOperations");
|
|
5
|
-
class VaultHandler {
|
|
1
|
+
import { YelayVaultOperations } from './YelayVaultOperations';
|
|
2
|
+
import { SiloVaultOperations } from './SiloVaultOperations';
|
|
3
|
+
export default class VaultHandler {
|
|
6
4
|
perqSdk;
|
|
7
5
|
constructor(perqSdk) {
|
|
8
6
|
this.perqSdk = perqSdk;
|
|
@@ -96,12 +94,11 @@ class VaultHandler {
|
|
|
96
94
|
getSdkHandler(sdkType) {
|
|
97
95
|
switch (sdkType) {
|
|
98
96
|
case 'yelay':
|
|
99
|
-
return new
|
|
97
|
+
return new YelayVaultOperations(this.perqSdk);
|
|
100
98
|
case 'silo':
|
|
101
|
-
return new
|
|
99
|
+
return new SiloVaultOperations(this.perqSdk);
|
|
102
100
|
default:
|
|
103
101
|
throw new Error(`Unsupported SDK type: ${sdkType}`);
|
|
104
102
|
}
|
|
105
103
|
}
|
|
106
104
|
}
|
|
107
|
-
exports.default = VaultHandler;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const utils_1 = require("ethers/lib/utils");
|
|
4
|
-
class VestingPackage {
|
|
1
|
+
import { formatUnits } from 'ethers/lib/utils';
|
|
2
|
+
export default class VestingPackage {
|
|
5
3
|
perqSdk;
|
|
6
4
|
constructor(perqSdk) {
|
|
7
5
|
this.perqSdk = perqSdk;
|
|
@@ -33,7 +31,7 @@ class VestingPackage {
|
|
|
33
31
|
async getVestedAmount(beneficiary) {
|
|
34
32
|
try {
|
|
35
33
|
const vestedAmount = await this.perqSdk.perqVestingContract.vested(beneficiary);
|
|
36
|
-
return
|
|
34
|
+
return formatUnits(vestedAmount, 18);
|
|
37
35
|
}
|
|
38
36
|
catch (error) {
|
|
39
37
|
if (error instanceof Error) {
|
|
@@ -45,7 +43,7 @@ class VestingPackage {
|
|
|
45
43
|
async getReleasableAmount(beneficiary) {
|
|
46
44
|
try {
|
|
47
45
|
const releasableAmount = await this.perqSdk.perqVestingContract.releasable(beneficiary);
|
|
48
|
-
return
|
|
46
|
+
return formatUnits(releasableAmount, 18);
|
|
49
47
|
}
|
|
50
48
|
catch (error) {
|
|
51
49
|
if (error instanceof Error) {
|
|
@@ -57,7 +55,7 @@ class VestingPackage {
|
|
|
57
55
|
async getReleasableTotalAmount(beneficiary) {
|
|
58
56
|
try {
|
|
59
57
|
const releasableTotalAmount = await this.perqSdk.perqVestingContract.releasableTotal(beneficiary);
|
|
60
|
-
return
|
|
58
|
+
return formatUnits(releasableTotalAmount, 18);
|
|
61
59
|
}
|
|
62
60
|
catch (error) {
|
|
63
61
|
if (error instanceof Error) {
|
|
@@ -109,4 +107,3 @@ class VestingPackage {
|
|
|
109
107
|
};
|
|
110
108
|
}
|
|
111
109
|
}
|
|
112
|
-
exports.default = VestingPackage;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.YelayVaultOperations = void 0;
|
|
4
|
-
const ethers_1 = require("ethers");
|
|
5
|
-
class YelayVaultOperations {
|
|
1
|
+
import { BigNumber } from 'ethers';
|
|
2
|
+
export class YelayVaultOperations {
|
|
6
3
|
perqSdk;
|
|
7
4
|
constructor(perqSdk) {
|
|
8
5
|
this.perqSdk = perqSdk;
|
|
@@ -22,7 +19,7 @@ class YelayVaultOperations {
|
|
|
22
19
|
}
|
|
23
20
|
case 'swap': {
|
|
24
21
|
const allowanceString = await this.perqSdk.lite.getSwapAndDepositAllowance(sourceTokenAddress);
|
|
25
|
-
allowance =
|
|
22
|
+
allowance = BigNumber.from(allowanceString);
|
|
26
23
|
break;
|
|
27
24
|
}
|
|
28
25
|
case 'wrap': {
|
|
@@ -104,4 +101,3 @@ class YelayVaultOperations {
|
|
|
104
101
|
return 'swap';
|
|
105
102
|
}
|
|
106
103
|
}
|
|
107
|
-
exports.YelayVaultOperations = YelayVaultOperations;
|
package/dist/types/Asset.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/dist/types/BeanEntry.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/dist/types/BridgePerq.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/dist/types/ChainId.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
exports.ARBITRUM_CHAIN_ID = 42161;
|
|
8
|
-
exports.SONIC_CHAIN_ID = 146;
|
|
9
|
-
exports.AVALANCHE_CHAIN_ID = 43114;
|
|
1
|
+
export const BASE_CHAIN_ID = 8453;
|
|
2
|
+
export const ETHEREUM_CHAIN_ID = 1;
|
|
3
|
+
export const ETHEREUM_SEPOLIA_CHAIN_ID = 11155111;
|
|
4
|
+
export const ARBITRUM_CHAIN_ID = 42161;
|
|
5
|
+
export const SONIC_CHAIN_ID = 146;
|
|
6
|
+
export const AVALANCHE_CHAIN_ID = 43114;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
1
|
var ELoyaltyCardTier;
|
|
4
2
|
(function (ELoyaltyCardTier) {
|
|
5
3
|
ELoyaltyCardTier["White"] = "White";
|
|
@@ -10,4 +8,4 @@ var ELoyaltyCardTier;
|
|
|
10
8
|
ELoyaltyCardTier["Umber"] = "Umber";
|
|
11
9
|
ELoyaltyCardTier["Black"] = "Black";
|
|
12
10
|
})(ELoyaltyCardTier || (ELoyaltyCardTier = {}));
|
|
13
|
-
|
|
11
|
+
export default ELoyaltyCardTier;
|
package/dist/types/Earnings.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/dist/types/MyPerqData.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/dist/types/NFTBoost.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/dist/types/PerqConfig.js
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
ChainId_1.SONIC_CHAIN_ID,
|
|
9
|
-
ChainId_1.ARBITRUM_CHAIN_ID,
|
|
10
|
-
ChainId_1.AVALANCHE_CHAIN_ID,
|
|
1
|
+
import { ARBITRUM_CHAIN_ID, AVALANCHE_CHAIN_ID, BASE_CHAIN_ID, ETHEREUM_CHAIN_ID, SONIC_CHAIN_ID } from './ChainId';
|
|
2
|
+
export const PERQ_SUPPORTED_CHAIN_IDS = [
|
|
3
|
+
ETHEREUM_CHAIN_ID,
|
|
4
|
+
BASE_CHAIN_ID,
|
|
5
|
+
SONIC_CHAIN_ID,
|
|
6
|
+
ARBITRUM_CHAIN_ID,
|
|
7
|
+
AVALANCHE_CHAIN_ID,
|
|
11
8
|
];
|
|
12
|
-
|
|
9
|
+
export const PRODUCTION = {
|
|
13
10
|
route: 'https://perq.finance',
|
|
14
11
|
perqTokenAddress: '0x2a414884a549ef5716bc1a4e648d3dc03f08b2cf',
|
|
15
12
|
perqTokenRecyclerAddress: '0x2fdcdb17799557dce6f26921f12b7fa1dbcd79fa',
|
|
@@ -22,7 +19,7 @@ exports.PRODUCTION = {
|
|
|
22
19
|
bridgeSonicPerqToMainnetAddress: '0x26c352304909CC7e59EEeD39242Eb7AFbC706Ad3',
|
|
23
20
|
slotBurnTokenAddress: '0x71516ba944af3f2342da97519205f4fb9e51ad36',
|
|
24
21
|
};
|
|
25
|
-
|
|
22
|
+
export const DEVELOPMENT = {
|
|
26
23
|
route: 'https://dev.perq.finance',
|
|
27
24
|
perqTokenAddress: '0x707b4cc05645713d8ea04fbc7192a0f2c1503d6e',
|
|
28
25
|
perqTokenRecyclerAddress: '0x07f2264e199d62afe07e8288ec9d36d155fc3f24',
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/dist/types/SdkType.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/dist/types/Strategy.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/dist/types/SwapInfo.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/dist/types/VaultData.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/dist/types/VaultStats.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/dist/types/VaultType.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/dist/types/index.js
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ELoyaltyCardTier = void 0;
|
|
7
|
-
const ELoyaltyCardTier_1 = __importDefault(require("./ELoyaltyCardTier"));
|
|
8
|
-
exports.ELoyaltyCardTier = ELoyaltyCardTier_1.default;
|
|
1
|
+
import ELoyaltyCardTier from './ELoyaltyCardTier';
|
|
2
|
+
export { ELoyaltyCardTier, };
|
package/package.json
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dripfi/drip-sdk",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.35-beta",
|
|
4
4
|
"description": "Drip SDK",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"prepublish": "npm run build",
|
|
9
9
|
"build": "tsc",
|
|
10
|
-
"publish": "npm publish --access public",
|
|
11
10
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
11
|
"lint": "eslint src",
|
|
13
12
|
"pretty": "prettier --write \"./**/*.{js,jsx,mjs,cjs,ts,tsx,json}\""
|
|
14
13
|
},
|
|
15
14
|
"dependencies": {
|
|
16
15
|
"@dripfi/silo-sdk": "^0.0.1",
|
|
17
|
-
"@
|
|
16
|
+
"@gud/drift-ethers-v5": "^1.0.2",
|
|
17
|
+
"@yelay-lite/sdk": "^2.0.0-beta.1",
|
|
18
18
|
"ethers": "^5.7.2"
|
|
19
19
|
},
|
|
20
20
|
"author": "",
|
|
21
21
|
"license": "ISC",
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"
|
|
23
|
+
"@stylistic/eslint-plugin-ts": "^2.12.1",
|
|
24
24
|
"eslint": "^9.17.0",
|
|
25
|
-
"typescript": "^5.4.5",
|
|
26
|
-
"prettier-eslint": "^16.3.0",
|
|
27
25
|
"prettier": "^3.4.2",
|
|
28
|
-
"
|
|
26
|
+
"prettier-eslint": "^16.3.0",
|
|
27
|
+
"typescript": "^5.4.5",
|
|
28
|
+
"typescript-eslint": "^8.19.1"
|
|
29
29
|
}
|
|
30
30
|
}
|