@verified-network/verified-sdk 0.8.1 → 0.8.2

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 (39) hide show
  1. package/dist/abi/securities/Bonds.json +7082 -7099
  2. package/dist/abi/securities/Products.json +5322 -5534
  3. package/dist/abi/securities/Stocks.json +5379 -5396
  4. package/dist/contract/account/index.js +1 -1
  5. package/dist/contract/assetmanager/index.js +0 -1
  6. package/dist/contract/bond/index.js +0 -1
  7. package/dist/contract/bonds/index.js +0 -1
  8. package/dist/contract/cash/index.js +0 -1
  9. package/dist/contract/client/index.js +4 -3
  10. package/dist/contract/custody/index.js +1 -1
  11. package/dist/contract/distribution/index.js +1 -1
  12. package/dist/contract/factory/index.js +2 -1
  13. package/dist/contract/holder/index.js +0 -1
  14. package/dist/contract/kyc/index.js +1 -1
  15. package/dist/contract/ledger/index.js +0 -1
  16. package/dist/contract/liquidity/index.js +1 -1
  17. package/dist/contract/oracle/index.js +1 -1
  18. package/dist/contract/orderpool/index.js +0 -1
  19. package/dist/contract/poolfactory/index.js +1 -1
  20. package/dist/contract/posttrade/index.js +1 -1
  21. package/dist/contract/pretrade/index.js +1 -1
  22. package/dist/contract/product/index.js +1 -1
  23. package/dist/contract/public/bond/index.js +0 -1
  24. package/dist/contract/public/cash/index.js +0 -1
  25. package/dist/contract/public/client/index.js +1 -1
  26. package/dist/contract/public/distribution/index.js +1 -1
  27. package/dist/contract/public/factory/index.js +1 -1
  28. package/dist/contract/public/product/index.js +1 -1
  29. package/dist/contract/public/rates/index.js +1 -1
  30. package/dist/contract/public/security/index.js +1 -1
  31. package/dist/contract/rates/index.js +1 -1
  32. package/dist/contract/securitiesregistry/index.js +1 -1
  33. package/dist/contract/security/index.js +0 -1
  34. package/dist/contract/stocks/index.js +0 -1
  35. package/dist/contract/system/index.js +1 -1
  36. package/dist/contract/token/index.js +0 -1
  37. package/dist/contract/trade/index.js +1 -1
  38. package/dist/contractAddress/index.js +3 -3
  39. package/package.json +1 -1
@@ -10,7 +10,7 @@ var FUNCTIONS;
10
10
  })(FUNCTIONS || (FUNCTIONS = {}));
11
11
  class AccountContract extends index_1.VerifiedContract {
12
12
  constructor(signer, accountAddress) {
13
- const chainId = signer.provider._network.chainId.toString();
13
+ //const chainId: string = signer.provider._network.chainId.toString()
14
14
  const address = accountAddress;
15
15
  super(address, JSON.stringify(Account_json_1.abi), signer);
16
16
  this.contractAddress = address;
@@ -20,7 +20,6 @@ var FUNCTIONS;
20
20
  })(FUNCTIONS || (FUNCTIONS = {}));
21
21
  class AssetManager extends index_1.VerifiedContract {
22
22
  constructor(signer, platformAddress) {
23
- const chainId = signer.provider._network.chainId.toString();
24
23
  const address = platformAddress;
25
24
  super(address, JSON.stringify(BalancerManager_json_1.abi), signer);
26
25
  this.contractAddress = address;
@@ -18,7 +18,6 @@ var FUNCTIONS;
18
18
  })(FUNCTIONS || (FUNCTIONS = {}));
19
19
  class BondContract extends index_1.VerifiedContract {
20
20
  constructor(signer, bondCurrencyAddress) {
21
- const chainId = signer.provider._network.chainId.toString();
22
21
  const address = bondCurrencyAddress;
23
22
  super(address, JSON.stringify(Bond_json_1.abi), signer);
24
23
  this.contractAddress = address;
@@ -27,7 +27,6 @@ var FUNCTIONS;
27
27
  })(FUNCTIONS || (FUNCTIONS = {}));
28
28
  class BondsContract extends index_1.VerifiedContract {
29
29
  constructor(signer, issue) {
30
- const chainId = signer.provider._network.chainId.toString();
31
30
  const address = issue;
32
31
  super(address, JSON.stringify(Bonds_json_1.abi), signer);
33
32
  this.contractAddress = address;
@@ -18,7 +18,6 @@ var FUNCTIONS;
18
18
  })(FUNCTIONS || (FUNCTIONS = {}));
