@oceanprotocol/lib 2.0.0-next.2 → 2.0.0-next.3
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/CHANGELOG.md +7 -0
- package/dist/lib.js +1 -1
- package/dist/lib.js.map +1 -1
- package/dist/lib.modern.js +1 -1
- package/dist/lib.modern.js.map +1 -1
- package/dist/lib.module.js +1 -1
- package/dist/lib.module.js.map +1 -1
- package/dist/lib.umd.js +1 -1
- package/dist/lib.umd.js.map +1 -1
- package/dist/src/contracts/df/DfRewards.d.ts +32 -0
- package/dist/src/contracts/df/DfStrategyV1.d.ts +23 -0
- package/dist/src/contracts/index.d.ts +2 -0
- package/dist/test/unit/DFRewards.test.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { AbiItem } from 'web3-utils';
|
|
2
|
+
import { SmartContractWithAddress } from '../SmartContractWithAddress';
|
|
3
|
+
import { ReceiptOrEstimate } from '../../@types';
|
|
4
|
+
/**
|
|
5
|
+
* Provides an interface for DFRewards contract
|
|
6
|
+
*/
|
|
7
|
+
export declare class DfRewards extends SmartContractWithAddress {
|
|
8
|
+
getDefaultAbi(): AbiItem | AbiItem[];
|
|
9
|
+
/** Get available DF Rewards for a token
|
|
10
|
+
* @param {String} userAddress user address
|
|
11
|
+
* @param {String} tokenAddress token address
|
|
12
|
+
* @return {Promise<string>}
|
|
13
|
+
*/
|
|
14
|
+
getAvailableRewards(userAddress: string, tokenAddress: string): Promise<string>;
|
|
15
|
+
/**
|
|
16
|
+
* claim rewards for any address
|
|
17
|
+
* @param {String} fromUserAddress user that generates the tx
|
|
18
|
+
* @param {String} userAddress user address to claim
|
|
19
|
+
* @param {String} tokenAddress token address
|
|
20
|
+
* @return {Promise<ReceiptOrEstimate>}
|
|
21
|
+
*/
|
|
22
|
+
claimRewards<G extends boolean = false>(fromUserAddress: string, userAddress: string, tokenAddress: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
23
|
+
/**
|
|
24
|
+
* allocate rewards to address. An approve must exist before calling this function.
|
|
25
|
+
* @param {String} fromUserAddress user that generates the tx
|
|
26
|
+
* @param {String[]} userAddresses array of users that will receive rewards
|
|
27
|
+
* @param {String[]} amounts array of amounts
|
|
28
|
+
* @param {String} tokenAddress token address
|
|
29
|
+
* @return {Promise<ReceiptOrEstimate>}
|
|
30
|
+
*/
|
|
31
|
+
allocateRewards<G extends boolean = false>(fromUserAddress: string, userAddresses: string[], amounts: string[], tokenAddress: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AbiItem } from 'web3-utils';
|
|
2
|
+
import { SmartContractWithAddress } from '../SmartContractWithAddress';
|
|
3
|
+
import { ReceiptOrEstimate } from '../../@types';
|
|
4
|
+
/**
|
|
5
|
+
* Provides an interface for dfStrategyV1 contract
|
|
6
|
+
*/
|
|
7
|
+
export declare class DfStrategyV1 extends SmartContractWithAddress {
|
|
8
|
+
getDefaultAbi(): AbiItem | AbiItem[];
|
|
9
|
+
/** Get available DF Rewards for multiple tokens
|
|
10
|
+
* @param {String} userAddress user address
|
|
11
|
+
* @param {String} tokenAddresses array of tokens
|
|
12
|
+
* @return {Promise<string[]>}
|
|
13
|
+
*/
|
|
14
|
+
getMultipleAvailableRewards(userAddress: string, tokenAddresses: string[]): Promise<string[]>;
|
|
15
|
+
/**
|
|
16
|
+
* claim multiple token rewards for any address
|
|
17
|
+
* @param {String} fromUserAddress user that generates the tx
|
|
18
|
+
* @param {String} userAddress user address to claim
|
|
19
|
+
* @param {String} tokenAddresses array of tokens
|
|
20
|
+
* @return {Promise<ReceiptOrEstimate>}
|
|
21
|
+
*/
|
|
22
|
+
claimMultipleRewards<G extends boolean = false>(fromUserAddress: string, userAddress: string, tokenAddresses: string[], estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED