@verified-network/verified-sdk 0.9.2 → 0.9.4

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 (43) hide show
  1. package/dist/abi/L1distribution/Distribution.json +4 -4
  2. package/dist/abi/L2distribution/Distribution.json +3 -3
  3. package/dist/abi/accounts/Account.json +1693 -1693
  4. package/dist/abi/accounts/Client.json +8351 -6165
  5. package/dist/abi/accounts/Holder.json +1999 -1999
  6. package/dist/abi/accounts/Kyc.json +2256 -2256
  7. package/dist/abi/accounts/Ledger.json +1079 -1079
  8. package/dist/abi/accounts/System.json +2942 -2942
  9. package/dist/abi/assetmanager/kyber/PrimaryIssueManager.json +74238 -0
  10. package/dist/abi/custody/Vault.json +4 -10
  11. package/dist/abi/deposits/Bond.json +224 -224
  12. package/dist/abi/deposits/Cash.json +423 -423
  13. package/dist/abi/deposits/Factory.json +3626 -3173
  14. package/dist/abi/deposits/Rates.json +1410 -1410
  15. package/dist/abi/deposits/Security.json +514 -514
  16. package/dist/abi/liquidity/Liquidity.json +4 -4
  17. package/dist/abi/payments/Bond.json +890 -890
  18. package/dist/abi/payments/Cash.json +25333 -21492
  19. package/dist/abi/payments/Factory.json +2547 -2547
  20. package/dist/abi/payments/Oracle.json +2215 -2215
  21. package/dist/abi/payments/Rates.json +1406 -1406
  22. package/dist/abi/payments/Token.json +1222 -1222
  23. package/dist/abi/securities/Bonds.json +3 -3
  24. package/dist/abi/securities/Products.json +3 -3
  25. package/dist/abi/securities/Stocks.json +3 -3
  26. package/dist/abi/trades/OrderPool.json +4 -4
  27. package/dist/abi/trades/PoolFactory.json +3 -3
  28. package/dist/abi/trades/PostTrade.json +3 -3
  29. package/dist/abi/trades/PreTrade.json +4 -4
  30. package/dist/abi/trades/SecuritiesRegistry.json +4 -4
  31. package/dist/abi/trades/Security.json +3 -3
  32. package/dist/abi/trades/Trade.json +4 -4
  33. package/dist/contract/amm/primary/index.js +141 -0
  34. package/dist/contract/amm/secondary/index.js +42 -0
  35. package/dist/contract/cash/index.js +7 -0
  36. package/dist/contract/client/index.js +13 -6
  37. package/dist/contract/pretrade/index.js +2 -2
  38. package/dist/contract/public/client/index.js +9 -0
  39. package/dist/contract/public/factory/index.js +9 -0
  40. package/dist/contract/securitiesregistry/index.js +12 -0
  41. package/dist/contractAddress/index.js +51 -50
  42. package/dist/index.js +5 -5
  43. package/package.json +1 -1
@@ -38573,12 +38573,12 @@
38573
38573
  "5": {
38574
38574
  "events": {},
38575
38575
  "links": {},
38576
- "address": "0x4DFE3441A4916efACe1Ad4530Ef9A42864134d1B",
38577
- "transactionHash": "0x16b944cfdc255d2674a2c7c332ae6dfa9b7fdd3aecf668032076ec5763296532"
38576
+ "address": "0xb3D8BB812cC4F7680995B03dFF7c8A2168DCB9A4",
38577
+ "transactionHash": "0x384888922096f8a1afe90fad58c7b93020739ef1b1ea1639b868246a4d30e620"
38578
38578
  }
38579
38579
  },
38580
38580
  "schemaVersion": "3.4.3",
38581
- "updatedAt": "2022-07-26T06:08:10.334Z",
38581
+ "updatedAt": "2022-08-18T07:33:37.167Z",
38582
38582
  "networkType": "ethereum",
38583
38583
  "devdoc": {
38584
38584
  "methods": {
@@ -25527,12 +25527,12 @@
25527
25527
  }
25528
25528
  },
25529
25529
  "links": {},
25530
- "address": "0x8f60B2df5803A9cAAC202140825Ad3be158bDb96",
25531
- "transactionHash": "0x659d5352d97834c57b268ad67bfcb3d0d312ea2c86d7511508c0b3dc5bb736fe"
25530
+ "address": "0xb206a38a8CaCb79d53f3AA1C977E6f75632b50fd",
25531
+ "transactionHash": "0x6c2b366096d6c0362f41ef30a0253dfe504927afc330b9a43e43601b85f89c5c"
25532
25532
  }
25533
25533
  },
