@verified-network/verified-sdk 2.1.3 → 2.1.5

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.
@@ -39,87 +39,87 @@ class Custody extends index_1.VerifiedContract {
39
39
  return await this.getQuote(paymentTokenAddress, functionName, args);
40
40
  }
41
41
  async createVault(_creator, _id, options) {
42
- await this.validateInput(index_1.DATATYPES.STRING, _creator);
42
+ await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
43
43
  await this.validateInput(index_1.DATATYPES.STRING, _id);
44
- return this.callContract(FUNCTIONS.CREATEVAULT, this.sanitiseInput(index_1.DATATYPES.BYTE32, _creator), _id, options);
44
+ return this.callContract(FUNCTIONS.CREATEVAULT, _creator, _id, options);
45
45
  }
46
46
  async resetPin(_creator, _id, _new, options) {
47
- await this.validateInput(index_1.DATATYPES.STRING, _creator);
47
+ await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
48
48
  await this.validateInput(index_1.DATATYPES.STRING, _id);
49
49
  await this.validateInput(index_1.DATATYPES.STRING, _new);
50
- return this.callContract(FUNCTIONS.RESETPIN, this.sanitiseInput(index_1.DATATYPES.BYTE32, _creator), _id, _new, options);
50
+ return this.callContract(FUNCTIONS.RESETPIN, _creator, _id, _new, options);
51
51
  }
52
52
  async getVaults() {
53
53
  return this.callContract(FUNCTIONS.GETVAULTS);
54
54
  }
55
55
  async transferVault(_creator, _id, _transferee, options) {
56
- await this.validateInput(index_1.DATATYPES.STRING, _creator);
56
+ await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
57
57
  await this.validateInput(index_1.DATATYPES.STRING, _id);
58
58
  await this.validateInput(index_1.DATATYPES.ADDRESS, _transferee);
59
- return this.callContract(FUNCTIONS.TRANSFERVAULT, this.sanitiseInput(index_1.DATATYPES.BYTE32, _creator), _id, _transferee, options);
59
+ return this.callContract(FUNCTIONS.TRANSFERVAULT, _creator, _id, _transferee, options);
60
60
  }
61
61
  async getCreator(_creator, _pin, options) {
62
- await this.validateInput(index_1.DATATYPES.STRING, _creator);
63
- await this.validateInput(index_1.DATATYPES.NUMBER, _pin);
64
- return this.callContract(FUNCTIONS.GETCREATOR, this.sanitiseInput(index_1.DATATYPES.BYTE32, _creator), _pin, options);
62
+ await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
63
+ await this.validateInput(index_1.DATATYPES.STRING, _pin);
64
+ return this.callContract(FUNCTIONS.GETCREATOR, _creator, _pin, options);
65
65
  }
66
66
  async addParticipant(_creator, _id, _participant, _shard, options) {
67
- await this.validateInput(index_1.DATATYPES.STRING, _creator);
67
+ await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
68
68
  await this.validateInput(index_1.DATATYPES.STRING, _id);
69
- await this.validateInput(index_1.DATATYPES.STRING, _participant);
69
+ await this.validateInput(index_1.DATATYPES.BYTE32, _participant);
70
70
  await this.validateInput(index_1.DATATYPES.STRING, _shard);
71
- return this.callContract(FUNCTIONS.ADDPARTICIPANT, this.sanitiseInput(index_1.DATATYPES.BYTE32, _creator), _id, this.sanitiseInput(index_1.DATATYPES.BYTE32, _participant), _shard, options);
71
+ return this.callContract(FUNCTIONS.ADDPARTICIPANT, _creator, _id, _participant, _shard, options);
72
72
  }
73
73
  async removeParticipant(_creator, _id, _participant, options) {
74
- await this.validateInput(index_1.DATATYPES.STRING, _creator);
74
+ await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
75
75
  await this.validateInput(index_1.DATATYPES.STRING, _id);
76
- await this.validateInput(index_1.DATATYPES.STRING, _participant);
77
- return this.callContract(FUNCTIONS.REMOVEPARTICIPANT, this.sanitiseInput(index_1.DATATYPES.BYTE32, _creator), _id, this.sanitiseInput(index_1.DATATYPES.BYTE32, _participant), options);
76
+ await this.validateInput(index_1.DATATYPES.BYTE32, _participant);
77
+ return this.callContract(FUNCTIONS.REMOVEPARTICIPANT, _creator, _id, _participant, options);
78
78
  }
