@dripfi/drip-sdk 1.0.0 → 1.0.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/DripApi.d.ts +19 -0
- package/dist/DripApi.js +139 -0
- package/dist/DripConfig.d.ts +11 -0
- package/dist/DripConfig.js +42 -0
- package/dist/DripSdk.d.ts +36 -0
- package/dist/DripSdk.js +457 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +10 -0
- package/dist/types/QLFastRedeem.d.ts +15 -0
- package/dist/types/QLFastRedeem.js +2 -0
- package/dist/types/SwapInfo.d.ts +5 -0
- package/dist/types/SwapInfo.js +2 -0
- package/dist/types/UserBalance.d.ts +7 -0
- package/dist/types/UserBalance.js +2 -0
- package/dist/types/Vault.d.ts +66 -0
- package/dist/types/Vault.js +2 -0
- package/dist/utils.d.ts +1 -0
- package/dist/utils.js +14 -0
- package/package.json +11 -5
- package/DripApi.ts +0 -133
- package/DripConfig.ts +0 -38
- package/DripSdk.ts +0 -516
- package/index.ts +0 -5
- package/types/QLFastRedeem.ts +0 -15
- package/types/SwapInfo.ts +0 -5
- package/types/UserBalance.ts +0 -7
- package/types/Vault.ts +0 -68
- package/utils.ts +0 -12
package/types/QLFastRedeem.ts
DELETED
package/types/SwapInfo.ts
DELETED
package/types/UserBalance.ts
DELETED
package/types/Vault.ts
DELETED
@@ -1,68 +0,0 @@
|
|
1
|
-
export type Vault = {
|
2
|
-
vaultName: string
|
3
|
-
vaultAddress: string
|
4
|
-
apy: number
|
5
|
-
tvr: number
|
6
|
-
protocols: string[]
|
7
|
-
projectName: string
|
8
|
-
depositToken: VaultDepositToken
|
9
|
-
type: VaultType
|
10
|
-
rewards: VaultReward[]
|
11
|
-
liveUntil: string
|
12
|
-
liveUntilFormatted: string
|
13
|
-
hasPoolEnded: boolean
|
14
|
-
boosters: NFTBoost[]
|
15
|
-
stretchGoals: StretchGoal[]
|
16
|
-
strategies: Strategy[]
|
17
|
-
newWithdraw: boolean
|
18
|
-
tgePrice?: number
|
19
|
-
maxAmountOfTokens?: number,
|
20
|
-
rewardsInformation: RewardsInformation
|
21
|
-
}
|
22
|
-
|
23
|
-
export type VaultType = 'launch' | 'earn' | 'airdrop'
|
24
|
-
|
25
|
-
export type VaultDepositToken = {
|
26
|
-
name: string
|
27
|
-
symbol: string
|
28
|
-
roundingDecimals: number
|
29
|
-
precisionDecimals: number
|
30
|
-
tokenAddress: string
|
31
|
-
}
|
32
|
-
|
33
|
-
export type VaultReward = {
|
34
|
-
type: 'token' | 'points'
|
35
|
-
name: string
|
36
|
-
symbol: string
|
37
|
-
decimals: number
|
38
|
-
tokenAddress: string
|
39
|
-
monthlyEmissionRate?: number
|
40
|
-
}
|
41
|
-
|
42
|
-
export type NFTBoost = {
|
43
|
-
url: string
|
44
|
-
tokenAddress: string
|
45
|
-
multiplier: number
|
46
|
-
nftAddress: string
|
47
|
-
network: string
|
48
|
-
initialBlock: number // needs to be the block when rewards was deployed
|
49
|
-
imagePath: string
|
50
|
-
}
|
51
|
-
|
52
|
-
export interface StretchGoal {
|
53
|
-
threshhold: number
|
54
|
-
threshholdDescription: string
|
55
|
-
rewardTooltip: string
|
56
|
-
rewardDescription: string
|
57
|
-
amountOfTokens: number
|
58
|
-
}
|
59
|
-
|
60
|
-
export type RewardsInformation = {
|
61
|
-
[tokenAddress: string]: { blockNumber: string, rewardrate: string, timestamp: string, endTime: string }
|
62
|
-
}
|
63
|
-
|
64
|
-
export type Strategy = {
|
65
|
-
address: string
|
66
|
-
lastDoHardWorkTime: number | null
|
67
|
-
lastDoHardWorkBlock: number | null
|
68
|
-
}
|
package/utils.ts
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
|
2
|
-
export function insertDot(numberString: string, decimals: number) {
|
3
|
-
if (numberString.length < decimals + 1) {
|
4
|
-
numberString = '0'.repeat(decimals + 1 - numberString.length) + numberString
|
5
|
-
}
|
6
|
-
const indexToInsertDot = numberString.length - decimals
|
7
|
-
// Ensure there is a part before the dot, even if it's 0
|
8
|
-
const beforeDecimal = indexToInsertDot > 0 ? numberString.slice(0, indexToInsertDot) : '0'
|
9
|
-
const afterDecimal = numberString.slice(indexToInsertDot)
|
10
|
-
return `${beforeDecimal}.${afterDecimal}`
|
11
|
-
}
|
12
|
-
|