@verified-network/verified-sdk 0.8.3 → 0.8.6
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 +29253 -35211
- package/dist/abi/assetmanager/Client.json +1170 -1170
- package/dist/abi/assetmanager/Products.json +658 -340
- package/dist/abi/custody/Vault.json +4 -4
- package/dist/abi/deposits/Bond.json +222 -222
- package/dist/abi/deposits/Cash.json +421 -421
- package/dist/abi/deposits/Factory.json +17533 -5519
- package/dist/abi/deposits/Rates.json +1408 -1408
- package/dist/abi/deposits/Security.json +3417 -9505
- package/dist/abi/liquidity/Liquidity.json +11090 -12315
- package/dist/contract/assetmanager/index.js +8 -2
- package/dist/contract/liquidity/index.js +6 -4
- package/dist/contract/public/factory/index.js +27 -0
- package/dist/contract/public/product/index.js +5 -0
- package/dist/contract/public/security/index.js +7 -27
- package/dist/contractAddress/index.js +16 -18
- package/dist/index.js +1 -3
- package/package.json +1 -1
|
@@ -24,7 +24,12 @@ class AssetManager extends index_1.VerifiedContract {
|
|
|
24
24
|
super(address, JSON.stringify(BalancerManager_json_1.abi), signer);
|
|
25
25
|
this.contractAddress = address;
|
|
26
26
|
}
|
|
27
|
-
async offer(owned, isin, offered, tomatch, desired, min, issuer,
|
|
27
|
+
async offer(owned, isin, offered, tomatch, desired, min, issuer,
|
|
28
|
+
//_hashedMessage: string,
|
|
29
|
+
//_v: string,
|
|
30
|
+
//_r: string,
|
|
31
|
+
//_s: string,
|
|
32
|
+
options) {
|
|
28
33
|
await this.validateInput(index_1.DATATYPES.ADDRESS, owned);
|
|
29
34
|
await this.validateInput(index_1.DATATYPES.ADDRESS, tomatch);
|
|
30
35
|
await this.validateInput(index_1.DATATYPES.ADDRESS, issuer);
|
|
@@ -32,7 +37,8 @@ class AssetManager extends index_1.VerifiedContract {
|
|
|
32
37
|
await this.validateInput(index_1.DATATYPES.NUMBER, offered);
|
|
33
38
|
await this.validateInput(index_1.DATATYPES.NUMBER, desired);
|
|
34
39
|
await this.validateInput(index_1.DATATYPES.NUMBER, min);
|
|
35
|
-
return this.callContract(FUNCTIONS.OFFER, owned, this.sanitiseInput(index_1.DATATYPES.BYTE32, isin), offered, tomatch, desired, min, issuer,
|
|
40
|
+
return this.callContract(FUNCTIONS.OFFER, owned, this.sanitiseInput(index_1.DATATYPES.BYTE32, isin), offered, tomatch, desired, min, issuer,
|
|
41
|
+
/*_hashedMessage, _v, _r, _s,*/ options);
|
|
36
42
|
}
|
|
37
43
|
/**
|
|
38
44
|
* Gets security tokens offered for passed token parameter
|
|
@@ -21,7 +21,7 @@ var FUNCTIONS;
|
|
|
21
21
|
FUNCTIONS["ADDMANAGER"] = "addManager";
|
|
22
22
|
FUNCTIONS["REMOVEMANAGER"] = "removeManager";
|
|
23
23
|
FUNCTIONS["GETMANAGERS"] = "getManagers";
|
|
24
|
-
FUNCTIONS["GETPLATFORMS"] = "
|
|
24
|
+
FUNCTIONS["GETPLATFORMS"] = "getPlatforms";
|
|
25
25
|
FUNCTIONS["GETPLATFORMPERFORMANCE"] = "getPlatformPerformance";
|
|
26
26
|
FUNCTIONS["GETMANAGERPERFORMANCE"] = "getManagerPerformance";
|
|
27
27
|
FUNCTIONS["PROVIDELIQUIDITY"] = "provideLiquidity";
|
|
@@ -99,7 +99,7 @@ class LiquidityContract extends index_1.VerifiedContract {
|
|
|
99
99
|
/**
|
|
100
100
|
Fetches registered platforms
|
|
101
101
|
*/
|
|
102
|
-
async
|
|
102
|
+
async getPlatforms() {
|
|
103
103
|
return this.callContract(FUNCTIONS.GETPLATFORMS);
|
|
104
104
|
}
|
|
105
105
|
/**
|
|
@@ -221,11 +221,13 @@ class LiquidityContract extends index_1.VerifiedContract {
|
|
|
221
221
|
* @param options
|
|
222
222
|
* @returns none
|
|
223
223
|
*/
|
|
224
|
-
async provideLiquidity(_platform, _manager, _liquidity, options) {
|
|
224
|
+
async provideLiquidity(_platform, _manager, _liquidity, _token, _tokenAmount, options) {
|
|
225
225
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _platform);
|
|
226
226
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _manager);
|
|
227
227
|
await this.validateInput(index_1.DATATYPES.NUMBER, _liquidity);
|
|
228
|
-
|
|
228
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _token);
|
|
229
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _tokenAmount);
|
|
230
|
+
return this.callContract(FUNCTIONS.PROVIDELIQUIDITY, _platform, _manager, _liquidity, _token, _tokenAmount, options);
|
|
229
231
|
}
|
|
230
232
|
/**
|
|
231
233
|
* Fetches balance of investor
|
|
@@ -13,6 +13,10 @@ var FUNCTIONS;
|
|
|
13
13
|
FUNCTIONS["GETTOKENCOUNT"] = "getTokenCount";
|
|
14
14
|
FUNCTIONS["GETTOKEN"] = "getToken";
|
|
15
15
|
FUNCTIONS["GETNAMEANDTYPE"] = "getNameAndType";
|
|
16
|
+
FUNCTIONS["SETSIGNER"] = "setSigner";
|
|
17
|
+
FUNCTIONS["ADDBALANCE"] = "addToBalance";
|
|
18
|
+
FUNCTIONS["ISSUESECURITY"] = "issueSecurity";
|
|
19
|
+
FUNCTIONS["SECURITIESADDED"] = "securitiesAdded";
|
|
16
20
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
17
21
|
class VerifiedFactory extends index_1.VerifiedContract {
|
|
18
22
|
constructor(signer) {
|
|
@@ -21,6 +25,14 @@ class VerifiedFactory extends index_1.VerifiedContract {
|
|
|
21
25
|
super(address, JSON.stringify(Factory_json_1.abi), signer);
|
|
22
26
|
this.contractAddress = address;
|
|
23
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
Sets signer to verify bridge
|
|
30
|
+
@param _signer address of signer that can only be set by owner of bridge
|
|
31
|
+
*/
|
|
32
|
+
async setSigner(_signer, options) {
|
|
33
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _signer);
|
|
34
|
+
return this.callContract(FUNCTIONS.SETSIGNER, _signer, options);
|
|
35
|
+
}
|
|
24
36
|
/**
|
|
25
37
|
* Get number of tokens [callable by client]
|
|
26
38
|
* @param
|
|
@@ -88,5 +100,20 @@ class VerifiedFactory extends index_1.VerifiedContract {
|
|
|
88
100
|
await this.validateInput(index_1.DATATYPES.STRING, tokenType);
|
|
89
101
|
return this.callContract(FUNCTIONS.GETISSUER, this.sanitiseInput(index_1.DATATYPES.BYTE32, tokenType), this.sanitiseInput(index_1.DATATYPES.BYTE32, tokenName), options);
|
|
90
102
|
}
|
|
103
|
+
async issueSecurity(_security, _company, _isin, _currency, _issuer, _hashedMessage, _v, _r, _s, options) {
|
|
104
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _security);
|
|
105
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _issuer);
|
|
106
|
+
return this.callContract(FUNCTIONS.ISSUESECURITY, _security, this.sanitiseInput(index_1.DATATYPES.BYTE32, _company), this.sanitiseInput(index_1.DATATYPES.BYTE32, _isin), this.sanitiseInput(index_1.DATATYPES.BYTE32, _currency), _issuer, _hashedMessage, _v, _r, _s, options);
|
|
107
|
+
}
|
|
108
|
+
async addBalance(_security, _transferor, _transferee, _amount, _hashedMessage, _v, _r, _s, options) {
|
|
109
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _security);
|
|
110
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _transferor);
|
|
111
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _transferee);
|
|
112
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _amount);
|
|
113
|
+
return this.callContract(FUNCTIONS.ADDBALANCE, _security, _transferor, _transferee, _amount, _hashedMessage, _v, _r, _s, options);
|
|
114
|
+
}
|
|
115
|
+
notifySecuritiesAdded(callback) {
|
|
116
|
+
this.getEvent(FUNCTIONS.SECURITIESADDED, callback);
|
|
117
|
+
}
|
|
91
118
|
}
|
|
92
119
|
exports.default = VerifiedFactory;
|
|
@@ -7,6 +7,7 @@ const Products_json_1 = require("../../../abi/assetmanager/Products.json");
|
|
|
7
7
|
var FUNCTIONS;
|
|
8
8
|
(function (FUNCTIONS) {
|
|
9
9
|
FUNCTIONS["ISSUEPRODUCT"] = "issueProduct";
|
|
10
|
+
FUNCTIONS["GETPRODUCTREFERENCE"] = "getProductReference";
|
|
10
11
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
11
12
|
class VerifiedProducts extends index_1.VerifiedContract {
|
|
12
13
|
constructor(signer) {
|
|
@@ -20,5 +21,9 @@ class VerifiedProducts extends index_1.VerifiedContract {
|
|
|
20
21
|
await this.validateInput(index_1.DATATYPES.STRING, ref);
|
|
21
22
|
return this.callContract(FUNCTIONS.ISSUEPRODUCT, issue, this.sanitiseInput(index_1.DATATYPES.BYTE32, ref), _hashedMessage, _v, _r, _s, options);
|
|
22
23
|
}
|
|
24
|
+
async getProductReference(issue, options) {
|
|
25
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, issue);
|
|
26
|
+
return this.callContract(FUNCTIONS.GETPRODUCTREFERENCE, issue, options);
|
|
27
|
+
}
|
|
23
28
|
}
|
|
24
29
|
exports.default = VerifiedProducts;
|
|
@@ -6,39 +6,19 @@ const index_1 = require("../../index");
|
|
|
6
6
|
const Security_json_1 = require("../../../abi/deposits/Security.json");
|
|
7
7
|
var FUNCTIONS;
|
|
8
8
|
(function (FUNCTIONS) {
|
|
9
|
-
FUNCTIONS["
|
|
10
|
-
FUNCTIONS["ADDBALANCE"] = "addToBalance";
|
|
11
|
-
FUNCTIONS["TRANSFERBALANCE"] = "transferBalance";
|
|
12
|
-
FUNCTIONS["SECURITIESADDED"] = "securitiesAdded";
|
|
9
|
+
FUNCTIONS["APPROVETOKEN"] = "approveToken";
|
|
13
10
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
14
11
|
class VerifiedSecurity extends index_1.VerifiedContract {
|
|
15
|
-
constructor(signer) {
|
|
16
|
-
const
|
|
17
|
-
const address = Security_json_1.networks[chainId].address;
|
|
12
|
+
constructor(signer, tokenAddress) {
|
|
13
|
+
const address = tokenAddress;
|
|
18
14
|
super(address, JSON.stringify(Security_json_1.abi), signer);
|
|
19
15
|
this.contractAddress = address;
|
|
20
16
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
*/
|
|
25
|
-
async setSigner(_signer, options) {
|
|
26
|
-
await this.validateInput(index_1.DATATYPES.ADDRESS, _signer);
|
|
27
|
-
return this.callContract(FUNCTIONS.SETSIGNER, _signer, options);
|
|
28
|
-
}
|
|
29
|
-
async addToBalance(_isin, _amount, _tokenHolder, _currency, _hashedMessage, _v, _r, _s, options) {
|
|
30
|
-
await this.validateInput(index_1.DATATYPES.ADDRESS, _tokenHolder);
|
|
31
|
-
await this.validateInput(index_1.DATATYPES.NUMBER, _amount);
|
|
32
|
-
return this.callContract(FUNCTIONS.ADDBALANCE, this.sanitiseInput(index_1.DATATYPES.BYTE32, _isin), _amount, _tokenHolder, this.sanitiseInput(index_1.DATATYPES.BYTE32, _currency), _hashedMessage, _v, _r, _s, options);
|
|
33
|
-
}
|
|
34
|
-
async transferBalance(_isin, _transferor, _amount, _transferee, _currency, _hashedMessage, _v, _r, _s, options) {
|
|
35
|
-
await this.validateInput(index_1.DATATYPES.ADDRESS, _transferee);
|
|
36
|
-
await this.validateInput(index_1.DATATYPES.ADDRESS, _transferor);
|
|
17
|
+
async approveToken(_owner, _spender, _amount, _hashedMessage, _v, _r, _s, options) {
|
|
18
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _owner);
|
|
19
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _spender);
|
|
37
20
|
await this.validateInput(index_1.DATATYPES.NUMBER, _amount);
|
|
38
|
-
return this.callContract(FUNCTIONS.
|
|
39
|
-
}
|
|
40
|
-
notifySecuritiesAdded(callback) {
|
|
41
|
-
this.getEvent(FUNCTIONS.SECURITIESADDED, callback);
|
|
21
|
+
return this.callContract(FUNCTIONS.APPROVETOKEN, _owner, _spender, _amount, _hashedMessage, _v, _r, _s, options);
|
|
42
22
|
}
|
|
43
23
|
}
|
|
44
24
|
exports.default = VerifiedSecurity;
|
|
@@ -2,42 +2,41 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const contractAddress = {
|
|
4
4
|
'L1-goerli': {
|
|
5
|
-
'Client': '
|
|
5
|
+
'Client': '0xF1ECb20bce1B31ae61bd5dBf8decac0428942D18',
|
|
6
6
|
'KYC': '',
|
|
7
7
|
'System': '',
|
|
8
8
|
'Holder': '',
|
|
9
9
|
'Ledger': '',
|
|
10
10
|
'Account': '',
|
|
11
|
-
'Factory': '
|
|
12
|
-
'Cash': '
|
|
13
|
-
'Bond': '
|
|
11
|
+
'Factory': '0x31A0469B5B0941aCcf75643aAB81ae319AD07733',
|
|
12
|
+
'Cash': '0x13AAf050FD9BB16bb57A9D141515f789cD711004',
|
|
13
|
+
'Bond': '0xc97E5FFE71eE3dBf90a01917b154a20F6DfF6eb9',
|
|
14
14
|
'Token': '',
|
|
15
15
|
'Oracle': '',
|
|
16
|
-
'Rates': '
|
|
16
|
+
'Rates': '0xDccbBf85d4881f0BA8ea7c9Cb02f4Ed8a123A3fD',
|
|
17
17
|
'PreTrade': '',
|
|
18
18
|
'Trade': '',
|
|
19
19
|
'PostTrade': '',
|
|
20
20
|
'SecuritiesRegistry': '',
|
|
21
|
-
'Security': '
|
|
21
|
+
'Security': '0x6c09aA54F469052E29bBa80b632fDBc95Ea0a0e8',
|
|
22
22
|
'OrderPool': '',
|
|
23
23
|
'PoolFactory': '',
|
|
24
|
-
'Products': '0xF647F22e8Ce31d912c2786135610f9f4A45c8690',
|
|
25
24
|
'Stocks': '',
|
|
26
25
|
'Bonds': '',
|
|
27
|
-
'Liquidity': '
|
|
26
|
+
'Liquidity': '0xE3B74659a6464519987DEe03F17696690BF3Ae10',
|
|
28
27
|
'Distribution': '0x5c3171AFEC854f8B6FD138ee9533629ABd8A5365',
|
|
29
|
-
'BalancerManager': '
|
|
30
|
-
'PrimaryIssuePoolFactory': '
|
|
28
|
+
'BalancerManager': '0x4654FbF60b3e42Df6127451cAaC5CFeD86e2eA53',
|
|
29
|
+
'PrimaryIssuePoolFactory': '0x738731dbA0D01c8d6197d65437cc7B627fA687bD',
|
|
31
30
|
'Custody': '',
|
|
32
31
|
'CASH': {
|
|
33
|
-
'VCUSD': '
|
|
34
|
-
'VCEUR': '
|
|
35
|
-
'VCINR': '
|
|
32
|
+
'VCUSD': '0x64EA01fF7e9A0986Cd70b4d19CEDB26a9f99F0c1',
|
|
33
|
+
'VCEUR': '0x5f678B12C4a5fc2136CC9060B10BB2a8AFdfA5b6',
|
|
34
|
+
'VCINR': '0x74153fe9E896EC7067CC53c9533BFC00c45CD629'
|
|
36
35
|
},
|
|
37
36
|
'BOND': {
|
|
38
|
-
'VBUSD': '
|
|
39
|
-
'VBEUR': '
|
|
40
|
-
'VBINR': '
|
|
37
|
+
'VBUSD': '0x64a281e17b089aB8F0D50729b2C9C779B460e1fC',
|
|
38
|
+
'VBEUR': '0x220C22b1a292504afdA9FC0fE39D83e4bcBb834E',
|
|
39
|
+
'VBINR': '0x3cbaD48599a8EBfF275480E51ee03F9b1F63F0de'
|
|
41
40
|
},
|
|
42
41
|
},
|
|
43
42
|
'L2-goerli': {
|
|
@@ -60,14 +59,13 @@ const contractAddress = {
|
|
|
60
59
|
'Security': '0x324dfB528BEea8419eC96C6a54E0DA7744A4f8da',
|
|
61
60
|
'OrderPool': '0x69C61a08b46fdd75D6f000CCf2b85618AC7011a5',
|
|
62
61
|
'PoolFactory': '0xEE713f9e7d7D03267534C2628019C16dC1c41ecB',
|
|
63
|
-
'Products': '0xCA7C581d55E5025745C495D9be8EE6f8B22FD156',
|
|
64
62
|
'Stocks': '0xA02119054272E52f6b6380c358E995f95Db2E9B2',
|
|
65
63
|
'Bonds': '0xBa0daEBb3D325e6cE3401ff2FF913a5FEe20181D',
|
|
66
64
|
'Liquidity': '',
|
|
67
65
|
'Distribution': '',
|
|
68
66
|
'BalancerManager': '',
|
|
69
67
|
'PrimaryIssuePoolFactory': '',
|
|
70
|
-
'Custody': '',
|
|
68
|
+
'Custody': '0x138a6aF82D20c1bb4589721C846626317C5E1143',
|
|
71
69
|
'CASH': {
|
|
72
70
|
'VCUSD': '0xdD089A53574CabcA8082F81CC883bdBFCb0e464a',
|
|
73
71
|
'VCEUR': '0xC889374e780911b6524ADde13998F7Cb2b0Bb8d5',
|
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.VerifiedClient = exports.
|
|
7
|
+
exports.contractAddress = exports.utils = exports.VerifiedClient = exports.VerifiedRates = exports.VerifiedDistribution = exports.VerifiedFactory = exports.VerifiedSecurity = exports.VerifiedBond = exports.VerifiedCash = 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");
|
|
@@ -73,8 +73,6 @@ const distribution_2 = __importDefault(require("./contract/public/distribution")
|
|
|
73
73
|
exports.VerifiedDistribution = distribution_2.default;
|
|
74
74
|
const rates_2 = __importDefault(require("./contract/public/rates"));
|
|
75
75
|
exports.VerifiedRates = rates_2.default;
|
|
76
|
-
const product_2 = __importDefault(require("./contract/public/product"));
|
|
77
|
-
exports.VerifiedProducts = product_2.default;
|
|
78
76
|
const client_2 = __importDefault(require("./contract/public/client"));
|
|
79
77
|
exports.VerifiedClient = client_2.default;
|
|
80
78
|
const ethers_1 = require("ethers");
|