@verified-network/verified-sdk 0.1.6 → 0.2.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 +3 -3
- package/dist/abi/accounts/Client.json +3 -3
- package/dist/abi/accounts/Holder.json +3 -3
- package/dist/abi/accounts/Kyc.json +3 -3
- package/dist/abi/accounts/Ledger.json +3 -3
- package/dist/abi/accounts/System.json +3 -3
- package/dist/abi/payments/Bond.json +9734 -9964
- package/dist/abi/payments/Cash.json +7062 -7098
- package/dist/abi/payments/Factory.json +1478 -1798
- package/dist/abi/payments/Oracle.json +2830 -2862
- package/dist/abi/payments/Token.json +2622 -1972
- package/dist/abi/trades/OrderPool.json +3 -3
- package/dist/abi/trades/PoolFactory.json +3 -3
- package/dist/abi/trades/PostTrade.json +3 -3
- package/dist/abi/trades/PreTrade.json +4 -4
- package/dist/abi/trades/SecuritiesRegistry.json +3 -3
- package/dist/abi/trades/Trade.json +4 -4
- package/dist/contract/client/index.js +6 -4
- package/dist/contract/index.js +1 -1
- package/dist/contract/kyc/index.js +9 -2
- package/dist/contractAddress/index.js +23 -23
- package/package.json +1 -1
|
@@ -39041,12 +39041,12 @@
|
|
|
39041
39041
|
"3": {
|
|
39042
39042
|
"events": {},
|
|
39043
39043
|
"links": {},
|
|
39044
|
-
"address": "
|
|
39045
|
-
"transactionHash": "
|
|
39044
|
+
"address": "0x55ec2F142E9f1aAd7694CA049940764a9CaEEc92",
|
|
39045
|
+
"transactionHash": "0xe042317c7975a5049bfe1e8c1ae0948e5f79c63d3fa193b5e0d2fca0bca69a61"
|
|
39046
39046
|
}
|
|
39047
39047
|
},
|
|
39048
39048
|
"schemaVersion": "3.4.3",
|
|
39049
|
-
"updatedAt": "2021-10-
|
|
39049
|
+
"updatedAt": "2021-10-11T02:24:21.192Z",
|
|
39050
39050
|
"networkType": "ethereum",
|
|
39051
39051
|
"devdoc": {
|
|
39052
39052
|
"methods": {
|
|
@@ -6303,12 +6303,12 @@
|
|
|
6303
6303
|
}
|
|
6304
6304
|
},
|
|
6305
6305
|
"links": {},
|
|
6306
|
-
"address": "
|
|
6307
|
-
"transactionHash": "
|
|
6306
|
+
"address": "0x22346A38fBe75f68484F80bFB5Ea062bb92c2d0B",
|
|
6307
|
+
"transactionHash": "0xf6936c346cc649524bf33b170134adf435a5502f3db1bb9de8ad0ac977817cbd"
|
|
6308
6308
|
}
|
|
6309
6309
|
},
|
|
6310
6310
|
"schemaVersion": "3.4.3",
|
|
6311
|
-
"updatedAt": "2021-10-
|
|
6311
|
+
"updatedAt": "2021-10-11T02:24:21.178Z",
|
|
6312
6312
|
"networkType": "ethereum",
|
|
6313
6313
|
"devdoc": {
|
|
6314
6314
|
"methods": {
|
|
@@ -16723,12 +16723,12 @@
|
|
|
16723
16723
|
}
|
|
16724
16724
|
},
|
|
16725
16725
|
"links": {},
|
|
16726
|
-
"address": "
|
|
16727
|
-
"transactionHash": "
|
|
16726
|
+
"address": "0xCb521a99fD2e7302Db8997a9785164F6adF4eA5D",
|
|
16727
|
+
"transactionHash": "0xe2d6c6b4d51d2a0bf322f7fec8c1ffe374105d3ab8458a9f76ba109a1e643418"
|
|
16728
16728
|
}
|
|
16729
16729
|
},
|
|
16730
16730
|
"schemaVersion": "3.4.3",
|
|
16731
|
-
"updatedAt": "2021-10-
|
|
16731
|
+
"updatedAt": "2021-10-11T02:24:21.229Z",
|
|
16732
16732
|
"networkType": "ethereum",
|
|
16733
16733
|
"devdoc": {
|
|
16734
16734
|
"methods": {
|
|
@@ -28903,14 +28903,14 @@
|
|
|
28903
28903
|
}
|
|
28904
28904
|
},
|
|
28905
28905
|
"links": {
|
|
28906
|
-
"stringutils": "
|
|
28906
|
+
"stringutils": "0x20CfD87Eb4c317f22F09CE9354DeCAc88ADe13E4"
|
|
28907
28907
|
},
|
|
28908
|
-
"address": "
|
|
28909
|
-
"transactionHash": "
|
|
28908
|
+
"address": "0x48B4a144700ED764645bc5262a054025644cFCed",
|
|
28909
|
+
"transactionHash": "0x4d6ea695ff06847758a5ab3fc057183f0f4efac865659a74b40118349a923c7a"
|
|
28910
28910
|
}
|
|
28911
28911
|
},
|
|
28912
28912
|
"schemaVersion": "3.4.3",
|
|
28913
|
-
"updatedAt": "2021-10-
|
|
28913
|
+
"updatedAt": "2021-10-11T02:24:21.116Z",
|
|
28914
28914
|
"networkType": "ethereum",
|
|
28915
28915
|
"devdoc": {
|
|
28916
28916
|
"methods": {
|
|
@@ -24429,12 +24429,12 @@
|
|
|
24429
24429
|
}
|
|
24430
24430
|
},
|
|
24431
24431
|
"links": {},
|
|
24432
|
-
"address": "
|
|
24433
|
-
"transactionHash": "
|
|
24432
|
+
"address": "0x98afbA1B1B8bf6cE72b51D78983357d6f1410F08",
|
|
24433
|
+
"transactionHash": "0x9d6c87927790a01b6cd75b363849a316ab3cd27871a1247199b0ed5b6473333a"
|
|
24434
24434
|
}
|
|
24435
24435
|
},
|
|
24436
24436
|
"schemaVersion": "3.4.3",
|
|
24437
|
-
"updatedAt": "2021-10-
|
|
24437
|
+
"updatedAt": "2021-10-11T02:24:21.130Z",
|
|
24438
24438
|
"networkType": "ethereum",
|
|
24439
24439
|
"devdoc": {
|
|
24440
24440
|
"methods": {
|
|
@@ -32940,14 +32940,14 @@
|
|
|
32940
32940
|
}
|
|
32941
32941
|
},
|
|
32942
32942
|
"links": {
|
|
32943
|
-
"stringutils": "
|
|
32943
|
+
"stringutils": "0x20CfD87Eb4c317f22F09CE9354DeCAc88ADe13E4"
|
|
32944
32944
|
},
|
|
32945
|
-
"address": "
|
|
32946
|
-
"transactionHash": "
|
|
32945
|
+
"address": "0xA3b2c452dE0d7F70f60862d8f0EBC6540F928E4b",
|
|
32946
|
+
"transactionHash": "0x8d46619c7104bfbcf0a794a5f3a48f50f915fa724e97c02c579b13bf3ac8ed15"
|
|
32947
32947
|
}
|
|
32948
32948
|
},
|
|
32949
32949
|
"schemaVersion": "3.4.3",
|
|
32950
|
-
"updatedAt": "2021-10-
|
|
32950
|
+
"updatedAt": "2021-10-11T02:24:21.215Z",
|
|
32951
32951
|
"networkType": "ethereum",
|
|
32952
32952
|
"devdoc": {
|
|
32953
32953
|
"methods": {
|
|
@@ -33,11 +33,13 @@ class ClientContract extends index_1.VerifiedContract {
|
|
|
33
33
|
initialize(_address) {
|
|
34
34
|
return this.callContract(FUNCTIONS.INITIALIZE, params);
|
|
35
35
|
}
|
|
36
|
-
setCustody(
|
|
37
|
-
|
|
36
|
+
async setCustody(address, custody, options) {
|
|
37
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, address);
|
|
38
|
+
return this.callContract(FUNCTIONS.SETCUSTODY, address, this.sanitiseInput(index_1.DATATYPES.BYTE32, custody), options);
|
|
38
39
|
}
|
|
39
|
-
getCustody(
|
|
40
|
-
|
|
40
|
+
async getCustody(address, options) {
|
|
41
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, address);
|
|
42
|
+
return this.callContract(FUNCTIONS.GETCUSTODY, address, options);
|
|
41
43
|
}
|
|
42
44
|
/**
|
|
43
45
|
* We can implement registration and log in using a SSO scheme such as Firebase (https://firebase.google.com/docs/auth) or Azure.
|
package/dist/contract/index.js
CHANGED
|
@@ -191,7 +191,7 @@ class VerifiedContract {
|
|
|
191
191
|
}
|
|
192
192
|
getEvent(eventName, callback) {
|
|
193
193
|
let res = {};
|
|
194
|
-
this.contract.
|
|
194
|
+
this.contract.once(eventName, (...data) => {
|
|
195
195
|
const dataToBeFormatted = data.splice(0, data.length - 1);
|
|
196
196
|
res.response = this.tempOutput(ethers_1.utils.deepCopy(dataToBeFormatted));
|
|
197
197
|
res.status = STATUS.SUCCESS;
|
|
@@ -79,12 +79,12 @@ class KYCContract extends index_1.VerifiedContract {
|
|
|
79
79
|
await this.validateInput(index_1.DATATYPES.STRING, _fatca);
|
|
80
80
|
await this.validateInput(index_1.DATATYPES.STRING, _crs);
|
|
81
81
|
await this.validateInput(index_1.DATATYPES.STRING, _country);
|
|
82
|
-
return this.callContract(FUNCTIONS.SETKYC, _clientAddress, _file, _fatca, _crs, _photoId, _videoId, _address, _country, options);
|
|
82
|
+
return this.callContract(FUNCTIONS.SETKYC, _clientAddress, _file, _fatca, _crs, _photoId, _videoId, _address, this.sanitiseInput(index_1.DATATYPES.BYTE32, _country), options);
|
|
83
83
|
}
|
|
84
84
|
async setCountry(_clientAddress, _country, options) {
|
|
85
85
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _clientAddress);
|
|
86
86
|
await this.validateInput(index_1.DATATYPES.STRING, _country);
|
|
87
|
-
return this.callContract(FUNCTIONS.SETCOUNTRY, _clientAddress, _country, options);
|
|
87
|
+
return this.callContract(FUNCTIONS.SETCOUNTRY, _clientAddress, this.sanitiseInput(index_1.DATATYPES.BYTE32, _country), options);
|
|
88
88
|
}
|
|
89
89
|
async setFile(_clientAddress, _file, options) {
|
|
90
90
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _clientAddress);
|
|
@@ -126,24 +126,31 @@ class KYCContract extends index_1.VerifiedContract {
|
|
|
126
126
|
return this.callContract(FUNCTIONS.GETKYC, _client, options);
|
|
127
127
|
}
|
|
128
128
|
async getFile(_clientAddress, options) {
|
|
129
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _clientAddress);
|
|
129
130
|
return this.callContract(FUNCTIONS.GETFILE, _clientAddress, options);
|
|
130
131
|
}
|
|
131
132
|
async getFATCA(_clientAddress, options) {
|
|
133
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _clientAddress);
|
|
132
134
|
return this.callContract(FUNCTIONS.GETFATCA, _clientAddress, options);
|
|
133
135
|
}
|
|
134
136
|
async getCRS(_clientAddress, options) {
|
|
137
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _clientAddress);
|
|
135
138
|
return this.callContract(FUNCTIONS.GETCRS, _clientAddress, options);
|
|
136
139
|
}
|
|
137
140
|
async getPhotoID(_clientAddress, options) {
|
|
141
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _clientAddress);
|
|
138
142
|
return this.callContract(FUNCTIONS.GETPHOTOID, _clientAddress, options);
|
|
139
143
|
}
|
|
140
144
|
async getVideoID(_clientAddress, options) {
|
|
145
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _clientAddress);
|
|
141
146
|
return this.callContract(FUNCTIONS.GETVIDEOID, _clientAddress, options);
|
|
142
147
|
}
|
|
143
148
|
async getAddress(_clientAddress, options) {
|
|
149
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _clientAddress);
|
|
144
150
|
return this.callContract(FUNCTIONS.GETADDRESS, _clientAddress, options);
|
|
145
151
|
}
|
|
146
152
|
async getCountry(_clientAddress, options) {
|
|
153
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _clientAddress);
|
|
147
154
|
return this.callContract(FUNCTIONS.GETCOUNTRY, _clientAddress, options);
|
|
148
155
|
}
|
|
149
156
|
}
|
|
@@ -2,32 +2,32 @@
|
|
|
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': '
|
|
11
|
-
'Factory': '
|
|
12
|
-
'Oracle': '
|
|
13
|
-
'Cash': '
|
|
14
|
-
'Bond': '
|
|
15
|
-
'Token': '
|
|
16
|
-
'PreTrade': '
|
|
17
|
-
'Trade': '
|
|
18
|
-
'PostTrade': '
|
|
19
|
-
'SecuritiesRegistry': '
|
|
20
|
-
'OrderPool': '
|
|
21
|
-
'PoolFactory': '
|
|
5
|
+
'Client': '0x7cEC58dEdc4E743cd2858435aF786f11A0815f11',
|
|
6
|
+
'KYC': '0x0c30Dea061038F3FB879Feb631EcF29fF4923Dec',
|
|
7
|
+
'System': '0x71356EfD49E2d30bEC21fC87124E83bc3292Cd65',
|
|
8
|
+
'Holder': '0x2380eE1062546EF794BdAb3Bf72Da217369c8a6C',
|
|
9
|
+
'Ledger': '0x50fE184d8F0Bbc3Ad5b51aDeA2AAEa18F5ad22F9',
|
|
10
|
+
'Account': '0x65233680a46479C44A6ab67d6dD8f4a73355433B',
|
|
11
|
+
'Factory': '0xd378916F1DedA7802141c497Be0d19C63A0F0c5b',
|
|
12
|
+
'Oracle': '0x0921041002c2FcD37CF2A08AfD4a41FE1978293c',
|
|
13
|
+
'Cash': '0x99834Ba58Ebe9d20b2a4c5edba35a8a15a442261',
|
|
14
|
+
'Bond': '0xAE3ef89e5e4d1cB81aD4229cd171ADd2077D3438',
|
|
15
|
+
'Token': '0x66ec2e2C6f60eAafEE2b55E0db0C88fd72ccd960',
|
|
16
|
+
'PreTrade': '0x48B4a144700ED764645bc5262a054025644cFCed',
|
|
17
|
+
'Trade': '0xA3b2c452dE0d7F70f60862d8f0EBC6540F928E4b',
|
|
18
|
+
'PostTrade': '0xCb521a99fD2e7302Db8997a9785164F6adF4eA5D',
|
|
19
|
+
'SecuritiesRegistry': '0x98afbA1B1B8bf6cE72b51D78983357d6f1410F08',
|
|
20
|
+
'OrderPool': '0x55ec2F142E9f1aAd7694CA049940764a9CaEEc92',
|
|
21
|
+
'PoolFactory': '0x22346A38fBe75f68484F80bFB5Ea062bb92c2d0B',
|
|
22
22
|
'CASH': {
|
|
23
|
-
'VCUSD': '
|
|
24
|
-
'VCEUR': '
|
|
25
|
-
'VCINR': '
|
|
23
|
+
'VCUSD': '0x0705Ea183F46EBDF5339c7A80a03e70cbADBA760',
|
|
24
|
+
'VCEUR': '0xa49b165fc3B9C5d023c8d12658F24AcDb0C84336',
|
|
25
|
+
'VCINR': '0xca3185dd4d63851e69660BFFf17F2CFf85E033F1'
|
|
26
26
|
},
|
|
27
27
|
'BOND': {
|
|
28
|
-
'VBUSD': '
|
|
29
|
-
'VBEUR': '
|
|
30
|
-
'VBINR': '
|
|
28
|
+
'VBUSD': '0x3A6103DE00bf323C5e3c7608EAae302933F06157',
|
|
29
|
+
'VBEUR': '0xfa7F0565F3393dA7c16A6294EE88C646E80900B4',
|
|
30
|
+
'VBINR': '0x7a49e0bE922194585fFAa447DE9A35fa20adEEc5'
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
};
|