@verified-network/verified-sdk 0.8.0 → 0.8.3
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/assetmanager/BalancerManager.json +36659 -23205
- package/dist/abi/assetmanager/Client.json +11249 -0
- package/dist/abi/assetmanager/Products.json +3094 -0
- package/dist/abi/assetmanager/VerifiedProducts.json +861 -0
- package/dist/abi/liquidity/Liquidity.json +8644 -8155
- package/dist/abi/securities/Bonds.json +7054 -7415
- package/dist/abi/securities/Products.json +5322 -5534
- package/dist/abi/securities/Stocks.json +5361 -5722
- package/dist/contract/account/index.js +1 -1
- package/dist/contract/assetmanager/index.js +48 -5
- package/dist/contract/bond/index.js +0 -1
- package/dist/contract/bonds/index.js +26 -1
- package/dist/contract/cash/index.js +0 -1
- package/dist/contract/client/index.js +4 -3
- package/dist/contract/custody/index.js +1 -1
- package/dist/contract/distribution/index.js +1 -1
- package/dist/contract/factory/index.js +2 -1
- package/dist/contract/holder/index.js +0 -1
- package/dist/contract/kyc/index.js +1 -1
- package/dist/contract/ledger/index.js +0 -1
- package/dist/contract/liquidity/index.js +1 -1
- package/dist/contract/oracle/index.js +1 -1
- package/dist/contract/orderpool/index.js +0 -1
- package/dist/contract/poolfactory/index.js +1 -1
- package/dist/contract/posttrade/index.js +1 -1
- package/dist/contract/pretrade/index.js +1 -1
- package/dist/contract/product/index.js +6 -1
- package/dist/contract/public/bond/index.js +0 -1
- package/dist/contract/public/cash/index.js +0 -1
- package/dist/contract/public/client/index.js +59 -0
- package/dist/contract/public/distribution/index.js +1 -1
- package/dist/contract/public/factory/index.js +1 -1
- package/dist/contract/public/product/index.js +24 -0
- package/dist/contract/public/rates/index.js +1 -1
- package/dist/contract/public/security/index.js +1 -1
- package/dist/contract/rates/index.js +1 -1
- package/dist/contract/securitiesregistry/index.js +1 -1
- package/dist/contract/security/index.js +0 -1
- package/dist/contract/stocks/index.js +26 -1
- package/dist/contract/system/index.js +1 -1
- package/dist/contract/token/index.js +0 -1
- package/dist/contract/trade/index.js +1 -1
- package/dist/contractAddress/index.js +8 -8
- package/dist/index.js +5 -1
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ var FUNCTIONS;
|
|
|
10
10
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
11
11
|
class AccountContract extends index_1.VerifiedContract {
|
|
12
12
|
constructor(signer, accountAddress) {
|
|
13
|
-
const chainId = signer.provider._network.chainId.toString()
|
|
13
|
+
//const chainId: string = signer.provider._network.chainId.toString()
|
|
14
14
|
const address = accountAddress;
|
|
15
15
|
super(address, JSON.stringify(Account_json_1.abi), signer);
|
|
16
16
|
this.contractAddress = address;
|
|
@@ -11,22 +11,28 @@ var FUNCTIONS;
|
|
|
11
11
|
FUNCTIONS["GETOFFERMADE"] = "getOfferMade";
|
|
12
12
|
FUNCTIONS["GETALLOTTEDSTAKE"] = "getAllotedStake";
|
|
13
13
|
FUNCTIONS["GETLIQUIDITYPROVIDERS"] = "getLiquidityProviders";
|
|
14
|
+
FUNCTIONS["ISSUE"] = "issue";
|
|
15
|
+
FUNCTIONS["GETSUBSCRIBERS"] = "getSubscribers";
|
|
16
|
+
FUNCTIONS["CLOSE"] = "close";
|
|
17
|
+
FUNCTIONS["ACCEPT"] = "accept";
|
|
18
|
+
FUNCTIONS["REJECT"] = "reject";
|
|
19
|
+
FUNCTIONS["SETTLE"] = "settle";
|
|
14
20
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
15
21
|
class AssetManager extends index_1.VerifiedContract {
|
|
16
22
|
constructor(signer, platformAddress) {
|
|
17
|
-
const chainId = signer.provider._network.chainId.toString();
|
|
18
23
|
const address = platformAddress;
|
|
19
24
|
super(address, JSON.stringify(BalancerManager_json_1.abi), signer);
|
|
20
25
|
this.contractAddress = address;
|
|
21
26
|
}
|
|
22
|
-
async offer(owned, isin, offered, tomatch, desired, min, options) {
|
|
27
|
+
async offer(owned, isin, offered, tomatch, desired, min, issuer, _hashedMessage, _v, _r, _s, options) {
|
|
23
28
|
await this.validateInput(index_1.DATATYPES.ADDRESS, owned);
|
|
24
29
|
await this.validateInput(index_1.DATATYPES.ADDRESS, tomatch);
|
|
30
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, issuer);
|
|
25
31
|
await this.validateInput(index_1.DATATYPES.STRING, isin);
|
|
26
32
|
await this.validateInput(index_1.DATATYPES.NUMBER, offered);
|
|
27
33
|
await this.validateInput(index_1.DATATYPES.NUMBER, desired);
|
|
28
34
|
await this.validateInput(index_1.DATATYPES.NUMBER, min);
|
|
29
|
-
return this.callContract(FUNCTIONS.OFFER, owned, this.sanitiseInput(index_1.DATATYPES.BYTE32, isin), offered, tomatch, desired, min, options);
|
|
35
|
+
return this.callContract(FUNCTIONS.OFFER, owned, this.sanitiseInput(index_1.DATATYPES.BYTE32, isin), offered, tomatch, desired, min, issuer, _hashedMessage, _v, _r, _s, options);
|
|
30
36
|
}
|
|
31
37
|
/**
|
|
32
38
|
* Gets security tokens offered for passed token parameter
|
|
@@ -64,9 +70,46 @@ class AssetManager extends index_1.VerifiedContract {
|
|
|
64
70
|
* @param options
|
|
65
71
|
* @returns array of structs of liquidity providers
|
|
66
72
|
*/
|
|
67
|
-
async getLiquidityProviders(security,
|
|
73
|
+
async getLiquidityProviders(security,
|
|
74
|
+
//_hashedMessage: string,
|
|
75
|
+
//_v: string,
|
|
76
|
+
//_r: string,
|
|
77
|
+
//_s: string,
|
|
78
|
+
options) {
|
|
68
79
|
await this.validateInput(index_1.DATATYPES.ADDRESS, security);
|
|
69
|
-
return this.callContract(FUNCTIONS.GETLIQUIDITYPROVIDERS, security,
|
|
80
|
+
return this.callContract(FUNCTIONS.GETLIQUIDITYPROVIDERS, security,
|
|
81
|
+
//_hashedMessage, _v, _r, _s,
|
|
82
|
+
options);
|
|
83
|
+
}
|
|
84
|
+
async issue(security, cutoffTime, issuer, _hashedMessage, _v, _r, _s, options) {
|
|
85
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, security);
|
|
86
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, issuer);
|
|
87
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, cutoffTime);
|
|
88
|
+
return this.callContract(FUNCTIONS.ISSUE, security, cutoffTime, issuer, _hashedMessage, _v, _r, _s, options);
|
|
89
|
+
}
|
|
90
|
+
async getSubscribers(poolId, _hashedMessage, _v, _r, _s, options) {
|
|
91
|
+
await this.validateInput(index_1.DATATYPES.STRING, poolId);
|
|
92
|
+
return this.callContract(FUNCTIONS.GETSUBSCRIBERS, this.sanitiseInput(index_1.DATATYPES.BYTE32, poolId), _hashedMessage, _v, _r, _s, options);
|
|
93
|
+
}
|
|
94
|
+
async close(security, _hashedMessage, _v, _r, _s, options) {
|
|
95
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, security);
|
|
96
|
+
return this.callContract(FUNCTIONS.CLOSE, security, _hashedMessage, _v, _r, _s, options);
|
|
97
|
+
}
|
|
98
|
+
async accept(poolid, investor, amnt, asset, _hashedMessage, _v, _r, _s, options) {
|
|
99
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, investor);
|
|
100
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, asset);
|
|
101
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, amnt);
|
|
102
|
+
await this.validateInput(index_1.DATATYPES.STRING, poolid);
|
|
103
|
+
return this.callContract(FUNCTIONS.ACCEPT, this.sanitiseInput(index_1.DATATYPES.BYTE32, poolId), investor, amnt, asset, _hashedMessage, _v, _r, _s, options);
|
|
104
|
+
}
|
|
105
|
+
async reject(poolid, investor, _hashedMessage, _v, _r, _s, options) {
|
|
106
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, investor);
|
|
107
|
+
await this.validateInput(index_1.DATATYPES.STRING, poolid);
|
|
108
|
+
return this.callContract(FUNCTIONS.REJECT, this.sanitiseInput(index_1.DATATYPES.BYTE32, poolId), investor, _hashedMessage, _v, _r, _s, options);
|
|
109
|
+
}
|
|
110
|
+
async settle(poolId, _hashedMessage, _v, _r, _s, options) {
|
|
111
|
+
await this.validateInput(index_1.DATATYPES.STRING, poolId);
|
|
112
|
+
return this.callContract(FUNCTIONS.SETTLE, this.sanitiseInput(index_1.DATATYPES.BYTE32, poolId), _hashedMessage, _v, _r, _s, options);
|
|
70
113
|
}
|
|
71
114
|
}
|
|
72
115
|
exports.default = AssetManager;
|
|
@@ -18,7 +18,6 @@ var FUNCTIONS;
|
|
|
18
18
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
19
19
|
class BondContract extends index_1.VerifiedContract {
|
|
20
20
|
constructor(signer, bondCurrencyAddress) {
|
|
21
|
-
const chainId = signer.provider._network.chainId.toString();
|
|
22
21
|
const address = bondCurrencyAddress;
|
|
23
22
|
super(address, JSON.stringify(Bond_json_1.abi), signer);
|
|
24
23
|
this.contractAddress = address;
|
|
@@ -24,10 +24,13 @@ var FUNCTIONS;
|
|
|
24
24
|
FUNCTIONS["PAYOUT"] = "payOut";
|
|
25
25
|
FUNCTIONS["ISSUEBOND"] = "issueBond";
|
|
26
26
|
FUNCTIONS["GETBENEFICIARIES"] = "getBeneficiaries";
|
|
27
|
+
FUNCTIONS["SETLIQUIDITYPROVIDERS"] = "setLiquidityProviders";
|
|
28
|
+
FUNCTIONS["SETPLATFORMPOOLS"] = "setPlatformPools";
|
|
29
|
+
FUNCTIONS["SETPLATFORMSUBSCRIBERS"] = "setPlatformSubscribers";
|
|
30
|
+
FUNCTIONS["SETTLE"] = "settleIssue";
|
|
27
31
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
28
32
|
class BondsContract extends index_1.VerifiedContract {
|
|
29
33
|
constructor(signer, issue) {
|
|
30
|
-
const chainId = signer.provider._network.chainId.toString();
|
|
31
34
|
const address = issue;
|
|
32
35
|
super(address, JSON.stringify(Bonds_json_1.abi), signer);
|
|
33
36
|
this.contractAddress = address;
|
|
@@ -57,6 +60,10 @@ class BondsContract extends index_1.VerifiedContract {
|
|
|
57
60
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _asset);
|
|
58
61
|
return this.callContract(FUNCTIONS.ALLOTISSUE, this.sanitiseInput(index_1.DATATYPES.BYTE32, _allotment), _platform, this.sanitiseInput(index_1.DATATYPES.BYTE32, _pool), _investor, _amount, _asset, options);
|
|
59
62
|
}
|
|
63
|
+
async settle(issue, options) {
|
|
64
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, issue);
|
|
65
|
+
return this.callContract(FUNCTIONS.SETTLE, issue, options);
|
|
66
|
+
}
|
|
60
67
|
async computeNextInstallment(_currency, options) {
|
|
61
68
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _currency);
|
|
62
69
|
return this.callContract(FUNCTIONS.NEXTINSTALLMENT, _currency, options);
|
|
@@ -111,5 +118,23 @@ class BondsContract extends index_1.VerifiedContract {
|
|
|
111
118
|
await this.validateInput(index_1.DATATYPES.STRING, _offeringDocuments);
|
|
112
119
|
return this.callContract(FUNCTIONS.ISSUEBOND, _issueSize, _offerPrice, _minAskPrice, _minSubscription, _couponPaymentCycle, _tenure, this.sanitiseInput(index_1.DATATYPES.BYTE32, _currency), this.sanitiseInput(index_1.DATATYPES.BYTE32, _offerType), this.sanitiseInput(index_1.DATATYPES.BYTE32, _isin), _offeringDocuments, options);
|
|
113
120
|
}
|
|
121
|
+
async setLiquidityProviders(platform, liquidityProviders, _hashedMessage, _v, _r, _s, options) {
|
|
122
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, platform);
|
|
123
|
+
await this.validateInput(index_1.DATATYPES.STRING, liquidityProviders);
|
|
124
|
+
return this.callContract(FUNCTIONS.SETLIQUIDITYPROVIDERS, platform, liquidityProviders, _hashedMessage, _v, _r, _s, options);
|
|
125
|
+
}
|
|
126
|
+
async setPlatformPools(platform, securityToken, pools, status, _hashedMessage, _v, _r, _s, options) {
|
|
127
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, platform);
|
|
128
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, securityToken);
|
|
129
|
+
await this.validateInput(index_1.DATATYPES.STRING, pools);
|
|
130
|
+
await this.validateInput(index_1.DATATYPES.STRING, status);
|
|
131
|
+
return this.callContract(FUNCTIONS.SETPLATFORMPOOLS, platform, securityToken, pools, status, _hashedMessage, _v, _r, _s, options);
|
|
132
|
+
}
|
|
133
|
+
async setPlatformSubscribers(platform, pool, eois, _hashedMessage, _v, _r, _s, options) {
|
|
134
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, platform);
|
|
135
|
+
await this.validateInput(index_1.DATATYPES.STRING, pool);
|
|
136
|
+
await this.validateInput(index_1.DATATYPES.STRING, eois);
|
|
137
|
+
return this.callContract(FUNCTIONS.SETPLATFORMSUBSCRIBERS, platform, this.sanitiseInput(index_1.DATATYPES.BYTE32, pool), eois, _hashedMessage, _v, _r, _s, options);
|
|
138
|
+
}
|
|
114
139
|
}
|
|
115
140
|
exports.default = BondsContract;
|
|
@@ -18,7 +18,6 @@ var FUNCTIONS;
|
|
|
18
18
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
19
19
|
class CashContract extends index_1.VerifiedContract {
|
|
20
20
|
constructor(signer, currencyAddress) {
|
|
21
|
-
const chainId = signer.provider._network.chainId.toString();
|
|
22
21
|
const address = currencyAddress;
|
|
23
22
|
super(address, JSON.stringify(Cash_json_1.abi), signer);
|
|
24
23
|
this.contractAddress = address;
|
|
@@ -25,7 +25,7 @@ var FUNCTIONS;
|
|
|
25
25
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
26
26
|
class ClientContract extends index_1.VerifiedContract {
|
|
27
27
|
constructor(signer) {
|
|
28
|
-
const chainId =
|
|
28
|
+
const chainId = Object.keys(Client_json_1.networks);
|
|
29
29
|
const address = Client_json_1.networks[chainId].address;
|
|
30
30
|
super(address, JSON.stringify(Client_json_1.abi), signer);
|
|
31
31
|
this.contractAddress = address;
|
|
@@ -49,9 +49,10 @@ class ClientContract extends index_1.VerifiedContract {
|
|
|
49
49
|
* @params (bool login)
|
|
50
50
|
* @returns
|
|
51
51
|
*/
|
|
52
|
-
async setAccess(_token, options) {
|
|
52
|
+
async setAccess(_client, _token, options) {
|
|
53
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _client);
|
|
53
54
|
await this.validateInput(index_1.DATATYPES.STRING, _token);
|
|
54
|
-
return this.callContract(FUNCTIONS.SETACCESS, _token, options);
|
|
55
|
+
return this.callContract(FUNCTIONS.SETACCESS, _client, _token, options);
|
|
55
56
|
}
|
|
56
57
|
async getAccess(_clientAddress, options) {
|
|
57
58
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _clientAddress);
|
|
@@ -19,7 +19,7 @@ var FUNCTIONS;
|
|
|
19
19
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
20
20
|
class CustodyContract extends index_1.VerifiedContract {
|
|
21
21
|
constructor(signer) {
|
|
22
|
-
const chainId =
|
|
22
|
+
const chainId = Object.keys(Vault_json_1.networks);
|
|
23
23
|
const address = Vault_json_1.networks[chainId].address;
|
|
24
24
|
super(address, JSON.stringify(Vault_json_1.abi), signer);
|
|
25
25
|
this.contractAddress = address;
|
|
@@ -14,7 +14,7 @@ var FUNCTIONS;
|
|
|
14
14
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
15
15
|
class DistributionContract extends index_1.VerifiedContract {
|
|
16
16
|
constructor(signer) {
|
|
17
|
-
const chainId =
|
|
17
|
+
const chainId = Object.keys(Distribution_json_1.networks);
|
|
18
18
|
const address = Distribution_json_1.networks[chainId].address;
|
|
19
19
|
super(address, JSON.stringify(Distribution_json_1.abi), signer);
|
|
20
20
|
this.contractAddress = address;
|
|
@@ -23,7 +23,8 @@ var FUNCTIONS;
|
|
|
23
23
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
24
24
|
class FactoryContract extends index_1.VerifiedContract {
|
|
25
25
|
constructor(signer) {
|
|
26
|
-
const chainId =
|
|
26
|
+
const chainId = Object.keys(Factory_json_1.networks);
|
|
27
|
+
console.log("Factory chain id " + chainId);
|
|
27
28
|
const address = Factory_json_1.networks[chainId].address;
|
|
28
29
|
super(address, JSON.stringify(Factory_json_1.abi), signer);
|
|
29
30
|
this.contractAddress = address;
|
|
@@ -18,7 +18,6 @@ var FUNCTIONS;
|
|
|
18
18
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
19
19
|
class HolderContract extends index_1.VerifiedContract {
|
|
20
20
|
constructor(signer, holderAddress) {
|
|
21
|
-
const chainId = signer.provider._network.chainId.toString();
|
|
22
21
|
const address = holderAddress;
|
|
23
22
|
super(address, JSON.stringify(Holder_json_1.abi), signer);
|
|
24
23
|
this.contractAddress = address;
|
|
@@ -36,7 +36,7 @@ var FUNCTIONS;
|
|
|
36
36
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
37
37
|
class KYCContract extends index_1.VerifiedContract {
|
|
38
38
|
constructor(signer) {
|
|
39
|
-
const chainId =
|
|
39
|
+
const chainId = Object.keys(Kyc_json_1.networks);
|
|
40
40
|
const address = Kyc_json_1.networks[chainId].address;
|
|
41
41
|
super(address, JSON.stringify(Kyc_json_1.abi), signer);
|
|
42
42
|
this.contractAddress = address;
|
|
@@ -10,7 +10,6 @@ var FUNCTIONS;
|
|
|
10
10
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
11
11
|
class LedgerContract extends index_1.VerifiedContract {
|
|
12
12
|
constructor(signer, ledgerAddress) {
|
|
13
|
-
const chainId = signer.provider._network.chainId.toString();
|
|
14
13
|
const address = ledgerAddress;
|
|
15
14
|
super(address, JSON.stringify(Ledger_json_1.abi), signer);
|
|
16
15
|
this.contractAddress = address;
|
|
@@ -30,7 +30,7 @@ var FUNCTIONS;
|
|
|
30
30
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
31
31
|
class LiquidityContract extends index_1.VerifiedContract {
|
|
32
32
|
constructor(signer) {
|
|
33
|
-
const chainId =
|
|
33
|
+
const chainId = Object.keys(Liquidity_json_1.networks);
|
|
34
34
|
const address = Liquidity_json_1.networks[chainId].address;
|
|
35
35
|
super(address, JSON.stringify(Liquidity_json_1.abi), signer);
|
|
36
36
|
this.contractAddress = address;
|
|
@@ -10,7 +10,7 @@ var FUNCTIONS;
|
|
|
10
10
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
11
11
|
class OracleContract extends index_1.VerifiedContract {
|
|
12
12
|
constructor(signer) {
|
|
13
|
-
const chainId =
|
|
13
|
+
const chainId = Object.keys(Oracle_json_1.networks);
|
|
14
14
|
const address = Oracle_json_1.networks[chainId].address;
|
|
15
15
|
super(address, JSON.stringify(Oracle_json_1.abi), signer);
|
|
16
16
|
this.contractAddress = address;
|
|
@@ -13,7 +13,6 @@ var FUNCTIONS;
|
|
|
13
13
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
14
14
|
class OrderPoolContract extends index_1.VerifiedContract {
|
|
15
15
|
constructor(signer, orderPool) {
|
|
16
|
-
const chainId = signer.provider._network.chainId.toString();
|
|
17
16
|
const address = orderPool;
|
|
18
17
|
super(address, JSON.stringify(OrderPool_json_1.abi), signer);
|
|
19
18
|
this.contractAddress = address;
|
|
@@ -10,7 +10,7 @@ var FUNCTIONS;
|
|
|
10
10
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
11
11
|
class PoolFactoryContract extends index_1.VerifiedContract {
|
|
12
12
|
constructor(signer) {
|
|
13
|
-
const chainId =
|
|
13
|
+
const chainId = Object.keys(PoolFactory_json_1.networks);
|
|
14
14
|
const address = PoolFactory_json_1.networks[chainId].address;
|
|
15
15
|
super(address, JSON.stringify(PoolFactory_json_1.abi), signer);
|
|
16
16
|
this.contractAddress = address;
|
|
@@ -12,7 +12,7 @@ var FUNCTIONS;
|
|
|
12
12
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
13
13
|
class PostTradeContract extends index_1.VerifiedContract {
|
|
14
14
|
constructor(signer) {
|
|
15
|
-
const chainId =
|
|
15
|
+
const chainId = Object.keys(PostTrade_json_1.networks);
|
|
16
16
|
const address = PostTrade_json_1.networks[chainId].address;
|
|
17
17
|
super(address, JSON.stringify(PostTrade_json_1.abi), signer);
|
|
18
18
|
this.contractAddress = address;
|
|
@@ -19,7 +19,7 @@ var FUNCTIONS;
|
|
|
19
19
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
20
20
|
class PreTradeContract extends index_1.VerifiedContract {
|
|
21
21
|
constructor(signer) {
|
|
22
|
-
const chainId =
|
|
22
|
+
const chainId = Object.keys(PreTrade_json_1.networks);
|
|
23
23
|
const address = PreTrade_json_1.networks[chainId].address;
|
|
24
24
|
super(address, JSON.stringify(PreTrade_json_1.abi), signer);
|
|
25
25
|
this.contractAddress = address;
|
|
@@ -22,10 +22,11 @@ var FUNCTIONS;
|
|
|
22
22
|
FUNCTIONS["GETPLATFORMS"] = "getPlatforms";
|
|
23
23
|
FUNCTIONS["GETPRODUCTREFERENCE"] = "getProductReference";
|
|
24
24
|
FUNCTIONS["SETSIGNER"] = "setSigner";
|
|
25
|
+
FUNCTIONS["REGISTERPLATFORM"] = "registerPlatform";
|
|
25
26
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
26
27
|
class ProductContract extends index_1.VerifiedContract {
|
|
27
28
|
constructor(signer) {
|
|
28
|
-
const chainId =
|
|
29
|
+
const chainId = Object.keys(Products_json_1.networks);
|
|
29
30
|
const address = Products_json_1.networks[chainId].address;
|
|
30
31
|
super(address, JSON.stringify(Products_json_1.abi), signer);
|
|
31
32
|
this.contractAddress = address;
|
|
@@ -101,5 +102,9 @@ class ProductContract extends index_1.VerifiedContract {
|
|
|
101
102
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _issue);
|
|
102
103
|
return this.callContract(FUNCTIONS.GETPRODUCTREFERENCE, _issue, options);
|
|
103
104
|
}
|
|
105
|
+
async registerPlatform(liquidityPlatform, _hashedMessage, _v, _r, _s, options) {
|
|
106
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, liquidityPlatform);
|
|
107
|
+
return this.callContract(FUNCTIONS.REGISTERPLATFORM, liquidityPlatform, _hashedMessage, _v, _r, _s, options);
|
|
108
|
+
}
|
|
104
109
|
}
|
|
105
110
|
exports.default = ProductContract;
|
|
@@ -21,7 +21,6 @@ var FUNCTIONS;
|
|
|
21
21
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
22
22
|
class VerifiedBond extends index_1.VerifiedContract {
|
|
23
23
|
constructor(signer, bondCurrencyAddress) {
|
|
24
|
-
const chainId = signer.provider._network.chainId.toString();
|
|
25
24
|
const address = bondCurrencyAddress;
|
|
26
25
|
super(address, JSON.stringify(Bond_json_1.abi), signer);
|
|
27
26
|
this.contractAddress = address;
|
|
@@ -24,7 +24,6 @@ var FUNCTIONS;
|
|
|
24
24
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
25
25
|
class VerifiedCash extends index_1.VerifiedContract {
|
|
26
26
|
constructor(signer, currencyAddress) {
|
|
27
|
-
const chainId = signer.provider._network.chainId.toString();
|
|
28
27
|
const address = currencyAddress;
|
|
29
28
|
super(address, JSON.stringify(Cash_json_1.abi), signer);
|
|
30
29
|
this.contractAddress = address;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// SPDX-License-Identifier: BUSL-1.1
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
const index_1 = require("../../index");
|
|
6
|
+
const Client_json_1 = require("../../../abi/assetmanager/Client.json");
|
|
7
|
+
var FUNCTIONS;
|
|
8
|
+
(function (FUNCTIONS) {
|
|
9
|
+
FUNCTIONS["SETSIGNER"] = "setSigner";
|
|
10
|
+
FUNCTIONS["GETROLE"] = "getRole";
|
|
11
|
+
FUNCTIONS["REMOVEROLE"] = "removeRole";
|
|
12
|
+
FUNCTIONS["ADDROLE"] = "addRole";
|
|
13
|
+
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
14
|
+
class VerifiedClient extends index_1.VerifiedContract {
|
|
15
|
+
constructor(signer) {
|
|
16
|
+
const chainId = Object.keys(Client_json_1.networks);
|
|
17
|
+
const address = Client_json_1.networks[chainId].address;
|
|
18
|
+
super(address, JSON.stringify(Client_json_1.abi), signer);
|
|
19
|
+
this.contractAddress = address;
|
|
20
|
+
}
|
|
21
|
+
setSigner(_address) {
|
|
22
|
+
return this.callContract(FUNCTIONS.SETSIGNER, _address);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Get sub-managers for role [callable only by manager]
|
|
26
|
+
* @params (address _submanager, bytes32 _country)
|
|
27
|
+
* @returns {address[] memory}
|
|
28
|
+
*/
|
|
29
|
+
async getRole(_submanager, options) {
|
|
30
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _submanager);
|
|
31
|
+
return this.callContract(FUNCTIONS.GETROLE, _submanager, options);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Remove sub-manager from role [callable only by manager]
|
|
35
|
+
* @params (address _submanager, bytes32 _country, bytes32 _role)
|
|
36
|
+
* @returns
|
|
37
|
+
*/
|
|
38
|
+
async removeRole(_manager, _submanager, _country, _role, _hashedMessage, _v, _r, _s, options) {
|
|
39
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _manager);
|
|
40
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _submanager);
|
|
41
|
+
await this.validateInput(index_1.DATATYPES.STRING, _country);
|
|
42
|
+
await this.validateInput(index_1.DATATYPES.STRING, _role);
|
|
43
|
+
return this.callContract(FUNCTIONS.REMOVEROLE, _manager, _submanager, this.sanitiseInput(index_1.DATATYPES.BYTE32, _country), this.sanitiseInput(index_1.DATATYPES.BYTE32, _role), _hashedMessage, _v, _r, _s, options);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Create role for sub-manager [callable only by manager
|
|
47
|
+
* @params (address _submanager, bytes32 _country, bytes32 _role)
|
|
48
|
+
* @returns
|
|
49
|
+
*/
|
|
50
|
+
async addRole(_manager, _submanager, _country, _role, _id, _hashedMessage, _v, _r, _s, options) {
|
|
51
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _manager);
|
|
52
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _submanager);
|
|
53
|
+
await this.validateInput(index_1.DATATYPES.STRING, _country);
|
|
54
|
+
await this.validateInput(index_1.DATATYPES.STRING, _role);
|
|
55
|
+
await this.validateInput(index_1.DATATYPES.STRING, _id);
|
|
56
|
+
return this.callContract(FUNCTIONS.ADDROLE, _manager, _submanager, this.sanitiseInput(index_1.DATATYPES.BYTE32, _country), this.sanitiseInput(index_1.DATATYPES.BYTE32, _role), this.sanitiseInput(index_1.DATATYPES.BYTE32, _id), _hashedMessage, _v, _r, _s, options);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.default = VerifiedClient;
|
|
@@ -14,7 +14,7 @@ var FUNCTIONS;
|
|
|
14
14
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
15
15
|
class DistributionContract extends index_1.VerifiedContract {
|
|
16
16
|
constructor(signer) {
|
|
17
|
-
const chainId =
|
|
17
|
+
const chainId = Object.keys(Distribution_json_1.networks);
|
|
18
18
|
const address = Distribution_json_1.networks[chainId].address;
|
|
19
19
|
super(address, JSON.stringify(Distribution_json_1.abi), signer);
|
|
20
20
|
this.contractAddress = address;
|
|
@@ -16,7 +16,7 @@ var FUNCTIONS;
|
|
|
16
16
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
17
17
|
class VerifiedFactory extends index_1.VerifiedContract {
|
|
18
18
|
constructor(signer) {
|
|
19
|
-
const chainId =
|
|
19
|
+
const chainId = Object.keys(Factory_json_1.networks);
|
|
20
20
|
const address = Factory_json_1.networks[chainId].address;
|
|
21
21
|
super(address, JSON.stringify(Factory_json_1.abi), signer);
|
|
22
22
|
this.contractAddress = address;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// SPDX-License-Identifier: BUSL-1.1
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
const index_1 = require("../../index");
|
|
6
|
+
const Products_json_1 = require("../../../abi/assetmanager/Products.json");
|
|
7
|
+
var FUNCTIONS;
|
|
8
|
+
(function (FUNCTIONS) {
|
|
9
|
+
FUNCTIONS["ISSUEPRODUCT"] = "issueProduct";
|
|
10
|
+
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
11
|
+
class VerifiedProducts extends index_1.VerifiedContract {
|
|
12
|
+
constructor(signer) {
|
|
13
|
+
const chainId = Object.keys(Products_json_1.networks);
|
|
14
|
+
const address = Products_json_1.networks[chainId].address;
|
|
15
|
+
super(address, JSON.stringify(Products_json_1.abi), signer);
|
|
16
|
+
this.contractAddress = address;
|
|
17
|
+
}
|
|
18
|
+
async issueProduct(issue, ref, _hashedMessage, _v, _r, _s, options) {
|
|
19
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, issue);
|
|
20
|
+
await this.validateInput(index_1.DATATYPES.STRING, ref);
|
|
21
|
+
return this.callContract(FUNCTIONS.ISSUEPRODUCT, issue, this.sanitiseInput(index_1.DATATYPES.BYTE32, ref), _hashedMessage, _v, _r, _s, options);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.default = VerifiedProducts;
|
|
@@ -19,7 +19,7 @@ var FUNCTIONS;
|
|
|
19
19
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
20
20
|
class VerifiedRates extends index_1.VerifiedContract {
|
|
21
21
|
constructor(signer) {
|
|
22
|
-
const chainId =
|
|
22
|
+
const chainId = Object.keys(Rates_json_1.networks);
|
|
23
23
|
const address = Rates_json_1.networks[chainId].address;
|
|
24
24
|
super(address, JSON.stringify(Rates_json_1.abi), signer);
|
|
25
25
|
this.contractAddress = address;
|
|
@@ -13,7 +13,7 @@ var FUNCTIONS;
|
|
|
13
13
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
14
14
|
class VerifiedSecurity extends index_1.VerifiedContract {
|
|
15
15
|
constructor(signer) {
|
|
16
|
-
const chainId =
|
|
16
|
+
const chainId = Object.keys(Security_json_1.networks);
|
|
17
17
|
const address = Security_json_1.networks[chainId].address;
|
|
18
18
|
super(address, JSON.stringify(Security_json_1.abi), signer);
|
|
19
19
|
this.contractAddress = address;
|
|
@@ -19,7 +19,7 @@ var FUNCTIONS;
|
|
|
19
19
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
20
20
|
class RatesContract extends index_1.VerifiedContract {
|
|
21
21
|
constructor(signer) {
|
|
22
|
-
const chainId =
|
|
22
|
+
const chainId = Object.keys(Rates_json_1.networks);
|
|
23
23
|
const address = Rates_json_1.networks[chainId].address;
|
|
24
24
|
super(address, JSON.stringify(Rates_json_1.abi), signer);
|
|
25
25
|
this.contractAddress = address;
|
|
@@ -19,7 +19,7 @@ var FUNCTIONS;
|
|
|
19
19
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
20
20
|
class SecuritiesRegistryContract extends index_1.VerifiedContract {
|
|
21
21
|
constructor(signer) {
|
|
22
|
-
const chainId =
|
|
22
|
+
const chainId = Object.keys(SecuritiesRegistry_json_1.networks);
|
|
23
23
|
const address = SecuritiesRegistry_json_1.networks[chainId].address;
|
|
24
24
|
super(address, JSON.stringify(SecuritiesRegistry_json_1.abi), signer);
|
|
25
25
|
this.contractAddress = address;
|
|
@@ -11,7 +11,6 @@ var FUNCTIONS;
|
|
|
11
11
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
12
12
|
class SecurityContract extends index_1.VerifiedContract {
|
|
13
13
|
constructor(signer, tokenAddress) {
|
|
14
|
-
const chainId = signer.provider._network.chainId.toString();
|
|
15
14
|
const address = tokenAddress;
|
|
16
15
|
super(address, JSON.stringify(Security_json_1.abi), signer);
|
|
17
16
|
this.contractAddress = address;
|
|
@@ -17,10 +17,13 @@ var FUNCTIONS;
|
|
|
17
17
|
FUNCTIONS["PAYOUT"] = "payOut";
|
|
18
18
|
FUNCTIONS["ISSUESHARE"] = "issueShare";
|
|
19
19
|
FUNCTIONS["GETBENEFICIARIES"] = "getBeneficiaries";
|
|
20
|
+
FUNCTIONS["SETLIQUIDITYPROVIDERS"] = "setLiquidityProviders";
|
|
21
|
+
FUNCTIONS["SETPLATFORMPOOLS"] = "setPlatformPools";
|
|
22
|
+
FUNCTIONS["SETPLATFORMSUBSCRIBERS"] = "setPlatformSubscribers";
|
|
23
|
+
FUNCTIONS["SETTLE"] = "settleIssue";
|
|
20
24
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
21
25
|
class StocksContract extends index_1.VerifiedContract {
|
|
22
26
|
constructor(signer, issue) {
|
|
23
|
-
const chainId = signer.provider._network.chainId.toString();
|
|
24
27
|
const address = issue;
|
|
25
28
|
super(address, JSON.stringify(Stocks_json_1.abi), signer);
|
|
26
29
|
this.contractAddress = address;
|
|
@@ -50,6 +53,10 @@ class StocksContract extends index_1.VerifiedContract {
|
|
|
50
53
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _asset);
|
|
51
54
|
return this.callContract(FUNCTIONS.ALLOTISSUE, this.sanitiseInput(index_1.DATATYPES.BYTE32, _allotment), _platform, this.sanitiseInput(index_1.DATATYPES.BYTE32, _pool), _investor, _amount, _asset, options);
|
|
52
55
|
}
|
|
56
|
+
async settle(issue, options) {
|
|
57
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, issue);
|
|
58
|
+
return this.callContract(FUNCTIONS.SETTLE, issue, options);
|
|
59
|
+
}
|
|
53
60
|
async getPaymentStatusFor(_beneficiary, options) {
|
|
54
61
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _beneficiary);
|
|
55
62
|
return this.callContract(FUNCTIONS.GETPAYMENTSTATUS, _beneficiary, options);
|
|
@@ -78,5 +85,23 @@ class StocksContract extends index_1.VerifiedContract {
|
|
|
78
85
|
await this.validateInput(index_1.DATATYPES.STRING, _isin);
|
|
79
86
|
return this.callContract(FUNCTIONS.ISSUESHARE, _issueSize, _offerPrice, _minAskPrice, _minSubscription, this.sanitiseInput(index_1.DATATYPES.BYTE32, _currency), this.sanitiseInput(index_1.DATATYPES.BYTE32, _offerType), this.sanitiseInput(index_1.DATATYPES.BYTE32, _isin), _offeringDocuments, options);
|
|
80
87
|
}
|
|
88
|
+
async setLiquidityProviders(platform, liquidityProviders, _hashedMessage, _v, _r, _s, options) {
|
|
89
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, platform);
|
|
90
|
+
await this.validateInput(index_1.DATATYPES.STRING, liquidityProviders);
|
|
91
|
+
return this.callContract(FUNCTIONS.SETLIQUIDITYPROVIDERS, platform, liquidityProviders, _hashedMessage, _v, _r, _s, options);
|
|
92
|
+
}
|
|
93
|
+
async setPlatformPools(platform, securityToken, pools, status, _hashedMessage, _v, _r, _s, options) {
|
|
94
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, platform);
|
|
95
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, securityToken);
|
|
96
|
+
await this.validateInput(index_1.DATATYPES.STRING, pools);
|
|
97
|
+
await this.validateInput(index_1.DATATYPES.STRING, status);
|
|
98
|
+
return this.callContract(FUNCTIONS.SETPLATFORMPOOLS, platform, securityToken, pools, status, _hashedMessage, _v, _r, _s, options);
|
|
99
|
+
}
|
|
100
|
+
async setPlatformSubscribers(platform, pool, eois, _hashedMessage, _v, _r, _s, options) {
|
|
101
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, platform);
|
|
102
|
+
await this.validateInput(index_1.DATATYPES.STRING, pool);
|
|
103
|
+
await this.validateInput(index_1.DATATYPES.STRING, eois);
|
|
104
|
+
return this.callContract(FUNCTIONS.SETPLATFORMSUBSCRIBERS, platform, this.sanitiseInput(index_1.DATATYPES.BYTE32, pool), eois, _hashedMessage, _v, _r, _s, options);
|
|
105
|
+
}
|
|
81
106
|
}
|
|
82
107
|
exports.default = StocksContract;
|
|
@@ -19,7 +19,7 @@ var FUNCTIONS;
|
|
|
19
19
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
20
20
|
class SystemContract extends index_1.VerifiedContract {
|
|
21
21
|
constructor(signer) {
|
|
22
|
-
const chainId =
|
|
22
|
+
const chainId = Object.keys(System_json_1.networks);
|
|
23
23
|
const address = System_json_1.networks[chainId].address;
|
|
24
24
|
super(address, JSON.stringify(System_json_1.abi), signer);
|
|
25
25
|
this.contractAddress = address;
|
|
@@ -12,7 +12,6 @@ var FUNCTIONS;
|
|
|
12
12
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
13
13
|
class TokenContract extends index_1.VerifiedContract {
|
|
14
14
|
constructor(signer, bondCurrencyAddress) {
|
|
15
|
-
const chainId = signer.provider._network.chainId.toString();
|
|
16
15
|
const address = bondCurrencyAddress;
|
|
17
16
|
super(address, JSON.stringify(Token_json_1.abi), signer);
|
|
18
17
|
this.contractAddress = address;
|
|
@@ -12,7 +12,7 @@ var FUNCTIONS;
|
|
|
12
12
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
13
13
|
class TradeContract extends index_1.VerifiedContract {
|
|
14
14
|
constructor(signer) {
|
|
15
|
-
const chainId =
|
|
15
|
+
const chainId = Object.keys(Trade_json_1.networks);
|
|
16
16
|
const address = Trade_json_1.networks[chainId].address;
|
|
17
17
|
super(address, JSON.stringify(Trade_json_1.abi), signer);
|
|
18
18
|
this.contractAddress = address;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const contractAddress = {
|
|
4
4
|
'L1-goerli': {
|
|
5
|
-
'Client': '',
|
|
5
|
+
'Client': '0x9C0B0Fc0737e6C87EB9AbB00BAFE5A211691E62D',
|
|
6
6
|
'KYC': '',
|
|
7
7
|
'System': '',
|
|
8
8
|
'Holder': '',
|
|
@@ -21,13 +21,13 @@ const contractAddress = {
|
|
|
21
21
|
'Security': '0x8B7D20deDF0DC7874B3C357Ba759890e51ad4bb3',
|
|
22
22
|
'OrderPool': '',
|
|
23
23
|
'PoolFactory': '',
|
|
24
|
-
'Products': '',
|
|
24
|
+
'Products': '0xF647F22e8Ce31d912c2786135610f9f4A45c8690',
|
|
25
25
|
'Stocks': '',
|
|
26
26
|
'Bonds': '',
|
|
27
|
-
'Liquidity': '
|
|
27
|
+
'Liquidity': '0xf6FeBF7B2d2A9828F4B75dB9AE56414907175849',
|
|
28
28
|
'Distribution': '0x5c3171AFEC854f8B6FD138ee9533629ABd8A5365',
|
|
29
|
-
'BalancerManager': '',
|
|
30
|
-
'PrimaryIssuePoolFactory': '',
|
|
29
|
+
'BalancerManager': '0x5bd1c54f94eE6eB7a7fA94bB31A600B9Ea6E179a',
|
|
30
|
+
'PrimaryIssuePoolFactory': '0xe1e009F722e5fb544b35543Cc5da7B7E00a56abB',
|
|
31
31
|
'Custody': '',
|
|
32
32
|
'CASH': {
|
|
33
33
|
'VCUSD': '0xCb8eF17d0715bB115977C65e04423d9171025911',
|
|
@@ -60,9 +60,9 @@ const contractAddress = {
|
|
|
60
60
|
'Security': '0x324dfB528BEea8419eC96C6a54E0DA7744A4f8da',
|
|
61
61
|
'OrderPool': '0x69C61a08b46fdd75D6f000CCf2b85618AC7011a5',
|
|
62
62
|
'PoolFactory': '0xEE713f9e7d7D03267534C2628019C16dC1c41ecB',
|
|
63
|
-
'Products': '
|
|
64
|
-
'Stocks': '
|
|
65
|
-
'Bonds': '
|
|
63
|
+
'Products': '0xCA7C581d55E5025745C495D9be8EE6f8B22FD156',
|
|
64
|
+
'Stocks': '0xA02119054272E52f6b6380c358E995f95Db2E9B2',
|
|
65
|
+
'Bonds': '0xBa0daEBb3D325e6cE3401ff2FF913a5FEe20181D',
|
|
66
66
|
'Liquidity': '',
|
|
67
67
|
'Distribution': '',
|
|
68
68
|
'BalancerManager': '',
|