@oceanprotocol/lib 5.0.5 → 5.1.0
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 +44 -9
- package/CodeExamples.md +8 -4
- package/ComputeExamples.md +4 -2
- package/dist/lib.cjs +1 -1
- package/dist/lib.cjs.map +1 -1
- package/dist/lib.modern.js +1 -1
- package/dist/lib.modern.js.map +1 -1
- package/dist/lib.module.mjs +1 -1
- package/dist/lib.module.mjs.map +1 -1
- package/dist/lib.umd.js +1 -1
- package/dist/lib.umd.js.map +1 -1
- package/dist/types/config/Config.d.ts +0 -8
- package/dist/types/contracts/Dispenser.d.ts +1 -1
- package/dist/types/contracts/EnterpriseFeeCollector.d.ts +2 -1
- package/dist/types/contracts/Escrow.d.ts +12 -9
- package/dist/types/contracts/FixedRateExchange.d.ts +0 -1
- package/dist/types/contracts/NFT.d.ts +1 -1
- package/dist/types/contracts/index.d.ts +0 -6
- package/dist/types/services/Aquarius.d.ts +3 -2
- package/dist/types/services/Provider.d.ts +5 -3
- package/dist/types/utils/Assets.d.ts +2 -1
- package/dist/types/utils/TokenUtils.d.ts +2 -1
- package/docs/modules.md +0 -6
- package/package.json +5 -5
- package/dist/types/contracts/df/DfRewards.d.ts +0 -31
- package/dist/types/contracts/df/DfStrategyV1.d.ts +0 -21
- package/dist/types/contracts/ve/VeAllocate.d.ts +0 -38
- package/dist/types/contracts/ve/VeFeeDistributor.d.ts +0 -29
- package/dist/types/contracts/ve/VeFeeEstimate.d.ts +0 -14
- package/dist/types/contracts/ve/VeOcean.d.ts +0 -68
- package/docs/classes/DfRewards.md +0 -345
- package/docs/classes/DfStrategyV1.md +0 -313
- package/docs/classes/VeAllocate.md +0 -372
- package/docs/classes/VeFeeDistributor.md +0 -325
- package/docs/classes/VeFeeEstimate.md +0 -281
- package/docs/classes/VeOcean.md +0 -513
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
[@oceanprotocol/lib](../README.md) / [Exports](../modules.md) / VeFeeEstimate
|
|
2
|
-
|
|
3
|
-
# Class: VeFeeEstimate
|
|
4
|
-
|
|
5
|
-
Provides an interface for veOcean contract
|
|
6
|
-
|
|
7
|
-
## Hierarchy
|
|
8
|
-
|
|
9
|
-
- [`SmartContractWithAddress`](SmartContractWithAddress.md)
|
|
10
|
-
|
|
11
|
-
↳ **`VeFeeEstimate`**
|
|
12
|
-
|
|
13
|
-
## Table of contents
|
|
14
|
-
|
|
15
|
-
### Constructors
|
|
16
|
-
|
|
17
|
-
- [constructor](VeFeeEstimate.md#constructor)
|
|
18
|
-
|
|
19
|
-
### Properties
|
|
20
|
-
|
|
21
|
-
- [abi](VeFeeEstimate.md#abi)
|
|
22
|
-
- [address](VeFeeEstimate.md#address)
|
|
23
|
-
- [config](VeFeeEstimate.md#config)
|
|
24
|
-
- [contract](VeFeeEstimate.md#contract)
|
|
25
|
-
- [signer](VeFeeEstimate.md#signer)
|
|
26
|
-
|
|
27
|
-
### Methods
|
|
28
|
-
|
|
29
|
-
- [amountToUnits](VeFeeEstimate.md#amounttounits)
|
|
30
|
-
- [estimateClaim](VeFeeEstimate.md#estimateclaim)
|
|
31
|
-
- [getContract](VeFeeEstimate.md#getcontract)
|
|
32
|
-
- [getDefaultAbi](VeFeeEstimate.md#getdefaultabi)
|
|
33
|
-
- [getFairGasPrice](VeFeeEstimate.md#getfairgasprice)
|
|
34
|
-
- [unitsToAmount](VeFeeEstimate.md#unitstoamount)
|
|
35
|
-
|
|
36
|
-
## Constructors
|
|
37
|
-
|
|
38
|
-
### constructor
|
|
39
|
-
|
|
40
|
-
• **new VeFeeEstimate**(`address`, `signer`, `network?`, `config?`, `abi?`)
|
|
41
|
-
|
|
42
|
-
Instantiate the smart contract.
|
|
43
|
-
|
|
44
|
-
#### Parameters
|
|
45
|
-
|
|
46
|
-
| Name | Type | Description |
|
|
47
|
-
| :------ | :------ | :------ |
|
|
48
|
-
| `address` | `string` | The address of the contract. |
|
|
49
|
-
| `signer` | `Signer` | The signer object. |
|
|
50
|
-
| `network?` | `string` \| `number` | Network id or name |
|
|
51
|
-
| `config?` | [`Config`](Config.md) | The configuration object. |
|
|
52
|
-
| `abi?` | [`AbiItem`](../interfaces/AbiItem.md)[] | ABI array of the smart contract |
|
|
53
|
-
|
|
54
|
-
#### Inherited from
|
|
55
|
-
|
|
56
|
-
[SmartContractWithAddress](SmartContractWithAddress.md).[constructor](SmartContractWithAddress.md#constructor)
|
|
57
|
-
|
|
58
|
-
#### Defined in
|
|
59
|
-
|
|
60
|
-
[contracts/SmartContractWithAddress.ts:17](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContractWithAddress.ts#L17)
|
|
61
|
-
|
|
62
|
-
## Properties
|
|
63
|
-
|
|
64
|
-
### abi
|
|
65
|
-
|
|
66
|
-
• **abi**: [`AbiItem`](../interfaces/AbiItem.md)[]
|
|
67
|
-
|
|
68
|
-
#### Inherited from
|
|
69
|
-
|
|
70
|
-
[SmartContractWithAddress](SmartContractWithAddress.md).[abi](SmartContractWithAddress.md#abi)
|
|
71
|
-
|
|
72
|
-
#### Defined in
|
|
73
|
-
|
|
74
|
-
[contracts/SmartContract.ts:14](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContract.ts#L14)
|
|
75
|
-
|
|
76
|
-
___
|
|
77
|
-
|
|
78
|
-
### address
|
|
79
|
-
|
|
80
|
-
• **address**: `string`
|
|
81
|
-
|
|
82
|
-
#### Inherited from
|
|
83
|
-
|
|
84
|
-
[SmartContractWithAddress](SmartContractWithAddress.md).[address](SmartContractWithAddress.md#address)
|
|
85
|
-
|
|
86
|
-
#### Defined in
|
|
87
|
-
|
|
88
|
-
[contracts/SmartContractWithAddress.ts:6](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContractWithAddress.ts#L6)
|
|
89
|
-
|
|
90
|
-
___
|
|
91
|
-
|
|
92
|
-
### config
|
|
93
|
-
|
|
94
|
-
• **config**: [`Config`](Config.md)
|
|
95
|
-
|
|
96
|
-
#### Inherited from
|
|
97
|
-
|
|
98
|
-
[SmartContractWithAddress](SmartContractWithAddress.md).[config](SmartContractWithAddress.md#config)
|
|
99
|
-
|
|
100
|
-
#### Defined in
|
|
101
|
-
|
|
102
|
-
[contracts/SmartContract.ts:13](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContract.ts#L13)
|
|
103
|
-
|
|
104
|
-
___
|
|
105
|
-
|
|
106
|
-
### contract
|
|
107
|
-
|
|
108
|
-
• **contract**: `Contract`
|
|
109
|
-
|
|
110
|
-
#### Inherited from
|
|
111
|
-
|
|
112
|
-
[SmartContractWithAddress](SmartContractWithAddress.md).[contract](SmartContractWithAddress.md#contract)
|
|
113
|
-
|
|
114
|
-
#### Defined in
|
|
115
|
-
|
|
116
|
-
[contracts/SmartContractWithAddress.ts:7](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContractWithAddress.ts#L7)
|
|
117
|
-
|
|
118
|
-
___
|
|
119
|
-
|
|
120
|
-
### signer
|
|
121
|
-
|
|
122
|
-
• **signer**: `Signer`
|
|
123
|
-
|
|
124
|
-
#### Inherited from
|
|
125
|
-
|
|
126
|
-
[SmartContractWithAddress](SmartContractWithAddress.md).[signer](SmartContractWithAddress.md#signer)
|
|
127
|
-
|
|
128
|
-
#### Defined in
|
|
129
|
-
|
|
130
|
-
[contracts/SmartContract.ts:12](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContract.ts#L12)
|
|
131
|
-
|
|
132
|
-
## Methods
|
|
133
|
-
|
|
134
|
-
### amountToUnits
|
|
135
|
-
|
|
136
|
-
▸ `Protected` **amountToUnits**(`token`, `amount`, `tokenDecimals?`): `Promise`<`string`\>
|
|
137
|
-
|
|
138
|
-
Converts an amount of tokens to units
|
|
139
|
-
|
|
140
|
-
#### Parameters
|
|
141
|
-
|
|
142
|
-
| Name | Type | Description |
|
|
143
|
-
| :------ | :------ | :------ |
|
|
144
|
-
| `token` | `string` | The token to convert |
|
|
145
|
-
| `amount` | `string` | The amount of tokens to convert |
|
|
146
|
-
| `tokenDecimals?` | `number` | The number of decimals of the token |
|
|
147
|
-
|
|
148
|
-
#### Returns
|
|
149
|
-
|
|
150
|
-
`Promise`<`string`\>
|
|
151
|
-
|
|
152
|
-
- The converted amount in units
|
|
153
|
-
|
|
154
|
-
#### Inherited from
|
|
155
|
-
|
|
156
|
-
[SmartContractWithAddress](SmartContractWithAddress.md).[amountToUnits](SmartContractWithAddress.md#amounttounits)
|
|
157
|
-
|
|
158
|
-
#### Defined in
|
|
159
|
-
|
|
160
|
-
[contracts/SmartContract.ts:43](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContract.ts#L43)
|
|
161
|
-
|
|
162
|
-
___
|
|
163
|
-
|
|
164
|
-
### estimateClaim
|
|
165
|
-
|
|
166
|
-
▸ **estimateClaim**(`userAddress`): `Promise`<`string`\>
|
|
167
|
-
|
|
168
|
-
estimateClaim
|
|
169
|
-
|
|
170
|
-
#### Parameters
|
|
171
|
-
|
|
172
|
-
| Name | Type | Description |
|
|
173
|
-
| :------ | :------ | :------ |
|
|
174
|
-
| `userAddress` | `string` | user address |
|
|
175
|
-
|
|
176
|
-
#### Returns
|
|
177
|
-
|
|
178
|
-
`Promise`<`string`\>
|
|
179
|
-
|
|
180
|
-
#### Defined in
|
|
181
|
-
|
|
182
|
-
[contracts/ve/VeFeeEstimate.ts:18](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/ve/VeFeeEstimate.ts#L18)
|
|
183
|
-
|
|
184
|
-
___
|
|
185
|
-
|
|
186
|
-
### getContract
|
|
187
|
-
|
|
188
|
-
▸ `Protected` **getContract**(`address`, `abi?`): `Contract`
|
|
189
|
-
|
|
190
|
-
Returns a contract instance for the given address
|
|
191
|
-
|
|
192
|
-
#### Parameters
|
|
193
|
-
|
|
194
|
-
| Name | Type | Description |
|
|
195
|
-
| :------ | :------ | :------ |
|
|
196
|
-
| `address` | `string` | The address of the contract |
|
|
197
|
-
| `abi?` | [`AbiItem`](../interfaces/AbiItem.md)[] | The ABI of the contract |
|
|
198
|
-
|
|
199
|
-
#### Returns
|
|
200
|
-
|
|
201
|
-
`Contract`
|
|
202
|
-
|
|
203
|
-
- The contract instance
|
|
204
|
-
|
|
205
|
-
#### Inherited from
|
|
206
|
-
|
|
207
|
-
[SmartContractWithAddress](SmartContractWithAddress.md).[getContract](SmartContractWithAddress.md#getcontract)
|
|
208
|
-
|
|
209
|
-
#### Defined in
|
|
210
|
-
|
|
211
|
-
[contracts/SmartContract.ts:80](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContract.ts#L80)
|
|
212
|
-
|
|
213
|
-
___
|
|
214
|
-
|
|
215
|
-
### getDefaultAbi
|
|
216
|
-
|
|
217
|
-
▸ **getDefaultAbi**(): [`AbiItem`](../interfaces/AbiItem.md)[]
|
|
218
|
-
|
|
219
|
-
#### Returns
|
|
220
|
-
|
|
221
|
-
[`AbiItem`](../interfaces/AbiItem.md)[]
|
|
222
|
-
|
|
223
|
-
#### Overrides
|
|
224
|
-
|
|
225
|
-
[SmartContractWithAddress](SmartContractWithAddress.md).[getDefaultAbi](SmartContractWithAddress.md#getdefaultabi)
|
|
226
|
-
|
|
227
|
-
#### Defined in
|
|
228
|
-
|
|
229
|
-
[contracts/ve/VeFeeEstimate.ts:9](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/ve/VeFeeEstimate.ts#L9)
|
|
230
|
-
|
|
231
|
-
___
|
|
232
|
-
|
|
233
|
-
### getFairGasPrice
|
|
234
|
-
|
|
235
|
-
▸ `Protected` **getFairGasPrice**(): `Promise`<`string`\>
|
|
236
|
-
|
|
237
|
-
Retruns the gas price
|
|
238
|
-
|
|
239
|
-
#### Returns
|
|
240
|
-
|
|
241
|
-
`Promise`<`string`\>
|
|
242
|
-
|
|
243
|
-
- The fair gas price
|
|
244
|
-
|
|
245
|
-
#### Inherited from
|
|
246
|
-
|
|
247
|
-
[SmartContractWithAddress](SmartContractWithAddress.md).[getFairGasPrice](SmartContractWithAddress.md#getfairgasprice)
|
|
248
|
-
|
|
249
|
-
#### Defined in
|
|
250
|
-
|
|
251
|
-
[contracts/SmartContract.ts:70](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContract.ts#L70)
|
|
252
|
-
|
|
253
|
-
___
|
|
254
|
-
|
|
255
|
-
### unitsToAmount
|
|
256
|
-
|
|
257
|
-
▸ `Protected` **unitsToAmount**(`token`, `amount`, `tokenDecimals?`): `Promise`<`string`\>
|
|
258
|
-
|
|
259
|
-
Converts an amount of units to tokens
|
|
260
|
-
|
|
261
|
-
#### Parameters
|
|
262
|
-
|
|
263
|
-
| Name | Type | Description |
|
|
264
|
-
| :------ | :------ | :------ |
|
|
265
|
-
| `token` | `string` | The token to convert |
|
|
266
|
-
| `amount` | `string` | The amount of units to convert |
|
|
267
|
-
| `tokenDecimals?` | `number` | The number of decimals in the token |
|
|
268
|
-
|
|
269
|
-
#### Returns
|
|
270
|
-
|
|
271
|
-
`Promise`<`string`\>
|
|
272
|
-
|
|
273
|
-
- The converted amount in tokens
|
|
274
|
-
|
|
275
|
-
#### Inherited from
|
|
276
|
-
|
|
277
|
-
[SmartContractWithAddress](SmartContractWithAddress.md).[unitsToAmount](SmartContractWithAddress.md#unitstoamount)
|
|
278
|
-
|
|
279
|
-
#### Defined in
|
|
280
|
-
|
|
281
|
-
[contracts/SmartContract.ts:58](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContract.ts#L58)
|