25534
25534
  "schemaVersion": "3.4.3",
25535
- "updatedAt": "2022-07-26T06:08:10.267Z",
25535
+ "updatedAt": "2022-08-18T07:33:37.099Z",
25536
25536
  "networkType": "ethereum",
25537
25537
  "devdoc": {
25538
25538
  "methods": {
@@ -29266,12 +29266,12 @@
29266
29266
  "5": {
29267
29267
  "events": {},
29268
29268
  "links": {},
29269
- "address": "0x7338E7a7A5da4ED7CfA48cb49329E8234a5c2870",
29270
- "transactionHash": "0xa053f36b15ed680f82a1ea3a62a55158df4e1ad71c9f4063acc38b8bab1c3bb6"
29269
+ "address": "0x344cA252E2fCDDDF7F070Cf50920dB1bAAD0dEc5",
29270
+ "transactionHash": "0x7adc66313ae3920f6e7ba3ab75d00ca3601f9fce2e0d6499b9f35fd6f1887ef1"
29271
29271
  }
29272
29272
  },
29273
29273
  "schemaVersion": "3.4.3",
29274
- "updatedAt": "2022-07-26T06:08:10.298Z",
29274
+ "updatedAt": "2022-08-18T07:33:37.126Z",
29275
29275
  "networkType": "ethereum",
29276
29276
  "devdoc": {
29277
29277
  "methods": {
@@ -60786,14 +60786,14 @@
60786
60786
  "5": {
60787
60787
  "events": {},
60788
60788
  "links": {
60789
- "stringutils": "0x50d57064878a814c6f9B670D249ec8Db7c099881"
60789
+ "stringutils": "0x5214f1d37382dfD422772D6DAFbFdcD4316C8397"
60790
60790
  },
60791
- "address": "0x32e1D25C0ffb5AcfCc1d3392aaAB332157D1C0cc",
60792
- "transactionHash": "0xca79f7941f34e9a584fdae858c39251c47fec5c9c3c36394f597a6878be4a692"
60791
+ "address": "0x8F1531627A7675Ffb04Dc2d4C83D976E22A239D3",
60792
+ "transactionHash": "0xc64f5b384b2379d5b3773b9c312d52c3327177fe5f1f100081a364339cdeac48"
60793
60793
  }
60794
60794
  },
60795
60795
  "schemaVersion": "3.4.3",
60796
- "updatedAt": "2022-07-17T14:30:16.665Z",
60796
+ "updatedAt": "2022-08-18T07:16:52.203Z",
60797
60797
  "networkType": "ethereum",
60798
60798
  "devdoc": {
60799
60799
  "methods": {}
@@ -6563,12 +6563,12 @@
6563
6563
  "5": {
6564
6564
  "events": {},
6565
6565
  "links": {},
6566
- "address": "0x6Ea7c61a85E6e07711C15Eb7B3E74f7844c1c7b9",
6567
- "transactionHash": "0x6f5023f22339543890d0c49be2c0a727bacfccbbf10244a7d1cb5f0cb4a91389"
6566
+ "address": "0x45d6D11B9e888F3735d57eea2d732e9f62DFE3e7",
6567
+ "transactionHash": "0xd2bc2ed2a06476b92851412a214eae1bd9fc1cad96476b80cc31b1231002e463"
6568
6568
  }
6569
6569
  },
6570
6570
  "schemaVersion": "3.4.3",
6571
- "updatedAt": "2022-07-17T14:30:16.650Z",
6571
+ "updatedAt": "2022-08-18T07:16:52.168Z",
6572
6572
  "networkType": "ethereum",
6573
6573
  "devdoc": {
6574
6574
  "methods": {
@@ -23475,12 +23475,12 @@
23475
23475
  "5": {
23476
23476
  "events": {},
23477
23477
  "links": {},
23478
- "address": "0x076C72796885345a96919DB683a76234B48a63bF",
23479
- "transactionHash": "0xdfc664c6a583a090dbf38e85d6694145a6c66a3e8a7456d8ae8cf54a8b41a63f"
23478
+ "address": "0x3FBdFE4a6Ea67bC45d31F32ABf801766530E2Ff0",
23479
+ "transactionHash": "0x8ae361ea828c84951849cf74ea41c5202f7555db6cc2b8a7e2bec3c14418e0eb"
23480
23480
  }
23481
23481
  },
23482
23482
  "schemaVersion": "3.4.3",
23483
- "updatedAt": "2022-07-17T14:30:16.730Z",
23483
+ "updatedAt": "2022-08-18T07:16:52.290Z",
23484
23484
  "networkType": "ethereum",
23485
23485
  "devdoc": {
23486
23486
  "methods": {
@@ -28873,14 +28873,14 @@
28873
28873
  }
28874
28874
  },
28875
28875
  "links": {
28876
- "stringutils": "0x50d57064878a814c6f9B670D249ec8Db7c099881"
28876
+ "stringutils": "0x5214f1d37382dfD422772D6DAFbFdcD4316C8397"
28877
28877
  },
28878
- "address": "0x1bde40708A80D41390cd2097fF1C787a4E70827d",
28879
- "transactionHash": "0x97f9298ba7219d20b68225a8222553ac2aeb3129b92506a99e97b487913287d9"
28878
+ "address": "0x5d49E52CE8aA2c715E6Fdf8Fd46B43cbfAEd6650",
28879
+ "transactionHash": "0xf7aba732034e9f5a2c08f287d4735f0320a13adb6c2b2aed10d46f7b70e04ae2"
28880
28880
  }
28881
28881
  },
28882
28882
  "schemaVersion": "3.4.3",
28883
- "updatedAt": "2022-07-17T14:30:16.625Z",
28883
+ "updatedAt": "2022-08-18T07:16:52.106Z",
28884
28884
  "networkType": "ethereum",
28885
28885
  "devdoc": {
28886
28886
  "methods": {
@@ -22204,14 +22204,14 @@
22204
22204
  }
22205
22205
  },
22206
22206
  "links": {
22207
- "stringutils": "0x50d57064878a814c6f9B670D249ec8Db7c099881"
22207
+ "stringutils": "0x5214f1d37382dfD422772D6DAFbFdcD4316C8397"
22208
22208
  },
22209
- "address": "0x4Cee41ea3c9AD664449cC47f4f3cb0D99140F57A",
22210
- "transactionHash": "0x8408014e1e957d68ef39a619808421c7d0fc02b461f41d4723258b5db309748e"
22209
+ "address": "0xE6bEb64f49250D7D455D9910224c03faA93f6fEc",
22210
+ "transactionHash": "0x3a5bee5b04134415710e39548aa52817180a1bac6cd6f1fbd0e0d331e65484a7"
22211
22211
  }
