@verified-network/verified-sdk 0.5.6 → 0.6.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.
Files changed (33) hide show
  1. package/dist/abi/accounts/Account.json +3 -3
  2. package/dist/abi/accounts/Client.json +676 -676
  3. package/dist/abi/accounts/Holder.json +3 -3
  4. package/dist/abi/accounts/Kyc.json +3 -3
  5. package/dist/abi/accounts/Ledger.json +3 -3
  6. package/dist/abi/accounts/System.json +4 -4
  7. package/dist/abi/assetmanager/BalancerManager.json +45127 -0
  8. package/dist/abi/liquidity/Distribution.json +53 -53
  9. package/dist/abi/liquidity/Liquidity.json +35017 -27009
  10. package/dist/abi/payments/Bond.json +930 -930
  11. package/dist/abi/payments/Cash.json +8537 -8433
  12. package/dist/abi/payments/Factory.json +1761 -1761
  13. package/dist/abi/payments/Oracle.json +2176 -2176
  14. package/dist/abi/payments/Rates.json +1376 -1376
  15. package/dist/abi/payments/Token.json +1220 -1220
  16. package/dist/abi/securities/Bonds.json +7192 -9467
  17. package/dist/abi/securities/Products.json +5956 -4766
  18. package/dist/abi/securities/Stocks.json +5555 -5849
  19. package/dist/abi/trades/OrderPool.json +4 -4
  20. package/dist/abi/trades/PoolFactory.json +3 -3
  21. package/dist/abi/trades/PostTrade.json +3 -3
  22. package/dist/abi/trades/PreTrade.json +4 -4
  23. package/dist/abi/trades/SecuritiesRegistry.json +4 -4
  24. package/dist/abi/trades/Security.json +3 -3
  25. package/dist/abi/trades/Trade.json +4 -4
  26. package/dist/contract/assetmanager/index.js +72 -0
  27. package/dist/contract/balancer/index.js +32 -12
  28. package/dist/contract/liquidity/index.js +95 -11
  29. package/dist/contract/product/index.js +9 -0
  30. package/dist/contract/securitiesregistry/index.js +1 -1
  31. package/dist/contractAddress/index.js +31 -30
  32. package/dist/index.js +3 -1
  33. package/package.json +1 -1
@@ -56207,14 +56207,14 @@
56207
56207
  "3": {
56208
56208
  "events": {},
56209
56209
  "links": {
56210
- "stringutils": "0x02aeBE191ff79C4b0AbF6C8c35650f9f7c9f816d"
56210
+ "stringutils": "0x2D14e93232C3C276073D2496732CCb82a9949918"
56211
56211
  },
56212
- "address": "0x18d202852377DA0C972BfD7f1145a3a000b5E35E",
56213
- "transactionHash": "0x5810988180b6f38d671b6630196b9ad7a0fa5cf0afae12bf754a2b85b814e1e2"
56212
+ "address": "0xB8F217a7a49B250ed02577FC9F9C4B538da8c847",
56213
+ "transactionHash": "0xfdb5b50c60b41811cb18c041647051fcdb9b28533d18fe3930feeeeed386579b"
56214
56214
  }
56215
56215
  },
56216
56216
  "schemaVersion": "3.4.3",
56217
- "updatedAt": "2022-02-05T15:49:24.504Z",
56217
+ "updatedAt": "2022-02-19T08:19:00.642Z",
56218
56218
  "networkType": "ethereum",
56219
56219
  "devdoc": {
56220
56220
  "methods": {}
@@ -5893,12 +5893,12 @@
5893
5893
  "3": {
5894
5894
  "events": {},
5895
5895
  "links": {},
5896
- "address": "0xdb0DcCF068710176f1a6E7798c3dE3cf7B282ce4",
5897
- "transactionHash": "0xcd446b10d7fd34950391ff252ef57337e645a2a38fb9e41225f4365ee19167c1"
5896
+ "address": "0xBF4872e094A621Be1eCE8f72bbc78C885034ac98",
5897
+ "transactionHash": "0x2cc37f99a3d782456afa14fd535623d806e440f5145b8889af74aa25f9edb807"
5898
5898
  }
5899
5899
  },
5900
5900
  "schemaVersion": "3.4.3",
5901
- "updatedAt": "2022-02-05T15:49:24.489Z",
5901
+ "updatedAt": "2022-02-19T08:19:00.628Z",
5902
5902
  "networkType": "ethereum",