19
19
  class CashContract extends index_1.VerifiedContract {
20
20
  constructor(signer, currencyAddress) {
21
- const chainId = signer.provider._network.chainId.toString();
22
21
  const address = currencyAddress;
23
22
  super(address, JSON.stringify(Cash_json_1.abi), signer);
24
23
  this.contractAddress = address;
@@ -25,7 +25,7 @@ var FUNCTIONS;
25
25
  })(FUNCTIONS || (FUNCTIONS = {}));
26
26
  class ClientContract extends index_1.VerifiedContract {
27
27
  constructor(signer) {
28
- const chainId = signer.provider._network.chainId.toString();
28
+ const chainId = Object.keys(Client_json_1.networks);
29
29
  const address = Client_json_1.networks[chainId].address;
30
30
  super(address, JSON.stringify(Client_json_1.abi), signer);
31
31
  this.contractAddress = address;
@@ -49,9 +49,10 @@ class ClientContract extends index_1.VerifiedContract {
49
49
  * @params (bool login)
50
50
  * @returns
51
51
  */
52
- async setAccess(_token, options) {
52
+ async setAccess(_client, _token, options) {
53
+ await this.validateInput(index_1.DATATYPES.ADDRESS, _client);
53
54
  await this.validateInput(index_1.DATATYPES.STRING, _token);
54
- return this.callContract(FUNCTIONS.SETACCESS, _token, options);
55
+ return this.callContract(FUNCTIONS.SETACCESS, _client, _token, options);
55
56
  }
56
57
  async getAccess(_clientAddress, options) {
57
58
  await this.validateInput(index_1.DATATYPES.ADDRESS, _clientAddress);
@@ -19,7 +19,7 @@ var FUNCTIONS;
19
19
  })(FUNCTIONS || (FUNCTIONS = {}));
20
20
  class CustodyContract extends index_1.VerifiedContract {
21
21
  constructor(signer) {
22
- const chainId = signer.provider._network.chainId.toString();
22
+ const chainId = Object.keys(Vault_json_1.networks);
23
23
  const address = Vault_json_1.networks[chainId].address;
24
24
  super(address, JSON.stringify(Vault_json_1.abi), signer);
25
25
  this.contractAddress = address;
@@ -14,7 +14,7 @@ var FUNCTIONS;
14
14
  })(FUNCTIONS || (FUNCTIONS = {}));
15
15
  class DistributionContract extends index_1.VerifiedContract {
16
16
  constructor(signer) {
17
- const chainId = signer.provider._network.chainId.toString();
17
+ const chainId = Object.keys(Distribution_json_1.networks);
18
18
  const address = Distribution_json_1.networks[chainId].address;
19
19
  super(address, JSON.stringify(Distribution_json_1.abi), signer);
20
20
  this.contractAddress = address;
@@ -23,7 +23,8 @@ var FUNCTIONS;
23
23
  })(FUNCTIONS || (FUNCTIONS = {}));
24
24
  class FactoryContract extends index_1.VerifiedContract {
25
25
  constructor(signer) {
26
- const chainId = signer.provider._network.chainId.toString();
26
+ const chainId = Object.keys(Factory_json_1.networks);
27
+ console.log("Factory chain id " + chainId);
27
28
  const address = Factory_json_1.networks[chainId].address;
28
29
  super(address, JSON.stringify(Factory_json_1.abi), signer);
29
30
  this.contractAddress = address;
@@ -18,7 +18,6 @@ var FUNCTIONS;
18
18
  })(FUNCTIONS || (FUNCTIONS = {}));
19
19
  class HolderContract extends index_1.VerifiedContract {
20
20
  constructor(signer, holderAddress) {
21
- const chainId = signer.provider._network.chainId.toString();
22
21
  const address = holderAddress;
23
22
  super(address, JSON.stringify(Holder_json_1.abi), signer);
24
23
  this.contractAddress = address;
@@ -36,7 +36,7 @@ var FUNCTIONS;
36
36
  })(FUNCTIONS || (FUNCTIONS = {}));
37
37
  class KYCContract extends index_1.VerifiedContract {
38
38
  constructor(signer) {
39
- const chainId = signer.provider._network.chainId.toString();
39
+ const chainId = Object.keys(Kyc_json_1.networks);
40
40
  const address = Kyc_json_1.networks[chainId].address;
41
41
  super(address, JSON.stringify(Kyc_json_1.abi), signer);
42
42
  this.contractAddress = address;
@@ -10,7 +10,6 @@ var FUNCTIONS;
10
10
  })(FUNCTIONS || (FUNCTIONS = {}));
11
11
  class LedgerContract extends index_1.VerifiedContract {
12
12
  constructor(signer, ledgerAddress) {
13
- const chainId = signer.provider._network.chainId.toString();
14
13
  const address = ledgerAddress;
15
14
  super(address, JSON.stringify(Ledger_json_1.abi), signer);
16
15
  this.contractAddress = address;
@@ -30,7 +30,7 @@ var FUNCTIONS;
30
30
  })(FUNCTIONS || (FUNCTIONS = {}));
31
31
  class LiquidityContract extends index_1.VerifiedContract {
32
32
  constructor(signer) {
33
- const chainId = signer.provider._network.chainId.toString();
33
+ const chainId = Object.keys(Liquidity_json_1.networks);
34
34
  const address = Liquidity_json_1.networks[chainId].address;
35
35
  super(address, JSON.stringify(Liquidity_json_1.abi), signer);
36
36
  this.contractAddress = address;
@@ -10,7 +10,7 @@ var FUNCTIONS;
10
10
  })(FUNCTIONS || (FUNCTIONS = {}));
11
11
  class OracleContract extends index_1.VerifiedContract {
12
12
  constructor(signer) {
13
- const chainId = signer.provider._network.chainId.toString();
13
+ const chainId = Object.keys(Oracle_json_1.networks);
14
14
  const address = Oracle_json_1.networks[chainId].address;
15
15
  super(address, JSON.stringify(Oracle_json_1.abi), signer);
16
16
  this.contractAddress = address;
@@ -13,7 +13,6 @@ var FUNCTIONS;
13
13
  })(FUNCTIONS || (FUNCTIONS = {}));
14
14
  class OrderPoolContract extends index_1.VerifiedContract {
15
15
  constructor(signer, orderPool) {
16
- const chainId = signer.provider._network.chainId.toString();
17
16
  const address = orderPool;
18
17
  super(address, JSON.stringify(OrderPool_json_1.abi), signer);
19
18
  this.contractAddress = address;
@@ -10,7 +10,7 @@ var FUNCTIONS;
10
10
  })(FUNCTIONS || (FUNCTIONS = {}));
11
11
  class PoolFactoryContract extends index_1.VerifiedContract {
12
12
  constructor(signer) {
13
- const chainId = signer.provider._network.chainId.toString();
13
+ const chainId = Object.keys(PoolFactory_json_1.networks);
14
14
  const address = PoolFactory_json_1.networks[chainId].address;
15
15
  super(address, JSON.stringify(PoolFactory_json_1.abi), signer);
16
16
  this.contractAddress = address;
@@ -12,7 +12,7 @@ var FUNCTIONS;
12
12
  })(FUNCTIONS || (FUNCTIONS = {}));
13
13
  class PostTradeContract extends index_1.VerifiedContract {
14
14
  constructor(signer) {
15
- const chainId = signer.provider._network.chainId.toString();
15
+ const chainId = Object.keys(PostTrade_json_1.networks);
16
16
  const address = PostTrade_json_1.networks[chainId].address;
17
17
  super(address, JSON.stringify(PostTrade_json_1.abi), signer);
18
18
  this.contractAddress = address;
@@ -19,7 +19,7 @@ var FUNCTIONS;
19
19
  })(FUNCTIONS || (FUNCTIONS = {}));
20
20
  class PreTradeContract extends index_1.VerifiedContract {
21
21
  constructor(signer) {
22
- const chainId = signer.provider._network.chainId.toString();
22
+ const chainId = Object.keys(PreTrade_json_1.networks);
23
23
  const address = PreTrade_json_1.networks[chainId].address;
24
24
  super(address, JSON.stringify(PreTrade_json_1.abi), signer);
25
25
  this.contractAddress = address;
@@ -25,7 +25,7 @@ var FUNCTIONS;
25
25
  })(FUNCTIONS || (FUNCTIONS = {}));
26
26
  class ProductContract extends index_1.VerifiedContract {
27
27
  constructor(signer) {
28
- const chainId = signer.provider._network.chainId.toString();
28
+ const chainId = Object.keys(Products_json_1.networks);
29
29
  const address = Products_json_1.networks[chainId].address;
30
30
  super(address, JSON.stringify(Products_json_1.abi), signer);
31
31
  this.contractAddress = address;
@@ -21,7 +21,6 @@ var FUNCTIONS;
21
21
  })(FUNCTIONS || (FUNCTIONS = {}));
22
22
  class VerifiedBond extends index_1.VerifiedContract {
23
23
  constructor(signer, bondCurrencyAddress) {
24
- const chainId = signer.provider._network.chainId.toString();
25
24
  const address = bondCurrencyAddress;
26
25
  super(address, JSON.stringify(Bond_json_1.abi), signer);
27
26
  this.contractAddress = address;
@@ -24,7 +24,6 @@ var FUNCTIONS;
24
24
  })(FUNCTIONS || (FUNCTIONS = {}));
25
25
  class VerifiedCash extends index_1.VerifiedContract {
26
26
  constructor(signer, currencyAddress) {
27
- const chainId = signer.provider._network.chainId.toString();
28
27
  const address = currencyAddress;
29
28
  super(address, JSON.stringify(Cash_json_1.abi), signer);
30
29
  this.contractAddress = address;
@@ -13,7 +13,7 @@ var FUNCTIONS;
13
13
  })(FUNCTIONS || (FUNCTIONS = {}));
14
14
  class VerifiedClient extends index_1.VerifiedContract {
15
15
  constructor(signer) {
16
- const chainId = signer.provider._network.chainId.toString();
16
+ const chainId = Object.keys(Client_json_1.networks);
17
17
  const address = Client_json_1.networks[chainId].address;
18
18
  super(address, JSON.stringify(Client_json_1.abi), signer);
19
19
  this.contractAddress = address;
@@ -14,7 +14,7 @@ var FUNCTIONS;
14
14
  })(FUNCTIONS || (FUNCTIONS = {}));
15
15
  class DistributionContract extends index_1.VerifiedContract {
16
16
  constructor(signer) {
17
- const chainId = signer.provider._network.chainId.toString();
17
+ const chainId = Object.keys(Distribution_json_1.networks);
18
18
  const address = Distribution_json_1.networks[chainId].address;
19
19
  super(address, JSON.stringify(Distribution_json_1.abi), signer);
20
20
  this.contractAddress = address;
@@ -16,7 +16,7 @@ var FUNCTIONS;
16
16
  })(FUNCTIONS || (FUNCTIONS = {}));
17
17
  class VerifiedFactory extends index_1.VerifiedContract {
18
18
  constructor(signer) {
19
- const chainId = signer.provider._network.chainId.toString();
19
+ const chainId = Object.keys(Factory_json_1.networks);
20
20
  const address = Factory_json_1.networks[chainId].address;
21
21
  super(address, JSON.stringify(Factory_json_1.abi), signer);
22
22
  this.contractAddress = address;
@@ -10,7 +10,7 @@ var FUNCTIONS;
10
10
  })(FUNCTIONS || (FUNCTIONS = {}));
11
11
  class VerifiedProducts extends index_1.VerifiedContract {
12
12
  constructor(signer) {
13
- const chainId = signer.provider._network.chainId.toString();
13
+ const chainId = Object.keys(Products_json_1.networks);
14
14
  const address = Products_json_1.networks[chainId].address;
15
15
  super(address, JSON.stringify(Products_json_1.abi), signer);
16
16
  this.contractAddress = address;
@@ -19,7 +19,7 @@ var FUNCTIONS;
19
19
  })(FUNCTIONS || (FUNCTIONS = {}));
20
20
  class VerifiedRates extends index_1.VerifiedContract {
21
21
  constructor(signer) {
22
- const chainId = signer.provider._network.chainId.toString();
22
+ const chainId = Object.keys(Rates_json_1.networks);
23
23
  const address = Rates_json_1.networks[chainId].address;
24
24
  super(address, JSON.stringify(Rates_json_1.abi), signer);
25
25
  this.contractAddress = address;
@@ -13,7 +13,7 @@ var FUNCTIONS;
13
13
  })(FUNCTIONS || (FUNCTIONS = {}));
14
14
  class VerifiedSecurity extends index_1.VerifiedContract {
15
15
  constructor(signer) {
16
- const chainId = signer.provider._network.chainId.toString();
16
+ const chainId = Object.keys(Security_json_1.networks);
17
17
  const address = Security_json_1.networks[chainId].address;
18
18
  super(address, JSON.stringify(Security_json_1.abi), signer);
19
19
  this.contractAddress = address;
@@ -19,7 +19,7 @@ var FUNCTIONS;
19
19
  })(FUNCTIONS || (FUNCTIONS = {}));
20
20
  class RatesContract extends index_1.VerifiedContract {
21
21
  constructor(signer) {
22
- const chainId = signer.provider._network.chainId.toString();
22
+ const chainId = Object.keys(Rates_json_1.networks);
23
23
  const address = Rates_json_1.networks[chainId].address;
24
24
  super(address, JSON.stringify(Rates_json_1.abi), signer);
25
25
  this.contractAddress = address;
@@ -19,7 +19,7 @@ var FUNCTIONS;
19
19
  })(FUNCTIONS || (FUNCTIONS = {}));
20
20
  class SecuritiesRegistryContract extends index_1.VerifiedContract {
21
21
  constructor(signer) {
22
- const chainId = signer.provider._network.chainId.toString();
22
+ const chainId = Object.keys(SecuritiesRegistry_json_1.networks);
23
23
  const address = SecuritiesRegistry_json_1.networks[chainId].address;
24
24
  super(address, JSON.stringify(SecuritiesRegistry_json_1.abi), signer);
25
25
  this.contractAddress = address;
@@ -11,7 +11,6 @@ var FUNCTIONS;
11
11
  })(FUNCTIONS || (FUNCTIONS = {}));
12
12
  class SecurityContract extends index_1.VerifiedContract {
13
13
  constructor(signer, tokenAddress) {
14
- const chainId = signer.provider._network.chainId.toString();
15
14
  const address = tokenAddress;
16
15
  super(address, JSON.stringify(Security_json_1.abi), signer);
17
16
  this.contractAddress = address;
@@ -20,7 +20,6 @@ var FUNCTIONS;
20
20
  })(FUNCTIONS || (FUNCTIONS = {}));
21
21
  class StocksContract extends index_1.VerifiedContract {
22
22
  constructor(signer, issue) {
23
- const chainId = signer.provider._network.chainId.toString();
24
23
  const address = issue;
25
24
  super(address, JSON.stringify(Stocks_json_1.abi), signer);
26
25
  this.contractAddress = address;
@@ -19,7 +19,7 @@ var FUNCTIONS;
19
19
  })(FUNCTIONS || (FUNCTIONS = {}));
20
20
  class SystemContract extends index_1.VerifiedContract {
21
21
  constructor(signer) {
22
- const chainId = signer.provider._network.chainId.toString();
22
+ const chainId = Object.keys(System_json_1.networks);
23
23
  const address = System_json_1.networks[chainId].address;
24
24
  super(address, JSON.stringify(System_json_1.abi), signer);
25
25
  this.contractAddress = address;
@@ -12,7 +12,6 @@ var FUNCTIONS;
12
12
  })(FUNCTIONS || (FUNCTIONS = {}));
13
13
  class TokenContract extends index_1.VerifiedContract {
14
14
  constructor(signer, bondCurrencyAddress) {
15
- const chainId = signer.provider._network.chainId.toString();
16
15
  const address = bondCurrencyAddress;
17
16
  super(address, JSON.stringify(Token_json_1.abi), signer);
18
17
  this.contractAddress = address;
@@ -12,7 +12,7 @@ var FUNCTIONS;
12
12
  })(FUNCTIONS || (FUNCTIONS = {}));
13
13
  class TradeContract extends index_1.VerifiedContract {
14
14
  constructor(signer) {
15
- const chainId = signer.provider._network.chainId.toString();
15
+ const chainId = Object.keys(Trade_json_1.networks);
16
16
  const address = Trade_json_1.networks[chainId].address;
17
17
  super(address, JSON.stringify(Trade_json_1.abi), signer);
18
18
  this.contractAddress = address;
@@ -60,9 +60,9 @@ const contractAddress = {
60
60
  'Security': '0x324dfB528BEea8419eC96C6a54E0DA7744A4f8da',
61
61
  'OrderPool': '0x69C61a08b46fdd75D6f000CCf2b85618AC7011a5',
62
62
  'PoolFactory': '0xEE713f9e7d7D03267534C2628019C16dC1c41ecB',
63
- 'Products': '0xA43Fe8095af86A2017Bfd939f02334CBE8ecBDb2',
64
- 'Stocks': '0xe77157fA1A77a0E441305196C457c74baE5FD58D',
65
- 'Bonds': '0xc439Aba7Bff2C134E4F3c3e47225F5C8D2118566',
63
+ 'Products': '0x53F20058A93364689C70d2CBf4057F507e32e000',
64
+ 'Stocks': '0x57ecEE694D9Cd5B16A55CFc5FF596de3Aa4B9a56',
65
+ 'Bonds': '0x23ceC8ec65837F71F02f27f351cecB3ec4cf5ba6',
66
66
  'Liquidity': '',
67
67
  'Distribution': '',
68
68
  'BalancerManager': '',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verified-network/verified-sdk",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "An SDK to develop applications on the Verified Network",
5
5
  "repository": {
6
6
  "type": "git",