@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.
@@ -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, _tokenAmount: string, options?: Options): any;
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, _tokenAmount, options) {
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
- await this.validateInput(index_1.DATATYPES.NUMBER, _tokenAmount);
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: "0xB72629Bb4d031F1C755AFfA123AAA28E81EfdA9A",
314
- Factory: "0xf4E7c068125F7937FCA1B1ed37ddd69Fc8Be40d2",
315
- Cash: "0x37De0Ffd0B20a73adD5Af2B50831f417F72E6fDa",
316
- Bond: "0x4034B2ea78e22FeE515D21d96E4a15B2a6a2cE2f",
317
- Token: "0xc35FF978c34825902537806b0a713e2E15B99408",
318
- Oracle: "0x1Dfc61E8cf73f19bd485A91eeFA1A656Bc3D8b6f",
319
- Rates: "0xD281789d42B9A8D463F2b999311e0C7C6816741B",
320
- Security: "0xa1c552a33FB9e391d0F50A6407385c55cd22d596",
321
- SecuritiesFactory: "0x7CaB6AA90fD672F6ddBd0B92c0a5428b53ebA414",
322
- Vitta: "0x87145164371Ad7851AD3B4D47C9820F95983d8EA",
323
- Liquidity: "0x27006b68b3594EF5Ae04C5457c24F0c7CF1E5553",
324
- Distribution: "0x5c3171AFEC854f8B6FD138ee9533629ABd8A5365",
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: "0x56B802f315e97c2BDDb0dA5F13EE8e11cBa3846B",
326
+ BalancerPrimaryIssueManager: "",
327
327
  SecondaryIssuePoolFactory: "0x4519148Cc4030c2e3573f1f886ed4071Fa35d62B",
328
- BalancerSecondaryIssueManager: "0xE3e3e9b8c0c292eD3756C7A1037322738de6B7FC",
328
+ BalancerSecondaryIssueManager: "",
329
329
  MarginTradingPoolFactory: "0xB1ae3Fc5B16d3736bf0db20606fB9a10b435392c",
330
- BalancerMarginIssueManager: "0xcC52ce78a8fF2198FBD37D85D1686E7C80604cd3",
331
- Custody: "0x3B3AD30e32fFef3dD598dd3EfDf6DCC392897786",
332
- Compound: "0x7FEC71327A33d59F293f4Db6dcDc4E6De2d407d6",
330
+ BalancerMarginIssueManager: "",
331
+ Custody: "0x594DC49A7C2B4b0f279247239cb6F1d943a99e7F",
332
+ Compound: "",
333
333
  CASH: {
334
- VCUSD: "0x2DDddbE71Ad0ffa4c62B2aEE408c5c4bDdD10A58",
335
- VCEUR: "0x16CBaa075beC8bEe8d4427A0E0077cE9C7c7018F",
336
- VCCHF: "0xcd39d935Bab9C0EF0667c290427F5BdC6181F3ec",
337
- VCINR: "0xf9139959C6b543E10ce26340CCf5845c73d83117",
334
+ VCUSD: "0x4F775199bAD6D02a0189eF4922cf47Cb64aB5F32",
335
+ VCEUR: "0xF556385dd699f60207744F0181f2D285634808c2",
336
+ VCGBP: "0xeF9c36B7909CC7D10AfC1e3c261808fB261aD486",
337
+ VCJPY: "0x54D26696c01A5591b93Ea15DB01C72d4d3eBE25C",
338
338
  },
339
339
  BOND: {
340
- VBUSD: "0xDEdB5B413a14e24Dc484221F8858f7a5b76294D0",
341
- VBEUR: "0x08c06611197E7f8162eDE48647eA8Cc913667556",
342
- VBCHF: "0x69036Bd8d4f7ff96A7Fe2098c6f12bf005eCba47",
343
- VBINR: "0x9381d9fba4ac1115e25E924D9bFa7c51179dea25",
340
+ VBUSD: "0x3B52c3825Ae26d21C3594d28853fabe7deB7AF06",
341
+ VBEUR: "0x5822746522C0cE9310e8a7088b3daCd943E78A5e",
342
+ VBGBP: "0xe2981ff6F1211bEEaB3522dd85d600Cf73cCE665",
343
+ VBJPY: "0x0614a2BBeE52cc8B76739Ab008F343e960E42779",
344
344
  },
345
345
  },
346
346
  balancerVault: "0xBA12222222228d8Ba445958a75a0704d566BF2C8",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verified-network/verified-sdk",
3
- "version": "2.5.6",
3
+ "version": "2.5.8",
4
4
  "description": "An SDK to develop applications on the Verified Network",
5
5
  "repository": {
6
6
  "type": "git",