@verified-network/verified-sdk 0.4.3 → 0.4.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.
@@ -10,7 +10,7 @@ var FUNCTIONS;
10
10
  FUNCTIONS["GETBOND"] = "getBond";
11
11
  FUNCTIONS["STARTISSUE"] = "startIssue";
12
12
  FUNCTIONS["ASKOFFERS"] = "askOffers";
13
- FUNCTIONS["CLOSEISSUE"] = "closeIssue";
13
+ FUNCTIONS["GETSUBSCRIBERS"] = "getSubscribers";
14
14
  FUNCTIONS["ALLOTISSUE"] = "allotIssue";
15
15
  FUNCTIONS["NEXTINSTALLMENT"] = "computeNextInstallment";
16
16
  FUNCTIONS["GETPAYMENTFOR"] = "getPaymentAmountFor";
@@ -28,9 +28,9 @@ var FUNCTIONS;
28
28
  FUNCTIONS["GETBENEFICIARIES"] = "getBeneficiaries";
29
29
  })(FUNCTIONS || (FUNCTIONS = {}));
30
30
  class IssueContract extends index_1.VerifiedContract {
31
- constructor(signer) {
31
+ constructor(signer, issue) {
32
32
  const chainId = signer.provider._network.chainId.toString();
33
- const address = Issues_json_1.networks[chainId].address;
33
+ const address = issue;
34
34
  super(address, JSON.stringify(Issues_json_1.abi), signer);
35
35
  this.contractAddress = address;
36
36
  }
@@ -50,8 +50,8 @@ class IssueContract extends index_1.VerifiedContract {
50
50
  await this.validateInput(index_1.DATATYPES.NUMBER, cutOffTime);
51
51
  return this.callContract(FUNCTIONS.STARTISSUE, cutOffTime, options);
52
52
  }
53
- async closeIssue() {
54
- return this.callContract(FUNCTIONS.CLOSEISSUE);
53
+ async getSubscribers() {
54
+ return this.callContract(FUNCTIONS.GETSUBSCRIBERS);
55
55
  }
56
56
  async allotIssue(_allotment, _platform, _pool, _investor, _amount, _asset, options) {
57
57
  await this.validateInput(index_1.DATATYPES.STRING, _allotment);
@@ -52,8 +52,8 @@ class OrderPoolContract extends index_1.VerifiedContract {
52
52
  * @param (bytes32 ref)
53
53
  * @returns (bool)
54
54
  */
55
- async cancelOrder(ref, options) {
56
- await this.validateInput(index_1.DATATYPES.STRING, ref);
55
+ async cancelOrder(_ref, options) {
56
+ await this.validateInput(index_1.DATATYPES.STRING, _ref);
57
57
  return this.callContract(FUNCTIONS.CANCELORDER, _ref, options);
58
58
  }
59
59
  /**
@@ -8,7 +8,9 @@ var FUNCTIONS;
8
8
  (function (FUNCTIONS) {
9
9
  FUNCTIONS["REGISTERPRODUCT"] = "recordProduct";
10
10
  FUNCTIONS["CLIENTPRODUCT"] = "getProductsForClient";
11
+ FUNCTIONS["CLIENTISSUE"] = "getIssuesForClient";
11
12
  FUNCTIONS["COUNTRYPRODUCT"] = "getProductsForCountry";
13
+ FUNCTIONS["COUNTRYISSUE"] = "getIssuesForCountry";
12
14
  FUNCTIONS["GETPRODUCT"] = "getProduct";
13
15
  FUNCTIONS["REGISTERCERTIFICATE"] = "registerCertificate";
14
16
  FUNCTIONS["GETCERTIFICATE"] = "getCertificate";
@@ -40,10 +42,17 @@ class ProductContract extends index_1.VerifiedContract {
40
42
  async getProductsForClient() {
41
43
  return this.callContract(FUNCTIONS.CLIENTPRODUCT);
42
44
  }
45
+ async getIssuesForClient() {
46
+ return this.callContract(FUNCTIONS.CLIENTISSUE);
47
+ }
43
48
  async getProductsForCountry(_country, options) {
44
49
  await this.validateInput(index_1.DATATYPES.STRING, _country);
45
50
  return this.callContract(FUNCTIONS.COUNTRYPRODUCT, this.sanitiseInput(index_1.DATATYPES.BYTE32, _country), options);
46
51
  }
52
+ async getIssuesForCountry(_country, options) {
53
+ await this.validateInput(index_1.DATATYPES.STRING, _country);
54
+ return this.callContract(FUNCTIONS.COUNTRYISSUE, this.sanitiseInput(index_1.DATATYPES.BYTE32, _country), options);
55
+ }
47
56
  async getProduct(_ref, options) {
48
57
  await this.validateInput(index_1.DATATYPES.STRING, _ref);
49
58
  return this.callContract(FUNCTIONS.GETPRODUCT, this.sanitiseInput(index_1.DATATYPES.BYTE32, _ref), options);
@@ -20,8 +20,8 @@ const contractAddress = {
20
20
  'Security': '0x62819B9f1A02f96F6685e361f2dFB74a3b5f7292',
21
21
  'OrderPool': '0x234a02b105fa720904a829C6709859bb38E2db00',
22
22
  'PoolFactory': '0x442900D17Ac8C7fC9B8489C1fa3c51538709cf83',
23
- 'Products': '0xEf94b3E3071DB90a4c6CbB1c65CE74A3752C9B12',
24
- 'Issues': '0x967dc622f4E62e3DD8832FBc7E3174082B3963aF',
23
+ 'Products': '0xF0Cdff4Fb59AeC4369EFc8DC5179D85F32b48007',
24
+ 'Issues': '0xd5134061e190a45e7378c3711D0a9B07972DA05f',
25
25
  'BalancerManager': '',
26
26
  'CASH': {
27
27
  'VCUSD': '0xe3b822b4d97604f1C73300619d9c8D507f9ED11f',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verified-network/verified-sdk",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "An SDK to develop applications on the Verified Network",
5
5
  "repository": {
6
6
  "type": "git",