@verified-network/verified-sdk 2.0.0 → 2.0.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.
- package/README.md +1 -1
- package/dist/contract/amm/margin/index.d.ts +20 -45
- package/dist/contract/amm/margin/index.js +20 -17
- package/dist/contract/amm/primary/index.d.ts +22 -53
- package/dist/contract/amm/primary/index.js +3 -0
- package/dist/contract/amm/secondary/index.d.ts +16 -29
- package/dist/contract/amm/secondary/index.js +3 -0
- package/dist/contract/bond/index.d.ts +24 -31
- package/dist/contract/bond/index.js +25 -22
- package/dist/contract/cash/index.d.ts +21 -28
- package/dist/contract/cash/index.js +19 -16
- package/dist/contract/client/index.d.ts +33 -73
- package/dist/contract/client/index.js +11 -8
- package/dist/contract/custody/index.d.ts +20 -45
- package/dist/contract/custody/index.js +3 -0
- package/dist/contract/distribution/index.d.ts +32 -42
- package/dist/contract/distribution/index.js +20 -17
- package/dist/contract/erc20/index.d.ts +16 -29
- package/dist/contract/erc20/index.js +3 -0
- package/dist/contract/factory/index.d.ts +32 -66
- package/dist/contract/factory/index.js +14 -11
- package/dist/contract/index.d.ts +15 -0
- package/dist/contract/index.js +163 -16
- package/dist/contract/liquidity/index.d.ts +98 -144
- package/dist/contract/liquidity/index.js +63 -60
- package/dist/contract/loans/compound/index.d.ts +17 -21
- package/dist/contract/loans/compound/index.js +7 -4
- package/dist/contract/pool/index.d.ts +12 -13
- package/dist/contract/pool/index.js +4 -1
- package/dist/contract/rates/index.d.ts +13 -17
- package/dist/contract/rates/index.js +3 -0
- package/dist/contract/securitiesfactory/index.d.ts +23 -48
- package/dist/contract/securitiesfactory/index.js +6 -3
- package/dist/contract/security/index.d.ts +36 -109
- package/dist/contract/security/index.js +3 -0
- package/dist/contract/token/index.d.ts +19 -35
- package/dist/contract/token/index.js +7 -4
- package/dist/utils/constants.js +1 -0
- package/package.json +5 -4
|
@@ -37,38 +37,41 @@ class LiquidityContract extends index_1.VerifiedContract {
|
|
|
37
37
|
super(address, JSON.stringify(Liquidity_json_1.abi), signer);
|
|
38
38
|
this.contractAddress = address;
|
|
39
39
|
}
|
|
40
|
+
async _getMeeQuote(paymentTokenAddress, functionName, args) {
|
|
41
|
+
return await this.getQuote(paymentTokenAddress, functionName, args);
|
|
42
|
+
}
|
|
40
43
|
/**
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
Creates supply of the Verified Liquidity token after initial issue with constructor defined parameters
|
|
45
|
+
@param _supply total supply of VITTA
|
|
46
|
+
@param _cap investment limit for each investor
|
|
47
|
+
@param _limit time limit for issue close
|
|
48
|
+
*/
|
|
46
49
|
async createSupply(_cap, _limit, options) {
|
|
47
50
|
await this.validateInput(index_1.DATATYPES.NUMBER, _cap);
|
|
48
51
|
await this.validateInput(index_1.DATATYPES.NUMBER, _limit);
|
|
49
52
|
return this.callContract(FUNCTIONS.CREATESUPPLY, _cap, _limit, options);
|
|
50
53
|
}
|
|
51
54
|
/**
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
Specifies list of supported tokens that can be invested in the Verified Liquidity token
|
|
56
|
+
@param _tokens array of supported token addresses
|
|
57
|
+
*/
|
|
55
58
|
async supportTokens(_tokens, _name, options) {
|
|
56
59
|
await this.validateInput(index_1.DATATYPES.STRING, _tokens);
|
|
57
60
|
await this.validateInput(index_1.DATATYPES.STRING, _name);
|
|
58
61
|
return this.callContract(FUNCTIONS.SUPPORTTOKENS, _tokens, _name, options);
|
|
59
62
|
}
|
|
60
63
|
/**
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
Checks if a specified token is supported for investing in the Verified Liquidity token
|
|
65
|
+
@param _token token that is supported for investment
|
|
66
|
+
*/
|
|
64
67
|
async checkSupportForToken(_token, options) {
|
|
65
68
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _token);
|
|
66
69
|
return this.callContract(FUNCTIONS.CHECKSUPPORTFORTOKEN, _token, options);
|
|
67
70
|
}
|
|
68
71
|
/**
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
+
Removes support for token for investing in the Verified Liquidity token
|
|
73
|
+
@param _token token that is supported for investment
|
|
74
|
+
*/
|
|
72
75
|
async removeToken(_token, options) {
|
|
73
76
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _token);
|
|
74
77
|
return this.callContract(FUNCTIONS.REMOVETOKEN, _token, options);
|
|
@@ -81,53 +84,53 @@ class LiquidityContract extends index_1.VerifiedContract {
|
|
|
81
84
|
return this.callContract(FUNCTIONS.GETSUPPORTEDTOKENS);
|
|
82
85
|
}
|
|
83
86
|
/**
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
+
Registers a liquidity platform (eg, DEX) where Verified Liquidity tokens can be used to underwrite investments
|
|
88
|
+
@param _liquidityPlatform address of the market making platform
|
|
89
|
+
*/
|
|
87
90
|
async registerPlatform(_platform, _name, options) {
|
|
88
91
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _platform);
|
|
89
92
|
await this.validateInput(index_1.DATATYPES.STRING, _name);
|
|
90
93
|
return this.callContract(FUNCTIONS.REGISTERPLATFORM, _platform, this.sanitiseInput(index_1.DATATYPES.BYTE32, _name), options);
|
|
91
94
|
}
|
|
92
95
|
/**
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
Used by external apps (eg, exchange, wallet) to buy Verified Liquidity token
|
|
97
|
+
@param _token address of token used by investor to buy the VITTA
|
|
98
|
+
@param _amount amount of token that is transferred from investor to this VITTA issuing contract's account for the investor
|
|
99
|
+
*/
|
|
97
100
|
async buy(_token, _amount, options) {
|
|
98
101
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _token);
|
|
99
102
|
await this.validateInput(index_1.DATATYPES.NUMBER, _amount);
|
|
100
103
|
return this.callContract(FUNCTIONS.BUY, _token, _amount, options);
|
|
101
104
|
}
|
|
102
105
|
/**
|
|
103
|
-
|
|
104
|
-
|
|
106
|
+
Fetches investors in VITTA
|
|
107
|
+
*/
|
|
105
108
|
async getInvestors() {
|
|
106
109
|
return this.callContract(FUNCTIONS.GETINVESTORS);
|
|
107
110
|
}
|
|
108
111
|
/**
|
|
109
|
-
|
|
110
|
-
|
|
112
|
+
Fetches registered platforms
|
|
113
|
+
*/
|
|
111
114
|
async getPlatforms() {
|
|
112
115
|
return this.callContract(FUNCTIONS.GETPLATFORMS);
|
|
113
116
|
}
|
|
114
117
|
/**
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
118
|
+
Fetches investment detail for specific investor in VITTA
|
|
119
|
+
@param _investor address of investor
|
|
120
|
+
@param _token address of token invested by investor
|
|
121
|
+
*/
|
|
119
122
|
async getInvestment(_investor, _token, options) {
|
|
120
123
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _investor);
|
|
121
124
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _token);
|
|
122
125
|
return this.callContract(FUNCTIONS.GETINVESTMENT, _investor, _token, options);
|
|
123
126
|
}
|
|
124
127
|
/**
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
Used by Issuers (eg, asset managers) to issue VITTA to investors or refund paid in tokens to investors if investment cap is breached
|
|
129
|
+
@param _investor address of investor
|
|
130
|
+
@param _token address of token invested in VITTA
|
|
131
|
+
@param _tokenAmount amount of token invested in VITTA
|
|
132
|
+
@param _LPToIssue amount of VITTA to issue to investor
|
|
133
|
+
*/
|
|
131
134
|
async issue(_investor, _token, _tokenAmount, _LPToIssue, options) {
|
|
132
135
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _investor);
|
|
133
136
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _token);
|
|
@@ -136,26 +139,26 @@ class LiquidityContract extends index_1.VerifiedContract {
|
|
|
136
139
|
return this.callContract(FUNCTIONS.ISSUE, _investor, _token, _tokenAmount, _LPToIssue, options);
|
|
137
140
|
}
|
|
138
141
|
/**
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
+
Used by VITTA holder to stake it for providing liquidity for underwriting investments
|
|
143
|
+
@param _toStake amount of VITTA to stake
|
|
144
|
+
*/
|
|
142
145
|
async stake(_toStake, options) {
|
|
143
146
|
await this.validateInput(index_1.DATATYPES.NUMBER, _toStake);
|
|
144
147
|
return this.callContract(FUNCTIONS.STAKE, _toStake, options);
|
|
145
148
|
}
|
|
146
149
|
/**
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
+
Used by VITTA holder to withdraw staked liquidity for underwriting investments
|
|
151
|
+
@param _fromStake amount of VITTA staked
|
|
152
|
+
*/
|
|
150
153
|
async withdraw(_fromStake, options) {
|
|
151
154
|
await this.validateInput(index_1.DATATYPES.NUMBER, _fromStake);
|
|
152
155
|
return this.callContract(FUNCTIONS.WITHDRAW, _fromStake, options);
|
|
153
156
|
}
|
|
154
157
|
/**
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
158
|
+
Pay out of income to VITTA Liquidity providers
|
|
159
|
+
@param _distribution amount of VITTA to mint and distribute pro rata to liquidity providers
|
|
160
|
+
@param _platform address of liquidity platform
|
|
161
|
+
*/
|
|
159
162
|
async payOut(_distribution, _platform, options) {
|
|
160
163
|
await this.validateInput(index_1.DATATYPES.NUMBER, _distribution);
|
|
161
164
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _platform);
|
|
@@ -196,26 +199,26 @@ class LiquidityContract extends index_1.VerifiedContract {
|
|
|
196
199
|
return this.callContract(FUNCTIONS.GETMANAGERS, _platform, options);
|
|
197
200
|
}
|
|
198
201
|
/**
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
202
|
+
* Gets return on investment performance of market making platform
|
|
203
|
+
* @param _platform address of market making platform
|
|
204
|
+
* @param options
|
|
205
|
+
* @returns uint256 unstakedLiquidity,
|
|
206
|
+
uint256 balancePlatformLiquidity,
|
|
207
|
+
uint256 platformLiquidityProvided,
|
|
208
|
+
uint256 platformCommissionsEarned
|
|
209
|
+
*/
|
|
207
210
|
async getPlatformPerformance(_platform, options) {
|
|
208
211
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _platform);
|
|
209
212
|
return this.callContract(FUNCTIONS.GETPLATFORMPERFORMANCE, _platform, options);
|
|
210
213
|
}
|
|
211
214
|
/**
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
215
|
+
* Gets return on investment performance for asset manager
|
|
216
|
+
* @param _platform address of market making platform (eg Balancer)
|
|
217
|
+
* @param _manager address of asset manager
|
|
218
|
+
* @param options
|
|
219
|
+
* @returns uint256 managerLiquidityProvided,
|
|
220
|
+
uint256 managerCommissionsEarned
|
|
221
|
+
*/
|
|
219
222
|
async getManagerPerformance(_platform, _token, _manager, options) {
|
|
220
223
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _platform);
|
|
221
224
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _token);
|
|
@@ -1,43 +1,39 @@
|
|
|
1
|
-
import { VerifiedContract } from
|
|
1
|
+
import { VerifiedContract, Options } from "../../index";
|
|
2
2
|
import { VerifiedWallet } from "../../../wallet";
|
|
3
3
|
export default class Compound extends VerifiedContract {
|
|
4
4
|
contractAddress: string;
|
|
5
5
|
constructor(signer: VerifiedWallet, contractNetworkAddress: string);
|
|
6
|
+
_getMeeQuote(paymentTokenAddress: string, functionName: string, args: any[]): Promise<{
|
|
7
|
+
tokenAddress: string;
|
|
8
|
+
amount: string;
|
|
9
|
+
amountInWei: string;
|
|
10
|
+
amouuntValue: string;
|
|
11
|
+
chainId: number;
|
|
12
|
+
functionName: string;
|
|
13
|
+
}>;
|
|
6
14
|
setSigner(_address: string): any;
|
|
7
15
|
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
submitNewRWA(asset: string, bond: string, apy: string, issuingDocs: string, faceValue: string, options?:
|
|
13
|
-
gasPrice: any;
|
|
14
|
-
gasLimit: any;
|
|
15
|
-
}): any;
|
|
16
|
+
* Submits new RWA to Compound
|
|
17
|
+
* @params (address asset, address bond, uint256 apy, string memory issuingDocs, uint256 faceValue)
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
submitNewRWA(asset: string, bond: string, apy: string, issuingDocs: string, faceValue: string, options?: Options): any;
|
|
16
21
|
/**
|
|
17
22
|
* Posts collateral to Compound
|
|
18
23
|
* @params (address asset, address collateral, uint256 amount)
|
|
19
24
|
* @returns
|
|
20
25
|
*/
|
|
21
|
-
postCollateral(asset: string, collateral: string, amount: string, options?:
|
|
22
|
-
gasPrice: any;
|
|
23
|
-
gasLimit: any;
|
|
24
|
-
}): any;
|
|
26
|
+
postCollateral(asset: string, collateral: string, amount: string, options?: Options): any;
|
|
25
27
|
/**
|
|
26
28
|
* Borrows from Compound
|
|
27
29
|
* @params (address base, uint256 amount)
|
|
28
30
|
* @returns
|
|
29
31
|
*/
|
|
30
|
-
borrowBase(base: string, amount: string, options?:
|
|
31
|
-
gasPrice: any;
|
|
32
|
-
gasLimit: any;
|
|
33
|
-
}): any;
|
|
32
|
+
borrowBase(base: string, amount: string, options?: Options): any;
|
|
34
33
|
/**
|
|
35
34
|
* Repays to Compound
|
|
36
35
|
* @params (address base, uint256 amount)
|
|
37
36
|
* @returns
|
|
38
37
|
*/
|
|
39
|
-
repayBase(base: string, amount: string, options?:
|
|
40
|
-
gasPrice: any;
|
|
41
|
-
gasLimit: any;
|
|
42
|
-
}): any;
|
|
38
|
+
repayBase(base: string, amount: string, options?: Options): any;
|
|
43
39
|
}
|
|
@@ -17,14 +17,17 @@ class Compound extends index_1.VerifiedContract {
|
|
|
17
17
|
super(address, JSON.stringify(VerifiedMarkets_json_1.abi), signer);
|
|
18
18
|
this.contractAddress = address;
|
|
19
19
|
}
|
|
20
|
+
async _getMeeQuote(paymentTokenAddress, functionName, args) {
|
|
21
|
+
return await this.getQuote(paymentTokenAddress, functionName, args);
|
|
22
|
+
}
|
|
20
23
|
setSigner(_address) {
|
|
21
24
|
return this.callContract(FUNCTIONS.SETSIGNER, _address);
|
|
22
25
|
}
|
|
23
26
|
/**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
* Submits new RWA to Compound
|
|
28
|
+
* @params (address asset, address bond, uint256 apy, string memory issuingDocs, uint256 faceValue)
|
|
29
|
+
* @returns
|
|
30
|
+
*/
|
|
28
31
|
async submitNewRWA(asset, bond, apy, issuingDocs, faceValue, options) {
|
|
29
32
|
await this.validateInput(index_1.DATATYPES.ADDRESS, asset);
|
|
30
33
|
await this.validateInput(index_1.DATATYPES.ADDRESS, bond);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VerifiedContract } from
|
|
1
|
+
import { VerifiedContract, Options } from "../index";
|
|
2
2
|
import { VerifiedWallet } from "../../../wallet";
|
|
3
3
|
type SingleSwap = {
|
|
4
4
|
poolId: string;
|
|
@@ -24,17 +24,16 @@ type Funds = {
|
|
|
24
24
|
export default class PoolContract extends VerifiedContract {
|
|
25
25
|
contractAddress: string;
|
|
26
26
|
constructor(signer: VerifiedWallet);
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}): any;
|
|
27
|
+
_getMeeQuote(paymentTokenAddress: string, functionName: string, args: any[]): Promise<{
|
|
28
|
+
tokenAddress: string;
|
|
29
|
+
amount: string;
|
|
30
|
+
amountInWei: string;
|
|
31
|
+
amouuntValue: string;
|
|
32
|
+
chainId: number;
|
|
33
|
+
functionName: string;
|
|
34
|
+
}>;
|
|
35
|
+
swap(_swap: SingleSwap, _funds: Funds, _limit: string, _deadline: string, options?: Options): any;
|
|
36
|
+
batchSwap(_kind: string, _swaps: Swap[], _assests: string[], _funds: Funds, _limits: string[], _deadline: string, options?: Options): any;
|
|
37
|
+
getPoolTokens(_poolId: string, options?: Options): any;
|
|
39
38
|
}
|
|
40
39
|
export {};
|
|
@@ -16,10 +16,13 @@ var FUNCTIONS;
|
|
|
16
16
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
17
17
|
class PoolContract extends index_1.VerifiedContract {
|
|
18
18
|
constructor(signer) {
|
|
19
|
-
const address = contractAddress_1.default[
|
|
19
|
+
const address = contractAddress_1.default["balancerVault"];
|
|
20
20
|
super(address, JSON.stringify(Vault_json_1.abi), signer);
|
|
21
21
|
this.contractAddress = address;
|
|
22
22
|
}
|
|
23
|
+
async _getMeeQuote(paymentTokenAddress, functionName, args) {
|
|
24
|
+
return await this.getQuote(paymentTokenAddress, functionName, args);
|
|
25
|
+
}
|
|
23
26
|
async swap(_swap, _funds, _limit, _deadline, options) {
|
|
24
27
|
const { poolId, kind, assetIn, assetOut, amount, userData } = _swap;
|
|
25
28
|
const { sender, fromInternalBalance, recipient, toInternalBalance } = _funds;
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
import { VerifiedContract } from
|
|
1
|
+
import { VerifiedContract, Options } from "../index";
|
|
2
2
|
import { VerifiedWallet } from "../../wallet";
|
|
3
3
|
export default class Rates extends VerifiedContract {
|
|
4
4
|
contractAddress: string;
|
|
5
5
|
constructor(signer: VerifiedWallet, contractNetworkAddress: string);
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
getFee(_feeType: string, options?: {
|
|
19
|
-
gasPrice: number;
|
|
20
|
-
gasLimit: number;
|
|
21
|
-
}): any;
|
|
6
|
+
_getMeeQuote(paymentTokenAddress: string, functionName: string, args: any[]): Promise<{
|
|
7
|
+
tokenAddress: string;
|
|
8
|
+
amount: string;
|
|
9
|
+
amountInWei: string;
|
|
10
|
+
amouuntValue: string;
|
|
11
|
+
chainId: number;
|
|
12
|
+
functionName: string;
|
|
13
|
+
}>;
|
|
14
|
+
setFeeTo(_feeTo: string, _fee: string, _feeType: string, options?: Options): any;
|
|
15
|
+
setFeeToSetter(_feeToSetter: string, options?: Options): any;
|
|
16
|
+
setCustodian(_custodian: string, options?: Options): any;
|
|
17
|
+
getFee(_feeType: string, options?: Options): any;
|
|
22
18
|
getFeeToSetter(): any;
|
|
23
19
|
getCustodian(): any;
|
|
24
20
|
}
|
|
@@ -19,6 +19,9 @@ class Rates extends index_1.VerifiedContract {
|
|
|
19
19
|
super(address, JSON.stringify(Rates_json_1.abi), signer);
|
|
20
20
|
this.contractAddress = address;
|
|
21
21
|
}
|
|
22
|
+
async _getMeeQuote(paymentTokenAddress, functionName, args) {
|
|
23
|
+
return await this.getQuote(paymentTokenAddress, functionName, args);
|
|
24
|
+
}
|
|
22
25
|
async setFeeTo(_feeTo, _fee, _feeType, options) {
|
|
23
26
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _feeTo);
|
|
24
27
|
await this.validateInput(index_1.DATATYPES.NUMBER, _fee);
|
|
@@ -1,61 +1,36 @@
|
|
|
1
|
-
import { VerifiedContract } from
|
|
1
|
+
import { VerifiedContract, Options } from "../index";
|
|
2
2
|
import { VerifiedWallet } from "../../../wallet";
|
|
3
3
|
export default class SecuritiesFactory extends VerifiedContract {
|
|
4
4
|
contractAddress: string;
|
|
5
5
|
constructor(signer: VerifiedWallet, contractNetworkAddress: string);
|
|
6
|
+
_getMeeQuote(paymentTokenAddress: string, functionName: string, args: any[]): Promise<{
|
|
7
|
+
tokenAddress: string;
|
|
8
|
+
amount: string;
|
|
9
|
+
amountInWei: string;
|
|
10
|
+
amouuntValue: string;
|
|
11
|
+
chainId: number;
|
|
12
|
+
functionName: string;
|
|
13
|
+
}>;
|
|
6
14
|
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
setSigner(_signer: string, options?:
|
|
11
|
-
gasPrice: number;
|
|
12
|
-
gasLimit: number;
|
|
13
|
-
}): any;
|
|
15
|
+
Sets signer to verify bridge
|
|
16
|
+
@param _signer address of signer that can only be set by owner of bridge
|
|
17
|
+
*/
|
|
18
|
+
setSigner(_signer: string, options?: Options): any;
|
|
14
19
|
/**
|
|
15
20
|
* Get issued security token addresses
|
|
16
21
|
* @param
|
|
17
22
|
* @returns returns array of addresses
|
|
18
23
|
*/
|
|
19
24
|
getIssues(): any;
|
|
20
|
-
getHolder(_token: string, options?:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
gasPrice: number;
|
|
26
|
-
gasLimit: number;
|
|
27
|
-
}): any;
|
|
28
|
-
issueSecurity(_security: string, _category: string, _company: string, _isin: string, _currency: string, _issuer: string, _intermediary: string, _restrictions: string, _country: string, _qualified: string, options?: {
|
|
29
|
-
gasPrice: number;
|
|
30
|
-
gasLimit: number;
|
|
31
|
-
}): any;
|
|
32
|
-
getSecurityToken(security: string, issuer: string, options?: {
|
|
33
|
-
gasPrice: number;
|
|
34
|
-
gasLimit: number;
|
|
35
|
-
}): any;
|
|
36
|
-
addBalance(_security: string, _transferor: string, _transferee: string, _amount: string, options?: {
|
|
37
|
-
gasPrice: number;
|
|
38
|
-
gasLimit: number;
|
|
39
|
-
}): any;
|
|
25
|
+
getHolder(_token: string, options?: Options): any;
|
|
26
|
+
getSecurity(_token: string, options?: Options): any;
|
|
27
|
+
issueSecurity(_security: string, _category: string, _company: string, _isin: string, _currency: string, _issuer: string, _intermediary: string, _restrictions: string, _country: string, _qualified: string, options?: Options): any;
|
|
28
|
+
getSecurityToken(security: string, issuer: string, options?: Options): any;
|
|
29
|
+
addBalance(_security: string, _transferor: string, _transferee: string, _amount: string, options?: Options): any;
|
|
40
30
|
notifySecuritiesAdded(callback: any): object;
|
|
41
|
-
setCustodian(_securityToken: string, _issuer: string, _custodian: string, options?:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
gasPrice: number;
|
|
47
|
-
gasLimit: number;
|
|
48
|
-
}): any;
|
|
49
|
-
restrictCountry(_security: string, _countries: string, options?: {
|
|
50
|
-
gasPrice: number;
|
|
51
|
-
gasLimit: number;
|
|
52
|
-
}): any;
|
|
53
|
-
getRestrictedCountries(_security: string, options?: {
|
|
54
|
-
gasPrice: number;
|
|
55
|
-
gasLimit: number;
|
|
56
|
-
}): any;
|
|
57
|
-
getDP(_securityToken: string, options?: {
|
|
58
|
-
gasPrice: number;
|
|
59
|
-
gasLimit: number;
|
|
60
|
-
}): any;
|
|
31
|
+
setCustodian(_securityToken: string, _issuer: string, _custodian: string, options?: Options): any;
|
|
32
|
+
getCustodian(_securityToken: string, _issuer: string, options?: Options): any;
|
|
33
|
+
restrictCountry(_security: string, _countries: string, options?: Options): any;
|
|
34
|
+
getRestrictedCountries(_security: string, options?: Options): any;
|
|
35
|
+
getDP(_securityToken: string, options?: Options): any;
|
|
61
36
|
}
|
|
@@ -28,10 +28,13 @@ class SecuritiesFactory extends index_1.VerifiedContract {
|
|
|
28
28
|
super(address, JSON.stringify(SecuritiesFactory_json_1.abi), signer);
|
|
29
29
|
this.contractAddress = address;
|
|
30
30
|
}
|
|
31
|
+
async _getMeeQuote(paymentTokenAddress, functionName, args) {
|
|
32
|
+
return await this.getQuote(paymentTokenAddress, functionName, args);
|
|
33
|
+
}
|
|
31
34
|
/**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
Sets signer to verify bridge
|
|
36
|
+
@param _signer address of signer that can only be set by owner of bridge
|
|
37
|
+
*/
|
|
35
38
|
async setSigner(_signer, options) {
|
|
36
39
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _signer);
|
|
37
40
|
return this.callContract(FUNCTIONS.SETSIGNER, _signer, options);
|
|
@@ -1,114 +1,41 @@
|
|
|
1
|
-
import { VerifiedContract } from "../index";
|
|
1
|
+
import { VerifiedContract, Options } from "../index";
|
|
2
2
|
import { VerifiedWallet } from "../../../wallet";
|
|
3
3
|
export default class Security extends VerifiedContract {
|
|
4
4
|
contractAddress: string;
|
|
5
5
|
constructor(signer: VerifiedWallet, tokenAddress: string);
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}): any;
|
|
42
|
-
burn(_holder: string, _amount: string, options?: {
|
|
43
|
-
gasPrice: number;
|
|
44
|
-
gasLimit: number;
|
|
45
|
-
}): any;
|
|
46
|
-
burnAll(options?: {
|
|
47
|
-
gasPrice: number;
|
|
48
|
-
gasLimit: number;
|
|
49
|
-
}): any;
|
|
50
|
-
schedule(_time: string, options?: {
|
|
51
|
-
gasPrice: number;
|
|
52
|
-
gasLimit: number;
|
|
53
|
-
}): any;
|
|
54
|
-
reschedule(_oldtime: string, _newtime: string, options?: {
|
|
55
|
-
gasPrice: number;
|
|
56
|
-
gasLimit: number;
|
|
57
|
-
}): any;
|
|
58
|
-
unschedule(_time: string, options?: {
|
|
59
|
-
gasPrice: number;
|
|
60
|
-
gasLimit: number;
|
|
61
|
-
}): any;
|
|
62
|
-
createResolution(_time: string, _votes: string, _ipfslink: string, options?: {
|
|
63
|
-
gasPrice: number;
|
|
64
|
-
gasLimit: number;
|
|
65
|
-
}): any;
|
|
66
|
-
countVotes(_time: string, options?: {
|
|
67
|
-
gasPrice: number;
|
|
68
|
-
gasLimit: number;
|
|
69
|
-
}): any;
|
|
70
|
-
payoutProrata(_time: string, _wallet: string, _token: string, _amount: string, options?: {
|
|
71
|
-
gasPrice: number;
|
|
72
|
-
gasLimit: number;
|
|
73
|
-
}): any;
|
|
74
|
-
payout(_time: string, _holder: string, _wallet: string, _token: string, _amount: string, options?: {
|
|
75
|
-
gasPrice: number;
|
|
76
|
-
gasLimit: number;
|
|
77
|
-
}): any;
|
|
78
|
-
pause(options?: {
|
|
79
|
-
gasPrice: number;
|
|
80
|
-
gasLimit: number;
|
|
81
|
-
}): any;
|
|
82
|
-
unpause(options?: {
|
|
83
|
-
gasPrice: number;
|
|
84
|
-
gasLimit: number;
|
|
85
|
-
}): any;
|
|
86
|
-
withdrawableFundsOf(_holder: string, options?: {
|
|
87
|
-
gasPrice: number;
|
|
88
|
-
gasLimit: number;
|
|
89
|
-
}): any;
|
|
90
|
-
withdrawnFundsOf(_holder: string, options?: {
|
|
91
|
-
gasPrice: number;
|
|
92
|
-
gasLimit: number;
|
|
93
|
-
}): any;
|
|
94
|
-
accumulativeFundsOf(_holder: string, options?: {
|
|
95
|
-
gasPrice: number;
|
|
96
|
-
gasLimit: number;
|
|
97
|
-
}): any;
|
|
98
|
-
withdrawFunds(options?: {
|
|
99
|
-
gasPrice: number;
|
|
100
|
-
gasLimit: number;
|
|
101
|
-
}): any;
|
|
102
|
-
pushFunds(_holder: string, options?: {
|
|
103
|
-
gasPrice: number;
|
|
104
|
-
gasLimit: number;
|
|
105
|
-
}): any;
|
|
106
|
-
updateFundsReceived(options?: {
|
|
107
|
-
gasPrice: number;
|
|
108
|
-
gasLimit: number;
|
|
109
|
-
}): any;
|
|
110
|
-
vote(_time: string, _ballot: string, options?: {
|
|
111
|
-
gasPrice: number;
|
|
112
|
-
gasLimit: number;
|
|
113
|
-
}): any;
|
|
6
|
+
_getMeeQuote(paymentTokenAddress: string, functionName: string, args: any[]): Promise<{
|
|
7
|
+
tokenAddress: string;
|
|
8
|
+
amount: string;
|
|
9
|
+
amountInWei: string;
|
|
10
|
+
amouuntValue: string;
|
|
11
|
+
chainId: number;
|
|
12
|
+
functionName: string;
|
|
13
|
+
}>;
|
|
14
|
+
whiteList(_spender: string, _amount: string, options?: Options): any;
|
|
15
|
+
transfer(_recipient: string, _amount: string, options?: Options): any;
|
|
16
|
+
approve(_spender: string, _amount: string, options?: Options): any;
|
|
17
|
+
transferFrom(_spender: string, _recipient: string, _amount: string, options?: Options): any;
|
|
18
|
+
increaseAllowance(_spender: string, _amount: string, options?: Options): any;
|
|
19
|
+
decreaseAllowance(_spender: string, _amount: string, options?: Options): any;
|
|
20
|
+
freeze(_holder: string, _amount: string, options?: Options): any;
|
|
21
|
+
unfreeze(_holder: string, options?: Options): any;
|
|
22
|
+
frozen(_account: string, options?: Options): any;
|
|
23
|
+
burn(_holder: string, _amount: string, options?: Options): any;
|
|
24
|
+
burnAll(options?: Options): any;
|
|
25
|
+
schedule(_time: string, options?: Options): any;
|
|
26
|
+
reschedule(_oldtime: string, _newtime: string, options?: Options): any;
|
|
27
|
+
unschedule(_time: string, options?: Options): any;
|
|
28
|
+
createResolution(_time: string, _votes: string, _ipfslink: string, options?: Options): any;
|
|
29
|
+
countVotes(_time: string, options?: Options): any;
|
|
30
|
+
payoutProrata(_time: string, _wallet: string, _token: string, _amount: string, options?: Options): any;
|
|
31
|
+
payout(_time: string, _holder: string, _wallet: string, _token: string, _amount: string, options?: Options): any;
|
|
32
|
+
pause(options?: Options): any;
|
|
33
|
+
unpause(options?: Options): any;
|
|
34
|
+
withdrawableFundsOf(_holder: string, options?: Options): any;
|
|
35
|
+
withdrawnFundsOf(_holder: string, options?: Options): any;
|
|
36
|
+
accumulativeFundsOf(_holder: string, options?: Options): any;
|
|
37
|
+
withdrawFunds(options?: Options): any;
|
|
38
|
+
pushFunds(_holder: string, options?: Options): any;
|
|
39
|
+
updateFundsReceived(options?: Options): any;
|
|
40
|
+
vote(_time: string, _ballot: string, options?: Options): any;
|
|
114
41
|
}
|