@verified-network/verified-sdk 1.3.8 → 1.3.9
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.
|
@@ -7,6 +7,25 @@ const Security_json_1 = require("../../abi/securities/Security.json");
|
|
|
7
7
|
var FUNCTIONS;
|
|
8
8
|
(function (FUNCTIONS) {
|
|
9
9
|
FUNCTIONS["WHITELIST"] = "whiteList";
|
|
10
|
+
FUNCTIONS["TRANSFER"] = "transfer";
|
|
11
|
+
FUNCTIONS["APPROVE"] = "approve";
|
|
12
|
+
FUNCTIONS["TRANSFERFROM"] = "transferFrom";
|
|
13
|
+
FUNCTIONS["INCREASEALLOWANCE"] = "increaseAllowance";
|
|
14
|
+
FUNCTIONS["DECREASEALLOWANCE"] = "decreaseAllowance";
|
|
15
|
+
FUNCTIONS["FREEZE"] = "freeze";
|
|
16
|
+
FUNCTIONS["UNFREEZE"] = "unfreeze";
|
|
17
|
+
FUNCTIONS["FROZEN"] = "frozen";
|
|
18
|
+
FUNCTIONS["BURN"] = "burn";
|
|
19
|
+
FUNCTIONS["BURNALL"] = "burnAll";
|
|
20
|
+
FUNCTIONS["SCHEDULE"] = "scheduleSnapshot";
|
|
21
|
+
FUNCTIONS["RESCHEDULE"] = "rescheduleSnapshot";
|
|
22
|
+
FUNCTIONS["UNSCHEDULE"] = "unscheduleSnapshot";
|
|
23
|
+
FUNCTIONS["CREATERESOLUTION"] = "createResolution";
|
|
24
|
+
FUNCTIONS["COUNTVOTES"] = "countVotes";
|
|
25
|
+
FUNCTIONS["PAYOUTPRORATA"] = "payoutProrata";
|
|
26
|
+
FUNCTIONS["PAYOUT"] = "payout";
|
|
27
|
+
FUNCTIONS["PAUSE"] = "pause";
|
|
28
|
+
FUNCTIONS["UNPAUSE"] = "unpause";
|
|
10
29
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
11
30
|
class Security extends index_1.VerifiedContract {
|
|
12
31
|
constructor(signer, tokenAddress) {
|
|
@@ -19,5 +38,96 @@ class Security extends index_1.VerifiedContract {
|
|
|
19
38
|
await this.validateInput(index_1.DATATYPES.NUMBER, _amount);
|
|
20
39
|
return this.callContract(FUNCTIONS.WHITELIST, _spender, _amount, options);
|
|
21
40
|
}
|
|
41
|
+
async transfer(_recipient, _amount, options) {
|
|
42
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _recipient);
|
|
43
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _amount);
|
|
44
|
+
return this.callContract(FUNCTIONS.TRANSFER, _recipient, _amount, options);
|
|
45
|
+
}
|
|
46
|
+
async approve(_spender, _amount, options) {
|
|
47
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _spender);
|
|
48
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _amount);
|
|
49
|
+
return this.callContract(FUNCTIONS.APPROVE, _spender, _amount, options);
|
|
50
|
+
}
|
|
51
|
+
async transferFrom(_spender, _recipient, _amount, options) {
|
|
52
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _spender);
|
|
53
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _recipient);
|
|
54
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _amount);
|
|
55
|
+
return this.callContract(FUNCTIONS.TRANSFERFROM, _spender, _recipient, _amount, options);
|
|
56
|
+
}
|
|
57
|
+
async increaseAllowance(_spender, _amount, options) {
|
|
58
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _spender);
|
|
59
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _amount);
|
|
60
|
+
return this.callContract(FUNCTIONS.INCREASEALLOWANCE, _spender, _amount, options);
|
|
61
|
+
}
|
|
62
|
+
async decreaseAllowance(_spender, _amount, options) {
|
|
63
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _spender);
|
|
64
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _amount);
|
|
65
|
+
return this.callContract(FUNCTIONS.DECREASEALLOWANCE, _spender, _amount, options);
|
|
66
|
+
}
|
|
67
|
+
async freeze(_holder, _amount, options) {
|
|
68
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _holder);
|
|
69
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _amount);
|
|
70
|
+
return this.callContract(FUNCTIONS.FREEZE, _holder, _amount, options);
|
|
71
|
+
}
|
|
72
|
+
async unfreeze(_holder, options) {
|
|
73
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _holder);
|
|
74
|
+
return this.callContract(FUNCTIONS.UNFREEZE, _holder, options);
|
|
75
|
+
}
|
|
76
|
+
async frozen(_account, options) {
|
|
77
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _holder);
|
|
78
|
+
return this.callContract(FUNCTIONS.FROZEN, _account, options);
|
|
79
|
+
}
|
|
80
|
+
async burn(_holder, _amount, options) {
|
|
81
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _holder);
|
|
82
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _amount);
|
|
83
|
+
return this.callContract(FUNCTIONS.BURN, _holder, _amount, options);
|
|
84
|
+
}
|
|
85
|
+
async burnAll(options) {
|
|
86
|
+
return this.callContract(FUNCTIONS.BURNALL, options);
|
|
87
|
+
}
|
|
88
|
+
async schedule(_time, options) {
|
|
89
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _time);
|
|
90
|
+
return this.callContract(FUNCTIONS.SCHEDULE, _time, options);
|
|
91
|
+
}
|
|
92
|
+
async reschedule(_oldtime, _newtime, options) {
|
|
93
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _oldtime);
|
|
94
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _newtime);
|
|
95
|
+
return this.callContract(FUNCTIONS.RESCHEDULE, _oldtime, _newtime, options);
|
|
96
|
+
}
|
|
97
|
+
async unschedule(_time, options) {
|
|
98
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _time);
|
|
99
|
+
return this.callContract(FUNCTIONS.UNSCHEDULE, _time, options);
|
|
100
|
+
}
|
|
101
|
+
async createResolution(_time, _votes, _ipfslink, options) {
|
|
102
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _time);
|
|
103
|
+
await this.validateInput(index_1.DATATYPES.BOOLEAN, _votes);
|
|
104
|
+
await this.validateInput(index_1.DATATYPES.STRING, _ipfslink);
|
|
105
|
+
return this.callContract(FUNCTIONS.CREATERESOLUTION, _time, _votes, _ipfslink, options);
|
|
106
|
+
}
|
|
107
|
+
async countVotes(_time, options) {
|
|
108
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _time);
|
|
109
|
+
return this.callContract(FUNCTIONS.COUNTVOTES, _time, options);
|
|
110
|
+
}
|
|
111
|
+
async payoutProrata(_time, _wallet, _token, _amount, options) {
|
|
112
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _time);
|
|
113
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _wallet);
|
|
114
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _token);
|
|
115
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _amount);
|
|
116
|
+
return this.callContract(FUNCTIONS.PAYOUTPRORATA, _time, _wallet, _token, _amount, options);
|
|
117
|
+
}
|
|
118
|
+
async payout(_time, _holder, _wallet, _token, _amount, options) {
|
|
119
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _time);
|
|
120
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _holder);
|
|
121
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _wallet);
|
|
122
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _token);
|
|
123
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _amount);
|
|
124
|
+
return this.callContract(FUNCTIONS.PAYOUT, _time, _holder, _wallet, _token, _amount, options);
|
|
125
|
+
}
|
|
126
|
+
async pause(options) {
|
|
127
|
+
return this.callContract(FUNCTIONS.PAUSE, options);
|
|
128
|
+
}
|
|
129
|
+
async unpause(options) {
|
|
130
|
+
return this.callContract(FUNCTIONS.UNPAUSE, options);
|
|
131
|
+
}
|
|
22
132
|
}
|
|
23
133
|
exports.default = Security;
|
|
@@ -69,6 +69,40 @@ const contractAddress = {
|
|
|
69
69
|
'VBINR': ''
|
|
70
70
|
},
|
|
71
71
|
},
|
|
72
|
+
80001: {
|
|
73
|
+
'Client': '0x8009B03BbaBD09B9C1EADCaBC7D27197AC251F44',
|
|
74
|
+
'Factory': '',
|
|
75
|
+
'Cash': '',
|
|
76
|
+
'Bond': '',
|
|
77
|
+
'Token': '',
|
|
78
|
+
'Oracle': '',
|
|
79
|
+
'Rates': '',
|
|
80
|
+
'Security': '0x2D76FE6DdC229a482eDeb6E86d12c733A05Af55b',
|
|
81
|
+
'SecuritiesFactory': '0xf1f349C2CBDA5BCAfD7F95b20C812b4A17c9333D',
|
|
82
|
+
'Vitta': '',
|
|
83
|
+
'Liquidity': '',
|
|
84
|
+
'Distribution': '',
|
|
85
|
+
'PrimaryIssuePoolFactory': '',
|
|
86
|
+
'BalancerPrimaryIssueManager': '',
|
|
87
|
+
'SecondaryIssuePoolFactory': '',
|
|
88
|
+
'BalancerSecondaryIssueManager': '',
|
|
89
|
+
'MarginTradingPoolFactory': '',
|
|
90
|
+
'BalancerMarginIssueManager': '',
|
|
91
|
+
'Custody': '0x27006b68b3594EF5Ae04C5457c24F0c7CF1E5553',
|
|
92
|
+
'Compound': '',
|
|
93
|
+
'CASH': {
|
|
94
|
+
'VCUSD': '',
|
|
95
|
+
'VCEUR': '',
|
|
96
|
+
'VCCHF': '',
|
|
97
|
+
'VCINR': ''
|
|
98
|
+
},
|
|
99
|
+
'BOND': {
|
|
100
|
+
'VBUSD': '',
|
|
101
|
+
'VBEUR': '',
|
|
102
|
+
'VCCHF': '',
|
|
103
|
+
'VBINR': ''
|
|
104
|
+
},
|
|
105
|
+
},
|
|
72
106
|
137: {
|
|
73
107
|
'Client': '0x2C5718206b37b8744784ce44f374DE13dd7BC2d1',
|
|
74
108
|
'Factory': '',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verified-network/verified-sdk",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.9",
|
|
4
4
|
"description": "An SDK to develop applications on the Verified Network",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,8 +31,15 @@
|
|
|
31
31
|
"greet": "./bin/index.bin.js"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
+
"@biconomy/account": "^3.1.1",
|
|
35
|
+
"@biconomy/bundler": "^3.1.1",
|
|
36
|
+
"@biconomy/common": "^3.1.1",
|
|
37
|
+
"@biconomy/core-types": "^3.1.1",
|
|
38
|
+
"@biconomy/modules": "^3.1.1",
|
|
39
|
+
"@biconomy/paymaster": "^3.1.1",
|
|
34
40
|
"ethereumjs-tx": "^2.1.2",
|
|
35
|
-
"ethers": "^5.
|
|
41
|
+
"ethers": "^5.7.2",
|
|
42
|
+
"web3": "^4.2.2"
|
|
36
43
|
},
|
|
37
44
|
"devDependencies": {
|
|
38
45
|
"dotenv": "^10.0.0",
|