22212
22212
  },
22213
22213
  "schemaVersion": "3.4.3",
22214
- "updatedAt": "2022-07-17T14:30:16.638Z",
22214
+ "updatedAt": "2022-08-18T07:16:52.137Z",
22215
22215
  "networkType": "ethereum",
22216
22216
  "devdoc": {
22217
22217
  "methods": {
@@ -8198,12 +8198,12 @@
8198
8198
  "5": {
8199
8199
  "events": {},
8200
8200
  "links": {},
8201
- "address": "0x346A38af25f5ae61A571DFC2431d84f1D3D0Ef6e",
8202
- "transactionHash": "0x7b036620a156ee7732440939172c09408fa16946c1e3e7e39b25cdac36df13e0"
8201
+ "address": "0x4BBfC384503C4A420551Db8E4C56c7BBda85B9EF",
8202
+ "transactionHash": "0xcddd8332be47f58329a4767d5999126977e89ccba869b0ec4a0f300d77304479"
8203
8203
  }
8204
8204
  },
8205
8205
  "schemaVersion": "3.4.3",
8206
- "updatedAt": "2022-07-17T14:30:16.646Z",
8206
+ "updatedAt": "2022-08-18T07:16:52.157Z",
8207
8207
  "networkType": "ethereum",
8208
8208
  "devdoc": {
8209
8209
  "methods": {
@@ -35626,14 +35626,14 @@
35626
35626
  }
35627
35627
  },
35628
35628
  "links": {
35629
- "stringutils": "0x50d57064878a814c6f9B670D249ec8Db7c099881"
35629
+ "stringutils": "0x5214f1d37382dfD422772D6DAFbFdcD4316C8397"
35630
35630
  },
35631
- "address": "0x103aE267406f545CABD5b711D29EAeF3FE2cf93b",
35632
- "transactionHash": "0xbb3af962311980efc6ceca6a39e1f4bc5de7ec0b0285bdbefe8df37ad68d8cd1"
35631
+ "address": "0x5E58Cc659d8a8E61450A7363C60a0Bd1d88942c5",
35632
+ "transactionHash": "0xd2e64e1adb1a79c15fe9585ab0df7c2ef979a0138571bdfc102241cbf193a7e4"
35633
35633
  }
35634
35634
  },
35635
35635
  "schemaVersion": "3.4.3",
35636
- "updatedAt": "2022-07-17T14:30:16.699Z",
35636
+ "updatedAt": "2022-08-18T07:16:52.258Z",
35637
35637
  "networkType": "ethereum",
