@dripfi/drip-sdk 1.4.28-silo-sdk-5 → 1.4.28-silo-sdk-7

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 CHANGED
@@ -326,6 +326,38 @@ const txHash = await lite.withdraw(
326
326
  );
327
327
  ```
328
328
 
329
+ ### `checkMainnetToSonicBridgeApproval(amount: string): Promise<boolean>`
330
+
331
+ I want to check if the User approved the bridge contract to bridge 10 PERQ from MAINNET to SONIC
332
+
333
+ ```typescript
334
+ const hasApprovedAmount = await dripSdk.bridge.checkMainnetToSonicBridgeApproval('10');
335
+ ```
336
+
337
+ ### `approveMainnetToSonicBridge(amount: string): Promise<string>`
338
+
339
+ I want to approve to bridge 10 PERQ from MAINNET to SONIC
340
+
341
+ ```typescript
342
+ const txHash = await dripSdk.bridge.approveMainnetToSonicBridge('10');
343
+ ```
344
+
345
+ ### `bridgeMainnetToSonic(amount: string): Promise<string>`
346
+
347
+ I want to bridge 10 PERQ from MAINNET to SONIC
348
+
349
+ ```typescript
350
+ const txHash = await dripSdk.bridge.bridgeMainnetToSonic('10');
351
+ ```
352
+
353
+ ### `bridgeSonicToMainnet(amount: string): Promise<string>`
354
+
355
+ I want to bridge 10 PERQ from SONIC to MAINNET
356
+
357
+ ```typescript
358
+ const txHash = await dripSdk.bridge.bridgeSonicToMainnet('10');
359
+ ```
360
+
329
361
  ## Types
330
362
 
331
363
  ```typescript
