@dripfi/drip-sdk 1.3.1 → 1.3.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.
@@ -1,4 +1,385 @@
1
1
  [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "internalType": "contract IERC20",
6
+ "name": "token",
7
+ "type": "address"
8
+ },
9
+ {
10
+ "internalType": "address",
11
+ "name": "admin",
12
+ "type": "address"
13
+ },
14
+ {
15
+ "internalType": "address",
16
+ "name": "oracle",
17
+ "type": "address"
18
+ },
19
+ {
20
+ "internalType": "address",
21
+ "name": "beneficiaryAddress_",
22
+ "type": "address"
23
+ },
24
+ {
25
+ "internalType": "uint256",
26
+ "name": "beneficiaryShare_",
27
+ "type": "uint256"
28
+ }
29
+ ],
30
+ "stateMutability": "nonpayable",
31
+ "type": "constructor"
32
+ },
33
+ {
34
+ "inputs": [],
35
+ "name": "AccessControlBadConfirmation",
36
+ "type": "error"
37
+ },
38
+ {
39
+ "inputs": [
40
+ {
41
+ "internalType": "address",
42
+ "name": "account",
43
+ "type": "address"
44
+ },
45
+ {
46
+ "internalType": "bytes32",
47
+ "name": "neededRole",
48
+ "type": "bytes32"
49
+ }
50
+ ],
51
+ "name": "AccessControlUnauthorizedAccount",
52
+ "type": "error"
53
+ },
54
+ {
55
+ "inputs": [
56
+ {
57
+ "internalType": "address",
58
+ "name": "target",
59
+ "type": "address"
60
+ }
61
+ ],
62
+ "name": "AddressEmptyCode",
63
+ "type": "error"
64
+ },
65
+ {
66
+ "inputs": [
67
+ {
68
+ "internalType": "address",
69
+ "name": "account",
70
+ "type": "address"
71
+ }
72
+ ],
73
+ "name": "AddressInsufficientBalance",
74
+ "type": "error"
75
+ },
76
+ {
77
+ "inputs": [],
78
+ "name": "ECDSAInvalidSignature",
79
+ "type": "error"
80
+ },
81
+ {
82
+ "inputs": [
83
+ {
84
+ "internalType": "uint256",
85
+ "name": "length",
86
+ "type": "uint256"
87
+ }
88
+ ],
89
+ "name": "ECDSAInvalidSignatureLength",
90
+ "type": "error"
91
+ },
92
+ {
93
+ "inputs": [
94
+ {
95
+ "internalType": "bytes32",
96
+ "name": "s",
97
+ "type": "bytes32"
98
+ }
99
+ ],
100
+ "name": "ECDSAInvalidSignatureS",
101
+ "type": "error"
102
+ },
103
+ {
104
+ "inputs": [],
105
+ "name": "FailedInnerCall",
106
+ "type": "error"
107
+ },
108
+ {
109
+ "inputs": [
110
+ {
111
+ "internalType": "address",
112
+ "name": "token",
113
+ "type": "address"
114
+ }
115
+ ],
116
+ "name": "SafeERC20FailedOperation",
117
+ "type": "error"
118
+ },
119
+ {
120
+ "anonymous": false,
121
+ "inputs": [
122
+ {
123
+ "indexed": true,
124
+ "internalType": "address",
125
+ "name": "sender",
126
+ "type": "address"
127
+ },
128
+ {
129
+ "indexed": true,
130
+ "internalType": "address",
131
+ "name": "rewardBeneficiary",
132
+ "type": "address"
133
+ },
134
+ {
135
+ "indexed": false,
136
+ "internalType": "uint256",
137
+ "name": "recycledAmount",
138
+ "type": "uint256"
139
+ },
140
+ {
141
+ "indexed": false,
142
+ "internalType": "uint256",
143
+ "name": "rewardAmount",
144
+ "type": "uint256"
145
+ }
146
+ ],
147
+ "name": "Recycled",
148
+ "type": "event"
149
+ },
150
+ {
151
+ "anonymous": false,
152
+ "inputs": [
153
+ {
154
+ "indexed": true,
155
+ "internalType": "bytes32",
156
+ "name": "role",
157
+ "type": "bytes32"
158
+ },
159
+ {
160
+ "indexed": true,
161
+ "internalType": "bytes32",
162
+ "name": "previousAdminRole",
163
+ "type": "bytes32"
164
+ },
165
+ {
166
+ "indexed": true,
167
+ "internalType": "bytes32",
168
+ "name": "newAdminRole",
169
+ "type": "bytes32"
170
+ }
171
+ ],
172
+ "name": "RoleAdminChanged",
173
+ "type": "event"
174
+ },
175
+ {
176
+ "anonymous": false,
177
+ "inputs": [
178
+ {
179
+ "indexed": true,
180
+ "internalType": "bytes32",
181
+ "name": "role",
182
+ "type": "bytes32"
183
+ },
184
+ {
185
+ "indexed": true,
186
+ "internalType": "address",
187
+ "name": "account",
188
+ "type": "address"
189
+ },
190
+ {
191
+ "indexed": true,
192
+ "internalType": "address",
193
+ "name": "sender",
194
+ "type": "address"
195
+ }
196
+ ],
197
+ "name": "RoleGranted",
198
+ "type": "event"
199
+ },
200
+ {
201
+ "anonymous": false,
202
+ "inputs": [
203
+ {
204
+ "indexed": true,
205
+ "internalType": "bytes32",
206
+ "name": "role",
207
+ "type": "bytes32"
208
+ },
209
+ {
210
+ "indexed": true,
211
+ "internalType": "address",
212
+ "name": "account",
213
+ "type": "address"
214
+ },
215
+ {
216
+ "indexed": true,
217
+ "internalType": "address",
218
+ "name": "sender",
219
+ "type": "address"
220
+ }
221
+ ],
222
+ "name": "RoleRevoked",
223
+ "type": "event"
224
+ },
225
+ {
226
+ "inputs": [],
227
+ "name": "ADMIN_ROLE",
228
+ "outputs": [
229
+ {
230
+ "internalType": "bytes32",
231
+ "name": "",
232
+ "type": "bytes32"
233
+ }
234
+ ],
235
+ "stateMutability": "view",
236
+ "type": "function"
237
+ },
238
+ {
239
+ "inputs": [],
240
+ "name": "BENEFICIARY_SHARE_PRECISION",
241
+ "outputs": [
242
+ {
243
+ "internalType": "uint16",
244
+ "name": "",
245
+ "type": "uint16"
246
+ }
247
+ ],
248
+ "stateMutability": "view",
249
+ "type": "function"
250
+ },
251
+ {
252
+ "inputs": [],
253
+ "name": "DEFAULT_ADMIN_ROLE",
254
+ "outputs": [
255
+ {
256
+ "internalType": "bytes32",
257
+ "name": "",
258
+ "type": "bytes32"
259
+ }
260
+ ],
261
+ "stateMutability": "view",
262
+ "type": "function"
263
+ },
264
+ {
265
+ "inputs": [],
266
+ "name": "ORACLE_ROLE",
267
+ "outputs": [
268
+ {
269
+ "internalType": "bytes32",
270
+ "name": "",
271
+ "type": "bytes32"
272
+ }
273
+ ],
274
+ "stateMutability": "view",
275
+ "type": "function"
276
+ },
277
+ {
278
+ "inputs": [
279
+ {
280
+ "internalType": "address",
281
+ "name": "",
282
+ "type": "address"
283
+ }
284
+ ],
285
+ "name": "addressToReward",
286
+ "outputs": [
287
+ {
288
+ "internalType": "uint256",
289
+ "name": "",
290
+ "type": "uint256"
291
+ }
292
+ ],
293
+ "stateMutability": "view",
294
+ "type": "function"
295
+ },
296
+ {
297
+ "inputs": [],
298
+ "name": "beneficiaryAddress",
299
+ "outputs": [
300
+ {
301
+ "internalType": "address",
302
+ "name": "",
303
+ "type": "address"
304
+ }
305
+ ],
306
+ "stateMutability": "view",
307
+ "type": "function"
308
+ },
309
+ {
310
+ "inputs": [],
311
+ "name": "beneficiaryShare",
312
+ "outputs": [
313
+ {
314
+ "internalType": "uint256",
315
+ "name": "",
316
+ "type": "uint256"
317
+ }
318
+ ],
319
+ "stateMutability": "view",
320
+ "type": "function"
321
+ },
322
+ {
323
+ "inputs": [
324
+ {
325
+ "internalType": "bytes32",
326
+ "name": "role",
327
+ "type": "bytes32"
328
+ }
329
+ ],
330
+ "name": "getRoleAdmin",
331
+ "outputs": [
332
+ {
333
+ "internalType": "bytes32",
334
+ "name": "",
335
+ "type": "bytes32"
336
+ }
337
+ ],
338
+ "stateMutability": "view",
339
+ "type": "function"
340
+ },
341
+ {
342
+ "inputs": [
343
+ {
344
+ "internalType": "bytes32",
345
+ "name": "role",
346
+ "type": "bytes32"
347
+ },
348
+ {
349
+ "internalType": "address",
350
+ "name": "account",
351
+ "type": "address"
352
+ }
353
+ ],
354
+ "name": "grantRole",
355
+ "outputs": [],
356
+ "stateMutability": "nonpayable",
357
+ "type": "function"
358
+ },
359
+ {
360
+ "inputs": [
361
+ {
362
+ "internalType": "bytes32",
363
+ "name": "role",
364
+ "type": "bytes32"
365
+ },
366
+ {
367
+ "internalType": "address",
368
+ "name": "account",
369
+ "type": "address"
370
+ }
371
+ ],
372
+ "name": "hasRole",
373
+ "outputs": [
374
+ {
375
+ "internalType": "bool",
376
+ "name": "",
377
+ "type": "bool"
378
+ }
379
+ ],
380
+ "stateMutability": "view",
381
+ "type": "function"
382
+ },
2
383
  {
3
384
  "inputs": [
4
385
  {
@@ -37,5 +418,143 @@
37
418
  ],
38
419
  "stateMutability": "nonpayable",
39
420
  "type": "function"
421
+ },
422
+ {
423
+ "inputs": [],
424
+ "name": "recycledToken",
425
+ "outputs": [
426
+ {
427
+ "internalType": "contract IERC20",
428
+ "name": "",
429
+ "type": "address"
430
+ }
431
+ ],
432
+ "stateMutability": "view",
433
+ "type": "function"
434
+ },
435
+ {
436
+ "inputs": [
437
+ {
438
+ "internalType": "bytes32",
439
+ "name": "role",
440
+ "type": "bytes32"
441
+ },
442
+ {
443
+ "internalType": "address",
444
+ "name": "callerConfirmation",
445
+ "type": "address"
446
+ }
447
+ ],
448
+ "name": "renounceRole",
449
+ "outputs": [],
450
+ "stateMutability": "nonpayable",
451
+ "type": "function"
452
+ },
453
+ {
454
+ "inputs": [
455
+ {
456
+ "internalType": "bytes32",
457
+ "name": "role",
458
+ "type": "bytes32"
459
+ },
460
+ {
461
+ "internalType": "address",
462
+ "name": "account",
463
+ "type": "address"
464
+ }
465
+ ],
466
+ "name": "revokeRole",
467
+ "outputs": [],
468
+ "stateMutability": "nonpayable",
469
+ "type": "function"
470
+ },
471
+ {
472
+ "inputs": [],
473
+ "name": "rewardDecimals",
474
+ "outputs": [
475
+ {
476
+ "internalType": "uint8",
477
+ "name": "",
478
+ "type": "uint8"
479
+ }
480
+ ],
481
+ "stateMutability": "view",
482
+ "type": "function"
483
+ },
484
+ {
485
+ "inputs": [
486
+ {
487
+ "internalType": "address",
488
+ "name": "beneficiaryAddress_",
489
+ "type": "address"
490
+ }
491
+ ],
492
+ "name": "setBeneficiaryAddress",
493
+ "outputs": [],
494
+ "stateMutability": "nonpayable",
495
+ "type": "function"
496
+ },
497
+ {
498
+ "inputs": [
499
+ {
500
+ "internalType": "uint256",
501
+ "name": "beneficiaryShare_",
502
+ "type": "uint256"
503
+ }
504
+ ],
505
+ "name": "setBeneficiaryShare",
506
+ "outputs": [],
507
+ "stateMutability": "nonpayable",
508
+ "type": "function"
509
+ },
510
+ {
511
+ "inputs": [
512
+ {
513
+ "internalType": "bytes4",
514
+ "name": "interfaceId",
515
+ "type": "bytes4"
516
+ }
517
+ ],
518
+ "name": "supportsInterface",
519
+ "outputs": [
520
+ {
521
+ "internalType": "bool",
522
+ "name": "",
523
+ "type": "bool"
524
+ }
525
+ ],
526
+ "stateMutability": "view",
527
+ "type": "function"
528
+ },
529
+ {
530
+ "inputs": [
531
+ {
532
+ "internalType": "uint256",
533
+ "name": "amount",
534
+ "type": "uint256"
535
+ }
536
+ ],
537
+ "name": "withdrawETH",
538
+ "outputs": [],
539
+ "stateMutability": "nonpayable",
540
+ "type": "function"
541
+ },
542
+ {
543
+ "inputs": [
544
+ {
545
+ "internalType": "contract IERC20",
546
+ "name": "token",
547
+ "type": "address"
548
+ },
549
+ {
550
+ "internalType": "uint256",
551
+ "name": "amount",
552
+ "type": "uint256"
553
+ }
554
+ ],
555
+ "name": "withdrawToken",
556
+ "outputs": [],
557
+ "stateMutability": "nonpayable",
558
+ "type": "function"
40
559
  }
41
560
  ]