35638
35638
  "devdoc": {
35639
35639
  "methods": {
@@ -0,0 +1,141 @@
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 PrimaryIssueManager_json_1 = require("../../../abi/assetmanager/balancer/PrimaryIssueManager.json");
7
+ const PrimaryIssueManager_json_2 = require("../../../abi/assetmanager/kyber/PrimaryIssueManager.json");
8
+ var FUNCTIONS;
9
+ (function (FUNCTIONS) {
10
+ FUNCTIONS["OFFER"] = "offer";
11
+ FUNCTIONS["GETOFFERED"] = "getOffered";
12
+ FUNCTIONS["GETOFFERMADE"] = "getOfferMade";
13
+ FUNCTIONS["GETALLOTTEDSTAKE"] = "getAllotedStake";
14
+ FUNCTIONS["GETLIQUIDITYPROVIDERS"] = "getLiquidityProviders";
15
+ FUNCTIONS["ISSUE"] = "issue";
16
+ FUNCTIONS["ONSUBSCRIPTION"] = "onSubscription";
17
+ FUNCTIONS["SUBSCRIBE"] = "subscribe";
18
+ FUNCTIONS["GETSUBSCRIBERS"] = "getSubscribers";
19
+ FUNCTIONS["CLOSE"] = "close";
20
+ FUNCTIONS["ACCEPT"] = "accept";
21
+ FUNCTIONS["REJECT"] = "reject";
22
+ FUNCTIONS["SETTLE"] = "settle";
23
+ })(FUNCTIONS || (FUNCTIONS = {}));
24
+ class PrimaryIssueManager extends index_1.VerifiedContract {
25
+ constructor(signer, platformAddress, platform) {
26
+ const address = platformAddress;
27
+ if (platform == "balancer")
28
+ super(address, JSON.stringify(PrimaryIssueManager_json_1.abiBalancer), signer);
29
+ else if (platform == "kyber")
30
+ super(address, JSON.stringify(PrimaryIssueManager_json_2.abiKyber), signer);
31
+ this.contractAddress = address;
32
+ }
33
+ async offer(owned, isin, offered, tomatch, desired, min, issuer,
34
+ //_hashedMessage: string,
35
+ //_v: string,
36
+ //_r: string,
37
+ //_s: string,
38
+ options) {
39
+ await this.validateInput(index_1.DATATYPES.ADDRESS, owned);
40
+ await this.validateInput(index_1.DATATYPES.ADDRESS, tomatch);
41
+ await this.validateInput(index_1.DATATYPES.ADDRESS, issuer);
42
+ await this.validateInput(index_1.DATATYPES.STRING, isin);
43
+ await this.validateInput(index_1.DATATYPES.NUMBER, offered);
44
+ await this.validateInput(index_1.DATATYPES.NUMBER, desired);
45
+ await this.validateInput(index_1.DATATYPES.NUMBER, min);
46
+ return this.callContract(FUNCTIONS.OFFER, owned, this.sanitiseInput(index_1.DATATYPES.BYTE32, isin), offered, tomatch, desired, min, issuer,
47
+ /*_hashedMessage, _v, _r, _s,*/ options);
48
+ }
49
+ /**
50
+ * Gets security tokens offered for passed token parameter
51
+ * @param offered address of liquidity token offered by asset manager
52
+ * @param options
53
+ * @returns array of structs of security tokens matching with offered liquidity token
54
+ */
55
+ async getOffered(offered, options) {
56
+ await this.validateInput(index_1.DATATYPES.ADDRESS, offered);
57
+ return this.callContract(FUNCTIONS.GETOFFERED, offered, options);
58
+ }
59
+ /**
60
+ * Gets offer made previously with offered token and token to match
61
+ * @param offered address of offered token
62
+ * @param tomatch address of token to match
63
+ * @param options
64
+ * @returns token struct
65
+ */
66
+ async getOfferMade(offered, tomatch, options) {
67
+ await this.validateInput(index_1.DATATYPES.ADDRESS, offered);
68
+ await this.validateInput(index_1.DATATYPES.ADDRESS, tomatch);
69
+ return this.callContract(FUNCTIONS.GETOFFERMADE, offered, tomatch, options);
70
+ }
71
+ /**
72
+ * Gets allotted liquidity stake for caller (asset manager) that is available to invest
73
+ * @param options
74
+ * @returns amount of available liquidity for caller (asset manager)
75
+ */
76
+ async getAllotedStake() {
77
+ return this.callContract(FUNCTIONS.GETALLOTTEDSTAKE);
78
+ }
79
+ /**
80
+ * Gets liquidity providers for a security token offering
81
+ * @param security address of security token
82
+ * @param options
83
+ * @returns array of structs of liquidity providers
84
+ */
85
+ async getLiquidityProviders(security,
86
+ //_hashedMessage: string,
87
+ //_v: string,
88
+ //_r: string,
89
+ //_s: string,
90
+ options) {
91
+ await this.validateInput(index_1.DATATYPES.ADDRESS, security);
92
+ return this.callContract(FUNCTIONS.GETLIQUIDITYPROVIDERS, security,
93
+ //_hashedMessage, _v, _r, _s,
94
+ options);
95
+ }
96
+ async issue(security, cutoffTime, issuer, _hashedMessage, _v, _r, _s, options) {
97
+ await this.validateInput(index_1.DATATYPES.ADDRESS, security);
98
+ await this.validateInput(index_1.DATATYPES.ADDRESS, issuer);
99
+ await this.validateInput(index_1.DATATYPES.NUMBER, cutoffTime);
100
+ return this.callContract(FUNCTIONS.ISSUE, security, cutoffTime, issuer, _hashedMessage, _v, _r, _s, options);
101
+ }
102
+ async onSubscription(pool, _hashedMessage, _v, _r, _s, options) {
103
+ await this.validateInput(index_1.DATATYPES.ADDRESS, pool);
104
+ return this.callContract(FUNCTIONS.ONSUBSCRIPTION, pool, _hashedMessage, _v, _r, _s, options);
105
+ }
106
+ async subscribe(security, asset, assetName, amount, investor, price, paidIn, _hashedMessage, _v, _r, _s, options) {
107
+ await this.validateInput(index_1.DATATYPES.ADDRESS, security);
108
+ await this.validateInput(index_1.DATATYPES.ADDRESS, asset);
109
+ await this.validateInput(index_1.DATATYPES.STRING, assetName);
110
+ await this.validateInput(index_1.DATATYPES.ADDRESS, investor);
111
+ await this.validateInput(index_1.DATATYPES.NUMBER, amount);
112
+ await this.validateInput(index_1.DATATYPES.NUMBER, price);
113
+ await this.validateInput(index_1.DATATYPES.STRING, paidIn);
114
+ return this.callContract(FUNCTIONS.SUBSCRIBE, security, asset, assetName, amount, investor, price, paidIn, _hashedMessage, _v, _r, _s, options);
115
+ }
116
+ async getSubscribers(poolId, _hashedMessage, _v, _r, _s, options) {
117
+ await this.validateInput(index_1.DATATYPES.STRING, poolId);
118
+ return this.callContract(FUNCTIONS.GETSUBSCRIBERS, this.sanitiseInput(index_1.DATATYPES.BYTE32, poolId), _hashedMessage, _v, _r, _s, options);
119
+ }
120
+ async close(security, redeem, _hashedMessage, _v, _r, _s, options) {
121
+ await this.validateInput(index_1.DATATYPES.ADDRESS, security);
122
+ return this.callContract(FUNCTIONS.CLOSE, security, redeem, _hashedMessage, _v, _r, _s, options);
123
+ }
124
+ async accept(poolid, investor, amnt, asset, _hashedMessage, _v, _r, _s, options) {
125
+ await this.validateInput(index_1.DATATYPES.ADDRESS, investor);
126
+ await this.validateInput(index_1.DATATYPES.ADDRESS, asset);
127
+ await this.validateInput(index_1.DATATYPES.NUMBER, amnt);
128
+ await this.validateInput(index_1.DATATYPES.STRING, poolid);
129
+ return this.callContract(FUNCTIONS.ACCEPT, this.sanitiseInput(index_1.DATATYPES.BYTE32, poolId), investor, amnt, asset, _hashedMessage, _v, _r, _s, options);
130
+ }
131
+ async reject(poolid, investor, _hashedMessage, _v, _r, _s, options) {
132
+ await this.validateInput(index_1.DATATYPES.ADDRESS, investor);
133
+ await this.validateInput(index_1.DATATYPES.STRING, poolid);
134
+ return this.callContract(FUNCTIONS.REJECT, this.sanitiseInput(index_1.DATATYPES.BYTE32, poolId), investor, _hashedMessage, _v, _r, _s, options);
135
+ }
136
+ async settle(poolId, _hashedMessage, _v, _r, _s, options) {
137
+ await this.validateInput(index_1.DATATYPES.STRING, poolId);
138
+ return this.callContract(FUNCTIONS.SETTLE, this.sanitiseInput(index_1.DATATYPES.BYTE32, poolId), _hashedMessage, _v, _r, _s, options);
139
+ }
140
+ }
141
+ exports.default = PrimaryIssueManager;
@@ -0,0 +1,42 @@
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 SecondaryIssueManager_json_1 = require("../../../abi/assetmanager/balancer/SecondaryIssueManager.json");
7
+ var FUNCTIONS;
8
+ (function (FUNCTIONS) {
9
+ FUNCTIONS["ISSUESECONDARY"] = "issueSecondary";
10
+ FUNCTIONS["GETSETTLEMENTREQUESTS"] = "getSettlementRequests";
11
+ FUNCTIONS["GETSETTLEMENTREQUEST"] = "getSettlementRequest";
12
+ FUNCTIONS["SETSETTLEMENTSTATUS"] = "setSettlementStatus";
13
+ })(FUNCTIONS || (FUNCTIONS = {}));
14
+ class SecondaryIssueManager extends index_1.VerifiedContract {
15
+ constructor(signer, platformAddress) {
16
+ const address = platformAddress;
17
+ super(address, JSON.stringify(SecondaryIssueManager_json_1.abi), signer);
18
+ this.contractAddress = address;
19
+ }
20
+ async issueSecondary(security, currency, amount, id, _hashedMessage, _v, _r, _s, options) {
21
+ await this.validateInput(index_1.DATATYPES.ADDRESS, security);
22
+ await this.validateInput(index_1.DATATYPES.ADDRESS, currency);
23
+ await this.validateInput(index_1.DATATYPES.STRING, id);
24
+ await this.validateInput(index_1.DATATYPES.NUMBER, amount);
25
+ return this.callContract(FUNCTIONS.ISSUESECONDARY, security, currency, amount, this.sanitiseInput(index_1.DATATYPES.BYTE32, id), _hashedMessage, _v, _r, _s, options);
26
+ }
27
+ async getSettlementRequests(dpid, options) {
28
+ await this.validateInput(index_1.DATATYPES.STRING, dpid);
29
+ return this.callContract(FUNCTIONS.GETSETTLEMENTREQUESTS, this.sanitiseInput(index_1.DATATYPES.BYTE32, dpid), options);
30
+ }
31
+ async getSettlementRequest(ref, options) {
32
+ await this.validateInput(index_1.DATATYPES.STRING, ref);
33
+ return this.callContract(FUNCTIONS.GETSETTLEMENTREQUEST, this.sanitiseInput(index_1.DATATYPES.BYTE32, ref), options);
34
+ }
35
+ async setSettlementStatus(ref, status, id, options) {
36
+ await this.validateInput(index_1.DATATYPES.STRING, ref);
37
+ await this.validateInput(index_1.DATATYPES.STRING, status);
38
+ await this.validateInput(index_1.DATATYPES.STRING, id);
39
+ return this.callContract(FUNCTIONS.SETSETTLEMENTSTATUS, this.sanitiseInput(index_1.DATATYPES.BYTE32, ref), this.sanitiseInput(index_1.DATATYPES.BYTE32, status), this.sanitiseInput(index_1.DATATYPES.BYTE32, id), options);
40
+ }
41
+ }
42
+ exports.default = SecondaryIssueManager;
@@ -15,6 +15,7 @@ var FUNCTIONS;
15
15
  FUNCTIONS["EXCHANGE"] = "CashDeposits";
16
16
  FUNCTIONS["SETSIGNER"] = "setSigner";
17
17
  FUNCTIONS["REQUESTISSUEFROML1"] = "requestIssueFromL1";
18
+ FUNCTIONS["BURNCASHTOKENS"] = "burnCashTokens";
18
19
  })(FUNCTIONS || (FUNCTIONS = {}));
