@verified-network/verified-sdk 0.8.4 → 0.8.5
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 +11376 -13001
- package/dist/abi/assetmanager/Client.json +1170 -1170
- package/dist/abi/assetmanager/Products.json +658 -340
- package/dist/abi/deposits/Bond.json +222 -222
- package/dist/abi/deposits/Cash.json +421 -421
- package/dist/abi/deposits/Factory.json +15925 -5016
- package/dist/abi/deposits/Rates.json +1408 -1408
- package/dist/contract/public/factory/index.js +27 -0
- package/dist/contract/public/product/index.js +5 -0
- package/dist/contractAddress/index.js +15 -15
- package/dist/index.js +1 -3
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -2,42 +2,42 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const contractAddress = {
|
|
4
4
|
'L1-goerli': {
|
|
5
|
-
'Client': '
|
|
5
|
+
'Client': '0xa1633Ab6F940D6eCE8a61F5D68285139277aeF0F',
|
|
6
6
|
'KYC': '',
|
|
7
7
|
'System': '',
|
|
8
8
|
'Holder': '',
|
|
9
9
|
'Ledger': '',
|
|
10
10
|
'Account': '',
|
|
11
|
-
'Factory': '
|
|
12
|
-
'Cash': '
|
|
13
|
-
'Bond': '
|
|
11
|
+
'Factory': '0x0F248837AAd71e08A2AE43d8e148A6AbE891Daa6',
|
|
12
|
+
'Cash': '0xf9CA2Ea876CB561610b89Cf3c009B723579f60C9',
|
|
13
|
+
'Bond': '0x2c9e6D15350C5217D2908a40a07af47CC5a94428',
|
|
14
14
|
'Token': '',
|
|
15
15
|
'Oracle': '',
|
|
16
|
-
'Rates': '
|
|
16
|
+
'Rates': '0x95b73422B232710953F8454e39E72672a48D88ED',
|
|
17
17
|
'PreTrade': '',
|
|
18
18
|
'Trade': '',
|
|
19
19
|
'PostTrade': '',
|
|
20
20
|
'SecuritiesRegistry': '',
|
|
21
|
-
'Security': '
|
|
21
|
+
'Security': '0xe88B4cc2F7620Ec5ABcd32aC5dCDB1E59Bd2D69b',
|
|
22
22
|
'OrderPool': '',
|
|
23
23
|
'PoolFactory': '',
|
|
24
|
-
'Products': '
|
|
24
|
+
'Products': '0xdC51E8b0BaE85B134FfAf1E2a1d3ABdE14eF4927',
|
|
25
25
|
'Stocks': '',
|
|
26
26
|
'Bonds': '',
|
|
27
27
|
'Liquidity': '0xE3B74659a6464519987DEe03F17696690BF3Ae10',
|
|
28
28
|
'Distribution': '0x5c3171AFEC854f8B6FD138ee9533629ABd8A5365',
|
|
29
|
-
'BalancerManager': '
|
|
30
|
-
'PrimaryIssuePoolFactory': '
|
|
29
|
+
'BalancerManager': '0xA1edeF110612Af64FE4b88d73d6DC5b73eDfc2C6',
|
|
30
|
+
'PrimaryIssuePoolFactory': '0x80B93fAe4DDaa078b054B761Ed09228814250b7F',
|
|
31
31
|
'Custody': '',
|
|
32
32
|
'CASH': {
|
|
33
|
-
'VCUSD': '
|
|
34
|
-
'VCEUR': '
|
|
35
|
-
'VCINR': '
|
|
33
|
+
'VCUSD': '0xAE12CFDF57c9c38441a4205179970Fd7eEcff5D7',
|
|
34
|
+
'VCEUR': '0x17531a8F6C5cd4a4681EB8c8B57c9c4C55b84308',
|
|
35
|
+
'VCINR': '0xA5939cA5fF0Aa81940e6bF2e1F4ab0efb27c06C6'
|
|
36
36
|
},
|
|
37
37
|
'BOND': {
|
|
38
|
-
'VBUSD': '
|
|
39
|
-
'VBEUR': '
|
|
40
|
-
'VBINR': '
|
|
38
|
+
'VBUSD': '0x738150a512984632D08e654f86B47CdF26eC644e',
|
|
39
|
+
'VBEUR': '0xE01633468Ddf83F6b19C8ea3156193561f1580AB',
|
|
40
|
+
'VBINR': '0x0075417c1B24a47fbCf54Eb53F29E1989eCEbC17'
|
|
41
41
|
},
|
|
42
42
|
},
|
|
43
43
|
'L2-goerli': {
|
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.VerifiedProducts = exports.VerifiedRates = exports.VerifiedDistribution = exports.VerifiedFactory = exports.
|
|
7
|
+
exports.contractAddress = exports.utils = exports.VerifiedClient = exports.VerifiedProducts = exports.VerifiedRates = exports.VerifiedDistribution = exports.VerifiedFactory = 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");
|
|
@@ -65,8 +65,6 @@ const cash_2 = __importDefault(require("./contract/public/cash"));
|
|
|
65
65
|
exports.VerifiedCash = cash_2.default;
|
|
66
66
|
const bond_2 = __importDefault(require("./contract/public/bond"));
|
|
67
67
|
exports.VerifiedBond = bond_2.default;
|
|
68
|
-
const security_2 = __importDefault(require("./contract/public/security"));
|
|
69
|
-
exports.VerifiedSecurity = security_2.default;
|
|
70
68
|
const factory_2 = __importDefault(require("./contract/public/factory"));
|
|
71
69
|
exports.VerifiedFactory = factory_2.default;
|
|
72
70
|
const distribution_2 = __importDefault(require("./contract/public/distribution"));
|