@verified-network/verified-sdk 2.5.6 → 2.5.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/dist/abi/distribution/Distribution.json +38 -36621
- package/dist/abi/liquidity/Liquidity.json +100 -72279
- package/dist/abi/payments/Bond.json +546 -383
- package/dist/abi/payments/Cash.json +404 -278
- package/dist/abi/payments/ERC20.json +147 -77
- package/dist/abi/payments/Factory.json +253 -373
- package/dist/abi/payments/Rates.json +38 -17
- package/dist/abi/payments/Token.json +246 -147
- package/dist/contract/liquidity/index.d.ts +5 -34
- package/dist/contract/liquidity/index.js +9 -61
- package/dist/contractAddress/index.js +25 -25
- package/package.json +1 -1
|
@@ -11,13 +11,6 @@ export default class LiquidityContract extends VerifiedContract {
|
|
|
11
11
|
chainId: number;
|
|
12
12
|
functionName: string;
|
|
13
13
|
}>;
|
|
14
|
-
/**
|
|
15
|
-
Creates supply of the Verified Liquidity token after initial issue with constructor defined parameters
|
|
16
|
-
@param _supply total supply of VITTA
|
|
17
|
-
@param _cap investment limit for each investor
|
|
18
|
-
@param _limit time limit for issue close
|
|
19
|
-
*/
|
|
20
|
-
createSupply(_cap: string, _limit: string, options?: Options): any;
|
|
21
14
|
/**
|
|
22
15
|
Specifies list of supported tokens that can be invested in the Verified Liquidity token
|
|
23
16
|
@param _tokens array of supported token addresses
|
|
@@ -28,6 +21,10 @@ export default class LiquidityContract extends VerifiedContract {
|
|
|
28
21
|
@param _token token that is supported for investment
|
|
29
22
|
*/
|
|
30
23
|
checkSupportForToken(_token: string, options?: Options): any;
|
|
24
|
+
/**
|
|
25
|
+
Checks NAV for Verified Liquidity token
|
|
26
|
+
*/
|
|
27
|
+
getNAVPrice(): any;
|
|
31
28
|
/**
|
|
32
29
|
Removes support for token for investing in the Verified Liquidity token
|
|
33
30
|
@param _token token that is supported for investment
|
|
@@ -63,30 +60,11 @@ export default class LiquidityContract extends VerifiedContract {
|
|
|
63
60
|
@param _token address of token invested by investor
|
|
64
61
|
*/
|
|
65
62
|
getInvestment(_investor: string, _token: string, options?: Options): any;
|
|
66
|
-
/**
|
|
67
|
-
Used by Issuers (eg, asset managers) to issue VITTA to investors or refund paid in tokens to investors if investment cap is breached
|
|
68
|
-
@param _investor address of investor
|
|
69
|
-
@param _token address of token invested in VITTA
|
|
70
|
-
@param _tokenAmount amount of token invested in VITTA
|
|
71
|
-
@param _LPToIssue amount of VITTA to issue to investor
|
|
72
|
-
*/
|
|
73
|
-
issue(_investor: string, _token: string, _tokenAmount: string, _LPToIssue: string, options?: Options): any;
|
|
74
|
-
/**
|
|
75
|
-
Used by VITTA holder to stake it for providing liquidity for underwriting investments
|
|
76
|
-
@param _toStake amount of VITTA to stake
|
|
77
|
-
*/
|
|
78
|
-
stake(_toStake: string, options?: Options): any;
|
|
79
63
|
/**
|
|
80
64
|
Used by VITTA holder to withdraw staked liquidity for underwriting investments
|
|
81
65
|
@param _fromStake amount of VITTA staked
|
|
82
66
|
*/
|
|
83
67
|
withdraw(_fromStake: string, options?: Options): any;
|
|
84
|
-
/**
|
|
85
|
-
Pay out of income to VITTA Liquidity providers
|
|
86
|
-
@param _distribution amount of VITTA to mint and distribute pro rata to liquidity providers
|
|
87
|
-
@param _platform address of liquidity platform
|
|
88
|
-
*/
|
|
89
|
-
payOut(_distribution: string, _platform: string, options?: Options): any;
|
|
90
68
|
/**
|
|
91
69
|
* Adds asset manager to manage liquidity
|
|
92
70
|
* @param _platform address of market making platform (eg Balancer)
|
|
@@ -137,13 +115,6 @@ export default class LiquidityContract extends VerifiedContract {
|
|
|
137
115
|
* @param options
|
|
138
116
|
* @returns none
|
|
139
117
|
*/
|
|
140
|
-
provideLiquidity(_platform: string, _manager: string, _liquidity: string, _token: string,
|
|
141
|
-
/**
|
|
142
|
-
* Fetches balance of investor
|
|
143
|
-
* @param _investor address of investor
|
|
144
|
-
* @param options
|
|
145
|
-
* @returns balance of investor
|
|
146
|
-
*/
|
|
147
|
-
balanceOf(_investor: string, options?: Options): any;
|
|
118
|
+
provideLiquidity(_platform: string, _manager: string, _liquidity: string, _token: string, options?: Options): any;
|
|
148
119
|
notifyIssue(callback: any): object;
|
|
149
120
|
}
|
|
@@ -6,7 +6,6 @@ const index_1 = require("../index");
|
|
|
6
6
|
const Liquidity_json_1 = require("../../abi/liquidity/Liquidity.json");
|
|
7
7
|
var FUNCTIONS;
|
|
8
8
|
(function (FUNCTIONS) {
|
|
9
|
-
FUNCTIONS["CREATESUPPLY"] = "createSupply";
|
|
10
9
|
FUNCTIONS["SUPPORTTOKENS"] = "supportTokens";
|
|
11
10
|
FUNCTIONS["REMOVETOKEN"] = "removeToken";
|
|
12
11
|
FUNCTIONS["CHECKSUPPORTFORTOKEN"] = "checkSupportForToken";
|
|
@@ -15,10 +14,7 @@ var FUNCTIONS;
|
|
|
15
14
|
FUNCTIONS["BUY"] = "buy";
|
|
16
15
|
FUNCTIONS["GETINVESTORS"] = "getInvestors";
|
|
17
16
|
FUNCTIONS["GETINVESTMENT"] = "getInvestment";
|
|
18
|
-
FUNCTIONS["ISSUE"] = "issue";
|
|
19
|
-
FUNCTIONS["STAKE"] = "stake";
|
|
20
17
|
FUNCTIONS["WITHDRAW"] = "withdraw";
|
|
21
|
-
FUNCTIONS["PAYOUT"] = "payOut";
|
|
22
18
|
FUNCTIONS["ADDMANAGER"] = "addManager";
|
|
23
19
|
FUNCTIONS["REMOVEMANAGER"] = "removeManager";
|
|
24
20
|
FUNCTIONS["GETMANAGERS"] = "getManagers";
|
|
@@ -26,8 +22,8 @@ var FUNCTIONS;
|
|
|
26
22
|
FUNCTIONS["GETPLATFORMPERFORMANCE"] = "getPlatformPerformance";
|
|
27
23
|
FUNCTIONS["GETMANAGERPERFORMANCE"] = "getManagerPerformance";
|
|
28
24
|
FUNCTIONS["PROVIDELIQUIDITY"] = "provideLiquidity";
|
|
29
|
-
FUNCTIONS["BALANCE"] = "balance";
|
|
30
25
|
FUNCTIONS["NOTIFYISSUE"] = "RequestIssue";
|
|
26
|
+
FUNCTIONS["GETNAV"] = "getNAVPrice";
|
|
31
27
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
32
28
|
class LiquidityContract extends index_1.VerifiedContract {
|
|
33
29
|
constructor(signer, contractNetworkAddress) {
|
|
@@ -40,17 +36,6 @@ class LiquidityContract extends index_1.VerifiedContract {
|
|
|
40
36
|
async _getMeeQuote(paymentTokenAddress, functionName, args, apiKey, rpcUrl, isReactNative) {
|
|
41
37
|
return await this.getQuote(paymentTokenAddress, functionName, args, rpcUrl, apiKey, isReactNative);
|
|
42
38
|
}
|
|
43
|
-
/**
|
|
44
|
-
Creates supply of the Verified Liquidity token after initial issue with constructor defined parameters
|
|
45
|
-
@param _supply total supply of VITTA
|
|
46
|
-
@param _cap investment limit for each investor
|
|
47
|
-
@param _limit time limit for issue close
|
|
48
|
-
*/
|
|
49
|
-
async createSupply(_cap, _limit, options) {
|
|
50
|
-
await this.validateInput(index_1.DATATYPES.NUMBER, _cap);
|
|
51
|
-
await this.validateInput(index_1.DATATYPES.NUMBER, _limit);
|
|
52
|
-
return this.callContract(FUNCTIONS.CREATESUPPLY, _cap, _limit, options);
|
|
53
|
-
}
|
|
54
39
|
/**
|
|
55
40
|
Specifies list of supported tokens that can be invested in the Verified Liquidity token
|
|
56
41
|
@param _tokens array of supported token addresses
|
|
@@ -68,6 +53,12 @@ class LiquidityContract extends index_1.VerifiedContract {
|
|
|
68
53
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _token);
|
|
69
54
|
return this.callContract(FUNCTIONS.CHECKSUPPORTFORTOKEN, _token, options);
|
|
70
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
Checks NAV for Verified Liquidity token
|
|
58
|
+
*/
|
|
59
|
+
async getNAVPrice() {
|
|
60
|
+
return this.callContract(FUNCTIONS.GETNAV);
|
|
61
|
+
}
|
|
71
62
|
/**
|
|
72
63
|
Removes support for token for investing in the Verified Liquidity token
|
|
73
64
|
@param _token token that is supported for investment
|
|
@@ -124,28 +115,6 @@ class LiquidityContract extends index_1.VerifiedContract {
|
|
|
124
115
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _token);
|
|
125
116
|
return this.callContract(FUNCTIONS.GETINVESTMENT, _investor, _token, options);
|
|
126
117
|
}
|
|
127
|
-
/**
|
|
128
|
-
Used by Issuers (eg, asset managers) to issue VITTA to investors or refund paid in tokens to investors if investment cap is breached
|
|
129
|
-
@param _investor address of investor
|
|
130
|
-
@param _token address of token invested in VITTA
|
|
131
|
-
@param _tokenAmount amount of token invested in VITTA
|
|
132
|
-
@param _LPToIssue amount of VITTA to issue to investor
|
|
133
|
-
*/
|
|
134
|
-
async issue(_investor, _token, _tokenAmount, _LPToIssue, options) {
|
|
135
|
-
await this.validateInput(index_1.DATATYPES.ADDRESS, _investor);
|
|
136
|
-
await this.validateInput(index_1.DATATYPES.ADDRESS, _token);
|
|
137
|
-
await this.validateInput(index_1.DATATYPES.NUMBER, _tokenAmount);
|
|
138
|
-
await this.validateInput(index_1.DATATYPES.NUMBER, _LPToIssue);
|
|
139
|
-
return this.callContract(FUNCTIONS.ISSUE, _investor, _token, _tokenAmount, _LPToIssue, options);
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
Used by VITTA holder to stake it for providing liquidity for underwriting investments
|
|
143
|
-
@param _toStake amount of VITTA to stake
|
|
144
|
-
*/
|
|
145
|
-
async stake(_toStake, options) {
|
|
146
|
-
await this.validateInput(index_1.DATATYPES.NUMBER, _toStake);
|
|
147
|
-
return this.callContract(FUNCTIONS.STAKE, _toStake, options);
|
|
148
|
-
}
|
|
149
118
|
/**
|
|
150
119
|
Used by VITTA holder to withdraw staked liquidity for underwriting investments
|
|
151
120
|
@param _fromStake amount of VITTA staked
|
|
@@ -154,16 +123,6 @@ class LiquidityContract extends index_1.VerifiedContract {
|
|
|
154
123
|
await this.validateInput(index_1.DATATYPES.NUMBER, _fromStake);
|
|
155
124
|
return this.callContract(FUNCTIONS.WITHDRAW, _fromStake, options);
|
|
156
125
|
}
|
|
157
|
-
/**
|
|
158
|
-
Pay out of income to VITTA Liquidity providers
|
|
159
|
-
@param _distribution amount of VITTA to mint and distribute pro rata to liquidity providers
|
|
160
|
-
@param _platform address of liquidity platform
|
|
161
|
-
*/
|
|
162
|
-
async payOut(_distribution, _platform, options) {
|
|
163
|
-
await this.validateInput(index_1.DATATYPES.NUMBER, _distribution);
|
|
164
|
-
await this.validateInput(index_1.DATATYPES.ADDRESS, _platform);
|
|
165
|
-
return this.callContract(FUNCTIONS.PAYOUT, _distribution, _platform, options);
|
|
166
|
-
}
|
|
167
126
|
/**
|
|
168
127
|
* Adds asset manager to manage liquidity
|
|
169
128
|
* @param _platform address of market making platform (eg Balancer)
|
|
@@ -233,23 +192,12 @@ class LiquidityContract extends index_1.VerifiedContract {
|
|
|
233
192
|
* @param options
|
|
234
193
|
* @returns none
|
|
235
194
|
*/
|
|
236
|
-
async provideLiquidity(_platform, _manager, _liquidity, _token,
|
|
195
|
+
async provideLiquidity(_platform, _manager, _liquidity, _token, options) {
|
|
237
196
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _platform);
|
|
238
197
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _manager);
|
|
239
198
|
await this.validateInput(index_1.DATATYPES.NUMBER, _liquidity);
|
|
240
199
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _token);
|
|
241
|
-
|
|
242
|
-
return this.callContract(FUNCTIONS.PROVIDELIQUIDITY, _platform, _manager, _liquidity, _token, _tokenAmount, options);
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
* Fetches balance of investor
|
|
246
|
-
* @param _investor address of investor
|
|
247
|
-
* @param options
|
|
248
|
-
* @returns balance of investor
|
|
249
|
-
*/
|
|
250
|
-
async balanceOf(_investor, options) {
|
|
251
|
-
await this.validateInput(index_1.DATATYPES.ADDRESS, _investor);
|
|
252
|
-
return this.callContract(FUNCTIONS.BALANCE, _investor, options);
|
|
200
|
+
return this.callContract(FUNCTIONS.PROVIDELIQUIDITY, _platform, _manager, _liquidity, _token, options);
|
|
253
201
|
}
|
|
254
202
|
notifyIssue(callback) {
|
|
255
203
|
this.getEvent(FUNCTIONS.NOTIFYISSUE, callback);
|
|
@@ -310,37 +310,37 @@ const contractAddress = {
|
|
|
310
310
|
},
|
|
311
311
|
},
|
|
312
312
|
11155111: {
|
|
313
|
-
Client: "
|
|
314
|
-
Factory: "
|
|
315
|
-
Cash: "
|
|
316
|
-
Bond: "
|
|
317
|
-
Token: "
|
|
318
|
-
Oracle: "
|
|
319
|
-
Rates: "
|
|
320
|
-
Security: "
|
|
321
|
-
SecuritiesFactory: "
|
|
322
|
-
Vitta: "
|
|
323
|
-
Liquidity: "
|
|
324
|
-
Distribution: "
|
|
313
|
+
Client: "",
|
|
314
|
+
Factory: "0x60dDeeD42EB62c98210513b3465c5aBf9503D8Ff",
|
|
315
|
+
Cash: "0x7eFDfeA69676b12060E00DFa57A86E158aBEF454",
|
|
316
|
+
Bond: "0x9cE001D04aa109f53055CE25D641a303224C6014",
|
|
317
|
+
Token: "0x1A8449883f4DE9e5BD94b2e6D6cf5c863D2CaD1d",
|
|
318
|
+
Oracle: "0x6F698b337e15dEaB55B80fe4E6f75C5c7850BE2f",
|
|
319
|
+
Rates: "0x131d6B6fb7D5D18fd106dbb4e605B66b46e887B7",
|
|
320
|
+
Security: "",
|
|
321
|
+
SecuritiesFactory: "",
|
|
322
|
+
Vitta: "0x9dff1f4c9Dc57dd80Ddd75528dF0fd8966078Ae3",
|
|
323
|
+
Liquidity: "0x589399c2290e98978d8c8f4a75fD7006C0c00209",
|
|
324
|
+
Distribution: "0xDb4f402520a0eb1922aE629CFA2D720a39361c63",
|
|
325
325
|
PrimaryIssuePoolFactory: "0xDA13BC71FEe08FfD523f10458B0e2c2D8427BBD5",
|
|
326
|
-
BalancerPrimaryIssueManager: "
|
|
326
|
+
BalancerPrimaryIssueManager: "",
|
|
327
327
|
SecondaryIssuePoolFactory: "0x4519148Cc4030c2e3573f1f886ed4071Fa35d62B",
|
|
328
|
-
BalancerSecondaryIssueManager: "
|
|
328
|
+
BalancerSecondaryIssueManager: "",
|
|
329
329
|
MarginTradingPoolFactory: "0xB1ae3Fc5B16d3736bf0db20606fB9a10b435392c",
|
|
330
|
-
BalancerMarginIssueManager: "
|
|
331
|
-
Custody: "
|
|
332
|
-
Compound: "
|
|
330
|
+
BalancerMarginIssueManager: "",
|
|
331
|
+
Custody: "0x594DC49A7C2B4b0f279247239cb6F1d943a99e7F",
|
|
332
|
+
Compound: "",
|
|
333
333
|
CASH: {
|
|
334
|
-
VCUSD: "
|
|
335
|
-
VCEUR: "
|
|
336
|
-
|
|
337
|
-
|
|
334
|
+
VCUSD: "0x4F775199bAD6D02a0189eF4922cf47Cb64aB5F32",
|
|
335
|
+
VCEUR: "0xF556385dd699f60207744F0181f2D285634808c2",
|
|
336
|
+
VCGBP: "0xeF9c36B7909CC7D10AfC1e3c261808fB261aD486",
|
|
337
|
+
VCJPY: "0x54D26696c01A5591b93Ea15DB01C72d4d3eBE25C",
|
|
338
338
|
},
|
|
339
339
|
BOND: {
|
|
340
|
-
VBUSD: "
|
|
341
|
-
VBEUR: "
|
|
342
|
-
|
|
343
|
-
|
|
340
|
+
VBUSD: "0x3B52c3825Ae26d21C3594d28853fabe7deB7AF06",
|
|
341
|
+
VBEUR: "0x5822746522C0cE9310e8a7088b3daCd943E78A5e",
|
|
342
|
+
VBGBP: "0xe2981ff6F1211bEEaB3522dd85d600Cf73cCE665",
|
|
343
|
+
VBJPY: "0x0614a2BBeE52cc8B76739Ab008F343e960E42779",
|
|
344
344
|
},
|
|
345
345
|
},
|
|
346
346
|
balancerVault: "0xBA12222222228d8Ba445958a75a0704d566BF2C8",
|