79
79
  async confirmParticipant(_creator, _id, _participant, _pin, _confirmation, options) {
80
- await this.validateInput(index_1.DATATYPES.STRING, _creator);
80
+ await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
81
81
  await this.validateInput(index_1.DATATYPES.STRING, _id);
82
- await this.validateInput(index_1.DATATYPES.STRING, _participant);
82
+ await this.validateInput(index_1.DATATYPES.BYTE32, _participant);
83
83
  await this.validateInput(index_1.DATATYPES.STRING, _pin);
84
84
  await this.validateInput(index_1.DATATYPES.BOOLEAN, _confirmation);
85
- return this.callContract(FUNCTIONS.CONFIRMPARTICIPANT, this.sanitiseInput(index_1.DATATYPES.BYTE32, _creator), _id, this.sanitiseInput(index_1.DATATYPES.BYTE32, _participant), _pin, _confirmation, options);
85
+ return this.callContract(FUNCTIONS.CONFIRMPARTICIPANT, _creator, _id, _participant, _pin, _confirmation, options);
86
86
  }
87
87
  async defineQuorum(_creator, _id, _minParticipants, options) {
88
- await this.validateInput(index_1.DATATYPES.STRING, _creator);
88
+ await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
89
89
  await this.validateInput(index_1.DATATYPES.STRING, _id);
90
90
  await this.validateInput(index_1.DATATYPES.NUMBER, _minParticipants);
91
- return this.callContract(FUNCTIONS.DEFINEQUORUM, this.sanitiseInput(index_1.DATATYPES.BYTE32, _creator), _id, _minParticipants, options);
91
+ return this.callContract(FUNCTIONS.DEFINEQUORUM, _creator, _id, _minParticipants, options);
92
92
  }
93
93
  async getQuorum(_creator, _id, options) {
94
- await this.validateInput(index_1.DATATYPES.STRING, _creator);
94
+ await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
95
95
  await this.validateInput(index_1.DATATYPES.STRING, _id);
96
- return this.callContract(FUNCTIONS.GETQUORUM, this.sanitiseInput(index_1.DATATYPES.BYTE32, _creator), _id, options);
96
+ return this.callContract(FUNCTIONS.GETQUORUM, _creator, _id, options);
97
97
  }
98
98
  async promptSignatures(_creator, _id, options) {
99
- await this.validateInput(index_1.DATATYPES.STRING, _creator);
99
+ await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
100
100
  await this.validateInput(index_1.DATATYPES.STRING, _id);
101
- return this.callContract(FUNCTIONS.PROMPTSIGNATURES, this.sanitiseInput(index_1.DATATYPES.BYTE32, _creator), _id, options);
101
+ return this.callContract(FUNCTIONS.PROMPTSIGNATURES, _creator, _id, options);
102
102
  }
103
103
  async signTransaction(_creator, _id, _participant, _tx, _pin, options) {
104
- await this.validateInput(index_1.DATATYPES.STRING, _creator);
104
+ await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
105
105
  await this.validateInput(index_1.DATATYPES.STRING, _id);
106
- await this.validateInput(index_1.DATATYPES.STRING, _participant);
106
+ await this.validateInput(index_1.DATATYPES.BYTE32, _participant);
107
107
  await this.validateInput(index_1.DATATYPES.STRING, _tx);
108
108
  await this.validateInput(index_1.DATATYPES.STRING, _pin);
109
- return this.callContract(FUNCTIONS.SIGNTRANSACTION, this.sanitiseInput(index_1.DATATYPES.BYTE32, _creator), _id, this.sanitiseInput(index_1.DATATYPES.BYTE32, _participant), _tx, _pin, options);
109
+ return this.callContract(FUNCTIONS.SIGNTRANSACTION, _creator, _id, _participant, _tx, _pin, options);
110
110
  }
