@verified-network/verified-sdk 0.2.8 → 0.3.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.
@@ -22,12 +22,11 @@ class AccountContract extends index_1.VerifiedContract {
22
22
  * @param (address _account, bytes32 _accountNumber, int256 _txAmount, bytes32 _txType, bytes32 _txDate, bytes32 _txDescription, bytes32 _vchType)
23
23
  *
24
24
  */
25
- async postEntry(_counterParty, _accountNumber, _txAmount, _txType, _txDate, _txDescription, _vchType, options) {
25
+ async postEntry(_counterParty, _txAmount, _txType, _txDate, _txDescription, _vchType, options) {
26
26
  await this.validateInput(index_1.DATATYPES.ADDRESS, _counterParty);
27
- await this.validateInput(index_1.DATATYPES.STRING, _accountNumber);
28
27
  await this.validateInput(index_1.DATATYPES.NUMBER, _txAmount);
29
28
  await this.validateInput(index_1.DATATYPES.NUMBER, _txDate);
30
- return this.callContract(FUNCTIONS.POSTENTRY, _counterParty, this.sanitiseInput(index_1.DATATYPES.BYTE32, _accountNumber), _txAmount, this.sanitiseInput(index_1.DATATYPES.BYTE32, _txType), _txDate, this.sanitiseInput(index_1.DATATYPES.BYTE32, _txDescription), this.sanitiseInput(index_1.DATATYPES.BYTE32, _vchType), options);
29
+ 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
30
  }
32
31
  /**
33
32
  * View account transaction [callable by KYC passed client
@@ -12,6 +12,7 @@ var FUNCTIONS;
12
12
  FUNCTIONS["CREATELEDGER"] = "createLedger";
13
13
  FUNCTIONS["GETTRANSACTIONS"] = "getTransactions";
14
14
  FUNCTIONS["FETCHTRANSACTIONS"] = "fetchTransactions";
15
+ FUNCTIONS["GETENTRY"] = "getEntry";
15
16
  })(FUNCTIONS || (FUNCTIONS = {}));
16
17
  class HolderContract extends index_1.VerifiedContract {
17
18
  constructor(signer, holderAddress) {
@@ -68,11 +69,22 @@ class HolderContract extends index_1.VerifiedContract {
68
69
  }
69
70
  /**
70
71
  * Get list of transactions for account holder [callable by KYC passed client
71
- * @returns (address[] memory, bytes16[] memory, bytes32[] memory, uint256[] memory, bytes32[] memory);
72
- * Arrays returned are for – party, amount, transaction type, transaction date, description
72
+ * @returns uint256 (number of transactions to _txDate and denominated in _currency)
73
73
  */
74
- async getTransactions() {
75
- return this.callContract(FUNCTIONS.GETTRANSACTIONS);
74
+ async getTransactions(_txDate, _currency, options) {
75
+ await this.validateInput(index_1.DATATYPES.NUMBER, _txDate);
76
+ await this.validateInput(index_1.DATATYPES.BYTE32, _currency);
77
+ return this.callContract(FUNCTIONS.GETTRANSACTIONS, _txDate, _currency, options);
78
+ }
79
+ /**
80
+ * Get list of transactions for account holder [callable by KYC passed client
81
+ * @returns (address party, uint256 amount, bytes32 currency, bytes32 transaction type, uint256 date, bytes32 description, bytes32 voucherType);
82
+ */
83
+ async getEntry(_index, _txDate, _currency, options) {
84
+ await this.validateInput(index_1.DATATYPES.NUMBER, _index);
85
+ await this.validateInput(index_1.DATATYPES.NUMBER, _txDate);
86
+ await this.validateInput(index_1.DATATYPES.BYTE32, _currency);
87
+ return this.callContract(FUNCTIONS.GETENTRY, _index, _txDate, _currency, options);
76
88
  }
77
89
  }
78
90
  exports.default = HolderContract;
@@ -2,12 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const contractAddress = {
4
4
  'ropsten': {
5
- 'Client': '0xc5fA33C9FfA51cE0982089DfCEa0D0591D9863f5',
6
- 'KYC': '0x7fd4D48AF2B984772c309856e5A0a779B2d048A6',
7
- 'System': '0x488B840d929dbD3DE41ca6e98815271DD0Fdadac',
8
- 'Holder': '0x3e4256A3cEE979099A6BfFb8993A8Ec9613Ec6e1',
9
- 'Ledger': '0x4cfAf4F5fe6f81815289078b9c014Bf4fBA6a11d',
10
- 'Account': '0x926Aa8c8826e5e1E656f5b5f3cd42cD6831c63c5',
5
+ 'Client': '0xDE913403cfeF324fA5B3c3cEe60586df7cAA4123',
6
+ 'KYC': '0xDe275F643288fA44B6217f164CeE3353df8b0474',
7
+ 'System': '0x4A13082F6F6AA94B1334e8DaBF93E12442900B91',
8
+ 'Holder': '0xDAC4DAad7B6d14e16cC3D9Fc9dcc314190c3753d',
9
+ 'Ledger': '0x7d8C5FD01936356cb15BEBE9222EdDD3e13bAE57',
10
+ 'Account': '0x6Ec5F5464fC1ee7B3c12B8a9a31DF5DfB51B91F9',
11
11
  'Factory': '0x688fBf0A2e72f937e2Ef322079b746f320413063',
12
12
  'Cash': '0xCeE5540B147b08A933FA8fD353446f6C60Fd95f7',
13
13
  'Bond': '0xaA7461A8be14fB0Fa2682a72968dFB0d48867A81',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verified-network/verified-sdk",
3
- "version": "0.2.8",
3
+ "version": "0.3.2",
4
4
  "description": "An SDK to develop applications on the Verified Network",
5
5
  "repository": {
6
6
  "type": "git",