@dripfi/drip-sdk 1.0.7 → 1.0.8
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 +11 -11
- package/package.json +1 -1
package/README.md
CHANGED
@@ -133,35 +133,35 @@ type SwapInfo = {
|
|
133
133
|
|
134
134
|
## Methods
|
135
135
|
|
136
|
-
-
|
136
|
+
- `getAllVaults(): Promise<Vault[]>`
|
137
137
|
Fetches details of all Drip Vaults.
|
138
138
|
|
139
|
-
-
|
139
|
+
- `getVaultDetails(vaultAddress: string): Promise<Vault> `
|
140
140
|
Fetches details of a specific Drip Vault identified by its address.
|
141
141
|
|
142
|
-
-
|
142
|
+
- `authenticate(): Promise<boolean>`
|
143
143
|
Initiates the user authentication process and returns a boolean indicating success.
|
144
144
|
|
145
|
-
-
|
145
|
+
- `isUserAuthenticated(): Promise<AuthenticationStatus>`
|
146
146
|
Checks if the user is authenticated and returns authentication status along with relevant information.
|
147
147
|
|
148
|
-
-
|
148
|
+
- `updateSigner(newSigner: Signer): Promise<void>`
|
149
149
|
Updates the signer for the SDK instance.
|
150
150
|
|
151
|
-
-
|
151
|
+
- `getUserBalance(vault: Vault): Promise<UserBalance>`
|
152
152
|
Fetches the user's balance for a specific Drip Vault.
|
153
153
|
|
154
|
-
-
|
154
|
+
- `deposit(tokenAddress: string, vaultAddress: string, amount: string): Promise<void>`
|
155
155
|
The deposit function allows you to deposit tokens into a specific vault.
|
156
156
|
|
157
|
-
-
|
157
|
+
- `swapAndDeposit(fromTokenAddress: string, toTokenAddress: string, fromTokenAmount: string, vaultAddress: string, ethAmount?: string): Promise<void>`
|
158
158
|
The swapAndDeposit function allows you to deposit a different token or ether and it will take care of swapping to the correct token before making the deposit
|
159
159
|
|
160
|
-
-
|
160
|
+
- `withdraw(vault: Vault, amountToWithdraw?: string): Promise<void>`
|
161
161
|
Withdraws tokens from a vault. After withdrawing, you must wait for the withdrawal to be processed by the 'DoHardWork' function, and then you can claim those tokens using claimWithdraws()
|
162
162
|
|
163
|
-
-
|
163
|
+
- `claimWithdraws(vaultAddress: string): Promise<void>`
|
164
164
|
After the withdrawal has been processed by the 'DoHardWork' function, the 'claimWithdraws' function transfers the withdrawn tokens to their personal account.
|
165
165
|
|
166
|
-
-
|
166
|
+
- `fastWithdraw(vault: Vault, amountToWithdraw?: string): Promise<void>`
|
167
167
|
For users who prefer not to wait for withdrawals to be processed, there is a Fast Withdrawal method. While this approach is more gas-intensive, as users bear the cost of executing the withdrawal process themselves, it allows for instant access to the withdrawn tokens. When utilizing Fast Withdrawal, users immediately receive the tokens, eliminating the need to initiate the 'claimWithdrawal' process separately.
|