@@ -488,15 +520,15 @@ type NonceEnrichedSignedPayload<T> = {
488
520
 
489
521
  type PerqConfig = {
490
522
  route: string;
491
- yelayLiteSdkConfig: sdkConfig;
492
523
  perqTokenAddress: string;
493
524
  perqTokenRecyclerAddress: string;
494
525
  perqSwapAndRecyclerAddress: string;
495
526
  perqVestingAddress: string;
496
527
  swapAndDepositContractAddress: string;
497
- smartVaultManagerContractAddress: string;
498
528
  ethereumSwapperAddress: string;
499
- baseSwapperAddress: string;
529
+ smartVaultManagerContractAddress: string,
530
+ bridgeMainnetPerqToSonicAddress: string;
531
+ bridgeSonicPerqToMainnetAddress: string;
500
532
  };
501
533
 
502
534
  type PerqToBeansSwapInfo = {
@@ -732,12 +764,6 @@ type DetailedProjectData = ReducedProjectData & {
732
764
 
733
765
  type RewardType = 'token' | 'points';
734
766
 
735
- type SDKConfig = {
736
- chainId: number;
737
- rpcUrl: string;
738
- // ... other SDK configuration
739
- };
740
-
741
767
  const BASE_CHAIN_ID = 8453;
742
768
  const ETHEREUM_CHAIN_ID = 1;
743
769
  const ETHEREUM_SEPOLIA_CHAIN_ID = 11155111;
@@ -775,11 +801,9 @@ type OverallStats = {
775
801
  ## Abis
776
802
 
777
803
  - PERQ_SWAP_AND_RECYCLER_ABI
778
-
779
804
  - WETH_TOKEN_ABI
780
-
781
805
  - PERQ_TOKEN_ABI
782
-
783
806
  - TOKEN_RECYCLER_ABI
784
-
785
807
  - PERQ_VESTING_ABI
808
+ - BRIDGE_SONIC_PERQ_TO_MAINNET_ABI
809
+ - BRIDGE_MAINNET_PERQ_TO_SONIC_ABI
package/dist/PerqSdk.d.ts CHANGED
@@ -3,6 +3,7 @@ import { PerqConfig } from './types';
3
3
  import PerqApi from './PerqApi';
4
4
  import { PerqSwapAndRecyclerContract, PerqTokenRecyclerContract, PerqVestingContract } from './contracts';
5
5
  import VestingPackage from './subpackages/VestingPackage';
6
+ import BridgePerqPackage from './subpackages/BridgePerqPackage';
6
7
  import LitePackage from './subpackages/LitePackage';
7
8
  import RecyclerPackage from './subpackages/RecyclerPackage';
8
9
  import LoyaltyCardsPackage from './subpackages/LoyaltyCardsPackage';
@@ -19,6 +20,7 @@ export default class PerqSdk {
19
20
  signer?: Signer;
20
21
  lite: LitePackage;
21
22
  vesting: VestingPackage;
23
+ bridge: BridgePerqPackage;
22
24
  recycler: RecyclerPackage;
23
25
  loyaltyCards: LoyaltyCardsPackage;
24
26
  tokenUtils: TokenUtilsPackage;
package/dist/PerqSdk.js CHANGED
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const PerqApi_1 = __importDefault(require("./PerqApi"));
7
7
  const contracts_1 = require("./contracts");
8
8
  const VestingPackage_1 = __importDefault(require("./subpackages/VestingPackage"));
9
+ const BridgePerqPackage_1 = __importDefault(require("./subpackages/BridgePerqPackage"));
9
10
  const LitePackage_1 = __importDefault(require("./subpackages/LitePackage"));
10
11
  const RecyclerPackage_1 = __importDefault(require("./subpackages/RecyclerPackage"));
11
12
  const LoyaltyCardsPackage_1 = __importDefault(require("./subpackages/LoyaltyCardsPackage"));
@@ -21,6 +22,7 @@ class PerqSdk {
21
22
  signer;
22
23
  lite;
23
24
  vesting;
25
+ bridge;
24
26
  recycler;
25
27
  loyaltyCards;
26
28
  tokenUtils;
@@ -43,6 +45,7 @@ class PerqSdk {
43
45
  this.siloPackage = new SiloPackage_1.default(newSigner);
44
46
  }
45
47
  this.vesting = new VestingPackage_1.default(this);
48
+ this.bridge = new BridgePerqPackage_1.default(this);
46
49
  this.lite = new LitePackage_1.default(this);
47
50
  this.recycler = new RecyclerPackage_1.default(this);
48
51
  this.loyaltyCards = new LoyaltyCardsPackage_1.default(this);
@@ -62,6 +65,7 @@ class PerqSdk {
62
65
  this.perqVestingContract = new contracts_1.PerqVestingContract(this);
63
66
  this.perqTokenRecyclerContract = new contracts_1.PerqTokenRecyclerContract(this);
64
67
  this.perqSwapAndRecyclerContract = new contracts_1.PerqSwapAndRecyclerContract(this);
68
+ this.bridge = new BridgePerqPackage_1.default(this);
65
69
  this.siloPackage = new SiloPackage_1.default(newSigner);
66
70
  }
67
71
  }
@@ -71,5 +71,291 @@ declare const _default: {
71
71
  stateMutability: string;
72
72
  type: string;
73
73
  }[];
74
+ readonly BRIDGE_SONIC_PERQ_TO_MAINNET_ABI: ({
75
+ inputs: {
76
+ internalType: string;
77
+ name: string;
78
+ type: string;
79
+ }[];
80
+ stateMutability: string;
81
+ type: string;
82
+ name?: undefined;
83
+ anonymous?: undefined;
84
+ outputs?: undefined;
85
+ } | {
86
+ inputs: {
87
+ internalType: string;
88
+ name: string;
89
+ type: string;
90
+ }[];
91
+ name: string;
92
+ type: string;
93
+ stateMutability?: undefined;
94
+ anonymous?: undefined;
95
+ outputs?: undefined;
96
+ } | {
97
+ anonymous: boolean;
98
+ inputs: {
99
+ indexed: boolean;
100
+ internalType: string;
101
+ name: string;
102
+ type: string;
103
+ }[];
104
+ name: string;
105
+ type: string;
106
+ stateMutability?: undefined;
107
+ outputs?: undefined;
108
+ } | {
109
+ anonymous: boolean;
110
+ inputs: {
111
+ components: {
112
+ internalType: string;
113
+ name: string;
114
+ type: string;
115
+ }[];
116
+ indexed: boolean;
117
+ internalType: string;
118
+ name: string;
119
+ type: string;
120
+ }[];
121
+ name: string;
122
+ type: string;
123
+ stateMutability?: undefined;
124
+ outputs?: undefined;
125
+ } | {
126
+ inputs: ({
127
+ components: {
128
+ internalType: string;
129
+ name: string;
130
+ type: string;
131
+ }[];
132
+ internalType: string;
133
+ name: string;
134
+ type: string;
135
+ } | {
136
+ internalType: string;
137
+ name: string;
138
+ type: string;
139
+ components?: undefined;
140
+ })[];
141
+ name: string;
142
+ outputs: {
143
+ internalType: string;
144
+ name: string;
145
+ type: string;
146
+ }[];
147
+ stateMutability: string;
148
+ type: string;
149
+ anonymous?: undefined;
150
+ } | {
151
+ inputs: {
152
+ components: ({
153
+ components: {
154
+ internalType: string;
155
+ name: string;
156
+ type: string;
157
+ }[];
158
+ internalType: string;
159
+ name: string;
160
+ type: string;
161
+ } | {
162
+ internalType: string;
163
+ name: string;
164
+ type: string;
165
+ components?: undefined;
166
+ })[];
167
+ internalType: string;
168
+ name: string;
169
+ type: string;
170
+ }[];
171
+ name: string;
172
+ outputs: never[];
173
+ stateMutability: string;
174
+ type: string;
175
+ anonymous?: undefined;
176
+ } | {
177
+ inputs: ({
178
+ components: {
179
+ internalType: string;
180
+ name: string;
181
+ type: string;
182
+ }[];
183
+ internalType: string;
184
+ name: string;
185
+ type: string;
186
+ } | {
187
+ internalType: string;
188
+ name: string;
189
+ type: string;
190
+ components?: undefined;
191
+ })[];
192
+ name: string;
193
+ outputs: {
194
+ components: ({
195
+ internalType: string;
196
+ name: string;
197
+ type: string;
198
+ components?: undefined;
199
+ } | {
200
+ components: {
201
+ internalType: string;
202
+ name: string;
203
+ type: string;
204
+ }[];
205
+ internalType: string;
206
+ name: string;
207
+ type: string;
208
+ })[];
209
+ internalType: string;
210
+ name: string;
211
+ type: string;
212
+ }[];
213
+ stateMutability: string;
214
+ type: string;
215
+ anonymous?: undefined;
216
+ })[];
217
+ readonly BRIDGE_MAINNET_PERQ_TO_SONIC_ABI: ({
218
+ inputs: {
219
+ internalType: string;
220
+ name: string;
221
+ type: string;
222
+ }[];
223
+ stateMutability: string;
224
+ type: string;
225
+ name?: undefined;
226
+ anonymous?: undefined;
227
+ outputs?: undefined;
228
+ } | {
229
+ inputs: {
230
+ internalType: string;
231
+ name: string;
232
+ type: string;
233
+ }[];
234
+ name: string;
235
+ type: string;
236
+ stateMutability?: undefined;
237
+ anonymous?: undefined;
238
+ outputs?: undefined;
239
+ } | {
240
+ anonymous: boolean;
241
+ inputs: {
242
+ components: {
243
+ internalType: string;
244
+ name: string;
245
+ type: string;
246
+ }[];
247
+ indexed: boolean;
248
+ internalType: string;
249
+ name: string;
250
+ type: string;
251
+ }[];
252
+ name: string;
253
+ type: string;
254
+ stateMutability?: undefined;
255
+ outputs?: undefined;
256
+ } | {
257
+ anonymous: boolean;
258
+ inputs: {
259
+ indexed: boolean;
260
+ internalType: string;
261
+ name: string;
262
+ type: string;
263
+ }[];
264
+ name: string;
265
+ type: string;
266
+ stateMutability?: undefined;
267
+ outputs?: undefined;
268
+ } | {
269
+ inputs: ({
270
+ components: {
271
+ internalType: string;
272
+ name: string;
273
+ type: string;
274
+ }[];
275
+ internalType: string;
276
+ name: string;
277
+ type: string;
278
+ } | {
279
+ internalType: string;
280
+ name: string;
281
+ type: string;
282
+ components?: undefined;
283
+ })[];
284
+ name: string;
285
+ outputs: {
286
+ internalType: string;
287
+ name: string;
288
+ type: string;
289
+ }[];
290
+ stateMutability: string;
291
+ type: string;
292
+ anonymous?: undefined;
293
+ } | {
294
+ inputs: {
295
+ components: ({
296
+ components: {
297
+ internalType: string;
298
+ name: string;
299
+ type: string;
300
+ }[];
301
+ internalType: string;
302
+ name: string;
303
+ type: string;
304
+ } | {
305
+ internalType: string;
306
+ name: string;
307
+ type: string;
308
+ components?: undefined;
309
+ })[];
310
+ internalType: string;
311
+ name: string;
312
+ type: string;
313
+ }[];
314
+ name: string;
315
+ outputs: never[];
316
+ stateMutability: string;
317
+ type: string;
318
+ anonymous?: undefined;
319
+ } | {
320
+ inputs: ({
321
+ components: {
322
+ internalType: string;
323
+ name: string;
324
+ type: string;
325
+ }[];
326
+ internalType: string;
327
+ name: string;
328
+ type: string;
329
+ } | {
330
+ internalType: string;
331
+ name: string;
332
+ type: string;
333
+ components?: undefined;
334
+ })[];
335
+ name: string;
336
+ outputs: {
337
+ components: ({
338
+ internalType: string;
339
+ name: string;
340
+ type: string;
341
+ components?: undefined;
342
+ } | {
343
+ components: {
344
+ internalType: string;
345
+ name: string;
346
+ type: string;
347
+ }[];
348
+ internalType: string;
349
+ name: string;
350
+ type: string;
351
+ })[];
352
+ internalType: string;
353
+ name: string;
354
+ type: string;
355
+ }[];
356
+ stateMutability: string;
357
+ type: string;
358
+ anonymous?: undefined;
359
+ })[];
74
360
  };
75
361
  export default _default;
package/dist/abi/index.js CHANGED
@@ -8,10 +8,14 @@ const WethTokenAbi_json_1 = __importDefault(require("./WethTokenAbi.json"));
8
8
  const PerqTokenAbi_json_1 = __importDefault(require("../abi/perq/PerqTokenAbi.json"));
9
9
  const TokenRecyclerAbi_json_1 = __importDefault(require("../abi/perq/TokenRecyclerAbi.json"));
10
10
  const PerqVestingAbi_json_1 = __importDefault(require("../abi/perq/PerqVestingAbi.json"));
11
+ const BridgeSonicPerqToMainnetAbi_json_1 = __importDefault(require("../abi/perq/BridgeSonicPerqToMainnetAbi.json"));
12
+ const BridgeMainnetPerqToSonicAbi_json_1 = __importDefault(require("../abi/perq/BridgeMainnetPerqToSonicAbi.json"));
11
13
  exports.default = {
12
14
  PERQ_SWAP_AND_RECYCLER_ABI: PerqSwapAndRecyclerAbi_json_1.default,
13
15
  WETH_TOKEN_ABI: WethTokenAbi_json_1.default,
14
16
  PERQ_TOKEN_ABI: PerqTokenAbi_json_1.default,
15
17
  TOKEN_RECYCLER_ABI: TokenRecyclerAbi_json_1.default,
16
18
  PERQ_VESTING_ABI: PerqVestingAbi_json_1.default,
19
+ BRIDGE_SONIC_PERQ_TO_MAINNET_ABI: BridgeSonicPerqToMainnetAbi_json_1.default,
20
+ BRIDGE_MAINNET_PERQ_TO_SONIC_ABI: BridgeMainnetPerqToSonicAbi_json_1.default,
17
21
  };