@verified-network/verified-sdk 0.5.1 → 0.5.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.
@@ -21,14 +21,15 @@ class AccountContract extends index_1.VerifiedContract {
21
21
  * @param (address _account, bytes32 _accountNumber, int256 _txAmount, bytes32 _txType, bytes32 _txDate, bytes32 _txDescription, bytes32 _vchType)
22
22
  *
23
23
  */
24
- async postEntry(_counterParty, _txAmount, _txType, _txDate, _txDescription, _vchType, options) {
24
+ async postEntry(_counterParty, _txAmount, _txType, _txDate, _txDescription, _vchType, _txHash, options) {
25
25
  await this.validateInput(index_1.DATATYPES.ADDRESS, _counterParty);
26
26
  await this.validateInput(index_1.DATATYPES.NUMBER, _txAmount);
27
27
  await this.validateInput(index_1.DATATYPES.NUMBER, _txDate);
28
28
  await this.validateInput(index_1.DATATYPES.STRING, _txType);
29
29
  await this.validateInput(index_1.DATATYPES.STRING, _txDescription);
30
30
  await this.validateInput(index_1.DATATYPES.STRING, _vchType);
31
- return this.callContract(FUNCTIONS.POSTENTRY, _counterParty, _txAmount, this.sanitiseInput(index_1.DATATYPES.BYTE32, _txType), _txDate, this.sanitiseInput(index_1.DATATYPES.BYTE32, _txDescription), this.sanitiseInput(index_1.DATATYPES.BYTE32, _vchType), options);
31
+ await this.validateInput(index_1.DATATYPES.STRING, _txHash);
32
+ return this.callContract(FUNCTIONS.POSTENTRY, _counterParty, _txAmount, this.sanitiseInput(index_1.DATATYPES.BYTE32, _txType), _txDate, this.sanitiseInput(index_1.DATATYPES.BYTE32, _txDescription), this.sanitiseInput(index_1.DATATYPES.BYTE32, _vchType), _txHash, options);
32
33
  }
33
34
  }
34
35
  exports.default = AccountContract;
@@ -49,9 +49,9 @@ class ClientContract extends index_1.VerifiedContract {
49
49
  * @params (bool login)
50
50
  * @returns
51
51
  */
52
- async setAccess(_login, options) {
53
- await this.validateInput(index_1.DATATYPES.BOOLEAN, _login);
54
- return this.callContract(FUNCTIONS.SETACCESS, _login, options);
52
+ async setAccess(_token, options) {
53
+ await this.validateInput(index_1.DATATYPES.STRING, _token);
54
+ return this.callContract(FUNCTIONS.SETACCESS, _token, options);
55
55
  }
56
56
  async getAccess(_clientAddress, options) {
57
57
  await this.validateInput(index_1.DATATYPES.ADDRESS, _clientAddress);
@@ -107,10 +107,9 @@ class ClientContract extends index_1.VerifiedContract {
107
107
  * @params (address _manager,bool _status)
108
108
  * @returns {address[] memory}
109
109
  */
110
- async getClients(_managerAddress, _status, options) {
110
+ async getClients(_managerAddress, options) {
111
111
  await this.validateInput(index_1.DATATYPES.ADDRESS, _managerAddress);
112
- await this.validateInput(index_1.DATATYPES.BOOLEAN, _status);
113
- return this.callContract(FUNCTIONS.GETCLIENTS, _managerAddress, _status, options);
112
+ return this.callContract(FUNCTIONS.GETCLIENTS, _managerAddress, options);
114
113
  }
115
114
  /**
116
115
  * Get sub-managers for role [callable only by manager]
@@ -13,6 +13,8 @@ var FUNCTIONS;
13
13
  FUNCTIONS["GETTRANSACTIONS"] = "getTransactions";
14
14
  FUNCTIONS["FETCHTRANSACTIONS"] = "fetchTransactions";
15
15
  FUNCTIONS["GETENTRY"] = "getEntry";
16
+ FUNCTIONS["SETBLOCK"] = "setBlock";
17
+ FUNCTIONS["GETBLOCK"] = "getBlock";
16
18
  })(FUNCTIONS || (FUNCTIONS = {}));
17
19
  class HolderContract extends index_1.VerifiedContract {
18
20
  constructor(signer, holderAddress) {
@@ -63,9 +65,10 @@ class HolderContract extends index_1.VerifiedContract {
63
65
  * @param (uint256 _txDate)
64
66
  * _txDate is unix timestamp for date on and which transactions are returned.
65
67
  */
66
- async fetchTransactions(_txDate, options) {
67
- await this.validateInput(index_1.DATATYPES.NUMBER, _txDate);
68
- return this.callContract(FUNCTIONS.FETCHTRANSACTIONS, _txDate, options);
68
+ async fetchTransactions(_startDate, _endDate, options) {
69
+ await this.validateInput(index_1.DATATYPES.NUMBER, _startDate);
70
+ await this.validateInput(index_1.DATATYPES.NUMBER, _endDate);
71
+ return this.callContract(FUNCTIONS.FETCHTRANSACTIONS, _startDate, _endDate, options);
69
72
  }
70
73
  /**
71
74
  * Get list of transactions for account holder [callable by KYC passed client
@@ -86,5 +89,12 @@ class HolderContract extends index_1.VerifiedContract {
86
89
  await this.validateInput(index_1.DATATYPES.STRING, _currency);
87
90
  return this.callContract(FUNCTIONS.GETENTRY, _index, _txDate, this.sanitiseInput(index_1.DATATYPES.BYTE32, _currency), options);
88
91
  }
92
+ async setBlock(_block, options) {
93
+ await this.validateInput(index_1.DATATYPES.NUMBER, _block);
94
+ return this.callContract(FUNCTIONS.SETBLOCK, _block, options);
95
+ }
96
+ async getBlock(options) {
97
+ return this.callContract(FUNCTIONS.GETBLOCK);
98
+ }
89
99
  }
90
100
  exports.default = HolderContract;
@@ -2,37 +2,37 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const contractAddress = {
4
4
  'ropsten': {
5
- 'Client': '0x4c0cB1cfB353f5387Bce7D2a9D3d8f9710E93dd7',
6
- 'KYC': '0x4d219Bde2787C57A54749AD88C8448f5ddD453b5',
7
- 'System': '0x00393538a3FD1872dE705aAD242B666630c89BF6',
8
- 'Holder': '0x6f34FFb2D85CB5aA0d028b55013bca291AE2738e',
9
- 'Ledger': '0x8a0125C0995D4428F9D35aDd5e300AbE612aC3d9',
10
- 'Account': '0x0446A54F9eA6BFE6B9e567c30E93a255b0A3E90e',
11
- 'Factory': '0x36f49e8e1D3d713B461D4Cd12f961bC9B784dF67',
12
- 'Cash': '0x93d5C6B832A9c4FEB1d9897D9b1088124c882eE3',
13
- 'Bond': '0x04dd0A9405B8DE91f92A0ee5F9972a1E898cFd79',
14
- 'Token': '0x4ef2b7de40058c71f8718D8c3bB93220Ec077305',
15
- 'Oracle': '0xf11cB9C121490294be1Db534d0162C390935FBf7',
16
- 'PreTrade': '0xc2239361eA58d6d3d2BA71cF519A66E47Bb852E5',
17
- 'Trade': '0x7463E81B06a7B49F89f5D2293aCE7E17EB9E70D9',
18
- 'PostTrade': '0x50D54Fca76ABDb7d8883cb6D5d6d6cD64aE7ab9F',
19
- 'SecuritiesRegistry': '0x745C78f4c84CA03d851342E594377079Bd235f5D',
20
- 'Security': '0xD5e94c19513B998A8432dCE101a94BACA75A1A5c',
21
- 'OrderPool': '0xb87da4B188D4EbEd1935d3981eF11F0b67DC0659',
22
- 'PoolFactory': '0x1a124dAF4bD0C8bC482b8Cb34511B672E16cdcDc',
23
- 'Products': '0x454FAFBA1430bADaaE6f8894aA459145Ae19F479',
24
- 'Issues': '0xb1f3891D8BC3195716D3D551eB5BABDD4d070352',
5
+ 'Client': '0xdC79eAb7e8780b488b976D2c58CCA0656953e99f',
6
+ 'KYC': '0x24049A601B3385CAD92F2536E4cEAbDB0Dc949AE',
7
+ 'System': '0xbd86BD9ab0B45703C793c7AF6EBe26F5156094E0',
8
+ 'Holder': '0x903a3Ca8070bDd5e2E1F0874E6adA619F600CDC3',
9
+ 'Ledger': '0xBd97E9fc5E661F3E1E10132E42c12EbbC484163A',
10
+ 'Account': '0xCa423473e5c7cc3e4A6949984c0adE8CF7fD1B90',
11
+ 'Factory': '0xeb8448D64f84173Ecc7a7973092B71d2d228f5C7',
12
+ 'Cash': '0x54145f1Fc67cCd555C2E2f78A60E3f4c6bcB4714',
13
+ 'Bond': '0x9d0A28a78E8fd7D4507f9600F7e85D46DAaF573E',
14
+ 'Token': '0xE2488DC37a251078F33BC873047869e5Eb95F33A',
15
+ 'Oracle': '',
16
+ 'PreTrade': '',
17
+ 'Trade': '',
18
+ 'PostTrade': '',
19
+ 'SecuritiesRegistry': '',
20
+ 'Security': '',
21
+ 'OrderPool': '',
22
+ 'PoolFactory': '',
23
+ 'Products': '',
24
+ 'Issues': '',
25
25
  'BalancerManager': '',
26
- 'Custody': '0xb6DD33C076fE95ffACC84E048Bda1caa6C304673',
26
+ 'Custody': '',
27
27
  'CASH': {
28
- 'VCUSD': '0x56849B0a8108d03926062187b2D97f67465Bb1a6',
29
- 'VCEUR': '0xB1D0B7a9d2CcD787dedc7f70aE6462062dc84255',
30
- 'VCINR': '0x4357af1D5823C256Ca1F1A417e2E83D91F25bDDB'
28
+ 'VCUSD': '0xd5CD71f85658F9E974D765d0E1ECbe0aeD10a95D',
29
+ 'VCEUR': '0x44Ac33B4463486e96d7746cbDbf6b80ad434ADB2',
30
+ 'VCINR': '0x01A972Da881252922f545DA5465F3Da043ef7e26'
31
31
  },
32
32
  'BOND': {
33
- 'VBUSD': '0xdF59f85dF09a06c704C5C5fcADe9f15b4Bc06baF',
34
- 'VBEUR': '0x700BE30446c9DC82C565444ed15EFc5A6696300e',
35
- 'VBINR': '0xe8Ad6c15Fb44DE7bc5403160279cd0e4CcB0B0A2'
33
+ 'VBUSD': '0xD0E8d8C8e029Fe94643E2EB88DC8306fAa3a433d',
34
+ 'VBEUR': '0x04F6c6219Fa92FC42cc38E6a98f93D2F7aDA8F62',
35
+ 'VBINR': '0x2d873D0189a30EB2AC69D8a1A71F3d075008e794'
36
36
  }
37
37
  }
38
38
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verified-network/verified-sdk",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "An SDK to develop applications on the Verified Network",
5
5
  "repository": {
6
6
  "type": "git",