@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.
@@ -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
+ }
@@ -9,3 +9,5 @@ export * from './NFTFactory';
9
9
  export * from './ve/VeOcean';
10
10
  export * from './ve/VeFeeDistributor';
11
11
  export * from './ve/VeAllocate';
12
+ export * from './df/DfRewards';
13
+ export * from './df/DfStrategyV1';
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oceanprotocol/lib",
3
3
  "source": "./src/index.ts",
4
- "version": "2.0.0-next.2",
4
+ "version": "2.0.0-next.3",
5
5
  "description": "JavaScript client library for Ocean Protocol",
6
6
  "main": "./dist/lib.js",
7
7
  "umd:main": "dist/lib.umd.js",