@dripfi/drip-sdk 1.4.3-yelay-lite-2 → 1.4.3-yelay-lite-4
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 +220 -44
- package/dist/PerqApi.d.ts +10 -9
- package/dist/PerqApi.js +36 -36
- package/dist/PerqSdk.d.ts +32 -83
- package/dist/PerqSdk.js +47 -581
- package/dist/abi/ERC20.json +222 -0
- package/dist/contracts/ERC20TokenContract.d.ts +10 -0
- package/dist/contracts/ERC20TokenContract.js +34 -0
- package/dist/contracts/PerqSwapAndRecyclerContract.d.ts +3 -2
- package/dist/contracts/PerqSwapAndRecyclerContract.js +2 -2
- package/dist/contracts/PerqTokenRecyclerContract.d.ts +3 -2
- package/dist/contracts/PerqTokenRecyclerContract.js +2 -2
- package/dist/contracts/PerqVestingContract.d.ts +3 -2
- package/dist/contracts/PerqVestingContract.js +2 -2
- package/dist/subpackages/LitePackage.d.ts +13 -0
- package/dist/subpackages/LitePackage.js +88 -0
- package/dist/subpackages/LoyaltyCardsPackage.d.ts +12 -0
- package/dist/subpackages/LoyaltyCardsPackage.js +34 -0
- package/dist/subpackages/PoolsPackage.d.ts +16 -0
- package/dist/subpackages/PoolsPackage.js +52 -0
- package/dist/subpackages/RecyclerPackage.d.ts +13 -0
- package/dist/subpackages/RecyclerPackage.js +87 -0
- package/dist/subpackages/SignHandlerPackage.d.ts +8 -0
- package/dist/subpackages/SignHandlerPackage.js +33 -0
- package/dist/subpackages/TokenUtilsPackage.d.ts +13 -0
- package/dist/subpackages/TokenUtilsPackage.js +66 -0
- package/dist/subpackages/UserPackage.d.ts +7 -0
- package/dist/subpackages/UserPackage.js +23 -0
- package/dist/subpackages/V2Package.d.ts +24 -0
- package/dist/subpackages/V2Package.js +207 -0
- package/dist/subpackages/VestingPackage.d.ts +14 -0
- package/dist/subpackages/VestingPackage.js +112 -0
- package/dist/types/ChainId.d.ts +5 -0
- package/dist/types/ChainId.js +7 -0
- package/dist/types/DetailedProjectData.d.ts +8 -7
- package/dist/types/VaultData.d.ts +2 -0
- package/dist/types/index.d.ts +1 -2
- package/dist/utils/chains.d.ts +1 -0
- package/dist/utils/chains.js +2 -1
- package/package.json +2 -2
- package/dist/types/YelayLiteVault.d.ts +0 -11
- package/dist/types/YelayLiteVault.js +0 -2
package/dist/PerqSdk.d.ts
CHANGED
@@ -1,87 +1,36 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import
|
4
|
-
import
|
1
|
+
import { Signer, ethers } from 'ethers';
|
2
|
+
import { PerqConfig } from './types';
|
3
|
+
import PerqApi from './PerqApi';
|
4
|
+
import { PerqSwapAndRecyclerContract, PerqTokenRecyclerContract, PerqVestingContract } from './contracts';
|
5
|
+
import VestingPackage from './subpackages/VestingPackage';
|
6
|
+
import LitePackage from './subpackages/LitePackage';
|
7
|
+
import V2Package from './subpackages/V2Package';
|
8
|
+
import RecyclerPackage from './subpackages/RecyclerPackage';
|
9
|
+
import LoyaltyCardsPackage from './subpackages/LoyaltyCardsPackage';
|
10
|
+
import { YelayLiteSdk } from '@yelay-lite/sdk';
|
11
|
+
import TokenUtilsPackage from './subpackages/TokenUtilsPackage';
|
12
|
+
import UserPackage from './subpackages/UserPackage';
|
13
|
+
import SignHandlerPackage from './subpackages/SignHandlerPackage';
|
14
|
+
import PoolsPackage from './subpackages/PoolsPackage';
|
15
|
+
import { SpoolSdk } from '@spool.fi/spool-v2-sdk';
|
5
16
|
export default class PerqSdk {
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
17
|
+
perqApi: PerqApi;
|
18
|
+
signer?: Signer;
|
19
|
+
lite: LitePackage;
|
20
|
+
v2: V2Package;
|
21
|
+
vesting: VestingPackage;
|
22
|
+
recycler: RecyclerPackage;
|
23
|
+
loyaltyCards: LoyaltyCardsPackage;
|
24
|
+
tokenUtils: TokenUtilsPackage;
|
25
|
+
user: UserPackage;
|
26
|
+
signHandler: SignHandlerPackage;
|
27
|
+
pools: PoolsPackage;
|
28
|
+
perqConfig: PerqConfig;
|
29
|
+
yelayLiteSdk?: YelayLiteSdk;
|
30
|
+
spoolSdk?: SpoolSdk;
|
31
|
+
perqVestingContract: PerqVestingContract;
|
32
|
+
perqTokenRecyclerContract: PerqTokenRecyclerContract;
|
33
|
+
perqSwapAndRecyclerContract: PerqSwapAndRecyclerContract;
|
15
34
|
constructor(perqConfig: PerqConfig, provider?: ethers.providers.JsonRpcProvider);
|
16
|
-
getAllProjects(): Promise<ReducedProjectData[]>;
|
17
|
-
getProjectDetails(projectName: string): Promise<DetailedProjectData>;
|
18
|
-
getAllVaults(): Promise<VaultData[]>;
|
19
|
-
getV2VaultDetails(vaultAddress: string): Promise<VaultData>;
|
20
|
-
getLiteVaultDetails(vaultAddress: string, onChainProjectId: number): Promise<VaultData>;
|
21
|
-
getVaultStats(): Promise<VaultStats>;
|
22
|
-
getTokenPrice(tokenName: string): Promise<number>;
|
23
35
|
updateSigner(newSigner: Signer): Promise<void>;
|
24
|
-
yelayLiteDeposit(tokenAddress: string, vaultAddress: string, onChainProjectId: number, amount: string): Promise<string>;
|
25
|
-
newDeposit(tokenAddress: string, vaultAddress: string, amount: string): Promise<string>;
|
26
|
-
deposit(tokenAddress: string, vaultAddress: string, amount: string): Promise<string>;
|
27
|
-
private doDeposit;
|
28
|
-
getTokenAllowanceForCurrency(tokenAddress: string): Promise<string>;
|
29
|
-
getSwapAndDepositTokenAllowanceForCurrency(tokenAddress: string): Promise<string>;
|
30
|
-
getTokenAllowanceForRecycler(tokenAddress: string): Promise<BigNumber>;
|
31
|
-
getTokenAllowanceForSwapAndRecycler(tokenAddress: string): Promise<BigNumber>;
|
32
|
-
getExpectedSwapResult(fromTokenAddress: string, toTokenAddress: string, amount: string, decimals: number): Promise<string>;
|
33
|
-
getExpectedYelayLiteSwapResult(fromTokenAddress: string, toTokenAddress: string, amount: string, decimals: number): Promise<string>;
|
34
|
-
getUserBoostedNfts(vaultAddress: string): Promise<string[]>;
|
35
|
-
getRewardsPerHour(vaultAddress: string): Promise<number>;
|
36
|
-
getRewards(): Promise<UserRewards>;
|
37
|
-
getMyPerqBalance(): Promise<MyPerqData[]>;
|
38
|
-
getYelayLiteUserVaultBalance(vaultAddress: string, onChainProjectId: number): Promise<UserVaultBalance>;
|
39
|
-
getUserVaultBalance(vaultAddress: string): Promise<UserVaultBalance>;
|
40
|
-
fastWithdraw(vaultAddress: string, amountToWithdraw?: string): Promise<string>;
|
41
|
-
swapAndDeposit(fromTokenAddress: string, toTokenAddress: string, fromTokenAmount: string, vaultAddress: string, ethAmount?: string): Promise<string>;
|
42
|
-
newSwapAndDeposit(fromTokenAddress: string, toTokenAddress: string, fromTokenAmount: string, vaultAddress: string, ethAmount?: string): Promise<string>;
|
43
|
-
private doSwapAndDeposit;
|
44
|
-
withdraw(vaultAddress: string, amountToWithdraw?: string): Promise<string>;
|
45
|
-
getYelayLiteSwapAndDepositAllowance(tokenAddress: string): Promise<string>;
|
46
|
-
approveYelayLiteSwapAndDeposit(tokenAddress: string, amount: string): Promise<string>;
|
47
|
-
yelayLiteSwapAndDeposit(fromTokenAddress: string, toTokenAddress: string, amount: string, vaultAddress: string, projectId: number): Promise<string>;
|
48
|
-
yelayLiteWithdraw(tokenAddress: string, vaultAddress: string, onChainProjectId: number, amount: string): Promise<string>;
|
49
|
-
claimWithdraws(vaultAddress: string): Promise<string>;
|
50
|
-
getBeansBalance(): Promise<BeansBalance>;
|
51
|
-
getBeansHistory(): Promise<BeanEntry[]>;
|
52
|
-
recycleTokens(tokenAddress: string | undefined, amountToRecycle: string, beneficiary: string | undefined, price: string, deadline: string, signature: string): Promise<string>;
|
53
|
-
swapAndRecycleETH(beneficiary: string, path: string[], minAmountOutWithDecimals: string, amountOfEth: string, price: string, deadline: string, signature: string): Promise<string>;
|
54
|
-
swapAndRecycleERC20(beneficiary: string, path: string[], minAmountOutWithDecimals: string, amountInWithDecimals: string, price: string, deadline: string, signature: string): Promise<string>;
|
55
|
-
upgradeLoyaltyCard(index: number): Promise<LoyaltyCard>;
|
56
|
-
getOwnedLoyaltyCard(): Promise<LoyaltyCard>;
|
57
|
-
getAllLoyaltyCards(): Promise<LoyaltyCard[]>;
|
58
|
-
approveTokenForRecycler(tokenAddress: string, amount: string): Promise<string>;
|
59
|
-
approveTokenForSwapAndRecycler(tokenAddress: string, amount: string): Promise<string>;
|
60
|
-
approveTokenForSwapAndDeposit(tokenAddress: string, amount: string): Promise<string>;
|
61
|
-
approveTokenForDeposit(tokenAddress: string, amount: string): Promise<string>;
|
62
|
-
getPerqTokenContractAddress(): string;
|
63
|
-
getSwapPerqForBeansInfo(): Promise<PerqToBeansSwapInfo>;
|
64
|
-
getAllowance(tokenAddress: string, spender: string): Promise<string>;
|
65
|
-
approveAllowance(tokenAddress: string, amount: string, spenderAddress: string): Promise<string>;
|
66
|
-
transferErc20Token(tokenAddress: string, amount: string, receiver: string): Promise<string>;
|
67
|
-
wrapEther(amount: string, tokenAddress: string): Promise<string>;
|
68
|
-
getVestingStart(): Promise<string>;
|
69
|
-
getVestingEnd(): Promise<string>;
|
70
|
-
getVestedAmount(beneficiary: string): Promise<string>;
|
71
|
-
getReleasableAmount(beneficiary: string): Promise<string>;
|
72
|
-
getReleasableTotalAmount(beneficiary: string): Promise<string>;
|
73
|
-
getAllVestingInfo(beneficiaryAddress: string): Promise<VestingInfo>;
|
74
|
-
claimVestedPerq(amount: string): Promise<string>;
|
75
|
-
burnVestedPerq(amount: string, price: string, deadline: string, signature: string): Promise<string>;
|
76
|
-
linkSuiWalletWithEthWallet(suiWalletAddress: string): Promise<boolean>;
|
77
|
-
getLinkedSuiWallet(): Promise<string>;
|
78
|
-
signPayload<T>(payload: T): Promise<NonceEnrichedSignedPayload<T>>;
|
79
|
-
private getEnrichedPayload;
|
80
|
-
private generateRedeemBagStruct;
|
81
|
-
private getERC20Precission;
|
82
|
-
private getTokenAllowanceForDeposit;
|
83
|
-
private getTokenAllowanceForSwapAndDeposit;
|
84
|
-
getERC20TokenAllowance(spender: string, tokenAddress: string): Promise<BigNumber>;
|
85
|
-
approveToken(tokenAddress: string, amount: string, spender: string): Promise<string>;
|
86
|
-
yelayLiteWrapAndDepositEth(vaultAddress: string, onChainProjectId: number, amount: string): Promise<any>;
|
87
36
|
}
|