@verified-network/verified-sdk 0.5.8 → 0.5.9

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.
@@ -54,8 +54,8 @@ class AssetManager extends index_1.VerifiedContract {
54
54
  * @param options
55
55
  * @returns amount of available liquidity for caller (asset manager)
56
56
  */
57
- async getAllotedStake(options) {
58
- return this.callContract(FUNCTIONS.GETALLOTTEDSTAKE, options);
57
+ async getAllotedStake() {
58
+ return this.callContract(FUNCTIONS.GETALLOTTEDSTAKE);
59
59
  }
60
60
  }
61
61
  exports.default = AssetManager;
@@ -20,6 +20,7 @@ var FUNCTIONS;
20
20
  FUNCTIONS["ADDMANAGER"] = "addManager";
21
21
  FUNCTIONS["REMOVEMANAGER"] = "removeManager";
22
22
  FUNCTIONS["GETMANAGERS"] = "getManagers";
23
+ FUNCTIONS["GETPLATFORMS"] = "getPlaforms";
23
24
  FUNCTIONS["GETPLATFORMPERFORMANCE"] = "getPlatformPerformance";
24
25
  FUNCTIONS["GETMANAGERPERFORMANCE"] = "getManagerPerformance";
25
26
  FUNCTIONS["PROVIDELIQUIDITY"] = "provideLiquidity";
@@ -47,9 +48,10 @@ class LiquidityContract extends index_1.VerifiedContract {
47
48
  Specifies list of supported tokens that can be invested in the Verified Liquidity token
48
49
  @param _tokens array of supported token addresses
49
50
  */
50
- async supportTokens(_tokens, options) {
51
+ async supportTokens(_tokens, _name, options) {
51
52
  await this.validateInput(index_1.DATATYPES.STRING, _tokens);
52
- 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);
53
55
  }
54
56
  /**
55
57
  Checks if a specified token is supported for investing in the Verified Liquidity token
@@ -63,9 +65,10 @@ class LiquidityContract extends index_1.VerifiedContract {
63
65
  Registers a liquidity platform (eg, DEX) where Verified Liquidity tokens can be used to underwrite investments
64
66
  @param _liquidityPlatform address of the market making platform
65
67
  */
66
- async registerPlatform(_platform, options) {
68
+ async registerPlatform(_platform, _name, options) {
67
69
  await this.validateInput(index_1.DATATYPES.ADDRESS, _platform);
68
- 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);
69
72
  }
70
73
  /**
71
74
  Used by external apps (eg, exchange, wallet) to buy Verified Liquidity token
@@ -80,8 +83,14 @@ class LiquidityContract extends index_1.VerifiedContract {
80
83
  /**
81
84
  Fetches investors in VITTA
82
85
  */
83
- async getInvestors(options) {
84
- 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);
85
94
  }
86
95
  /**
87
96
  Fetches investment detail for specific investor in VITTA
@@ -24,9 +24,9 @@ const contractAddress = {
24
24
  'Products': '0x8d0517CCCB30a6621bF7e718a023664B1626572b',
25
25
  'Stocks': '0x595EDBeD8073DadB80e8CF72Ae4e862D0ead6410',
26
26
  'Bonds': '0x40a62d2C91C532C7695Ac14fEf2B8F0087699885',
27
- 'Liquidity': '0x8998Ca7e3565F465611088b4AB531b08187Aeaa9',
28
- 'Distribution': '0xe4D6ff708Bb82B24467EAa0964128196C7907e82',
29
- 'AssetManager': '0xfb9BAe10F8dEA2f78292bC3c3b455afc60A0c321',
27
+ 'Liquidity': '0xC86966d0CB548744aE62d8769698AD2b73D6bD63',
28
+ 'Distribution': '0x87Fe4826dD795491B8DCaa6e1a8aA9BbA2A5A8B8',
29
+ 'AssetManager': '0xEfA3Bb8d57c458e83B72255Eff078D430E5142aD',
30
30
  'Custody': '0xb6DD33C076fE95ffACC84E048Bda1caa6C304673',
31
31
  'CASH': {
32
32
  'VCUSD': '0xac27eeA1D7B9778D5C8D9b595282AEA076e54E90',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verified-network/verified-sdk",
3
- "version": "0.5.8",
3
+ "version": "0.5.9",
4
4
  "description": "An SDK to develop applications on the Verified Network",
5
5
  "repository": {
6
6
  "type": "git",