19
20
  class CashContract extends index_1.VerifiedContract {
20
21
  constructor(signer, currencyAddress) {
@@ -47,6 +48,12 @@ class CashContract extends index_1.VerifiedContract {
47
48
  await this.validateInput(index_1.DATATYPES.STRING, _currency);
48
49
  return this.callContract(FUNCTIONS.PAYIN, _tokens, _payer, this.sanitiseInput(index_1.DATATYPES.BYTE32, _currency), options);
49
50
  }
51
+ async burnCashTokens(_tokens, _payer, _currency, options) {
52
+ await this.validateInput(index_1.DATATYPES.NUMBER, _tokens);
53
+ await this.validateInput(index_1.DATATYPES.ADDRESS, _payer);
54
+ await this.validateInput(index_1.DATATYPES.STRING, _currency);
55
+ return this.callContract(FUNCTIONS.BURNCASHTOKENS, _tokens, _payer, this.sanitiseInput(index_1.DATATYPES.BYTE32, _currency), options);
56
+ }
50
57
  /**
51
58
  Sets signer to verify bridge
52
59
  @param _signer address of signer that can only be set by owner of bridge
@@ -22,6 +22,7 @@ var FUNCTIONS;
22
22
  FUNCTIONS["ADDROLE"] = "addRole";
23
23
  FUNCTIONS["GETMANAGERS"] = "getManagers";
24
24
  FUNCTIONS["MANAGERADDED"] = "ManagerAdded";
25
+ FUNCTIONS["GETCLIENT"] = "getClient";
25
26
  })(FUNCTIONS || (FUNCTIONS = {}));
26
27
  class ClientContract extends index_1.VerifiedContract {
27
28
  constructor(signer) {
@@ -33,13 +34,19 @@ class ClientContract extends index_1.VerifiedContract {
33
34
  initialize(_address) {
34
35
  return this.callContract(FUNCTIONS.INITIALIZE, params);
35
36
  }
36
- async setCustody(address, custody, options) {
37
- await this.validateInput(index_1.DATATYPES.ADDRESS, address);
38
- return this.callContract(FUNCTIONS.SETCUSTODY, address, this.sanitiseInput(index_1.DATATYPES.BYTE32, custody), options);
37
+ async setCustody(client, service, account, options) {
38
+ await this.validateInput(index_1.DATATYPES.ADDRESS, client);
39
+ return this.callContract(FUNCTIONS.SETCUSTODY, client, this.sanitiseInput(index_1.DATATYPES.BYTE32, service), this.sanitiseInput(index_1.DATATYPES.BYTE32, account), options);
39
40
  }
40
- async getCustody(address, options) {
41
- await this.validateInput(index_1.DATATYPES.ADDRESS, address);
42
- return this.callContract(FUNCTIONS.GETCUSTODY, address, options);
41
+ async getCustody(client, service, options) {
42
+ await this.validateInput(index_1.DATATYPES.ADDRESS, client);
43
+ await this.validateInput(index_1.DATATYPES.STRING, service);
44
+ return this.callContract(FUNCTIONS.GETCUSTODY, client, this.sanitiseInput(index_1.DATATYPES.BYTE32, service), options);
45
+ }
46
+ async getClient(service, account, options) {
47
+ await this.validateInput(index_1.DATATYPES.STRING, service);
48
+ await this.validateInput(index_1.DATATYPES.STRING, account);
49
+ return this.callContract(FUNCTIONS.GETCLIENT, this.sanitiseInput(index_1.DATATYPES.BYTE32, service), this.sanitiseInput(index_1.DATATYPES.BYTE32, account), options);
43
50
  }
44
51
  /**
45
52
  * We can implement registration and log in using a SSO scheme such as Firebase (https://firebase.google.com/docs/auth) or Azure.
@@ -104,8 +104,8 @@ class PreTradeContract extends index_1.VerifiedContract {
104
104
  uint256 faceValue;
105
105
  } )
106
106
  */
107
- async getConfirmationRequest(_ref, options) {
108
- return this.callContract(FUNCTIONS.GETCONFIRMATIONREQUEST, _ref, options);
107
+ async getConfirmationRequest(_currencyCode, options) {
108
+ return this.callContract(FUNCTIONS.GETCONFIRMATIONREQUEST, _currencyCode, options);
109
109
  }
110
110
  /**
111
111
  * Confirm security registration request [sent by manager on PreTrade.sol, only works if manager’s role is DP]
@@ -10,6 +10,7 @@ var FUNCTIONS;
10
10
  FUNCTIONS["GETROLE"] = "getRole";
11
11
  FUNCTIONS["REMOVEROLE"] = "removeRole";
12
12
  FUNCTIONS["ADDROLE"] = "addRole";
13
+ FUNCTIONS["UPDATEKYC"] = "KycUpdate";
13
14
  })(FUNCTIONS || (FUNCTIONS = {}));
14
15
  class VerifiedClient extends index_1.VerifiedContract {
15
16
  constructor(signer) {
@@ -55,5 +56,13 @@ class VerifiedClient extends index_1.VerifiedContract {
55
56
  await this.validateInput(index_1.DATATYPES.STRING, _id);
56
57
  return this.callContract(FUNCTIONS.ADDROLE, _manager, _submanager, this.sanitiseInput(index_1.DATATYPES.BYTE32, _country), this.sanitiseInput(index_1.DATATYPES.BYTE32, _role), this.sanitiseInput(index_1.DATATYPES.BYTE32, _id), _hashedMessage, _v, _r, _s, options);
57
58
  }
59
+ async KycUpdate(client, name, surname, country, status, _hashedMessage, _v, _r, _s, options) {
60
+ await this.validateInput(index_1.DATATYPES.ADDRESS, client);
61
+ await this.validateInput(index_1.DATATYPES.STRING, name);
62
+ await this.validateInput(index_1.DATATYPES.STRING, surname);
63
+ await this.validateInput(index_1.DATATYPES.STRING, country);
64
+ await this.validateInput(index_1.DATATYPES.NUMBER, status);
65
+ return this.callContract(FUNCTIONS.UPDATEKYC, client, this.sanitiseInput(index_1.DATATYPES.BYTE32, name), this.sanitiseInput(index_1.DATATYPES.BYTE32, surname), this.sanitiseInput(index_1.DATATYPES.BYTE32, country), status, _hashedMessage, _v, _r, _s, options);
66
+ }
58
67
  }
59
68
  exports.default = VerifiedClient;
@@ -10,6 +10,7 @@ var FUNCTIONS;
10
10
  FUNCTIONS["GETTYPE"] = "getType";
11
11
  FUNCTIONS["GETTOKENBYNAMETYPE"] = "getTokenByNameType";
12
12
  FUNCTIONS["GETISSUER"] = "getIssuer";
13
+ FUNCTIONS["GETISSUES"] = "getIssues";
13
14
  FUNCTIONS["GETTOKENCOUNT"] = "getTokenCount";
14
15
  FUNCTIONS["GETTOKEN"] = "getToken";
15
16
  FUNCTIONS["GETNAMEANDTYPE"] = "getNameAndType";
@@ -101,6 +102,14 @@ class VerifiedFactory extends index_1.VerifiedContract {
101
102
  await this.validateInput(index_1.DATATYPES.STRING, tokenType);
102
103
  return this.callContract(FUNCTIONS.GETISSUER, this.sanitiseInput(index_1.DATATYPES.BYTE32, tokenType), this.sanitiseInput(index_1.DATATYPES.BYTE32, tokenName), options);
103
104
  }
105
+ /**
106
+ * Get issued security token addresses
107
+ * @param
108
+ * @returns returns array of addresses
109
+ */
110
+ async getIssues() {
111
+ return this.callContract(FUNCTIONS.GETISSUES);
112
+ }
104
113
  async issueSecurity(_security, _company, _isin, _currency, _issuer, _hashedMessage, _v, _r, _s, options) {
105
114
  await this.validateInput(index_1.DATATYPES.ADDRESS, _security);
106
115
  await this.validateInput(index_1.DATATYPES.ADDRESS, _issuer);
@@ -16,6 +16,8 @@ var FUNCTIONS;
16
16
  FUNCTIONS["GETSECURITYDETAILS"] = "getSecurityDetails";
17
17
  FUNCTIONS["CREATESECURITY"] = "createSecurity";
18
18
  FUNCTIONS["GETISSUEDSECURITIES"] = "getSecuritiesIssued";
19
+ FUNCTIONS["SUPPORTTOKENS"] = "supportTokens";
20
+ FUNCTIONS["CHECKSUPPORTFORTOKEN"] = "checkSupportForToken";
19
21
  })(FUNCTIONS || (FUNCTIONS = {}));
20
22
  class SecuritiesRegistryContract extends index_1.VerifiedContract {
21
23
  constructor(signer) {
@@ -24,6 +26,16 @@ class SecuritiesRegistryContract extends index_1.VerifiedContract {
24
26
  super(address, JSON.stringify(SecuritiesRegistry_json_1.abi), signer);
25
27
  this.contractAddress = address;
26
28
  }
29
+ async supportToken(_token, _name, _network, options) {
30
+ await this.validateInput(index_1.DATATYPES.ADDRESS, _token);
31
+ await this.validateInput(index_1.DATATYPES.STRING, _name);
32
+ await this.validateInput(index_1.DATATYPES.STRING, _network);
33
+ return this.callContract(FUNCTIONS.SUPPORTTOKENS, _token, this.sanitiseInput(index_1.DATATYPES.BYTE32, _name), this.sanitiseInput(index_1.DATATYPES.BYTE32, _network), options);
34
+ }
35
+ async checkSupportForToken(_token, options) {
36
+ await this.validateInput(index_1.DATATYPES.STRING, _token);
37
+ return this.callContract(FUNCTIONS.CHECKSUPPORTFORTOKEN, this.sanitiseInput(index_1.DATATYPES.BYTE32, _token), options);
38
+ }
27
39
  /**
28
40
  * Register demat account [sent by user on PreTrade.sol]
29
41
  * @param (bytes32 _currency, bytes32 _company, bytes32 _isin)