111
111
  async checkQuorum(_creator, _id, _participant, _txid, options) {
112
- await this.validateInput(index_1.DATATYPES.STRING, _creator);
112
+ await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
113
113
  await this.validateInput(index_1.DATATYPES.STRING, _id);
114
- await this.validateInput(index_1.DATATYPES.STRING, _participant);
114
+ await this.validateInput(index_1.DATATYPES.BYTE32, _participant);
115
115
  await this.validateInput(index_1.DATATYPES.STRING, _txid);
116
- return this.callContract(FUNCTIONS.CHECKQUORUM, this.sanitiseInput(index_1.DATATYPES.BYTE32, _creator), _id, this.sanitiseInput(index_1.DATATYPES.BYTE32, _participant), _txid, options);
116
+ return this.callContract(FUNCTIONS.CHECKQUORUM, _creator, _id, _participant, _txid, options);
117
117
  }
118
118
  async getShards(_creator, _id, _txid, options) {
119
- await this.validateInput(index_1.DATATYPES.STRING, _creator);
119
+ await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
120
120
  await this.validateInput(index_1.DATATYPES.STRING, _id);
121
121
  await this.validateInput(index_1.DATATYPES.STRING, _txid);
122
- return this.callContract(FUNCTIONS.GETSHARDS, this.sanitiseInput(index_1.DATATYPES.BYTE32, _creator), _id, _txid, options);
122
+ return this.callContract(FUNCTIONS.GETSHARDS, _creator, _id, _txid, options);
123
123
  }
124
124
  async snapshotBalance(_creator, _id, _token, options) {
125
125
  await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
@@ -214,17 +214,17 @@ const contractAddress = {
214
214
  'Token': '',
215
215
  'Oracle': '',
216
216
  'Rates': '',
217
- 'Security': '',
218
- 'SecuritiesFactory': '',
217
+ 'Security': '0x23A5d264b918c7711F8a067A44e158cD7b9b5A57',
218
+ 'SecuritiesFactory': '0x8Fe7C2bbb9285Ad54f0701A8a73B9f9a91c1f780',
219
219
  'Vitta': '0xF387D694B2ac3847F118778f16fdC11B58c0a859',
220
220
  'Liquidity': '0x5d85E0aDBa6E9E388D0641D7C8d925756316e99D',
221
221
  'Distribution': '0x3C0Da71292F095182b06e2f3c1527E2DF6aEa583',
222
222
  'PrimaryIssuePoolFactory': '0x73465Be532Aa390728D3Bb75D0b16F936Cd56bBE',
223
223
  'BalancerPrimaryIssueManager': '0xa4b9F21B92A7630a628C2B9EFbA1c844fCE7306E',
224
224
  'SecondaryIssuePoolFactory': '0xFd2Ef4b1c0AA3cd9A52264a23d244c21ba8572C6',
225
- 'BalancerSecondaryIssueManager': '',
225
+ 'BalancerSecondaryIssueManager': '0x775979123aD2e6DA3074bB38116430FEAE26974f',
226
226
  'MarginTradingPoolFactory': '0xb864e62CFebd368F4491Fe52A4Fcc22c1c525F1C',
227
- 'BalancerMarginIssueManager': '',
227
+ 'BalancerMarginIssueManager': '0x099EC82868A1636C9DE6C7E7014692382B3a793E',
228
228
  'Custody': '0xE6240CD9918772b7363c8CFd0C1D922A30c0c639',
229
229
  'Compound': '',
230
230
  'CASH': {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verified-network/verified-sdk",
3
- "version": "2.1.3",
3
+ "version": "2.1.5",
4
4
  "description": "An SDK to develop applications on the Verified Network",
5
5
  "repository": {
6
6
  "type": "git",
package/tsconfig.json CHANGED
@@ -6,7 +6,7 @@
6
6
  // "incremental": true, /* Enable incremental compilation */
7
7
  "target": "ES2017", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
8
8
  "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
9
- "lib": ["es5","DOM"], /* Specify library files to be included in the compilation. */
9
+ "lib": ["es2015","DOM"], /* Specify library files to be included in the compilation. */
10
10
  //"allowJs": true, /* Allow javascript files to be compiled. */
11
11
  // "checkJs": true, /* Report errors in .js files. */
12
12
  // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */