@bronlabs/intents-sdk 1.0.18 → 1.0.20

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.
@@ -74,7 +74,7 @@
74
74
  "type": "address"
75
75
  }
76
76
  ],
77
- "name": "activateOracle",
77
+ "name": "deactivateOracle",
78
78
  "outputs": [],
79
79
  "stateMutability": "nonpayable",
80
80
  "type": "function"
@@ -87,38 +87,39 @@
87
87
  "type": "address"
88
88
  }
89
89
  ],
90
- "name": "deactivateOracle",
91
- "outputs": [],
92
- "stateMutability": "nonpayable",
90
+ "name": "getOracleStatus",
91
+ "outputs": [
92
+ {
93
+ "internalType": "bool",
94
+ "name": "",
95
+ "type": "bool"
96
+ }
97
+ ],
98
+ "stateMutability": "view",
93
99
  "type": "function"
94
100
  },
95
101
  {
96
- "inputs": [
102
+ "inputs": [],
103
+ "name": "getTotalOraclesCount",
104
+ "outputs": [
97
105
  {
98
- "internalType": "contract IOrderEngine",
99
- "name": "_orderEngine",
100
- "type": "address"
106
+ "internalType": "uint256",
107
+ "name": "",
108
+ "type": "uint256"
101
109
  }
102
110
  ],
103
- "name": "initialize",
104
- "outputs": [],
105
- "stateMutability": "nonpayable",
111
+ "stateMutability": "view",
106
112
  "type": "function"
107
113
  },
108
114
  {
109
115
  "inputs": [
110
116
  {
111
- "internalType": "string",
112
- "name": "_orderId",
113
- "type": "string"
114
- },
115
- {
116
- "internalType": "bool",
117
- "name": "_isConfirmed",
118
- "type": "bool"
117
+ "internalType": "contract IOrderEngine",
118
+ "name": "_orderEngine",
119
+ "type": "address"
119
120
  }
120
121
  ],
121
- "name": "oracleConfirmLiquidation",
122
+ "name": "initialize",
122
123
  "outputs": [],
123
124
  "stateMutability": "nonpayable",
124
125
  "type": "function"
@@ -159,24 +160,6 @@
159
160
  "stateMutability": "nonpayable",
160
161
  "type": "function"
161
162
  },
162
- {
163
- "inputs": [
164
- {
165
- "internalType": "string",
166
- "name": "_orderId",
167
- "type": "string"
168
- },
169
- {
170
- "internalType": "uint256",
171
- "name": "_liquidationPrice",
172
- "type": "uint256"
173
- }
174
- ],
175
- "name": "oracleLiquidationSetPrice",
176
- "outputs": [],
177
- "stateMutability": "nonpayable",
178
- "type": "function"
179
- },
180
163
  {
181
164
  "inputs": [
182
165
  {
@@ -188,7 +171,7 @@
188
171
  "name": "oracles",
189
172
  "outputs": [
190
173
  {
191
- "internalType": "enum OracleAggregatorStorage.OracleStatus",
174
+ "internalType": "enum IOracleAggregator.OracleStatus",
192
175
  "name": "",
193
176
  "type": "uint8"
194
177
  }
@@ -242,6 +225,24 @@
242
225
  "stateMutability": "nonpayable",
243
226
  "type": "function"
244
227
  },
228
+ {
229
+ "inputs": [
230
+ {
231
+ "internalType": "address",
232
+ "name": "_oracle",
233
+ "type": "address"
234
+ },
235
+ {
236
+ "internalType": "bool",
237
+ "name": "_isAccepted",
238
+ "type": "bool"
239
+ }
240
+ ],
241
+ "name": "registerOracleResponse",
242
+ "outputs": [],
243
+ "stateMutability": "nonpayable",
244
+ "type": "function"
245
+ },
245
246
  {
246
247
  "inputs": [],
247
248
  "name": "renounceOwnership",
@@ -275,4 +276,4 @@
275
276
  "stateMutability": "nonpayable",
276
277
  "type": "function"
277
278
  }
278
- ]
279
+ ]
@@ -85,19 +85,6 @@
85
85
  "name": "OwnershipTransferred",
86
86
  "type": "event"
87
87
  },
88
- {
89
- "inputs": [],
90
- "name": "MAX_ACTION_DURATION",
91
- "outputs": [
92
- {
93
- "internalType": "uint256",
94
- "name": "",
95
- "type": "uint256"
96
- }
97
- ],
98
- "stateMutability": "view",
99
- "type": "function"
100
- },
101
88
  {
102
89
  "inputs": [
103
90
  {
@@ -179,6 +166,32 @@
179
166
  "stateMutability": "nonpayable",
180
167
  "type": "function"
181
168
  },
169
+ {
170
+ "inputs": [],
171
+ "name": "defaultSolverSettlementTime",
172
+ "outputs": [
173
+ {
174
+ "internalType": "uint256",
175
+ "name": "",
176
+ "type": "uint256"
177
+ }
178
+ ],
179
+ "stateMutability": "view",
180
+ "type": "function"
181
+ },
182
+ {
183
+ "inputs": [],
184
+ "name": "defaultUserSettlementTime",
185
+ "outputs": [
186
+ {
187
+ "internalType": "uint256",
188
+ "name": "",
189
+ "type": "uint256"
190
+ }
191
+ ],
192
+ "stateMutability": "view",
193
+ "type": "function"
194
+ },
182
195
  {
183
196
  "inputs": [
184
197
  {
@@ -358,6 +371,16 @@
358
371
  "internalType": "address",
359
372
  "name": "_solverRegister",
360
373
  "type": "address"
374
+ },
375
+ {
376
+ "internalType": "uint256",
377
+ "name": "_defaultUserSettlementTime",
378
+ "type": "uint256"
379
+ },
380
+ {
381
+ "internalType": "uint256",
382
+ "name": "_defaultSolverSettlementTime",
383
+ "type": "uint256"
361
384
  }
362
385
  ],
363
386
  "name": "initialize",
@@ -368,19 +391,20 @@
368
391
  {
369
392
  "inputs": [
370
393
  {
371
- "internalType": "string",
372
- "name": "_orderId",
373
- "type": "string"
374
- },
394
+ "internalType": "address",
395
+ "name": "",
396
+ "type": "address"
397
+ }
398
+ ],
399
+ "name": "isBrodcaster",
400
+ "outputs": [
375
401
  {
376
- "internalType": "uint256",
377
- "name": "_liquidationPrice",
378
- "type": "uint256"
402
+ "internalType": "bool",
403
+ "name": "",
404
+ "type": "bool"
379
405
  }
380
406
  ],
381
- "name": "liquidateOrder",
382
- "outputs": [],
383
- "stateMutability": "nonpayable",
407
+ "stateMutability": "view",
384
408
  "type": "function"
385
409
  },
386
410
  {
@@ -416,6 +440,109 @@
416
440
  "stateMutability": "nonpayable",
417
441
  "type": "function"
418
442
  },
443
+ {
444
+ "inputs": [
445
+ {
446
+ "internalType": "string",
447
+ "name": "_orderId",
448
+ "type": "string"
449
+ },
450
+ {
451
+ "internalType": "string",
452
+ "name": "_newTxHash",
453
+ "type": "string"
454
+ }
455
+ ],
456
+ "name": "replaceSolverTransaction",
457
+ "outputs": [],
458
+ "stateMutability": "nonpayable",
459
+ "type": "function"
460
+ },
461
+ {
462
+ "inputs": [
463
+ {
464
+ "internalType": "string",
465
+ "name": "_orderId",
466
+ "type": "string"
467
+ },
468
+ {
469
+ "internalType": "string",
470
+ "name": "_newTxHash",
471
+ "type": "string"
472
+ }
473
+ ],
474
+ "name": "replaceUserTransaction",
475
+ "outputs": [],
476
+ "stateMutability": "nonpayable",
477
+ "type": "function"
478
+ },
479
+ {
480
+ "inputs": [
481
+ {
482
+ "internalType": "address",
483
+ "name": "_brodcaster",
484
+ "type": "address"
485
+ },
486
+ {
487
+ "internalType": "bool",
488
+ "name": "_isBrodcaster",
489
+ "type": "bool"
490
+ }
491
+ ],
492
+ "name": "setBrodcaster",
493
+ "outputs": [],
494
+ "stateMutability": "nonpayable",
495
+ "type": "function"
496
+ },
497
+ {
498
+ "inputs": [
499
+ {
500
+ "internalType": "uint256",
501
+ "name": "_defaultSolverSettlementTime",
502
+ "type": "uint256"
503
+ }
504
+ ],
505
+ "name": "setDefaultSolverSettlementTime",
506
+ "outputs": [],
507
+ "stateMutability": "nonpayable",
508
+ "type": "function"
509
+ },
510
+ {
511
+ "inputs": [
512
+ {
513
+ "internalType": "uint256",
514
+ "name": "_defaultUserSettlementTime",
515
+ "type": "uint256"
516
+ }
517
+ ],
518
+ "name": "setDefaultUserSettlementTime",
519
+ "outputs": [],
520
+ "stateMutability": "nonpayable",
521
+ "type": "function"
522
+ },
523
+ {
524
+ "inputs": [
525
+ {
526
+ "internalType": "string",
527
+ "name": "_networkId",
528
+ "type": "string"
529
+ },
530
+ {
531
+ "internalType": "uint256",
532
+ "name": "_userSettlementTime",
533
+ "type": "uint256"
534
+ },
535
+ {
536
+ "internalType": "uint256",
537
+ "name": "_solverSettlementTime",
538
+ "type": "uint256"
539
+ }
540
+ ],
541
+ "name": "setNetworkSettings",
542
+ "outputs": [],
543
+ "stateMutability": "nonpayable",
544
+ "type": "function"
545
+ },
419
546
  {
420
547
  "inputs": [
421
548
  {
@@ -537,4 +664,4 @@
537
664
  "stateMutability": "nonpayable",
538
665
  "type": "function"
539
666
  }
540
- ]
667
+ ]
@@ -2,10 +2,14 @@ import { EvmNetwork } from './evm.js';
2
2
  import { TrxNetwork } from './trx.js';
3
3
  import { SolNetwork } from './sol.js';
4
4
  import { CantonNetwork } from './canton.js';
5
+ import { BtcNetwork } from './btc.js';
5
6
  const networkBuilders = {
7
+ "testBTC": (cf) => new BtcNetwork(cf.rpcUrl, 1),
6
8
  "testETH": (cf) => new EvmNetwork(cf.rpcUrl, 1),
7
9
  "testTRX": (cf) => new TrxNetwork(cf.rpcUrl, 1),
8
10
  "testSOL": (cf) => new SolNetwork(cf.rpcUrl, 1),
11
+ "testCC": (cf) => new CantonNetwork(cf.rpcUrl, cf.scanApiUrl, cf.clientId, cf.clientSecret, cf.walletAddress),
12
+ "BTC": (cf) => new BtcNetwork(cf.rpcUrl, 2),
9
13
  "ETH": (cf) => new EvmNetwork(cf.rpcUrl, 6),
10
14
  "TRX": (cf) => new TrxNetwork(cf.rpcUrl, 20),
11
15
  "SOL": (cf) => new SolNetwork(cf.rpcUrl, 20),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/networks/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAoB5C,MAAM,eAAe,GAAG;IACtB,SAAS,EAAE,CAAC,EAAiB,EAAE,EAAE,CAAC,IAAI,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;IAC9D,SAAS,EAAE,CAAC,EAAiB,EAAE,EAAE,CAAC,IAAI,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;IAC9D,SAAS,EAAE,CAAC,EAAiB,EAAE,EAAE,CAAC,IAAI,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,CA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,EAAE,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,YAAY,EAAE,EAAE,CAAC,aAAa,CAAC;CACzH,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,OAAyC,EAAE,MAAwC,EAAE,EAAE,CAClH,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC,EAAE,EAAE;IACrE,IAAI,OAAO,CAAC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;QAC9E,GAAG,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAA;IAClD,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC,EAAE,EAA6B,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bronlabs/intents-sdk",
3
- "version": "1.0.18",
3
+ "version": "1.0.20",
4
4
  "description": "SDK for Intents DeFi smart contracts",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",