@verified-network/verified-sdk 0.5.8 → 0.6.1
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/assetmanager/BalancerManager.json +17839 -14493
- package/dist/abi/liquidity/Distribution.json +2443 -2943
- package/dist/abi/liquidity/Liquidity.json +14048 -12140
- package/dist/contract/assetmanager/index.js +13 -2
- package/dist/contract/liquidity/index.js +15 -6
- package/dist/contractAddress/index.js +3 -3
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@ var FUNCTIONS;
|
|
|
10
10
|
FUNCTIONS["GETOFFERED"] = "getOffered";
|
|
11
11
|
FUNCTIONS["GETOFFERMADE"] = "getOfferMade";
|
|
12
12
|
FUNCTIONS["GETALLOTTEDSTAKE"] = "getAllotedStake";
|
|
13
|
+
FUNCTIONS["GETLIQUIDITYPROVIDERS"] = "getLiquidityProviders";
|
|
13
14
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
14
15
|
class AssetManager extends index_1.VerifiedContract {
|
|
15
16
|
constructor(signer, platformAddress) {
|
|
@@ -54,8 +55,18 @@ class AssetManager extends index_1.VerifiedContract {
|
|
|
54
55
|
* @param options
|
|
55
56
|
* @returns amount of available liquidity for caller (asset manager)
|
|
56
57
|
*/
|
|
57
|
-
async getAllotedStake(
|
|
58
|
-
return this.callContract(FUNCTIONS.GETALLOTTEDSTAKE
|
|
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);
|
|
59
70
|
}
|
|
60
71
|
}
|
|
61
72
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
84
|
-
return this.callContract(FUNCTIONS.GETINVESTORS
|
|
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': '
|
|
28
|
-
'Distribution': '
|
|
29
|
-
'AssetManager': '
|
|
27
|
+
'Liquidity': '0xcA352C991b980995D99ED9a63674ea497D9ca5A8',
|
|
28
|
+
'Distribution': '0xe68B06B7E38413269C8B64F0ed7966cE591e6706',
|
|
29
|
+
'AssetManager': '0x86b752ACe79829470e39976CA67DEcF1604F13dE',
|
|
30
30
|
'Custody': '0xb6DD33C076fE95ffACC84E048Bda1caa6C304673',
|
|
31
31
|
'CASH': {
|
|
32
32
|
'VCUSD': '0xac27eeA1D7B9778D5C8D9b595282AEA076e54E90',
|