@metamask-previews/transaction-pay-controller 22.7.0-preview-c7c3c44 → 22.7.0-preview-8751708e2
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 @@ export declare function getMessengerMock({ skipRegister, }?: {
|
|
|
74
74
|
sourceHash: `0x${string}`;
|
|
75
75
|
}>>;
|
|
76
76
|
publish: <EventType extends "AssetsController:stateChange" | "BridgeStatusController:stateChange" | "CurrencyRateController:stateChange" | "TokenRatesController:stateChange" | "TokensController:stateChange" | "TransactionController:stateChange" | "TransactionController:unapprovedTransactionAdded" | "TransactionPayController:stateChange">(eventType: EventType & `${string}:${string}`, ...payload: import("@metamask/messenger").ExtractEventPayload<import("@metamask/assets-controller").AssetsControllerStateChangeEvent, EventType> | import("@metamask/messenger").ExtractEventPayload<import("@metamask/bridge-status-controller").BridgeStatusControllerStateChangeEvent, EventType> | import("@metamask/messenger").ExtractEventPayload<import("@metamask/assets-controllers").CurrencyRateStateChange, EventType> | import("@metamask/messenger").ExtractEventPayload<import("@metamask/assets-controllers").TokenRatesControllerStateChangeEvent, EventType> | import("@metamask/messenger").ExtractEventPayload<import("@metamask/assets-controllers").TokensControllerStateChangeEvent, EventType> | import("@metamask/messenger").ExtractEventPayload<import("@metamask/transaction-controller").TransactionControllerStateChangeEvent, EventType> | import("@metamask/messenger").ExtractEventPayload<import("@metamask/transaction-controller").TransactionControllerUnapprovedTransactionAddedEvent, EventType> | import("@metamask/messenger").ExtractEventPayload<import("../index.cjs").TransactionPayControllerStateChangeEvent, EventType>) => void;
|
|
77
|
-
submitTransactionMock: jest.MockedFunction<(accountAddress: string,
|
|
77
|
+
submitTransactionMock: jest.MockedFunction<(accountAddress: string, maybeQuoteResponses: ({
|
|
78
78
|
quote: {
|
|
79
79
|
gasIncluded?: boolean | undefined;
|
|
80
80
|
gasIncluded7702?: boolean | undefined;
|
|
@@ -292,7 +292,225 @@ export declare function getMessengerMock({ skipRegister, }?: {
|
|
|
292
292
|
effectiveGas?: number | undefined;
|
|
293
293
|
} | undefined;
|
|
294
294
|
quoteRequestIndex?: number | undefined;
|
|
295
|
-
} & import("@metamask/bridge-controller").QuoteMetadata
|
|
295
|
+
} & import("@metamask/bridge-controller").QuoteMetadata) | ({
|
|
296
|
+
quote: {
|
|
297
|
+
gasIncluded?: boolean | undefined;
|
|
298
|
+
gasIncluded7702?: boolean | undefined;
|
|
299
|
+
gasSponsored?: boolean | undefined;
|
|
300
|
+
} & {
|
|
301
|
+
srcChainId: number;
|
|
302
|
+
destChainId: number;
|
|
303
|
+
srcAsset: {
|
|
304
|
+
symbol: string;
|
|
305
|
+
chainId: number;
|
|
306
|
+
address: string;
|
|
307
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
308
|
+
name: string;
|
|
309
|
+
decimals: number;
|
|
310
|
+
icon?: string | null | undefined;
|
|
311
|
+
iconUrl?: string | null | undefined;
|
|
312
|
+
};
|
|
313
|
+
destAsset: {
|
|
314
|
+
symbol: string;
|
|
315
|
+
chainId: number;
|
|
316
|
+
address: string;
|
|
317
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
318
|
+
name: string;
|
|
319
|
+
decimals: number;
|
|
320
|
+
icon?: string | null | undefined;
|
|
321
|
+
iconUrl?: string | null | undefined;
|
|
322
|
+
};
|
|
323
|
+
requestId: string;
|
|
324
|
+
srcTokenAmount: string;
|
|
325
|
+
destTokenAmount: string;
|
|
326
|
+
minDestTokenAmount: string;
|
|
327
|
+
feeData: {
|
|
328
|
+
metabridge: {
|
|
329
|
+
amount: string;
|
|
330
|
+
asset: {
|
|
331
|
+
symbol: string;
|
|
332
|
+
chainId: number;
|
|
333
|
+
address: string;
|
|
334
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
335
|
+
name: string;
|
|
336
|
+
decimals: number;
|
|
337
|
+
icon?: string | null | undefined;
|
|
338
|
+
iconUrl?: string | null | undefined;
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
txFee?: ({
|
|
342
|
+
amount: string;
|
|
343
|
+
asset: {
|
|
344
|
+
symbol: string;
|
|
345
|
+
chainId: number;
|
|
346
|
+
address: string;
|
|
347
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
348
|
+
name: string;
|
|
349
|
+
decimals: number;
|
|
350
|
+
icon?: string | null | undefined;
|
|
351
|
+
iconUrl?: string | null | undefined;
|
|
352
|
+
};
|
|
353
|
+
} & {
|
|
354
|
+
maxFeePerGas: string;
|
|
355
|
+
maxPriorityFeePerGas: string;
|
|
356
|
+
}) | undefined;
|
|
357
|
+
};
|
|
358
|
+
bridgeId: string;
|
|
359
|
+
bridges: string[];
|
|
360
|
+
steps: {
|
|
361
|
+
action: import("@metamask/bridge-controller").ActionTypes;
|
|
362
|
+
srcChainId: number;
|
|
363
|
+
srcAsset: {
|
|
364
|
+
symbol: string;
|
|
365
|
+
chainId: number;
|
|
366
|
+
address: string;
|
|
367
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
368
|
+
name: string;
|
|
369
|
+
decimals: number;
|
|
370
|
+
icon?: string | null | undefined;
|
|
371
|
+
iconUrl?: string | null | undefined;
|
|
372
|
+
};
|
|
373
|
+
destAsset: {
|
|
374
|
+
symbol: string;
|
|
375
|
+
chainId: number;
|
|
376
|
+
address: string;
|
|
377
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
378
|
+
name: string;
|
|
379
|
+
decimals: number;
|
|
380
|
+
icon?: string | null | undefined;
|
|
381
|
+
iconUrl?: string | null | undefined;
|
|
382
|
+
};
|
|
383
|
+
srcAmount: string;
|
|
384
|
+
destAmount: string;
|
|
385
|
+
protocol: {
|
|
386
|
+
name: string;
|
|
387
|
+
icon?: string | undefined;
|
|
388
|
+
displayName?: string | undefined;
|
|
389
|
+
};
|
|
390
|
+
destChainId?: number | undefined;
|
|
391
|
+
}[];
|
|
392
|
+
refuel?: {
|
|
393
|
+
action: import("@metamask/bridge-controller").ActionTypes;
|
|
394
|
+
srcChainId: number;
|
|
395
|
+
srcAsset: {
|
|
396
|
+
symbol: string;
|
|
397
|
+
chainId: number;
|
|
398
|
+
address: string;
|
|
399
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
400
|
+
name: string;
|
|
401
|
+
decimals: number;
|
|
402
|
+
icon?: string | null | undefined;
|
|
403
|
+
iconUrl?: string | null | undefined;
|
|
404
|
+
};
|
|
405
|
+
destAsset: {
|
|
406
|
+
symbol: string;
|
|
407
|
+
chainId: number;
|
|
408
|
+
address: string;
|
|
409
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
410
|
+
name: string;
|
|
411
|
+
decimals: number;
|
|
412
|
+
icon?: string | null | undefined;
|
|
413
|
+
iconUrl?: string | null | undefined;
|
|
414
|
+
};
|
|
415
|
+
srcAmount: string;
|
|
416
|
+
destAmount: string;
|
|
417
|
+
protocol: {
|
|
418
|
+
name: string;
|
|
419
|
+
icon?: string | undefined;
|
|
420
|
+
displayName?: string | undefined;
|
|
421
|
+
};
|
|
422
|
+
destChainId?: number | undefined;
|
|
423
|
+
} | undefined;
|
|
424
|
+
priceData?: {
|
|
425
|
+
totalFromAmountUsd?: string | undefined;
|
|
426
|
+
totalToAmountUsd?: string | undefined;
|
|
427
|
+
priceImpact?: string | undefined;
|
|
428
|
+
totalFeeAmountUsd?: string | undefined;
|
|
429
|
+
} | undefined;
|
|
430
|
+
intent?: {
|
|
431
|
+
protocol: string;
|
|
432
|
+
order: {
|
|
433
|
+
sellToken: `0x${string}`;
|
|
434
|
+
buyToken: `0x${string}`;
|
|
435
|
+
validTo: string | number;
|
|
436
|
+
appData: string;
|
|
437
|
+
appDataHash: `0x${string}`;
|
|
438
|
+
feeAmount: string;
|
|
439
|
+
kind: "buy" | "sell";
|
|
440
|
+
partiallyFillable: boolean;
|
|
441
|
+
receiver?: `0x${string}` | undefined;
|
|
442
|
+
sellAmount?: string | undefined;
|
|
443
|
+
buyAmount?: string | undefined;
|
|
444
|
+
from?: `0x${string}` | undefined;
|
|
445
|
+
};
|
|
446
|
+
typedData: {
|
|
447
|
+
types: Record<string, {
|
|
448
|
+
name: string;
|
|
449
|
+
type: string;
|
|
450
|
+
}[]>;
|
|
451
|
+
primaryType: string;
|
|
452
|
+
domain: Record<string, any>;
|
|
453
|
+
message: Record<string, any>;
|
|
454
|
+
};
|
|
455
|
+
settlementContract?: `0x${string}` | undefined;
|
|
456
|
+
} | undefined;
|
|
457
|
+
};
|
|
458
|
+
estimatedProcessingTimeInSeconds: number;
|
|
459
|
+
trade: string | {
|
|
460
|
+
chainId: number;
|
|
461
|
+
from: `0x${string}`;
|
|
462
|
+
to: `0x${string}`;
|
|
463
|
+
value: `0x${string}`;
|
|
464
|
+
data: `0x${string}`;
|
|
465
|
+
gasLimit: number | null;
|
|
466
|
+
effectiveGas?: number | undefined;
|
|
467
|
+
} | {
|
|
468
|
+
unsignedPsbtBase64: string;
|
|
469
|
+
inputsToSign: {}[] | null;
|
|
470
|
+
} | {
|
|
471
|
+
raw_data_hex: string;
|
|
472
|
+
visible?: boolean | undefined;
|
|
473
|
+
raw_data?: {
|
|
474
|
+
contract?: {
|
|
475
|
+
type?: string | undefined;
|
|
476
|
+
}[] | undefined;
|
|
477
|
+
fee_limit?: number | undefined;
|
|
478
|
+
} | null | undefined;
|
|
479
|
+
};
|
|
480
|
+
quoteId?: string | undefined;
|
|
481
|
+
approval?: {
|
|
482
|
+
chainId: number;
|
|
483
|
+
from: `0x${string}`;
|
|
484
|
+
to: `0x${string}`;
|
|
485
|
+
value: `0x${string}`;
|
|
486
|
+
data: `0x${string}`;
|
|
487
|
+
gasLimit: number | null;
|
|
488
|
+
effectiveGas?: number | undefined;
|
|
489
|
+
} | {
|
|
490
|
+
raw_data_hex: string;
|
|
491
|
+
visible?: boolean | undefined;
|
|
492
|
+
raw_data?: {
|
|
493
|
+
contract?: {
|
|
494
|
+
type?: string | undefined;
|
|
495
|
+
}[] | undefined;
|
|
496
|
+
fee_limit?: number | undefined;
|
|
497
|
+
} | null | undefined;
|
|
498
|
+
} | undefined;
|
|
499
|
+
} & {
|
|
500
|
+
trade: import("@metamask/bridge-controller").Trade;
|
|
501
|
+
approval?: import("@metamask/bridge-controller").Trade | undefined;
|
|
502
|
+
featureId?: import("@metamask/bridge-controller").FeatureId | undefined;
|
|
503
|
+
resetApproval?: {
|
|
504
|
+
chainId: number;
|
|
505
|
+
from: `0x${string}`;
|
|
506
|
+
to: `0x${string}`;
|
|
507
|
+
value: `0x${string}`;
|
|
508
|
+
data: `0x${string}`;
|
|
509
|
+
gasLimit: number | null;
|
|
510
|
+
effectiveGas?: number | undefined;
|
|
511
|
+
} | undefined;
|
|
512
|
+
quoteRequestIndex?: number | undefined;
|
|
513
|
+
} & import("@metamask/bridge-controller").QuoteMetadata)[], isStxEnabled: boolean, quotesReceivedContext?: (import("@metamask/bridge-controller").TradeData & {
|
|
296
514
|
warnings: import("@metamask/bridge-controller").QuoteWarning[];
|
|
297
515
|
best_quote_provider: `${string}_${string}` | undefined;
|
|
298
516
|
price_impact: number;
|
|
@@ -308,7 +526,39 @@ export declare function getMessengerMock({ skipRegister, }?: {
|
|
|
308
526
|
}) | undefined, location?: import("@metamask/bridge-controller").MetaMetricsSwapsEventSource | undefined, abTests?: Record<string, string> | undefined, activeAbTests?: {
|
|
309
527
|
key: string;
|
|
310
528
|
value: string;
|
|
311
|
-
}[] | undefined, tokenSecurityTypeDestination?: string | null | undefined
|
|
529
|
+
}[] | undefined, tokenSecurityTypeDestination?: string | null | undefined, batchSellTrades?: ({
|
|
530
|
+
transactions: ({
|
|
531
|
+
chainId: number;
|
|
532
|
+
from: `0x${string}`;
|
|
533
|
+
to: `0x${string}`;
|
|
534
|
+
value: `0x${string}`;
|
|
535
|
+
data: `0x${string}`;
|
|
536
|
+
gasLimit: number | null;
|
|
537
|
+
effectiveGas?: number | undefined;
|
|
538
|
+
} & {
|
|
539
|
+
maxFeePerGas: `0x${string}`;
|
|
540
|
+
maxPriorityFeePerGas: `0x${string}`;
|
|
541
|
+
} & {
|
|
542
|
+
type: import("@metamask/bridge-controller").BatchSellTransactionType;
|
|
543
|
+
})[];
|
|
544
|
+
fee?: {
|
|
545
|
+
amount: string;
|
|
546
|
+
asset: {
|
|
547
|
+
symbol: string;
|
|
548
|
+
chainId: number;
|
|
549
|
+
address: string;
|
|
550
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
551
|
+
name: string;
|
|
552
|
+
decimals: number;
|
|
553
|
+
icon?: string | null | undefined;
|
|
554
|
+
iconUrl?: string | null | undefined;
|
|
555
|
+
};
|
|
556
|
+
} | undefined;
|
|
557
|
+
} & {
|
|
558
|
+
gasIncluded?: boolean | undefined;
|
|
559
|
+
gasIncluded7702?: boolean | undefined;
|
|
560
|
+
gasSponsored?: boolean | undefined;
|
|
561
|
+
}) | undefined) => Promise<import("@metamask/transaction-controller").TransactionMeta>>;
|
|
312
562
|
updateTransactionMock: jest.MockedFn<(transactionMeta: import("@metamask/transaction-controller").TransactionMeta, note: string) => void>;
|
|
313
563
|
};
|
|
314
564
|
//# sourceMappingURL=messenger-mock.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messenger-mock.d.cts","sourceRoot":"","sources":["../../src/tests/messenger-mock.ts"],"names":[],"mappings":";AA4BA,OAAO,KAAK,EAAE,iCAAiC,EAAE,qBAAW;AAa5D;;;;;;GAMG;AAEH,wBAAgB,gBAAgB,CAAC,EAC/B,YAAY,GACb,GAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAO
|
|
1
|
+
{"version":3,"file":"messenger-mock.d.cts","sourceRoot":"","sources":["../../src/tests/messenger-mock.ts"],"names":[],"mappings":";AA4BA,OAAO,KAAK,EAAE,iCAAiC,EAAE,qBAAW;AAa5D;;;;;;GAMG;AAEH,wBAAgB,gBAAgB,CAAC,EAC/B,YAAY,GACb,GAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkRjC"}
|
|
@@ -74,7 +74,7 @@ export declare function getMessengerMock({ skipRegister, }?: {
|
|
|
74
74
|
sourceHash: `0x${string}`;
|
|
75
75
|
}>>;
|
|
76
76
|
publish: <EventType extends "AssetsController:stateChange" | "BridgeStatusController:stateChange" | "CurrencyRateController:stateChange" | "TokenRatesController:stateChange" | "TokensController:stateChange" | "TransactionController:stateChange" | "TransactionController:unapprovedTransactionAdded" | "TransactionPayController:stateChange">(eventType: EventType & `${string}:${string}`, ...payload: import("@metamask/messenger").ExtractEventPayload<import("@metamask/assets-controller").AssetsControllerStateChangeEvent, EventType> | import("@metamask/messenger").ExtractEventPayload<import("@metamask/bridge-status-controller").BridgeStatusControllerStateChangeEvent, EventType> | import("@metamask/messenger").ExtractEventPayload<import("@metamask/assets-controllers").CurrencyRateStateChange, EventType> | import("@metamask/messenger").ExtractEventPayload<import("@metamask/assets-controllers").TokenRatesControllerStateChangeEvent, EventType> | import("@metamask/messenger").ExtractEventPayload<import("@metamask/assets-controllers").TokensControllerStateChangeEvent, EventType> | import("@metamask/messenger").ExtractEventPayload<import("@metamask/transaction-controller").TransactionControllerStateChangeEvent, EventType> | import("@metamask/messenger").ExtractEventPayload<import("@metamask/transaction-controller").TransactionControllerUnapprovedTransactionAddedEvent, EventType> | import("@metamask/messenger").ExtractEventPayload<import("../index.mjs").TransactionPayControllerStateChangeEvent, EventType>) => void;
|
|
77
|
-
submitTransactionMock: jest.MockedFunction<(accountAddress: string,
|
|
77
|
+
submitTransactionMock: jest.MockedFunction<(accountAddress: string, maybeQuoteResponses: ({
|
|
78
78
|
quote: {
|
|
79
79
|
gasIncluded?: boolean | undefined;
|
|
80
80
|
gasIncluded7702?: boolean | undefined;
|
|
@@ -292,7 +292,225 @@ export declare function getMessengerMock({ skipRegister, }?: {
|
|
|
292
292
|
effectiveGas?: number | undefined;
|
|
293
293
|
} | undefined;
|
|
294
294
|
quoteRequestIndex?: number | undefined;
|
|
295
|
-
} & import("@metamask/bridge-controller").QuoteMetadata
|
|
295
|
+
} & import("@metamask/bridge-controller").QuoteMetadata) | ({
|
|
296
|
+
quote: {
|
|
297
|
+
gasIncluded?: boolean | undefined;
|
|
298
|
+
gasIncluded7702?: boolean | undefined;
|
|
299
|
+
gasSponsored?: boolean | undefined;
|
|
300
|
+
} & {
|
|
301
|
+
srcChainId: number;
|
|
302
|
+
destChainId: number;
|
|
303
|
+
srcAsset: {
|
|
304
|
+
symbol: string;
|
|
305
|
+
chainId: number;
|
|
306
|
+
address: string;
|
|
307
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
308
|
+
name: string;
|
|
309
|
+
decimals: number;
|
|
310
|
+
icon?: string | null | undefined;
|
|
311
|
+
iconUrl?: string | null | undefined;
|
|
312
|
+
};
|
|
313
|
+
destAsset: {
|
|
314
|
+
symbol: string;
|
|
315
|
+
chainId: number;
|
|
316
|
+
address: string;
|
|
317
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
318
|
+
name: string;
|
|
319
|
+
decimals: number;
|
|
320
|
+
icon?: string | null | undefined;
|
|
321
|
+
iconUrl?: string | null | undefined;
|
|
322
|
+
};
|
|
323
|
+
requestId: string;
|
|
324
|
+
srcTokenAmount: string;
|
|
325
|
+
destTokenAmount: string;
|
|
326
|
+
minDestTokenAmount: string;
|
|
327
|
+
feeData: {
|
|
328
|
+
metabridge: {
|
|
329
|
+
amount: string;
|
|
330
|
+
asset: {
|
|
331
|
+
symbol: string;
|
|
332
|
+
chainId: number;
|
|
333
|
+
address: string;
|
|
334
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
335
|
+
name: string;
|
|
336
|
+
decimals: number;
|
|
337
|
+
icon?: string | null | undefined;
|
|
338
|
+
iconUrl?: string | null | undefined;
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
txFee?: ({
|
|
342
|
+
amount: string;
|
|
343
|
+
asset: {
|
|
344
|
+
symbol: string;
|
|
345
|
+
chainId: number;
|
|
346
|
+
address: string;
|
|
347
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
348
|
+
name: string;
|
|
349
|
+
decimals: number;
|
|
350
|
+
icon?: string | null | undefined;
|
|
351
|
+
iconUrl?: string | null | undefined;
|
|
352
|
+
};
|
|
353
|
+
} & {
|
|
354
|
+
maxFeePerGas: string;
|
|
355
|
+
maxPriorityFeePerGas: string;
|
|
356
|
+
}) | undefined;
|
|
357
|
+
};
|
|
358
|
+
bridgeId: string;
|
|
359
|
+
bridges: string[];
|
|
360
|
+
steps: {
|
|
361
|
+
action: import("@metamask/bridge-controller").ActionTypes;
|
|
362
|
+
srcChainId: number;
|
|
363
|
+
srcAsset: {
|
|
364
|
+
symbol: string;
|
|
365
|
+
chainId: number;
|
|
366
|
+
address: string;
|
|
367
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
368
|
+
name: string;
|
|
369
|
+
decimals: number;
|
|
370
|
+
icon?: string | null | undefined;
|
|
371
|
+
iconUrl?: string | null | undefined;
|
|
372
|
+
};
|
|
373
|
+
destAsset: {
|
|
374
|
+
symbol: string;
|
|
375
|
+
chainId: number;
|
|
376
|
+
address: string;
|
|
377
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
378
|
+
name: string;
|
|
379
|
+
decimals: number;
|
|
380
|
+
icon?: string | null | undefined;
|
|
381
|
+
iconUrl?: string | null | undefined;
|
|
382
|
+
};
|
|
383
|
+
srcAmount: string;
|
|
384
|
+
destAmount: string;
|
|
385
|
+
protocol: {
|
|
386
|
+
name: string;
|
|
387
|
+
icon?: string | undefined;
|
|
388
|
+
displayName?: string | undefined;
|
|
389
|
+
};
|
|
390
|
+
destChainId?: number | undefined;
|
|
391
|
+
}[];
|
|
392
|
+
refuel?: {
|
|
393
|
+
action: import("@metamask/bridge-controller").ActionTypes;
|
|
394
|
+
srcChainId: number;
|
|
395
|
+
srcAsset: {
|
|
396
|
+
symbol: string;
|
|
397
|
+
chainId: number;
|
|
398
|
+
address: string;
|
|
399
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
400
|
+
name: string;
|
|
401
|
+
decimals: number;
|
|
402
|
+
icon?: string | null | undefined;
|
|
403
|
+
iconUrl?: string | null | undefined;
|
|
404
|
+
};
|
|
405
|
+
destAsset: {
|
|
406
|
+
symbol: string;
|
|
407
|
+
chainId: number;
|
|
408
|
+
address: string;
|
|
409
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
410
|
+
name: string;
|
|
411
|
+
decimals: number;
|
|
412
|
+
icon?: string | null | undefined;
|
|
413
|
+
iconUrl?: string | null | undefined;
|
|
414
|
+
};
|
|
415
|
+
srcAmount: string;
|
|
416
|
+
destAmount: string;
|
|
417
|
+
protocol: {
|
|
418
|
+
name: string;
|
|
419
|
+
icon?: string | undefined;
|
|
420
|
+
displayName?: string | undefined;
|
|
421
|
+
};
|
|
422
|
+
destChainId?: number | undefined;
|
|
423
|
+
} | undefined;
|
|
424
|
+
priceData?: {
|
|
425
|
+
totalFromAmountUsd?: string | undefined;
|
|
426
|
+
totalToAmountUsd?: string | undefined;
|
|
427
|
+
priceImpact?: string | undefined;
|
|
428
|
+
totalFeeAmountUsd?: string | undefined;
|
|
429
|
+
} | undefined;
|
|
430
|
+
intent?: {
|
|
431
|
+
protocol: string;
|
|
432
|
+
order: {
|
|
433
|
+
sellToken: `0x${string}`;
|
|
434
|
+
buyToken: `0x${string}`;
|
|
435
|
+
validTo: string | number;
|
|
436
|
+
appData: string;
|
|
437
|
+
appDataHash: `0x${string}`;
|
|
438
|
+
feeAmount: string;
|
|
439
|
+
kind: "buy" | "sell";
|
|
440
|
+
partiallyFillable: boolean;
|
|
441
|
+
receiver?: `0x${string}` | undefined;
|
|
442
|
+
sellAmount?: string | undefined;
|
|
443
|
+
buyAmount?: string | undefined;
|
|
444
|
+
from?: `0x${string}` | undefined;
|
|
445
|
+
};
|
|
446
|
+
typedData: {
|
|
447
|
+
types: Record<string, {
|
|
448
|
+
name: string;
|
|
449
|
+
type: string;
|
|
450
|
+
}[]>;
|
|
451
|
+
primaryType: string;
|
|
452
|
+
domain: Record<string, any>;
|
|
453
|
+
message: Record<string, any>;
|
|
454
|
+
};
|
|
455
|
+
settlementContract?: `0x${string}` | undefined;
|
|
456
|
+
} | undefined;
|
|
457
|
+
};
|
|
458
|
+
estimatedProcessingTimeInSeconds: number;
|
|
459
|
+
trade: string | {
|
|
460
|
+
chainId: number;
|
|
461
|
+
from: `0x${string}`;
|
|
462
|
+
to: `0x${string}`;
|
|
463
|
+
value: `0x${string}`;
|
|
464
|
+
data: `0x${string}`;
|
|
465
|
+
gasLimit: number | null;
|
|
466
|
+
effectiveGas?: number | undefined;
|
|
467
|
+
} | {
|
|
468
|
+
unsignedPsbtBase64: string;
|
|
469
|
+
inputsToSign: {}[] | null;
|
|
470
|
+
} | {
|
|
471
|
+
raw_data_hex: string;
|
|
472
|
+
visible?: boolean | undefined;
|
|
473
|
+
raw_data?: {
|
|
474
|
+
contract?: {
|
|
475
|
+
type?: string | undefined;
|
|
476
|
+
}[] | undefined;
|
|
477
|
+
fee_limit?: number | undefined;
|
|
478
|
+
} | null | undefined;
|
|
479
|
+
};
|
|
480
|
+
quoteId?: string | undefined;
|
|
481
|
+
approval?: {
|
|
482
|
+
chainId: number;
|
|
483
|
+
from: `0x${string}`;
|
|
484
|
+
to: `0x${string}`;
|
|
485
|
+
value: `0x${string}`;
|
|
486
|
+
data: `0x${string}`;
|
|
487
|
+
gasLimit: number | null;
|
|
488
|
+
effectiveGas?: number | undefined;
|
|
489
|
+
} | {
|
|
490
|
+
raw_data_hex: string;
|
|
491
|
+
visible?: boolean | undefined;
|
|
492
|
+
raw_data?: {
|
|
493
|
+
contract?: {
|
|
494
|
+
type?: string | undefined;
|
|
495
|
+
}[] | undefined;
|
|
496
|
+
fee_limit?: number | undefined;
|
|
497
|
+
} | null | undefined;
|
|
498
|
+
} | undefined;
|
|
499
|
+
} & {
|
|
500
|
+
trade: import("@metamask/bridge-controller").Trade;
|
|
501
|
+
approval?: import("@metamask/bridge-controller").Trade | undefined;
|
|
502
|
+
featureId?: import("@metamask/bridge-controller").FeatureId | undefined;
|
|
503
|
+
resetApproval?: {
|
|
504
|
+
chainId: number;
|
|
505
|
+
from: `0x${string}`;
|
|
506
|
+
to: `0x${string}`;
|
|
507
|
+
value: `0x${string}`;
|
|
508
|
+
data: `0x${string}`;
|
|
509
|
+
gasLimit: number | null;
|
|
510
|
+
effectiveGas?: number | undefined;
|
|
511
|
+
} | undefined;
|
|
512
|
+
quoteRequestIndex?: number | undefined;
|
|
513
|
+
} & import("@metamask/bridge-controller").QuoteMetadata)[], isStxEnabled: boolean, quotesReceivedContext?: (import("@metamask/bridge-controller").TradeData & {
|
|
296
514
|
warnings: import("@metamask/bridge-controller").QuoteWarning[];
|
|
297
515
|
best_quote_provider: `${string}_${string}` | undefined;
|
|
298
516
|
price_impact: number;
|
|
@@ -308,7 +526,39 @@ export declare function getMessengerMock({ skipRegister, }?: {
|
|
|
308
526
|
}) | undefined, location?: import("@metamask/bridge-controller").MetaMetricsSwapsEventSource | undefined, abTests?: Record<string, string> | undefined, activeAbTests?: {
|
|
309
527
|
key: string;
|
|
310
528
|
value: string;
|
|
311
|
-
}[] | undefined, tokenSecurityTypeDestination?: string | null | undefined
|
|
529
|
+
}[] | undefined, tokenSecurityTypeDestination?: string | null | undefined, batchSellTrades?: ({
|
|
530
|
+
transactions: ({
|
|
531
|
+
chainId: number;
|
|
532
|
+
from: `0x${string}`;
|
|
533
|
+
to: `0x${string}`;
|
|
534
|
+
value: `0x${string}`;
|
|
535
|
+
data: `0x${string}`;
|
|
536
|
+
gasLimit: number | null;
|
|
537
|
+
effectiveGas?: number | undefined;
|
|
538
|
+
} & {
|
|
539
|
+
maxFeePerGas: `0x${string}`;
|
|
540
|
+
maxPriorityFeePerGas: `0x${string}`;
|
|
541
|
+
} & {
|
|
542
|
+
type: import("@metamask/bridge-controller").BatchSellTransactionType;
|
|
543
|
+
})[];
|
|
544
|
+
fee?: {
|
|
545
|
+
amount: string;
|
|
546
|
+
asset: {
|
|
547
|
+
symbol: string;
|
|
548
|
+
chainId: number;
|
|
549
|
+
address: string;
|
|
550
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
551
|
+
name: string;
|
|
552
|
+
decimals: number;
|
|
553
|
+
icon?: string | null | undefined;
|
|
554
|
+
iconUrl?: string | null | undefined;
|
|
555
|
+
};
|
|
556
|
+
} | undefined;
|
|
557
|
+
} & {
|
|
558
|
+
gasIncluded?: boolean | undefined;
|
|
559
|
+
gasIncluded7702?: boolean | undefined;
|
|
560
|
+
gasSponsored?: boolean | undefined;
|
|
561
|
+
}) | undefined) => Promise<import("@metamask/transaction-controller").TransactionMeta>>;
|
|
312
562
|
updateTransactionMock: jest.MockedFn<(transactionMeta: import("@metamask/transaction-controller").TransactionMeta, note: string) => void>;
|
|
313
563
|
};
|
|
314
564
|
//# sourceMappingURL=messenger-mock.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messenger-mock.d.mts","sourceRoot":"","sources":["../../src/tests/messenger-mock.ts"],"names":[],"mappings":";AA4BA,OAAO,KAAK,EAAE,iCAAiC,EAAE,qBAAW;AAa5D;;;;;;GAMG;AAEH,wBAAgB,gBAAgB,CAAC,EAC/B,YAAY,GACb,GAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAO
|
|
1
|
+
{"version":3,"file":"messenger-mock.d.mts","sourceRoot":"","sources":["../../src/tests/messenger-mock.ts"],"names":[],"mappings":";AA4BA,OAAO,KAAK,EAAE,iCAAiC,EAAE,qBAAW;AAa5D;;;;;;GAMG;AAEH,wBAAgB,gBAAgB,CAAC,EAC/B,YAAY,GACb,GAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkRjC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask-previews/transaction-pay-controller",
|
|
3
|
-
"version": "22.7.0-preview-
|
|
3
|
+
"version": "22.7.0-preview-8751708e2",
|
|
4
4
|
"description": "Manages alternate payment strategies to provide required funds for transactions in MetaMask",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Ethereum",
|