@verified-network/verified-sdk 0.4.9 → 0.5.0
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.
|
@@ -10,6 +10,9 @@ var FUNCTIONS;
|
|
|
10
10
|
FUNCTIONS["GETTOKEN"] = "getToken";
|
|
11
11
|
FUNCTIONS["GETNAMEANDTYPE"] = "getNameAndType";
|
|
12
12
|
FUNCTIONS["TOKENCREATED"] = "TokenCreated";
|
|
13
|
+
FUNCTIONS["GETTOKENBYNAMETYPE"] = "getTokenByNameType";
|
|
14
|
+
FUNCTIONS["GETISSUER"] = "getIssuer";
|
|
15
|
+
FUNCTIONS["GETADDRESSTYPE"] = "getAddressAndType";
|
|
13
16
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
14
17
|
class FactoryContract extends index_1.VerifiedContract {
|
|
15
18
|
constructor(signer) {
|
|
@@ -51,5 +54,19 @@ class FactoryContract extends index_1.VerifiedContract {
|
|
|
51
54
|
notifyTokenCreated(callback) {
|
|
52
55
|
this.getEvent(FUNCTIONS.TOKENCREATED, callback);
|
|
53
56
|
}
|
|
57
|
+
async getTokenByNameType(tokenName, tokenType, options) {
|
|
58
|
+
await this.validateInput(index_1.DATATYPES.STRING, tokenName);
|
|
59
|
+
await this.validateInput(index_1.DATATYPES.STRING, tokenType);
|
|
60
|
+
return this.callContract(FUNCTIONS.GETTOKENBYNAMETYPE, this.sanitiseInput(index_1.DATATYPES.BYTE32, tokenName), this.sanitiseInput(index_1.DATATYPES.BYTE32, tokenType), options);
|
|
61
|
+
}
|
|
62
|
+
async getIssuer(tokenName, tokenType, options) {
|
|
63
|
+
await this.validateInput(index_1.DATATYPES.STRING, tokenName);
|
|
64
|
+
await this.validateInput(index_1.DATATYPES.STRING, tokenType);
|
|
65
|
+
return this.callContract(FUNCTIONS.GETISSUER, this.sanitiseInput(index_1.DATATYPES.BYTE32, tokenName), this.sanitiseInput(index_1.DATATYPES.BYTE32, tokenType), options);
|
|
66
|
+
}
|
|
67
|
+
async getAddressAndType(tokenName, options) {
|
|
68
|
+
await this.validateInput(index_1.DATATYPES.STRING, tokenName);
|
|
69
|
+
return this.callContract(FUNCTIONS.GETADDRESSTYPE, this.sanitiseInput(index_1.DATATYPES.BYTE32, tokenName), options);
|
|
70
|
+
}
|
|
54
71
|
}
|
|
55
72
|
exports.default = FactoryContract;
|
|
@@ -47,7 +47,7 @@ class SecuritiesRegistryContract extends index_1.VerifiedContract {
|
|
|
47
47
|
await this.validateInput(index_1.DATATYPES.STRING, _category);
|
|
48
48
|
await this.validateInput(index_1.DATATYPES.STRING, _action);
|
|
49
49
|
await this.validateInput(index_1.DATATYPES.STRING, _isin);
|
|
50
|
-
return this.callContract(FUNCTIONS.REGISTERCORPORATEACTION,
|
|
50
|
+
return this.callContract(FUNCTIONS.REGISTERCORPORATEACTION, _category, _action, this.sanitiseInput(index_1.DATATYPES.BYTE32, _isin), options);
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
53
|
* Registers credit score of issuer. Can only be called by the admin contract on the Verified Network.
|
|
@@ -73,7 +73,7 @@ class SecuritiesRegistryContract extends index_1.VerifiedContract {
|
|
|
73
73
|
async getCorporateActions(_category, _isin, options) {
|
|
74
74
|
await this.validateInput(index_1.DATATYPES.STRING, _category);
|
|
75
75
|
await this.validateInput(index_1.DATATYPES.STRING, _isin);
|
|
76
|
-
return this.callContract(FUNCTIONS.GETCORPORATEACTION,
|
|
76
|
+
return this.callContract(FUNCTIONS.GETCORPORATEACTION, _category, this.sanitiseInput(index_1.DATATYPES.BYTE32, _isin), options);
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
79
|
* Gets credit score
|
|
@@ -23,7 +23,7 @@ const contractAddress = {
|
|
|
23
23
|
'Products': '0xF91691BDA104Ad1F236c934c6d25FbD2f99d220F',
|
|
24
24
|
'Issues': '0x3b20aDc6f6B7c7B7379088c763CC1e65c3bF44Dc',
|
|
25
25
|
'BalancerManager': '',
|
|
26
|
-
'Custody': '
|
|
26
|
+
'Custody': '0xb6DD33C076fE95ffACC84E048Bda1caa6C304673',
|
|
27
27
|
'CASH': {
|
|
28
28
|
'VCUSD': '0x56849B0a8108d03926062187b2D97f67465Bb1a6',
|
|
29
29
|
'VCEUR': '0xB1D0B7a9d2CcD787dedc7f70aE6462062dc84255',
|