@verified-network/verified-sdk 0.3.7 → 0.4.1
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.
- package/dist/abi/accounts/Account.json +2552 -2552
- package/dist/abi/accounts/Client.json +5417 -5417
- package/dist/abi/accounts/Holder.json +2930 -2930
- package/dist/abi/accounts/Kyc.json +4192 -4192
- package/dist/abi/accounts/Ledger.json +1686 -1686
- package/dist/abi/accounts/System.json +20215 -12415
- package/dist/abi/trades/OrderPool.json +8053 -6901
- package/dist/abi/trades/PoolFactory.json +670 -670
- package/dist/abi/trades/PostTrade.json +461 -461
- package/dist/abi/trades/PreTrade.json +1203 -1160
- package/dist/abi/trades/SecuritiesRegistry.json +4442 -4394
- package/dist/abi/trades/Security.json +2976 -4863
- package/dist/abi/trades/Trade.json +5981 -5081
- package/dist/contract/index.js +3 -3
- package/dist/contract/pretrade/index.js +8 -8
- package/dist/contractAddress/index.js +13 -13
- package/package.json +1 -1
package/dist/contract/index.js
CHANGED
|
@@ -84,8 +84,7 @@ class VerifiedContract {
|
|
|
84
84
|
* @param ( value [ , unit = "ether" ] )
|
|
85
85
|
* @returns ⇒ BigNumber
|
|
86
86
|
*/
|
|
87
|
-
ethers_1.utils.parseUnits(data);
|
|
88
|
-
break;
|
|
87
|
+
return ethers_1.utils.parseUnits(data);
|
|
89
88
|
case DATATYPES.BOOLEAN:
|
|
90
89
|
const arr = [true, false, "true", "false", 'TRUE', 'FALSE'];
|
|
91
90
|
return arr.indexOf(data) !== -1 ? true : new Error("Invalid Boolean value");
|
|
@@ -140,8 +139,9 @@ class VerifiedContract {
|
|
|
140
139
|
return response.result.push(element.toString());
|
|
141
140
|
if (ethers_1.utils.isAddress(element))
|
|
142
141
|
return response.result.push(element);
|
|
142
|
+
//if (utils.isBytesLike(element)) return response.result.push(this.sanitiseOutput(DATATYPES.BYTE32, element))
|
|
143
143
|
if (ethers_1.utils.isBytesLike(element))
|
|
144
|
-
return response.result.push(
|
|
144
|
+
return response.result.push(element);
|
|
145
145
|
if (typeof element === 'boolean' || (this.validateInput(DATATYPES.ADDRESS, element)))
|
|
146
146
|
return response.result.push(element);
|
|
147
147
|
});
|
|
@@ -24,12 +24,12 @@ class PreTradeContract extends index_1.VerifiedContract {
|
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Register demat account [sent by user on PreTrade.sol]
|
|
27
|
-
* @param (bytes32
|
|
28
|
-
* @returns Returns nothing.
|
|
27
|
+
* @param (bytes32 _currencyCode)
|
|
28
|
+
* @returns Returns nothing.
|
|
29
29
|
*/
|
|
30
|
-
async registerDematAccount(
|
|
31
|
-
await this.validateInput(index_1.DATATYPES.STRING,
|
|
32
|
-
return this.callContract(FUNCTIONS.REGISTERDEMATACCOUNT, sanitiseInput(index_1.DATATYPES.BYTE32,
|
|
30
|
+
async registerDematAccount(_currencyCode, options) {
|
|
31
|
+
await this.validateInput(index_1.DATATYPES.STRING, _currencyCode);
|
|
32
|
+
return this.callContract(FUNCTIONS.REGISTERDEMATACCOUNT, this.sanitiseInput(index_1.DATATYPES.BYTE32, _currencyCode), options);
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
* Get no of registrations [sent by manager on PreTrade.sol, only works if manager’s role is DP]
|
|
@@ -38,7 +38,7 @@ class PreTradeContract extends index_1.VerifiedContract {
|
|
|
38
38
|
*/
|
|
39
39
|
async getRegistrationRequests(_countryCode, options) {
|
|
40
40
|
await this.validateInput(index_1.DATATYPES.STRING, _countryCode);
|
|
41
|
-
return this.callContract(FUNCTIONS.GETREGISTRATIONREQUESTS, sanitiseInput(index_1.DATATYPES.BYTE32, _countryCode), options);
|
|
41
|
+
return this.callContract(FUNCTIONS.GETREGISTRATIONREQUESTS, this.sanitiseInput(index_1.DATATYPES.BYTE32, _countryCode), options);
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* Get registration request for passed registration reference
|
|
@@ -47,7 +47,7 @@ class PreTradeContract extends index_1.VerifiedContract {
|
|
|
47
47
|
*/
|
|
48
48
|
async getRegistrationRequest(_ref, options) {
|
|
49
49
|
await this.validateInput(index_1.DATATYPES.STRING, _ref);
|
|
50
|
-
return this.callContract(FUNCTIONS.GETREGISTRATIONREQUEST, sanitiseInput(index_1.DATATYPES.BYTE32, _ref), options);
|
|
50
|
+
return this.callContract(FUNCTIONS.GETREGISTRATIONREQUEST, this.sanitiseInput(index_1.DATATYPES.BYTE32, _ref), options);
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
53
|
* Set registration status [sent by manager on PreTrade.sol, only works if manager’s role is DP]
|
|
@@ -58,7 +58,7 @@ class PreTradeContract extends index_1.VerifiedContract {
|
|
|
58
58
|
await this.validateInput(index_1.DATATYPES.STRING, _ref);
|
|
59
59
|
await this.validateInput(index_1.DATATYPES.STRING, _DPID);
|
|
60
60
|
await this.validateInput(index_1.DATATYPES.STRING, _dematAccountNo);
|
|
61
|
-
return this.callContract(FUNCTIONS.SETREGISTRATIONSTATUS, sanitiseInput(index_1.DATATYPES.BYTE32, _ref), sanitiseInput(index_1.DATATYPES.BYTE32, _DPID), sanitiseInput(index_1.DATATYPES.BYTE32, _dematAccountNo), options);
|
|
61
|
+
return this.callContract(FUNCTIONS.SETREGISTRATIONSTATUS, this.sanitiseInput(index_1.DATATYPES.BYTE32, _ref), this.sanitiseInput(index_1.DATATYPES.BYTE32, _DPID), this.sanitiseInput(index_1.DATATYPES.BYTE32, _dematAccountNo), options);
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
64
|
* Set registration status [sent by manager on PreTrade.sol, only works if manager’s role is DP]
|
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const contractAddress = {
|
|
4
4
|
'ropsten': {
|
|
5
|
-
'Client': '
|
|
6
|
-
'KYC': '
|
|
7
|
-
'System': '
|
|
8
|
-
'Holder': '
|
|
9
|
-
'Ledger': '
|
|
10
|
-
'Account': '
|
|
5
|
+
'Client': '0xEAFb86d95575a5893E692613e3F7c4ADb1c89E03',
|
|
6
|
+
'KYC': '0x24a41AADC3aFd117BEC9db41212D517499dd651d',
|
|
7
|
+
'System': '0x2399b44c71642709e870cE081Ecd2B060DF5eD63',
|
|
8
|
+
'Holder': '0x62B91a0A10540CF935De3c36354531f2E6399228',
|
|
9
|
+
'Ledger': '0xcfD532b8B0D6Dbf1Af531D7D3497304f77e99990',
|
|
10
|
+
'Account': '0x634056BbF1083Ed881C4f3187C8dfe6280C6a879',
|
|
11
11
|
'Factory': '0x688fBf0A2e72f937e2Ef322079b746f320413063',
|
|
12
12
|
'Cash': '0xCeE5540B147b08A933FA8fD353446f6C60Fd95f7',
|
|
13
13
|
'Bond': '0xaA7461A8be14fB0Fa2682a72968dFB0d48867A81',
|
|
14
14
|
'Token': '0xFF842A06f86996a5e711eDaF835538B45A356dA0',
|
|
15
15
|
'Oracle': '0xDa6699338C5b698DaEeF18dEff5db6A89d70390e',
|
|
16
|
-
'PreTrade': '',
|
|
17
|
-
'Trade': '',
|
|
18
|
-
'PostTrade': '',
|
|
19
|
-
'SecuritiesRegistry': '',
|
|
20
|
-
'Security': '',
|
|
21
|
-
'OrderPool': '',
|
|
22
|
-
'PoolFactory': '',
|
|
16
|
+
'PreTrade': '0xe451bf4555a3d664708ef95DE79483AD5707257C',
|
|
17
|
+
'Trade': '0xa2B1fb08866198E849Af9C5F20B8A2389C4762F1',
|
|
18
|
+
'PostTrade': '0xa6Ca8008702aB4f20460a6500563c81D27518Bb4',
|
|
19
|
+
'SecuritiesRegistry': '0x2Fed98ac417064c0F8B5C1403812742c0dbD7a5d',
|
|
20
|
+
'Security': '0xb8A0646BA31bF9005Fce5a7Fb8354CC26037dAd7',
|
|
21
|
+
'OrderPool': '0x7Ee1888b825618f936D14E89D8bF49CEed69a502',
|
|
22
|
+
'PoolFactory': '0xbF57Fb1eE2d13b42B80DF6Bd64EF7727F2eE4198',
|
|
23
23
|
'Products': '',
|
|
24
24
|
'Issues': '',
|
|
25
25
|
'BalancerManager': '',
|