@verified-network/verified-sdk 2.2.8 → 2.3.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.
@@ -11,22 +11,21 @@ export default class Custody extends VerifiedContract {
11
11
  chainId: number;
12
12
  functionName: string;
13
13
  }>;
14
- createVault(_creator: string, _id: string, options?: Options): any;
15
- resetPin(_creator: string, _id: string, _new: string, options?: Options): any;
14
+ createVault(_creator: string, options?: Options): any;
16
15
  getVaults(): any;
17
- transferVault(_creator: string, _id: string, _transferee: string, options?: Options): any;
18
- getCreator(_creator: string, _pin: string, options?: Options): any;
19
- addParticipant(_creator: string, _id: string, _participant: string, _shard: string, options?: Options): any;
20
- removeParticipant(_creator: string, _id: string, _participant: string, options?: Options): any;
21
- confirmParticipant(_creator: string, _id: string, _participant: string, _pin: string, _confirmation: string, options?: Options): any;
22
- defineQuorum(_creator: string, _id: string, _minParticipants: string, options?: Options): any;
23
- getQuorum(_creator: string, _id: string, options?: Options): any;
24
- promptSignatures(_creator: string, _id: string, options?: Options): any;
25
- signTransaction(_creator: string, _id: string, _participant: string, _tx: string, _pin: string, options?: Options): any;
26
- checkQuorum(_creator: string, _id: string, _participant: string, _txid: string, options?: Options): any;
27
- getShards(_creator: string, _id: string, _txid: string, options?: Options): any;
28
- snapshotBalance(_creator: string, _id: string, _token: string, options?: Options): any;
29
- calculateAverageBalance(_creator: string, _id: string, _token: string, _fromTime: string, _toTime: string, options?: Options): any;
16
+ transferVault(_creator: string, _transferee: string, options?: Options): any;
17
+ addParticipant(_creator: string, _participant: string, _shard: string, options?: Options): any;
18
+ removeParticipant(_creator: string, _participant: string, options?: Options): any;
19
+ confirmParticipant(_creator: string, _participant: string, _confirmation: string, options?: Options): any;
20
+ defineQuorum(_creator: string, _minParticipants: string, options?: Options): any;
21
+ getQuorum(_creator: string, options?: Options): any;
22
+ promptSignatures(_creator: string, options?: Options): any;
23
+ signTransaction(_creator: string, _participant: string, _tx: string, options?: Options): any;
24
+ checkQuorum(_creator: string, _txid: string, options?: Options): any;
25
+ getShards(_creator: string, _txid: string, options?: Options): any;
26
+ cleanTx(_creator: string, _txid: string, options?: Options): any;
27
+ snapshotBalance(_creator: string, _token: string, options?: Options): any;
28
+ calculateAverageBalance(_creator: string, _token: string, _fromTime: string, _toTime: string, options?: Options): any;
30
29
  collectCustodyFee(_token: string, options?: Options): any;
31
30
  setDistributor(_nominee: string, options?: Options): any;
32
31
  setCustodyFee(_fee: string, options?: Options): any;
@@ -28,6 +28,7 @@ var FUNCTIONS;
28
28
  FUNCTIONS["COLLECTCUSTODYFEE"] = "collectCustodyFee";
29
29
  FUNCTIONS["SETDISTRIBUTOR"] = "setDistributor";
30
30
  FUNCTIONS["SETCUSTODYFEE"] = "setCustodyFee";
31
+ FUNCTIONS["CLEANTX"] = "cleanTx";
31
32
  })(FUNCTIONS || (FUNCTIONS = {}));