5903
5903
  "devdoc": {
5904
5904
  "methods": {}
@@ -15934,12 +15934,12 @@
15934
15934
  "3": {
15935
15935
  "events": {},
15936
15936
  "links": {},
15937
- "address": "0x4Bf43C7937457550A16e2c1590BC9BdF8BC4D90C",
15938
- "transactionHash": "0xee2755f46ef07c5e9a28074734854e12406efb117df683a186265f72bad4f8d1"
15937
+ "address": "0x2cdc21375844Ad844Cef6f9Ce19379f38C073f53",
15938
+ "transactionHash": "0x8b3c88b6142e843f2abfec7601d78cea08bbb4bbb53a736ed8e9e53b8b01941f"
15939
15939
  }
15940
15940
  },
15941
15941
  "schemaVersion": "3.4.3",
15942
- "updatedAt": "2022-02-05T15:49:24.545Z",
15942
+ "updatedAt": "2022-02-19T08:19:00.983Z",
15943
15943
  "networkType": "ethereum",
15944
15944
  "devdoc": {
15945
15945
  "methods": {}
@@ -27091,14 +27091,14 @@
27091
27091
  "3": {
27092
27092
  "events": {},
27093
27093
  "links": {
27094
- "stringutils": "0x02aeBE191ff79C4b0AbF6C8c35650f9f7c9f816d"
27094
+ "stringutils": "0x2D14e93232C3C276073D2496732CCb82a9949918"
27095
27095
  },
27096
- "address": "0xBa694d60Ba62164C1E353016279B57CA9C32172A",
27097
- "transactionHash": "0xb3e2a43106d534e2223a6a42e2859e3af13edccbaba940f155fbded56db44f90"
27096
+ "address": "0xc8Ac3C49583122a25725784B26aEdcBddE263d26",
27097
+ "transactionHash": "0xdf0788ad6434ccf862183541b9e28dbfe9d2d96be703481b6acea921b46150d4"
27098
27098
  }
27099
27099
  },
27100
27100
  "schemaVersion": "3.4.3",
27101
- "updatedAt": "2022-02-05T15:49:24.465Z",
27101
+ "updatedAt": "2022-02-19T08:19:00.604Z",
27102
27102
  "networkType": "ethereum",
27103
27103
  "devdoc": {
27104
27104
  "methods": {}
@@ -22005,14 +22005,14 @@
22005
22005
  }
22006
22006
  },
22007
22007
  "links": {
22008
- "stringutils": "0x02aeBE191ff79C4b0AbF6C8c35650f9f7c9f816d"
22008
+ "stringutils": "0x2D14e93232C3C276073D2496732CCb82a9949918"
22009
22009
  },
22010
- "address": "0x31515db22638531284D1047C177F17EC609b6e21",
22011
- "transactionHash": "0xd66bf4dc30a2163471c9ea2544d64551534ea102641521ff1d0860860580ab8b"
22010
+ "address": "0xf381712b49D86768c729446254B474e31364fa28",
22011
+ "transactionHash": "0x8c2c8d99f40d5977fcaade7186de184f2a703c6b65130468ba26589abe6dbf3b"
22012
22012
  }
22013
22013
  },
22014
22014
  "schemaVersion": "3.4.3",
22015
- "updatedAt": "2022-02-05T15:49:24.477Z",
22015
+ "updatedAt": "2022-02-19T08:19:00.616Z",
22016
22016
  "networkType": "ethereum",
22017
22017
  "devdoc": {
22018
22018
  "methods": {
@@ -7307,12 +7307,12 @@
7307
7307
  "3": {
7308
7308
  "events": {},
7309
7309
  "links": {},
7310
- "address": "0xDb4b434C3c87Fcd054b044D848d8E46e63B1A0bf",
7311
- "transactionHash": "0xc9f9a1f7d9365ea3de300437f81950cffbe0dc6d0763579c9b900159d97f2540"
7310
+ "address": "0xc8489565c193ad196eDED4488538ef5aC18242b1",
7311
+ "transactionHash": "0x742a0c2787cb45037b71dd4c4b95968637220ce0278975d964db373d2350737c"
7312
7312
  }
7313
7313
  },
7314
7314
  "schemaVersion": "3.4.3",
7315
- "updatedAt": "2022-02-05T15:49:24.485Z",
7315
+ "updatedAt": "2022-02-19T08:19:00.624Z",
7316
7316
  "networkType": "ethereum",
7317
7317
  "devdoc": {
7318
7318
  "methods": {
@@ -33340,14 +33340,14 @@
33340
33340
  "3": {
33341
33341
  "events": {},
33342
33342
  "links": {
33343
- "stringutils": "0x02aeBE191ff79C4b0AbF6C8c35650f9f7c9f816d"
33343
+ "stringutils": "0x2D14e93232C3C276073D2496732CCb82a9949918"
33344
33344
  },
33345
- "address": "0x45cCaa9D61D7eD7aA2784Fac98d3F33AcfD2f149",
33346
- "transactionHash": "0xf28f9286a42aaa750c014e46eb79953228996eb2c1554bc1f65b782721a9945a"
33345
+ "address": "0xAd0d9B75b25F9291610dfF5c2536566eA94277c3",
33346
+ "transactionHash": "0x2b0a930cce29e0d967776513a51719068465710a95312f8db7e991478df4c1c1"
33347
33347
  }
33348
33348
  },
33349
33349
  "schemaVersion": "3.4.3",
33350
- "updatedAt": "2022-02-05T15:49:24.528Z",
33350
+ "updatedAt": "2022-02-19T08:19:00.662Z",
33351
33351
  "networkType": "ethereum",
33352
33352
  "devdoc": {
33353
33353
  "methods": {}
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ // SPDX-License-Identifier: BUSL-1.1
3
+ // @ts-nocheck
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ const index_1 = require("../index");
6
+ const BalancerManager_json_1 = require("../../abi/assetmanager/BalancerManager.json");
7
+ var FUNCTIONS;
8
+ (function (FUNCTIONS) {
9
+ FUNCTIONS["OFFER"] = "offer";
10
+ FUNCTIONS["GETOFFERED"] = "getOffered";
11
+ FUNCTIONS["GETOFFERMADE"] = "getOfferMade";
12
+ FUNCTIONS["GETALLOTTEDSTAKE"] = "getAllotedStake";
13
+ FUNCTIONS["GETLIQUIDITYPROVIDERS"] = "getLiquidityProviders";
14
+ })(FUNCTIONS || (FUNCTIONS = {}));
15
+ class AssetManager extends index_1.VerifiedContract {
16
+ constructor(signer, platformAddress) {
17
+ const chainId = signer.provider._network.chainId.toString();
18
+ const address = platformAddress;
19
+ super(address, JSON.stringify(BalancerManager_json_1.abi), signer);
20
+ this.contractAddress = address;
21
+ }
22
+ async offer(owned, isin, offered, tomatch, desired, min, options) {
23
+ await this.validateInput(index_1.DATATYPES.ADDRESS, owned);
24
+ await this.validateInput(index_1.DATATYPES.ADDRESS, tomatch);
25
+ await this.validateInput(index_1.DATATYPES.STRING, isin);
26
+ await this.validateInput(index_1.DATATYPES.NUMBER, offered);
27
+ await this.validateInput(index_1.DATATYPES.NUMBER, desired);
28
+ await this.validateInput(index_1.DATATYPES.NUMBER, min);
29
+ return this.callContract(FUNCTIONS.OFFER, owned, this.sanitiseInput(index_1.DATATYPES.BYTE32, isin), offered, tomatch, desired, min, options);
30
+ }
31
+ /**
32
+ * Gets security tokens offered for passed token parameter
33
+ * @param offered address of liquidity token offered by asset manager
34
+ * @param options
35
+ * @returns array of structs of security tokens matching with offered liquidity token
36
+ */
37
+ async getOffered(offered, options) {
38
+ await this.validateInput(index_1.DATATYPES.ADDRESS, offered);
39
+ return this.callContract(FUNCTIONS.GETOFFERED, offered, options);
40
+ }
41
+ /**
42
+ * Gets offer made previously with offered token and token to match
43
+ * @param offered address of offered token
44
+ * @param tomatch address of token to match
45
+ * @param options
46
+ * @returns token struct
47
+ */
48
+ async getOfferMade(offered, tomatch, options) {
49
+ await this.validateInput(index_1.DATATYPES.ADDRESS, offered);
50
+ await this.validateInput(index_1.DATATYPES.ADDRESS, tomatch);
51
+ return this.callContract(FUNCTIONS.GETOFFERMADE, offered, tomatch, options);
52
+ }
53
+ /**
54
+ * Gets allotted liquidity stake for caller (asset manager) that is available to invest
55
+ * @param options
56
+ * @returns amount of available liquidity for caller (asset manager)
57
+ */
58
+ async getAllotedStake() {
59
+ return this.callContract(FUNCTIONS.GETALLOTTEDSTAKE);
60
+ }
61
+ /**
62
+ * Gets liquidity providers for a security token offering
63
+ * @param security address of security token
64
+ * @param options
65
+ * @returns array of structs of liquidity providers
66
+ */
67
+ async getLiquidityProviders(security, options) {
68
+ await this.validateInput(index_1.DATATYPES.ADDRESS, security);
69
+ return this.callContract(FUNCTIONS.GETLIQUIDITYPROVIDERS, security, options);
70
+ }
71
+ }
72
+ exports.default = AssetManager;
@@ -3,26 +3,46 @@
3
3
  // @ts-nocheck
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  const index_1 = require("../index");
6
- const BalancerManager_json_1 = require("../../abi/liquidity/balancer/BalancerManager.json");
6
+ const BalancerManager_json_1 = require("../../abi/balancer/BalancerManager.json");
7
7
  var FUNCTIONS;
8
8
  (function (FUNCTIONS) {
9
- FUNCTIONS["MARKETMAKE"] = "make";
9
+ FUNCTIONS["OFFER"] = "offer";
10
+ FUNCTIONS["GETOFFERED"] = "getOffered";
11
+ FUNCTIONS["GETALLOTTEDSTAKE"] = "getAllotedStake";
10
12
  })(FUNCTIONS || (FUNCTIONS = {}));
11
- class BalancerManagerContract extends index_1.VerifiedContract {
13
+ class BalancerManager extends index_1.VerifiedContract {
12
14
  constructor(signer) {
13
15
  const chainId = signer.provider._network.chainId.toString();
14
16
  const address = BalancerManager_json_1.networks[chainId].address;
15
17
  super(address, JSON.stringify(BalancerManager_json_1.abi), signer);
16
18
  this.contractAddress = address;
17
19
  }
18
- async make(_owned, _isin, _offered, _tomatch, _desired, _min, options) {
19
- await this.validateInput(index_1.DATATYPES.ADDRESS, _owned);
20
- await this.validateInput(index_1.DATATYPES.STRING, _isin);
21
- await this.validateInput(index_1.DATATYPES.NUMBER, _offered);
22
- await this.validateInput(index_1.DATATYPES.ADDRESS, _tomatch);
23
- await this.validateInput(index_1.DATATYPES.NUMBER, _desired);
24
- await this.validateInput(index_1.DATATYPES.NUMBER, _min);
25
- return this.callContract(FUNCTIONS.MARKETMAKE, _owned, this.sanitiseInput(index_1.DATATYPES.BYTE32, _isin), _offered, _tomatch, _desired, _min, options);
20
+ async offer(owned, isin, offered, tomatch, desired, min, options) {
21
+ await this.validateInput(index_1.DATATYPES.ADDRESS, owned);
22
+ await this.validateInput(index_1.DATATYPES.ADDRESS, tomatch);
23
+ await this.validateInput(index_1.DATATYPES.STRING, isin);
24
+ await this.validateInput(index_1.DATATYPES.NUMBER, offered);
25
+ await this.validateInput(index_1.DATATYPES.NUMBER, desired);
26
+ await this.validateInput(index_1.DATATYPES.NUMBER, min);
27
+ return this.callContract(FUNCTIONS.OFFER, owned, this.sanitiseInput(index_1.DATATYPES.BYTE32, isin), offered, tomatch, desired, min, options);
28
+ }
29
+ /**
30
+ * Gets security tokens offered for passed token parameter
31
+ * @param offered address of liquidity token offered by asset manager
32
+ * @param options
33
+ * @returns array of structs of security tokens matching with offered liquidity token
34
+ */
35
+ async getOffered(offered, options) {
36
+ await this.validateInput(index_1.DATATYPES.ADDRESS, offered);
37
+ return this.callContract(FUNCTIONS.GETOFFERED, offered, options);
38
+ }
39
+ /**
40
+ * Gets allotted liquidity stake for caller (asset manager) that is available to invest
41
+ * @param options
42
+ * @returns amount of available liquidity for caller (asset manager)
43
+ */
44
+ async getAllotedStake(options) {
45
+ return this.callContract(FUNCTIONS.GETALLOTTEDSTAKE, options);
26
46
  }
27
47
  }
28
- exports.default = BalancerManagerContract;
48
+ exports.default = BalancerManager;
@@ -17,6 +17,12 @@ var FUNCTIONS;
17
17
  FUNCTIONS["STAKE"] = "stake";
18
18
  FUNCTIONS["WITHDRAW"] = "withdraw";
19
19
  FUNCTIONS["DISTRIBUTE"] = "distribute";
20
+ FUNCTIONS["ADDMANAGER"] = "addManager";
21
+ FUNCTIONS["REMOVEMANAGER"] = "removeManager";
22
+ FUNCTIONS["GETMANAGERS"] = "getManagers";
23
+ FUNCTIONS["GETPLATFORMS"] = "getPlaforms";
24
+ FUNCTIONS["GETPLATFORMPERFORMANCE"] = "getPlatformPerformance";
25
+ FUNCTIONS["GETMANAGERPERFORMANCE"] = "getManagerPerformance";
20
26
  FUNCTIONS["PROVIDELIQUIDITY"] = "provideLiquidity";
21
27
  })(FUNCTIONS || (FUNCTIONS = {}));
22
28
  class LiquidityContract extends index_1.VerifiedContract {
@@ -42,9 +48,10 @@ class LiquidityContract extends index_1.VerifiedContract {
42
48
  Specifies list of supported tokens that can be invested in the Verified Liquidity token
43
49
  @param _tokens array of supported token addresses
44
50
  */
45
- async supportTokens(_tokens, options) {
51
+ async supportTokens(_tokens, _name, options) {
46
52
  await this.validateInput(index_1.DATATYPES.STRING, _tokens);
47
- return this.callContract(FUNCTIONS.SUPPORTTOKENS, _tokens, options);
53
+ await this.validateInput(index_1.DATATYPES.STRING, _name);
54
+ return this.callContract(FUNCTIONS.SUPPORTTOKENS, _tokens, this.sanitiseInput(index_1.DATATYPES.BYTE32, _name), options);
48
55
  }
49
56
  /**
50
57
  Checks if a specified token is supported for investing in the Verified Liquidity token
@@ -58,9 +65,10 @@ class LiquidityContract extends index_1.VerifiedContract {
58
65
  Registers a liquidity platform (eg, DEX) where Verified Liquidity tokens can be used to underwrite investments
59
66
  @param _liquidityPlatform address of the market making platform
60
67
  */
61
- async registerPlatform(_platform, options) {
68
+ async registerPlatform(_platform, _name, options) {
62
69
  await this.validateInput(index_1.DATATYPES.ADDRESS, _platform);
63
- return this.callContract(FUNCTIONS.REGISTERPLATFORM, _platform, options);
70
+ await this.validateInput(index_1.DATATYPES.STRING, _name);
71
+ return this.callContract(FUNCTIONS.REGISTERPLATFORM, _platform, this.sanitiseInput(index_1.DATATYPES.BYTE32, _name), options);
64
72
  }
65
73
  /**
66
74
  Used by external apps (eg, exchange, wallet) to buy Verified Liquidity token
@@ -75,8 +83,14 @@ class LiquidityContract extends index_1.VerifiedContract {
75
83
  /**
76
84
  Fetches investors in VITTA
77
85
  */
78
- async getInvestors(options) {
79
- return this.callContract(FUNCTIONS.GETINVESTORS, options);
86
+ async getInvestors() {
87
+ return this.callContract(FUNCTIONS.GETINVESTORS);
88
+ }
89
+ /**
90
+ Fetches registered platforms
91
+ */
92
+ async getPlaforms() {
93
+ return this.callContract(FUNCTIONS.GETPLATFORMS);
80
94
  }
81
95
  /**
82
96
  Fetches investment detail for specific investor in VITTA
@@ -121,16 +135,86 @@ class LiquidityContract extends index_1.VerifiedContract {
121
135
  /**
122
136
  Pay out of income by Market maker contracts to VITTA Liquidity providers
123
137
  @param _distribution amount of VITTA to mint and distribute pro rata to liquidity providers
138
+ @param _manager address of asset manager
124
139
  */
125
- async distribute(_distribution, options) {
140
+ async distribute(_distribution, _manager, options) {
126
141
  await this.validateInput(index_1.DATATYPES.NUMBER, _distribution);
127
- return this.callContract(FUNCTIONS.DISTRIBUTE, _distribution, options);
142
+ await this.validateInput(index_1.DATATYPES.ADDRESS, _manager);
143
+ return this.callContract(FUNCTIONS.DISTRIBUTE, _distribution, _manager, options);
144
+ }
145
+ /**
146
+ * Adds asset manager to manage liquidity
147
+ * @param _platform address of market making platform (eg Balancer)
148
+ * @param _manager address of asset manager
149
+ * @param options
150
+ * @returns none
151
+ */
152
+ async addManager(_platform, _manager, options) {
153
+ await this.validateInput(index_1.DATATYPES.ADDRESS, _platform);
154
+ await this.validateInput(index_1.DATATYPES.ADDRESS, _manager);
155
+ return this.callContract(FUNCTIONS.ADDMANAGER, _platform, _manager, options);
156
+ }
157
+ /**
158
+ * Removes asset manager managing liquidity
159
+ * @param _platform address of market making platform (eg Balancer)
160
+ * @param _manager address of asset manager
161
+ * @param options
162
+ * @returns none
163
+ */
164
+ async removeManager(_platform, _manager, options) {
165
+ await this.validateInput(index_1.DATATYPES.ADDRESS, _platform);
166
+ await this.validateInput(index_1.DATATYPES.ADDRESS, _manager);
167
+ return this.callContract(FUNCTIONS.REMOVEMANAGER, _platform, _manager, options);
168
+ }
169
+ /**
170
+ * Fetches asset managers
171
+ * @param _platform address of market making platform
172
+ * @param options
173
+ * @returns array of asset manager addresses
174
+ */
175
+ async getManagers(_platform, options) {
176
+ await this.validateInput(index_1.DATATYPES.ADDRESS, _platform);
177
+ return this.callContract(FUNCTIONS.GETMANAGERS, _platform, options);
178
+ }
179
+ /**
180
+ * Gets return on investment performance of market making platform
181
+ * @param _platform address of market making platform
182
+ * @param options
183
+ * @returns uint256 unstakedLiquidity,
184
+ uint256 balancePlatformLiquidity,
185
+ uint256 platformLiquidityProvided,
186
+ uint256 platformCommissionsEarned
187
+ */
188
+ async getPlatformPerformance(_platform, options) {
189
+ await this.validateInput(index_1.DATATYPES.ADDRESS, _platform);
190
+ return this.callContract(FUNCTIONS.GETPLATFORMPERFORMANCE, _platform, options);
191
+ }
192
+ /**
193
+ * Gets return on investment performance for asset manager
194
+ * @param _platform address of market making platform (eg Balancer)
195
+ * @param _manager address of asset manager
196
+ * @param options
197
+ * @returns uint256 managerLiquidityProvided,
198
+ uint256 managerCommissionsEarned
199
+ */
200
+ async getManagerPerformance(_platform, _manager, options) {
201
+ await this.validateInput(index_1.DATATYPES.ADDRESS, _platform);
202
+ await this.validateInput(index_1.DATATYPES.ADDRESS, _manager);
203
+ return this.callContract(FUNCTIONS.GETMANAGERPERFORMANCE, _platform, _manager, options);
128
204
  }
129
205
  /**
130
- Provides staked VITTA to Market maker contracts based on prior liquidity consumed and commission earned
206
+ * Provides liquidity to asset managers on platform
207
+ * @param _platform address of market making platform
208
+ * @param _manager address of asset manager
209
+ * @param _liquidity amount of liquidity to provision to asset manager on platform
210
+ * @param options
211
+ * @returns none
131
212
  */
132
- async provideLiquidity(options) {
133
- return this.callContract(FUNCTIONS.PROVIDELIQUIDITY, options);
213
+ async provideLiquidity(_platform, _manager, _liquidity, options) {
214
+ await this.validateInput(index_1.DATATYPES.ADDRESS, _platform);
215
+ await this.validateInput(index_1.DATATYPES.ADDRESS, _manager);
216
+ await this.validateInput(index_1.DATATYPES.NUMBER, _liquidity);
217
+ return this.callContract(FUNCTIONS.PROVIDELIQUIDITY, _platform, _manager, _liquidity, options);
134
218
  }
135
219
  }
136
220
  exports.default = LiquidityContract;
@@ -19,6 +19,8 @@ var FUNCTIONS;
19
19
  FUNCTIONS["GETISSUE"] = "getIssue";
20
20
  FUNCTIONS["GETISSUERNAME"] = "getIssuerName";
21
21
  FUNCTIONS["GETISSUERADDRESS"] = "getIssuerAddress";
22
+ FUNCTIONS["GETPLATFORMS"] = "getPlatforms";
23
+ FUNCTIONS["GETPRODUCTREFERENCE"] = "getProductReference";
22
24
  })(FUNCTIONS || (FUNCTIONS = {}));
23
25
  class ProductContract extends index_1.VerifiedContract {
24
26
  constructor(signer) {
@@ -87,5 +89,12 @@ class ProductContract extends index_1.VerifiedContract {
87
89
  await this.validateInput(index_1.DATATYPES.STRING, _ref);
88
90
  return this.callContract(FUNCTIONS.GETISSUERADDRESS, _ref, options);
89
91
  }
92
+ async getPlatforms() {
93
+ return this.callContract(FUNCTIONS.GETPLATFORMS);
94
+ }
95
+ async getProductReference(_issue, options) {
96
+ await this.validateInput(index_1.DATATYPES.ADDRESS, _issue);
97
+ return this.callContract(FUNCTIONS.GETPRODUCTREFERENCE, _issue, options);
98
+ }
90
99
  }
91
100
  exports.default = ProductContract;
@@ -73,7 +73,7 @@ class SecuritiesRegistryContract extends index_1.VerifiedContract {
73
73
  async getCorporateActions(_category, _isin, options) {
74
74
  await this.validateInput(index_1.DATATYPES.STRING, _category);
75
75
  await this.validateInput(index_1.DATATYPES.STRING, _isin);
76
- return this.callContract(FUNCTIONS.GETCORPORATEACTION, _category, this.sanitiseInput(index_1.DATATYPES.BYTE32, _isin), options);
76
+ return this.callContract(FUNCTIONS.GETCORPORATEACTION, this.sanitiseInput(index_1.DATATYPES.BYTE32, _isin), _category, options);
77
77
  }
78
78
  /**
79
79
  * Gets credit score
@@ -2,40 +2,41 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const contractAddress = {
4
4
  'ropsten': {
5
- 'Client': '0x854834dbCBB8FBd227E2796187Eb922EE6202B26',
6
- 'KYC': '0x652De7ec6599a83e10A46006298dC9ADDCE98211',
7
- 'System': '0xDB436d805Bb39C24652B3532618d9172b485449c',
8
- 'Holder': '0xcd835F8B6686FEaA5228DaD98870a0966d0B90A6',
9
- 'Ledger': '0xb36F946f45be43C82170f0b9da50f039dC91177C',
10
- 'Account': '0xd2aD434A9e291F35AD33be54716c5FEE2B8449B8',
11
- 'Factory': '0x8F60a9A6DfD99be7afc136efDcEde1EEA84EBf8e',
12
- 'Cash': '0xfB97Ff7c3f03A84B43441F90d33C88A625c21be8',
13
- 'Bond': '0x4d3Bb75d64c5613715daaB8C7ae99E6759f21134',
14
- 'Token': '0xd96e55D4559677c6Ad388B308de49CD58FaD662B',
15
- 'Oracle': '0xE2420143F171328CA8dEbFAB657854737BE123Df',
16
- 'Rates': '0xb55F73FD5783362C5765A259f487741ecd530F40',
17
- 'PreTrade': '0xBa694d60Ba62164C1E353016279B57CA9C32172A',
18
- 'Trade': '0x45cCaa9D61D7eD7aA2784Fac98d3F33AcfD2f149',
19
- 'PostTrade': '0x4Bf43C7937457550A16e2c1590BC9BdF8BC4D90C',
20
- 'SecuritiesRegistry': '0x31515db22638531284D1047C177F17EC609b6e21',
21
- 'Security': '0xDb4b434C3c87Fcd054b044D848d8E46e63B1A0bf',
22
- 'OrderPool': '0x18d202852377DA0C972BfD7f1145a3a000b5E35E',
23
- 'PoolFactory': '0xdb0DcCF068710176f1a6E7798c3dE3cf7B282ce4',
24
- 'Products': '0x1d069536340d99E44F9e552C7bE31810abdc859A',
25
- 'Stocks': '0x56E7E41648853dC3ea64bC1CfbF2131dFFaa5889',
26
- 'Bonds': '0x30e6ba5D02E6d6F64aBAb2319079dfa1473e8a4D',
27
- 'Liquidity': '0xa3562f3858dc1D56F30F8353b69aD63DF8ba0aab',
28
- 'Distribution': '0xD07B6d0d5E36198d6F080d308E8ED30A57Da9dE8',
5
+ 'Client': '0x984b378b8a127aE900eA5F19CB7CbA6529eB3633',
6
+ 'KYC': '0x09677010AbA42A9E469D093dc50A108D69DB081A',
7
+ 'System': '0x79A1895Ea13D5b41274Ab851CC634ed896C1D1F1',
8
+ 'Holder': '0x1EaDa3d313beca88e3255b35c1bD3Fd2b6751e24',
9
+ 'Ledger': '0x95D661E06Bc5e936804B03Df73C9303A5606F0e6',
10
+ 'Account': '0x4F1Cad303FC6D5Fe33Fe17dB64E2AfBAee35595c',
11
+ 'Factory': '0x836c720b59dD5912DBB2a99757493816F2B59562',
12
+ 'Cash': '0x49C7f8D2D821e9Af80EbaA195A144E5Db97A3B40',
13
+ 'Bond': '0xB8810B7EB37E2F38E0fb37e71863fe7F23A167ae',
14
+ 'Token': '0x427b78CC87ba3123a825a1BB39eF428443DbdA90',
15
+ 'Oracle': '0xce5d6dC4529591863912fE39E8E5645BCe6Db518',
16
+ 'Rates': '0x3FfdaD9752B81c294D7b8425Bd1d9Ec55d47cb87',
17
+ 'PreTrade': '0xc8Ac3C49583122a25725784B26aEdcBddE263d26',
18
+ 'Trade': '0xAd0d9B75b25F9291610dfF5c2536566eA94277c3',
19
+ 'PostTrade': '0x2cdc21375844Ad844Cef6f9Ce19379f38C073f53',
20
+ 'SecuritiesRegistry': '0xf381712b49D86768c729446254B474e31364fa28',
21
+ 'Security': '0xc8489565c193ad196eDED4488538ef5aC18242b1',
22
+ 'OrderPool': '0xB8F217a7a49B250ed02577FC9F9C4B538da8c847',
23
+ 'PoolFactory': '0xBF4872e094A621Be1eCE8f72bbc78C885034ac98',
24
+ 'Products': '0x8d0517CCCB30a6621bF7e718a023664B1626572b',
25
+ 'Stocks': '0x595EDBeD8073DadB80e8CF72Ae4e862D0ead6410',
26
+ 'Bonds': '0x40a62d2C91C532C7695Ac14fEf2B8F0087699885',
27
+ 'Liquidity': '0x483885DF21C911ef38D2D1B6CC61b7beCF72b37f',
28
+ 'Distribution': '0x9B4545e0e3A1E853F0295fA69Deb34242B322332',
29
+ 'AssetManager': '0x48Ba77046b15B18381234316c15C6A79251A14Eb',
29
30
  'Custody': '0xb6DD33C076fE95ffACC84E048Bda1caa6C304673',
30
31
  'CASH': {
31
- 'VCUSD': '0x807A82d1b708D6C6703e734FacE0c1C0de363A00',
32
- 'VCEUR': '0xB9a104BE007BCF7207e3abbf5712f30b0f2a8e2B',
33
- 'VCINR': '0xe45A5EF3053FBd8301Fa7A0f837B5b14A343BBcb'
32
+ 'VCUSD': '0xac27eeA1D7B9778D5C8D9b595282AEA076e54E90',
33
+ 'VCEUR': '0xC25Dac47A2e323Da3eE1A665ACd0C62626Ca8279',
34
+ 'VCINR': '0xA268e5B4e980BeedCCB11635454AA0DC89Ba06B2'
34
35
  },
35
36
  'BOND': {
36
- 'VBUSD': '0x4586b99A5D698f99f701208DEAab9559a9DaD749',
37
- 'VBEUR': '0x0e16CD19d69CeB0DDD8af39ea8aE6D0d7Ca3427b',
38
- 'VBINR': '0xE38164e94fd6EE672f8e3e38A6E2ba265d2552E8'
37
+ 'VBUSD': '0x765414604B95130eD910fae412279D957278b5Fc',
38
+ 'VBEUR': '0x3AE4379Df6578c08De873A2503FEe33252585552',
39
+ 'VBINR': '0x945c4C7fDe7fB281521bB8c348F749121ab81c95'
39
40
  }
40
41
  }
41
42
  };
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  return (mod && mod.__esModule) ? mod : { "default": mod };
5
5
  };
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.contractAddress = exports.utils = exports.RatesContract = exports.LiquidityContract = exports.CustodyContract = exports.BondsContract = exports.StocksContract = exports.ProductContract = exports.DistributionContract = exports.OracleContract = exports.SecurityContract = exports.TokenContract = exports.FactoryContract = exports.TradeContract = exports.SecuritiesRegistryContract = exports.PreTradeContract = exports.PostTradeContract = exports.PoolFactoryContract = exports.OrderPoolContract = exports.CashContract = exports.BondContract = exports.AccountContract = exports.LedgerContract = exports.HolderContract = exports.SystemContract = exports.KYCContract = exports.ClientContract = exports.Provider = exports.VerifiedWallet = void 0;
7
+ exports.contractAddress = exports.utils = exports.AssetManager = exports.RatesContract = exports.LiquidityContract = exports.CustodyContract = exports.BondsContract = exports.StocksContract = exports.ProductContract = exports.DistributionContract = exports.OracleContract = exports.SecurityContract = exports.TokenContract = exports.FactoryContract = exports.TradeContract = exports.SecuritiesRegistryContract = exports.PreTradeContract = exports.PostTradeContract = exports.PoolFactoryContract = exports.OrderPoolContract = exports.CashContract = exports.BondContract = exports.AccountContract = exports.LedgerContract = exports.HolderContract = exports.SystemContract = exports.KYCContract = exports.ClientContract = exports.Provider = exports.VerifiedWallet = void 0;
8
8
  const wallet_1 = require("./wallet");
9
9
  Object.defineProperty(exports, "VerifiedWallet", { enumerable: true, get: function () { return wallet_1.VerifiedWallet; } });
10
10
  const utils_1 = require("./utils");
@@ -59,6 +59,8 @@ const distribution_1 = __importDefault(require("./contract/distribution"));
59
59
  exports.DistributionContract = distribution_1.default;
60
60
  const rates_1 = __importDefault(require("./contract/rates"));
61
61
  exports.RatesContract = rates_1.default;
62
+ const assetmanager_1 = __importDefault(require("./contract/assetmanager"));
63
+ exports.AssetManager = assetmanager_1.default;
62
64
  const ethers_1 = require("ethers");
63
65
  Object.defineProperty(exports, "utils", { enumerable: true, get: function () { return ethers_1.utils; } });
64
66
  const contractAddress_1 = __importDefault(require("./contractAddress"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verified-network/verified-sdk",
3
- "version": "0.5.6",
3
+ "version": "0.6.0",
4
4
  "description": "An SDK to develop applications on the Verified Network",
5
5
  "repository": {
6
6
  "type": "git",