@@ -1,25 +1 @@
1
- [
2
- {
3
- "constant": true,
4
- "inputs": [],
5
- "name": "decimals",
6
- "outputs": [
7
- {
8
- "name": "",
9
- "type": "uint8"
10
- }
11
- ],
12
- "payable": false,
13
- "stateMutability": "view",
14
- "type": "function"
15
- },
16
- {
17
- "constant": false,
18
- "inputs": [],
19
- "name": "deposit",
20
- "outputs": [],
21
- "payable": true,
22
- "stateMutability": "payable",
23
- "type": "function"
24
- }
25
- ]
1
+ [{ "constant": true, "inputs": [], "name": "name", "outputs": [{ "name": "", "type": "string" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "name": "guy", "type": "address" }, { "name": "wad", "type": "uint256" }], "name": "approve", "outputs": [{ "name": "", "type": "bool" }], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "totalSupply", "outputs": [{ "name": "", "type": "uint256" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "name": "src", "type": "address" }, { "name": "dst", "type": "address" }, { "name": "wad", "type": "uint256" }], "name": "transferFrom", "outputs": [{ "name": "", "type": "bool" }], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [{ "name": "wad", "type": "uint256" }], "name": "withdraw", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "decimals", "outputs": [{ "name": "", "type": "uint8" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [{ "name": "", "type": "address" }], "name": "balanceOf", "outputs": [{ "name": "", "type": "uint256" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "symbol", "outputs": [{ "name": "", "type": "string" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "name": "dst", "type": "address" }, { "name": "wad", "type": "uint256" }], "name": "transfer", "outputs": [{ "name": "", "type": "bool" }], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [], "name": "deposit", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function" }, { "constant": true, "inputs": [{ "name": "", "type": "address" }, { "name": "", "type": "address" }], "name": "allowance", "outputs": [{ "name": "", "type": "uint256" }], "payable": false, "stateMutability": "view", "type": "function" }, { "payable": true, "stateMutability": "payable", "type": "fallback" }, { "anonymous": false, "inputs": [{ "indexed": true, "name": "src", "type": "address" }, { "indexed": true, "name": "guy", "type": "address" }, { "indexed": false, "name": "wad", "type": "uint256" }], "name": "Approval", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "name": "src", "type": "address" }, { "indexed": true, "name": "dst", "type": "address" }, { "indexed": false, "name": "wad", "type": "uint256" }], "name": "Transfer", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "name": "dst", "type": "address" }, { "indexed": false, "name": "wad", "type": "uint256" }], "name": "Deposit", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "name": "src", "type": "address" }, { "indexed": false, "name": "wad", "type": "uint256" }], "name": "Withdrawal", "type": "event" }]
package/dist/index.d.ts CHANGED
@@ -14,9 +14,4 @@ import { Chain } from './DripConfig';
14
14
  import MyPerqData from './types/MyPerqData';
15
15
  import ELoyaltyCardTier from './types/ELoyaltyCardTier';
16
16
  import BeanEntry from './types/BeanEntry';
17
- import DRIP_SWAP_AND_RECYCLER_ABI from './contracts/abi/DripSwapAndRecyclerAbi.json';
18
- import WETH_TOKEN_ABI from './contracts/abi/WethTokenAbi.json';
19
- import DRIP_TOKEN_ABI from './contracts/abi/DripTokenAbi.json';
20
- import TOKEN_RECYCLER_ABI from './contracts/abi/TokenRecyclerAbi.json';
21
- import PERQ_VESTING_ABI from './contracts/abi/PerqVestingAbi.json';
22
- export { DRIP_SWAP_AND_RECYCLER_ABI, WETH_TOKEN_ABI, DRIP_TOKEN_ABI, TOKEN_RECYCLER_ABI, PERQ_VESTING_ABI, Vault, VaultReward, DripSdk, UserVaultBalance, UserBalance, VaultStats, NFTBoost, Strategy, StretchGoal, SwapInfo, VaultDepositToken, VaultType, MyPerqData, Chain, ELoyaltyCardTier, BeanEntry };
17
+ export { Vault, VaultReward, DripSdk, UserVaultBalance, UserBalance, VaultStats, NFTBoost, Strategy, StretchGoal, SwapInfo, VaultDepositToken, VaultType, MyPerqData, Chain, ELoyaltyCardTier, BeanEntry };
package/dist/index.js CHANGED
@@ -3,20 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ELoyaltyCardTier = exports.Chain = exports.DripSdk = exports.PERQ_VESTING_ABI = exports.TOKEN_RECYCLER_ABI = exports.DRIP_TOKEN_ABI = exports.WETH_TOKEN_ABI = exports.DRIP_SWAP_AND_RECYCLER_ABI = void 0;
6
+ exports.ELoyaltyCardTier = exports.Chain = exports.DripSdk = void 0;
7
7
  const DripSdk_1 = __importDefault(require("./DripSdk"));
8
8
  exports.DripSdk = DripSdk_1.default;
9
9
  const DripConfig_1 = require("./DripConfig");
10
10
  Object.defineProperty(exports, "Chain", { enumerable: true, get: function () { return DripConfig_1.Chain; } });
11
11
  const ELoyaltyCardTier_1 = __importDefault(require("./types/ELoyaltyCardTier"));
12
12
  exports.ELoyaltyCardTier = ELoyaltyCardTier_1.default;
13
- const DripSwapAndRecyclerAbi_json_1 = __importDefault(require("./contracts/abi/DripSwapAndRecyclerAbi.json"));
14
- exports.DRIP_SWAP_AND_RECYCLER_ABI = DripSwapAndRecyclerAbi_json_1.default;
15
- const WethTokenAbi_json_1 = __importDefault(require("./contracts/abi/WethTokenAbi.json"));
16
- exports.WETH_TOKEN_ABI = WethTokenAbi_json_1.default;
17
- const DripTokenAbi_json_1 = __importDefault(require("./contracts/abi/DripTokenAbi.json"));
18
- exports.DRIP_TOKEN_ABI = DripTokenAbi_json_1.default;
19
- const TokenRecyclerAbi_json_1 = __importDefault(require("./contracts/abi/TokenRecyclerAbi.json"));
20
- exports.TOKEN_RECYCLER_ABI = TokenRecyclerAbi_json_1.default;
21
- const PerqVestingAbi_json_1 = __importDefault(require("./contracts/abi/PerqVestingAbi.json"));
22
- exports.PERQ_VESTING_ABI = PerqVestingAbi_json_1.default;
@@ -1,5 +1,12 @@
1
- export type SignedPayload<T> = {
1
+ export type BasePayload<T> = {
2
+ payload: T;
3
+ };
4
+ export type NonceEnrichedPayload<T> = T & {
5
+ deadline: number;
6
+ signature: string;
7
+ };
8
+ export type NonceEnrichedSignedPayload<T> = {
2
9
  signature: string;
3
10
  signerAddress: string;
4
- payload: T;
11
+ payload: NonceEnrichedPayload<T>;
5
12
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dripfi/drip-sdk",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "Drip SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",