32
33
  class Custody extends index_1.VerifiedContract {
33
34
  constructor(signer, contractNetworkAddress) {
@@ -38,102 +39,80 @@ class Custody extends index_1.VerifiedContract {
38
39
  async _getMeeQuote(paymentTokenAddress, functionName, args, apiKey, rpcUrl) {
39
40
  return await this.getQuote(paymentTokenAddress, functionName, args, rpcUrl, apiKey);
40
41
  }
41
- async createVault(_creator, _id, options) {
42
+ async createVault(_creator, options) {
42
43
  await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
43
- await this.validateInput(index_1.DATATYPES.STRING, _id);
44
- return this.callContract(FUNCTIONS.CREATEVAULT, _creator, _id, options);
45
- }
46
- async resetPin(_creator, _id, _new, options) {
47
- await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
48
- await this.validateInput(index_1.DATATYPES.STRING, _id);
49
- await this.validateInput(index_1.DATATYPES.STRING, _new);
50
- return this.callContract(FUNCTIONS.RESETPIN, _creator, _id, _new, options);
44
+ return this.callContract(FUNCTIONS.CREATEVAULT, _creator, options);
51
45
  }
52
46
  async getVaults() {
53
47
  return this.callContract(FUNCTIONS.GETVAULTS);
54
48
  }
55
- async transferVault(_creator, _id, _transferee, options) {
49
+ async transferVault(_creator, _transferee, options) {
56
50
  await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
57
- await this.validateInput(index_1.DATATYPES.STRING, _id);
58
51
  await this.validateInput(index_1.DATATYPES.ADDRESS, _transferee);
59
- return this.callContract(FUNCTIONS.TRANSFERVAULT, _creator, _id, _transferee, options);
60
- }
61
- async getCreator(_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);
52
+ return this.callContract(FUNCTIONS.TRANSFERVAULT, _creator, _transferee, options);
65
53
  }
66
- async addParticipant(_creator, _id, _participant, _shard, options) {
54
+ async addParticipant(_creator, _participant, _shard, options) {
67
55
  await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
68
- await this.validateInput(index_1.DATATYPES.STRING, _id);
69
56
  await this.validateInput(index_1.DATATYPES.BYTE32, _participant);
70
57
  await this.validateInput(index_1.DATATYPES.STRING, _shard);
71
- return this.callContract(FUNCTIONS.ADDPARTICIPANT, _creator, _id, _participant, _shard, options);
58
+ return this.callContract(FUNCTIONS.ADDPARTICIPANT, _creator, _participant, _shard, options);
72
59
  }
73
- async removeParticipant(_creator, _id, _participant, options) {
60
+ async removeParticipant(_creator, _participant, options) {
74
61
  await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
75
- await this.validateInput(index_1.DATATYPES.STRING, _id);
76
62
  await this.validateInput(index_1.DATATYPES.BYTE32, _participant);
77
- return this.callContract(FUNCTIONS.REMOVEPARTICIPANT, _creator, _id, _participant, options);
63
+ return this.callContract(FUNCTIONS.REMOVEPARTICIPANT, _creator, _participant, options);
78
64
  }
79
- async confirmParticipant(_creator, _id, _participant, _pin, _confirmation, options) {
65
+ async confirmParticipant(_creator, _participant, _confirmation, options) {
80
66
  await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
81
- await this.validateInput(index_1.DATATYPES.STRING, _id);
82
67
  await this.validateInput(index_1.DATATYPES.BYTE32, _participant);
83
- await this.validateInput(index_1.DATATYPES.STRING, _pin);
84
68
  await this.validateInput(index_1.DATATYPES.BOOLEAN, _confirmation);
85
- return this.callContract(FUNCTIONS.CONFIRMPARTICIPANT, _creator, _id, _participant, _pin, _confirmation, options);
69
+ return this.callContract(FUNCTIONS.CONFIRMPARTICIPANT, _creator, _participant, _confirmation, options);
86
70
  }
87
- async defineQuorum(_creator, _id, _minParticipants, options) {
71
+ async defineQuorum(_creator, _minParticipants, options) {
88
72
  await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
89
- await this.validateInput(index_1.DATATYPES.STRING, _id);
90
73
  await this.validateInput(index_1.DATATYPES.NUMBER, _minParticipants);
91
- return this.callContract(FUNCTIONS.DEFINEQUORUM, _creator, _id, _minParticipants, options);
74
+ return this.callContract(FUNCTIONS.DEFINEQUORUM, _creator, _minParticipants, options);
92
75
  }
93
- async getQuorum(_creator, _id, options) {
76
+ async getQuorum(_creator, options) {
94
77
  await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
95
- await this.validateInput(index_1.DATATYPES.STRING, _id);
96
- return this.callContract(FUNCTIONS.GETQUORUM, _creator, _id, options);
78
+ return this.callContract(FUNCTIONS.GETQUORUM, _creator, options);
97
79
  }
98
- async promptSignatures(_creator, _id, options) {
80
+ async promptSignatures(_creator, options) {
99
81
  await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
100
- await this.validateInput(index_1.DATATYPES.STRING, _id);
101
- return this.callContract(FUNCTIONS.PROMPTSIGNATURES, _creator, _id, options);
82
+ return this.callContract(FUNCTIONS.PROMPTSIGNATURES, _creator, options);
102
83
  }
103
- async signTransaction(_creator, _id, _participant, _tx, _pin, options) {
84
+ async signTransaction(_creator, _participant, _tx, options) {
104
85
  await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
105
- await this.validateInput(index_1.DATATYPES.STRING, _id);
106
86
  await this.validateInput(index_1.DATATYPES.BYTE32, _participant);
107
87
  await this.validateInput(index_1.DATATYPES.STRING, _tx);
108
- await this.validateInput(index_1.DATATYPES.STRING, _pin);
109
- return this.callContract(FUNCTIONS.SIGNTRANSACTION, _creator, _id, _participant, _tx, _pin, options);
88
+ return this.callContract(FUNCTIONS.SIGNTRANSACTION, _creator, _participant, _tx, options);
110
89
  }
111
- async checkQuorum(_creator, _id, _participant, _txid, options) {
90
+ async checkQuorum(_creator, _txid, options) {
91
+ await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
92
+ await this.validateInput(index_1.DATATYPES.STRING, _txid);
93
+ return this.callContract(FUNCTIONS.CHECKQUORUM, _creator, _txid, options);
94
+ }
95
+ async getShards(_creator, _txid, options) {
112
96
  await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
113
- await this.validateInput(index_1.DATATYPES.STRING, _id);
114
- await this.validateInput(index_1.DATATYPES.BYTE32, _participant);
115
97
  await this.validateInput(index_1.DATATYPES.STRING, _txid);
116
- return this.callContract(FUNCTIONS.CHECKQUORUM, _creator, _id, _participant, _txid, options);
98
+ return this.callContract(FUNCTIONS.GETSHARDS, _creator, _txid, options);
117
99
  }
118
- async getShards(_creator, _id, _txid, options) {
100
+ async cleanTx(_creator, _txid, options) {
119
101
  await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
120
- await this.validateInput(index_1.DATATYPES.STRING, _id);
121
102
  await this.validateInput(index_1.DATATYPES.STRING, _txid);
122
- return this.callContract(FUNCTIONS.GETSHARDS, _creator, _id, _txid, options);
103
+ return this.callContract(FUNCTIONS.CLEANTX, _creator, _txid, options);
123
104
  }
124
- async snapshotBalance(_creator, _id, _token, options) {
105
+ async snapshotBalance(_creator, _token, options) {
125
106
  await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
126
- await this.validateInput(index_1.DATATYPES.STRING, _id);
127
107
  await this.validateInput(index_1.DATATYPES.ADDRESS, _token);
128
- return this.callContract(FUNCTIONS.SNAPSHOT, _creator, _id, _token, options);
108
+ return this.callContract(FUNCTIONS.SNAPSHOT, _creator, _token, options);
129
109
  }
130
- async calculateAverageBalance(_creator, _id, _token, _fromTime, _toTime, options) {
110
+ async calculateAverageBalance(_creator, _token, _fromTime, _toTime, options) {
131
111
  await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
132
- await this.validateInput(index_1.DATATYPES.STRING, _id);
133
112
  await this.validateInput(index_1.DATATYPES.ADDRESS, _token);
134
113
  await this.validateInput(index_1.DATATYPES.NUMBER, _fromTime);
135
114
  await this.validateInput(index_1.DATATYPES.NUMBER, _toTime);
136
- return this.callContract(FUNCTIONS.CALCULATEAVERAGEBALANCE, _creator, _id, _token, _fromTime, _toTime, options);
115
+ return this.callContract(FUNCTIONS.CALCULATEAVERAGEBALANCE, _creator, _token, _fromTime, _toTime, options);
137
116
  }
138
117
  async collectCustodyFee(_token, options) {
139
118
  await this.validateInput(index_1.DATATYPES.ADDRESS, _token);
@@ -311,12 +311,12 @@ const contractAddress = {
311
311
  },
312
312
  11155111: {
313
313
  'Client': '0xB72629Bb4d031F1C755AFfA123AAA28E81EfdA9A',
314
- 'Factory': '0x358643DA31fdE65b15839EeC0C72f3dacD07EBeD',
315
- 'Cash': '0xA565F2e350dC3972c3C1779DE1d9EB4EF45baaBA',
316
- 'Bond': '0xA357BaE12300992087560fd62c0638A91cD453C2',
317
- 'Token': '0x58D7648C9d55567b5D1C37A3176D487539e9B8Be',
318
- 'Oracle': '0xF6ebB33E758eC36A2D3065F4633131DFF8307A07',
319
- 'Rates': '0xfC63cBB9aC6F6de3cAfbb1df7430339f3989fe14',
314
+ 'Factory': '0x8B7e7F4f5E31e6D21df294b81bF0937f12ce46C6',
315
+ 'Cash': '0xC5908dC7FBAe5c89795a2b6125db91a2B63b8cDb',
316
+ 'Bond': '0x7E006149F41211a557119ffd7d85Dc3c1E9738A0',
317
+ 'Token': '0xB4386154a83411921c2D8CC405F26530b071f56C',
318
+ 'Oracle': '0x199C6e01B61C2C29D8fCbaDb4AefBC4318aF15A2',
319
+ 'Rates': '0xFF63C682d8904Fd3780b5c6b94737d32C7D5BB66',
320
320
  'Security': '0xa1c552a33FB9e391d0F50A6407385c55cd22d596',
321
321
  'SecuritiesFactory': '0x7CaB6AA90fD672F6ddBd0B92c0a5428b53ebA414',
322
322
  'Vitta': '0x87145164371Ad7851AD3B4D47C9820F95983d8EA',
@@ -328,19 +328,19 @@ const contractAddress = {
328
328
  'BalancerSecondaryIssueManager': '0xE3e3e9b8c0c292eD3756C7A1037322738de6B7FC',
329
329
  'MarginTradingPoolFactory': '0xB1ae3Fc5B16d3736bf0db20606fB9a10b435392c',
330
330
  'BalancerMarginIssueManager': '0xcC52ce78a8fF2198FBD37D85D1686E7C80604cd3',
331
- 'Custody': '0x1F97Bd2c4D3b42a87B225dd7990F4a13f1CF8760',
332
- 'Compound': '0x8c364b06741C9fE045E0e510A39BCbAf7445D8fD',
331
+ 'Custody': '0x3eDE98D53544249aB0e38211c16782A29D16dC40',
332
+ 'Compound': '',
333
333
  'CASH': {
334
- 'VCUSD': '0xFe55A419F0fc951d1924FB5eA456c94483BdDd82',
335
- 'VCEUR': '0xcdb1c23277C9C150E7D4201d854c558AAe986256',
336
- 'VCCHF': '0x666BE39Fb2D6965885DAA97422B286B7ec222488',
337
- 'VCINR': '0xeEd2B863F2Ac3BB4884701F0fD0F18f9bAD7819B'
334
+ 'VCUSD': '0x9947770931A0F4AC74941eaAE003991d2d487d83',
335
+ 'VCEUR': '0x196940848fECCaae04E555E3eD8481C6aA4D829C',
336
+ 'VCCHF': '0x3585Bc49dFad76850b8fB168bEF4cA70EA0A4838',
337
+ 'VCINR': '0x90cB7a153439021bFd6AD012325560A4E5224043'
338
338
  },
339
339
  'BOND': {
340
- 'VBUSD': '0xa8B77cF42e649Ae4BC3B5E2286b275E1A771054A',
341
- 'VBEUR': '0x860E90968FB712e391d14e32d2462CB7C9D158cb',
342
- 'VCCHF': '0x144Fb05846C4B1c2a85A92A918b29FAb4719a184',
343
- 'VBINR': '0x4C49fe7f77aF2818beb2F3E02fE85B8ACB8Df243'
340
+ 'VBUSD': '0x795746D83B9787F9f79dD41E80A311d70751D4eb',
341
+ 'VBEUR': '0x88200F79d4fC7Aec3581c5679002134D3a7cf6B8',
342
+ 'VBCHF': '0x69bcA5eE64aa9e25Fba2f7a02f55eE19dA22b15a',
343
+ 'VBINR': '0xc23B7f679a8aCB36E862d28Eb7c4d88a6F5dc451'
344
344
  },
345
345
  },
346
346
  'balancerVault': '0xBA12222222228d8Ba445958a75a0704d566BF2C8'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verified-network/verified-sdk",
3
- "version": "2.2.8",
3
+ "version": "2.3.0",
4
4
  "description": "An SDK to develop applications on the Verified Network",
5
5
  "repository": {
6
6
  "type": "git",