0xtrails 0.4.3 → 0.6.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.
- package/dist/analytics.d.ts +8 -3
- package/dist/analytics.d.ts.map +1 -1
- package/dist/{ccip-C9CA3tIi.js → ccip-Dw5AN7oU.js} +27 -27
- package/dist/cctp.d.ts +0 -149
- package/dist/cctp.d.ts.map +1 -1
- package/dist/chains.d.ts +31 -4
- package/dist/chains.d.ts.map +1 -1
- package/dist/config.d.ts +28 -52
- package/dist/config.d.ts.map +1 -1
- package/dist/constants.d.ts +1 -7
- package/dist/constants.d.ts.map +1 -1
- package/dist/contractUtils.d.ts.map +1 -1
- package/dist/estimate.d.ts.map +1 -1
- package/dist/fees.d.ts.map +1 -1
- package/dist/gasless.d.ts +12 -0
- package/dist/gasless.d.ts.map +1 -1
- package/dist/{index-CNB57v0n.js → index-BtVUTbEZ.js} +32255 -40547
- package/dist/index.d.ts +13 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +320 -944
- package/dist/indexerClient.d.ts +9 -6
- package/dist/indexerClient.d.ts.map +1 -1
- package/dist/intents.d.ts +0 -18
- package/dist/intents.d.ts.map +1 -1
- package/dist/mutations.d.ts.map +1 -1
- package/dist/paymasterSend.d.ts.map +1 -1
- package/dist/prepareSend.d.ts +1 -1
- package/dist/prepareSend.d.ts.map +1 -1
- package/dist/sendUserOp.d.ts +0 -18
- package/dist/sendUserOp.d.ts.map +1 -1
- package/dist/sequenceWallet.d.ts +1 -1
- package/dist/sequenceWallet.d.ts.map +1 -1
- package/dist/tokenBalances.d.ts.map +1 -1
- package/dist/tokens.d.ts +10 -8
- package/dist/tokens.d.ts.map +1 -1
- package/dist/trailsClient.d.ts +3 -3
- package/dist/trailsClient.d.ts.map +1 -1
- package/dist/transactionIntent/deposits/depositOrchestrator.d.ts +4 -5
- package/dist/transactionIntent/deposits/depositOrchestrator.d.ts.map +1 -1
- package/dist/transactionIntent/deposits/gaslessDeposit.d.ts +4 -5
- package/dist/transactionIntent/deposits/gaslessDeposit.d.ts.map +1 -1
- package/dist/transactionIntent/deposits/standardDeposit.d.ts +2 -2
- package/dist/transactionIntent/deposits/standardDeposit.d.ts.map +1 -1
- package/dist/transactionIntent/execution/transactionState.d.ts +2 -2
- package/dist/transactionIntent/execution/transactionState.d.ts.map +1 -1
- package/dist/transactionIntent/handlers/crossChain.d.ts +6 -4
- package/dist/transactionIntent/handlers/crossChain.d.ts.map +1 -1
- package/dist/transactionIntent/handlers/index.d.ts +0 -1
- package/dist/transactionIntent/handlers/index.d.ts.map +1 -1
- package/dist/transactionIntent/handlers/sameChainSameToken.d.ts +4 -34
- package/dist/transactionIntent/handlers/sameChainSameToken.d.ts.map +1 -1
- package/dist/transactionIntent/quote/normalizeQuote.d.ts.map +1 -1
- package/dist/transactionIntent/quote/quoteHelpers.d.ts +2 -1
- package/dist/transactionIntent/quote/quoteHelpers.d.ts.map +1 -1
- package/dist/transactionIntent/types.d.ts +7 -19
- package/dist/transactionIntent/types.d.ts.map +1 -1
- package/dist/transactionIntent/utils/index.d.ts +0 -1
- package/dist/transactionIntent/utils/index.d.ts.map +1 -1
- package/dist/transactions.d.ts +6 -18
- package/dist/transactions.d.ts.map +1 -1
- package/dist/utils.d.ts +8 -2
- package/dist/utils.d.ts.map +1 -1
- package/dist/walletUtils.d.ts +21 -0
- package/dist/walletUtils.d.ts.map +1 -0
- package/dist/wallets.d.ts +33 -240
- package/dist/wallets.d.ts.map +1 -1
- package/dist/widget/components/AccountIntentTransactionHistory.d.ts.map +1 -1
- package/dist/widget/components/ClassicSwap.d.ts.map +1 -1
- package/dist/widget/components/ConfigDisplay.d.ts.map +1 -1
- package/dist/widget/components/FeeOption.d.ts +8 -13
- package/dist/widget/components/FeeOption.d.ts.map +1 -1
- package/dist/widget/components/FeeOptions.d.ts +11 -5
- package/dist/widget/components/FeeOptions.d.ts.map +1 -1
- package/dist/widget/components/NativeGasOption.d.ts.map +1 -1
- package/dist/widget/components/Pay.d.ts.map +1 -1
- package/dist/widget/components/PoolDeposit.d.ts.map +1 -1
- package/dist/widget/components/QRCodeDeposit.d.ts +5 -0
- package/dist/widget/components/QRCodeDeposit.d.ts.map +1 -1
- package/dist/widget/components/QRCodeWalletSelect.d.ts +13 -0
- package/dist/widget/components/QRCodeWalletSelect.d.ts.map +1 -0
- package/dist/widget/components/QrCode.d.ts.map +1 -1
- package/dist/widget/components/QuoteDetails.d.ts.map +1 -1
- package/dist/widget/components/Receipt.d.ts.map +1 -1
- package/dist/widget/components/ScreenHeader.d.ts +1 -1
- package/dist/widget/components/ScreenHeader.d.ts.map +1 -1
- package/dist/widget/components/SlippageToleranceSettings.d.ts +1 -0
- package/dist/widget/components/SlippageToleranceSettings.d.ts.map +1 -1
- package/dist/widget/components/Toast.d.ts.map +1 -1
- package/dist/widget/components/TokenImage.d.ts.map +1 -1
- package/dist/widget/components/WalletConnect.d.ts.map +1 -1
- package/dist/widget/css/compiled.css +1 -1
- package/dist/widget/hooks/useCheckout.d.ts +15 -1
- package/dist/widget/hooks/useCheckout.d.ts.map +1 -1
- package/dist/widget/hooks/useCurrentScreen.d.ts +1 -1
- package/dist/widget/hooks/useCurrentScreen.d.ts.map +1 -1
- package/dist/widget/hooks/useDebugScreens.d.ts +1 -1
- package/dist/widget/hooks/useDebugScreens.d.ts.map +1 -1
- package/dist/widget/hooks/useIntentTransactionHistory.d.ts.map +1 -1
- package/dist/widget/hooks/useIsConnectedWalletSmartContract.d.ts +7 -0
- package/dist/widget/hooks/useIsConnectedWalletSmartContract.d.ts.map +1 -0
- package/dist/widget/hooks/useIsSequenceWallet.d.ts +6 -0
- package/dist/widget/hooks/useIsSequenceWallet.d.ts.map +1 -0
- package/dist/widget/hooks/useQuote.d.ts +6 -11
- package/dist/widget/hooks/useQuote.d.ts.map +1 -1
- package/dist/widget/hooks/useRecentTokens.d.ts.map +1 -1
- package/dist/widget/hooks/useSelectedFeeOption.d.ts +30 -0
- package/dist/widget/hooks/useSelectedFeeOption.d.ts.map +1 -0
- package/dist/widget/hooks/useSendForm.d.ts +6 -15
- package/dist/widget/hooks/useSendForm.d.ts.map +1 -1
- package/dist/widget/hooks/useTokenList.d.ts.map +1 -1
- package/dist/widget/index.d.ts +1 -0
- package/dist/widget/index.d.ts.map +1 -1
- package/dist/widget/index.js +4 -2
- package/dist/widget/providers/TrailsProvider.d.ts +29 -0
- package/dist/widget/providers/TrailsProvider.d.ts.map +1 -0
- package/dist/widget/widget.d.ts +14 -3
- package/dist/widget/widget.d.ts.map +1 -1
- package/package.json +9 -8
- package/src/analytics.ts +53 -21
- package/src/cctp.ts +0 -1016
- package/src/chains.ts +155 -68
- package/src/config.ts +51 -207
- package/src/constants.ts +1 -13
- package/src/contractUtils.ts +6 -6
- package/src/estimate.ts +3 -6
- package/src/fees.ts +5 -10
- package/src/gasless.ts +45 -0
- package/src/index.ts +18 -40
- package/src/indexerClient.ts +39 -48
- package/src/intents.ts +51 -226
- package/src/mutations.ts +3 -2
- package/src/paymasterSend.ts +2 -5
- package/src/prepareSend.ts +21 -14
- package/src/sendUserOp.ts +3 -64
- package/src/sequenceWallet.ts +1 -2
- package/src/tokenBalances.ts +2 -1
- package/src/tokens.ts +62 -133
- package/src/trailsClient.ts +17 -12
- package/src/transactionIntent/deposits/depositOrchestrator.ts +14 -15
- package/src/transactionIntent/deposits/gaslessDeposit.ts +70 -100
- package/src/transactionIntent/deposits/standardDeposit.ts +22 -28
- package/src/transactionIntent/execution/transactionState.ts +2 -2
- package/src/transactionIntent/handlers/crossChain.ts +179 -381
- package/src/transactionIntent/handlers/index.ts +0 -1
- package/src/transactionIntent/handlers/sameChainSameToken.ts +228 -94
- package/src/transactionIntent/quote/normalizeQuote.ts +4 -6
- package/src/transactionIntent/quote/quoteHelpers.ts +35 -3
- package/src/transactionIntent/types.ts +7 -27
- package/src/transactionIntent/utils/index.ts +0 -1
- package/src/transactions.ts +19 -118
- package/src/umd.tsx +1 -3
- package/src/utils.ts +28 -8
- package/src/walletUtils.ts +42 -0
- package/src/wallets.ts +365 -208
- package/src/widget/compiled.css +1 -1
- package/src/widget/components/AccountIntentTransactionHistory.tsx +78 -4
- package/src/widget/components/AccountSettings.tsx +17 -17
- package/src/widget/components/ChainList.tsx +3 -3
- package/src/widget/components/ClassicSwap.tsx +19 -10
- package/src/widget/components/ConfigDisplay.tsx +19 -59
- package/src/widget/components/FeeOption.tsx +63 -20
- package/src/widget/components/FeeOptions.tsx +54 -123
- package/src/widget/components/NativeGasOption.tsx +3 -1
- package/src/widget/components/Pay.tsx +18 -11
- package/src/widget/components/PoolDeposit.tsx +23 -10
- package/src/widget/components/QRCodeDeposit.tsx +50 -30
- package/src/widget/components/QRCodeWalletSelect.tsx +77 -0
- package/src/widget/components/QrCode.tsx +188 -233
- package/src/widget/components/QuoteDetails.tsx +48 -2
- package/src/widget/components/Receipt.tsx +5 -2
- package/src/widget/components/ScreenHeader.tsx +10 -8
- package/src/widget/components/SlippageToleranceSettings.tsx +63 -14
- package/src/widget/components/Toast.tsx +10 -0
- package/src/widget/components/TokenImage.tsx +56 -13
- package/src/widget/components/WalletConnect.tsx +37 -99
- package/src/widget/hooks/useCheckout.ts +71 -0
- package/src/widget/hooks/useCurrentScreen.tsx +1 -0
- package/src/widget/hooks/useDebugScreens.ts +5 -0
- package/src/widget/hooks/useIntentTransactionHistory.ts +790 -412
- package/src/widget/hooks/useIsConnectedWalletSmartContract.ts +43 -0
- package/src/widget/hooks/useIsSequenceWallet.ts +17 -0
- package/src/widget/hooks/useQuote.ts +27 -34
- package/src/widget/hooks/useRecentTokens.ts +2 -1
- package/src/widget/hooks/useSelectedFeeOption.tsx +257 -0
- package/src/widget/hooks/useSendForm.ts +175 -46
- package/src/widget/hooks/useTokenList.ts +15 -2
- package/src/widget/index.tsx +8 -0
- package/src/widget/providers/TrailsProvider.tsx +123 -0
- package/src/widget/widget.tsx +165 -143
- package/dist/cctpqueue.d.ts +0 -18
- package/dist/cctpqueue.d.ts.map +0 -1
- package/dist/preconditions.d.ts +0 -12
- package/dist/preconditions.d.ts.map +0 -1
- package/dist/trails.d.ts +0 -110
- package/dist/trails.d.ts.map +0 -1
- package/dist/transactionIntent/handlers/sameChainDifferentToken.d.ts +0 -62
- package/dist/transactionIntent/handlers/sameChainDifferentToken.d.ts.map +0 -1
- package/dist/transactionIntent/utils/lifiHelpers.d.ts +0 -10
- package/dist/transactionIntent/utils/lifiHelpers.d.ts.map +0 -1
- package/dist/widget/hooks/useSelectedFeeToken.d.ts +0 -33
- package/dist/widget/hooks/useSelectedFeeToken.d.ts.map +0 -1
- package/src/cctpqueue.ts +0 -66
- package/src/preconditions.ts +0 -47
- package/src/trails.ts +0 -1303
- package/src/transactionIntent/handlers/sameChainDifferentToken.ts +0 -323
- package/src/transactionIntent/utils/lifiHelpers.ts +0 -68
- package/src/widget/hooks/useSelectedFeeToken.tsx +0 -288
package/dist/trails.d.ts
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { TransactionPrecondition, Intent, QuoteIntentRequest, MetaTxn, IntentCalls } from '@0xsequence/trails-api';
|
|
2
|
-
import { TrailsClient } from './trailsClient.js';
|
|
3
|
-
import { Hex } from 'viem';
|
|
4
|
-
import { Connector } from 'wagmi';
|
|
5
|
-
import { OriginCallParams, TrailsFee as LocalTrailsFee, calculateIntentAddress, calculateOriginAndDestinationIntentAddresses } from './intents.js';
|
|
6
|
-
import { IntentReceiptStatus } from './intentReceiptMonitor.js';
|
|
7
|
-
export type WagmiAccount = {
|
|
8
|
-
address: `0x${string}`;
|
|
9
|
-
isConnected: boolean;
|
|
10
|
-
chainId: number;
|
|
11
|
-
connector?: Connector;
|
|
12
|
-
};
|
|
13
|
-
export type UseTrailsConfig = {
|
|
14
|
-
account: WagmiAccount;
|
|
15
|
-
disableAutoExecute?: boolean;
|
|
16
|
-
sequenceProjectAccessKey?: string;
|
|
17
|
-
};
|
|
18
|
-
export type UseTrailsReturn = {
|
|
19
|
-
trailsClient: TrailsClient;
|
|
20
|
-
metaTxns: MetaTxn[] | null;
|
|
21
|
-
intentCalls: IntentCalls[] | null;
|
|
22
|
-
intentPreconditions: TransactionPrecondition[] | null;
|
|
23
|
-
trailsFee: LocalTrailsFee | null;
|
|
24
|
-
txnHash: Hex | undefined;
|
|
25
|
-
committedOriginIntentAddress: string | null;
|
|
26
|
-
committedDestinationIntentAddress: string | null;
|
|
27
|
-
verificationStatus: {
|
|
28
|
-
success: boolean;
|
|
29
|
-
calculatedOriginAddress?: string;
|
|
30
|
-
calculatedDestinationAddress?: string;
|
|
31
|
-
receivedOriginAddress?: string;
|
|
32
|
-
receivedDestinationAddress?: string;
|
|
33
|
-
} | null;
|
|
34
|
-
estimatedGas: bigint | undefined;
|
|
35
|
-
isEstimateError: boolean;
|
|
36
|
-
estimateError: Error | null;
|
|
37
|
-
calculateIntentAddress: typeof calculateIntentAddress;
|
|
38
|
-
calculateOriginAndDestinationIntentAddresses: typeof calculateOriginAndDestinationIntentAddresses;
|
|
39
|
-
committedIntent: Intent | undefined;
|
|
40
|
-
isLoadingCommittedIntent: boolean;
|
|
41
|
-
committedConfigError: Error | null;
|
|
42
|
-
commitIntent: (intent: Intent) => void;
|
|
43
|
-
commitIntentPending: boolean;
|
|
44
|
-
commitIntentSuccess: boolean;
|
|
45
|
-
commitIntentError: Error | null;
|
|
46
|
-
commitIntentArgs: Intent | undefined;
|
|
47
|
-
executeIntent: (args: {
|
|
48
|
-
intentId: string;
|
|
49
|
-
depositTransactionHash: string;
|
|
50
|
-
}) => void;
|
|
51
|
-
executeIntentPending: boolean;
|
|
52
|
-
executeIntentSuccess: boolean;
|
|
53
|
-
executeIntentError: Error | null;
|
|
54
|
-
getIntentFromQuoteIntent: (args: QuoteIntentRequest) => Promise<Intent>;
|
|
55
|
-
operationHashes: {
|
|
56
|
-
[key: string]: Hex;
|
|
57
|
-
};
|
|
58
|
-
sendOriginTransaction: () => Promise<void>;
|
|
59
|
-
switchChain: any;
|
|
60
|
-
isSwitchingChain: boolean;
|
|
61
|
-
switchChainError: Error | null;
|
|
62
|
-
isTransactionInProgress: boolean;
|
|
63
|
-
isChainSwitchRequired: boolean;
|
|
64
|
-
sendTransaction: any;
|
|
65
|
-
isSendingTransaction: boolean;
|
|
66
|
-
originCallStatus: {
|
|
67
|
-
txnHash?: string;
|
|
68
|
-
status?: string;
|
|
69
|
-
revertReason?: string | null;
|
|
70
|
-
gasUsed?: number;
|
|
71
|
-
effectiveGasPrice?: string;
|
|
72
|
-
} | null;
|
|
73
|
-
updateOriginCallStatus: (hash: Hex | undefined, status: "success" | "reverted" | "pending" | "sending", gasUsed?: bigint, effectiveGasPrice?: bigint, revertReason?: string | null) => void;
|
|
74
|
-
isEstimatingGas: boolean;
|
|
75
|
-
isAutoExecute: boolean;
|
|
76
|
-
updateAutoExecute: (enabled: boolean) => void;
|
|
77
|
-
receipt: any;
|
|
78
|
-
isWaitingForReceipt: boolean;
|
|
79
|
-
receiptIsSuccess: boolean;
|
|
80
|
-
receiptIsError: boolean;
|
|
81
|
-
receiptError: Error | null;
|
|
82
|
-
hasAutoExecuted: boolean;
|
|
83
|
-
originCallSuccess: boolean;
|
|
84
|
-
sentMetaTxns: {
|
|
85
|
-
[key: string]: number;
|
|
86
|
-
};
|
|
87
|
-
clearIntent: () => void;
|
|
88
|
-
intentReceiptStatus: IntentReceiptStatus | null;
|
|
89
|
-
quoteIntent: (args: QuoteIntentRequest) => void;
|
|
90
|
-
quoteIntentPending: boolean;
|
|
91
|
-
quoteIntentSuccess: boolean;
|
|
92
|
-
quoteIntentError: Error | null;
|
|
93
|
-
quoteIntentArgs: QuoteIntentRequest | undefined;
|
|
94
|
-
originCallParams: OriginCallParams | null;
|
|
95
|
-
updateOriginCallParams: (args: {
|
|
96
|
-
originChainId: number;
|
|
97
|
-
tokenAddress: string;
|
|
98
|
-
} | null) => void;
|
|
99
|
-
originBlockTimestamp: number | null;
|
|
100
|
-
metaTxnBlockTimestamps: {
|
|
101
|
-
[key: string]: {
|
|
102
|
-
timestamp: number | null;
|
|
103
|
-
error?: string;
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
originIntentAddress: string | null;
|
|
107
|
-
destinationIntentAddress: string | null;
|
|
108
|
-
};
|
|
109
|
-
export declare function useTrails(config: UseTrailsConfig): UseTrailsReturn;
|
|
110
|
-
//# sourceMappingURL=trails.d.ts.map
|
package/dist/trails.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"trails.d.ts","sourceRoot":"","sources":["../src/trails.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,MAAM,EACN,kBAAkB,EAClB,OAAO,EACP,WAAW,EACZ,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAIrD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAS/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAWtC,OAAO,KAAK,EACV,gBAAgB,EAChB,SAAS,IAAI,cAAc,EAC5B,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,sBAAsB,EACtB,4CAA4C,EAE7C,MAAM,cAAc,CAAA;AACrB,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,2BAA2B,CAAA;AAOlC,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,KAAK,MAAM,EAAE,CAAA;IACtB,WAAW,EAAE,OAAO,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,SAAS,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,YAAY,CAAA;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,wBAAwB,CAAC,EAAE,MAAM,CAAA;CAClC,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,YAAY,EAAE,YAAY,CAAA;IAC1B,QAAQ,EAAE,OAAO,EAA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EAAE,OAAO,CAAA;IACvB,YAAY,EAAE,KAAK,GAAG,IAAI,CAAA;IAC1B,eAAe,EAAE,OAAO,CAAA;IACxB,iBAAiB,EAAE,OAAO,CAAA;IAC1B,YAAY,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;IACvC,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,mBAAmB,EAAE,mBAAmB,GAAG,IAAI,CAAA;IAC/C,WAAW,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,IAAI,CAAA;IAC/C,kBAAkB,EAAE,OAAO,CAAA;IAC3B,kBAAkB,EAAE,OAAO,CAAA;IAC3B,gBAAgB,EAAE,KAAK,GAAG,IAAI,CAAA;IAC9B,eAAe,EAAE,kBAAkB,GAAG,SAAS,CAAA;IAC/C,gBAAgB,EAAE,gBAAgB,GAAG,IAAI,CAAA;IACzC,sBAAsB,EAAE,CACtB,IAAI,EAAE;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,KACzD,IAAI,CAAA;IACT,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,sBAAsB,EAAE;QACtB,CAAC,GAAG,EAAE,MAAM,GAAG;YAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAC5D,CAAA;IACD,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,wBAAwB,EAAE,MAAM,GAAG,IAAI,CAAA;CACxC,CAAA;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG,eAAe,CA6nClE"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { Account, PublicClient, WalletClient } from 'viem';
|
|
2
|
-
import { TransactionState } from '../../transactions.js';
|
|
3
|
-
import { PrepareSendReturn, TradeType } from '../types.js';
|
|
4
|
-
/**
|
|
5
|
-
* @description
|
|
6
|
-
* This handler manages same-chain token swaps (e.g., ETH to WETH on the same chain).
|
|
7
|
-
* It leverages the Relay SDK for quote and transaction execution.
|
|
8
|
-
*
|
|
9
|
-
* Key characteristics:
|
|
10
|
-
* - Uses Relay SDK directly for quote fetching and transaction execution
|
|
11
|
-
* - Single transaction leg (swap on origin chain)
|
|
12
|
-
* - No cross-chain bridging required
|
|
13
|
-
* - Supports various token pair combinations on the same chain
|
|
14
|
-
*
|
|
15
|
-
* Transaction Flow:
|
|
16
|
-
* 1. Fetch quote via getRelaySDKQuote (Relay SDK API)
|
|
17
|
-
* 2. Create intent via createIntent (Intent object created)
|
|
18
|
-
* 3. Execute swap via executeSimpleRelayTransaction (User submits swap transaction)
|
|
19
|
-
* 4. Monitor via waitIntentReceipt API for transaction completion
|
|
20
|
-
* 5. Update transaction state and invoke callbacks
|
|
21
|
-
*
|
|
22
|
-
* Relay SDK Integration:
|
|
23
|
-
* - Direct integration with Relay SDK for quote and transaction submission
|
|
24
|
-
* - Transaction hash extracted via getTxHashFromRelayResult
|
|
25
|
-
* - Receipt polling via Trails API for consistent monitoring
|
|
26
|
-
*
|
|
27
|
-
* Error Handling:
|
|
28
|
-
* - Balance validation before transaction submission
|
|
29
|
-
* - Chain switching if user is on wrong network
|
|
30
|
-
* - Relay SDK error handling with proper error propagation
|
|
31
|
-
* - Checkout error callbacks for UI feedback
|
|
32
|
-
*
|
|
33
|
-
* State Management:
|
|
34
|
-
* - transactionStates[0]: Swap transaction
|
|
35
|
-
* - Updates propagated via onTransactionStateChange callback
|
|
36
|
-
* - Analytics tracking for payment completion or errors
|
|
37
|
-
*/
|
|
38
|
-
export declare function handleSameChainDifferentToken({ originTokenAddress, originTokenDecimals, swapAmount, destinationTokenAddress, destinationTokenDecimals, destinationCalldata, recipient, originChainId, walletClient, publicClient, account, tradeType, slippageTolerance, onTransactionStateChange, transactionStates, sourceTokenPriceUsd, destinationTokenPriceUsd, originNativeTokenPriceUsd, mode, fundMethod, originTokenSymbol, destinationTokenSymbol, }: {
|
|
39
|
-
originTokenAddress: string;
|
|
40
|
-
originTokenDecimals: number;
|
|
41
|
-
swapAmount: string;
|
|
42
|
-
destinationTokenAddress: string;
|
|
43
|
-
destinationTokenDecimals: number;
|
|
44
|
-
destinationCalldata?: string;
|
|
45
|
-
recipient: string;
|
|
46
|
-
originChainId: number;
|
|
47
|
-
walletClient: WalletClient;
|
|
48
|
-
publicClient: PublicClient;
|
|
49
|
-
account: Account;
|
|
50
|
-
tradeType?: TradeType;
|
|
51
|
-
slippageTolerance?: string;
|
|
52
|
-
onTransactionStateChange: (transactionStates: TransactionState[]) => void;
|
|
53
|
-
transactionStates: TransactionState[];
|
|
54
|
-
sourceTokenPriceUsd?: number | null;
|
|
55
|
-
destinationTokenPriceUsd?: number | null;
|
|
56
|
-
originNativeTokenPriceUsd?: number | null;
|
|
57
|
-
mode?: "pay" | "fund" | "earn" | "swap" | "receive";
|
|
58
|
-
fundMethod?: string;
|
|
59
|
-
originTokenSymbol: string;
|
|
60
|
-
destinationTokenSymbol: string;
|
|
61
|
-
}): Promise<PrepareSendReturn>;
|
|
62
|
-
//# sourceMappingURL=sameChainDifferentToken.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sameChainDifferentToken.d.ts","sourceRoot":"","sources":["../../../src/transactionIntent/handlers/sameChainDifferentToken.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAE/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,KAAK,EAAE,iBAAiB,EAAc,SAAS,EAAE,MAAM,aAAa,CAAA;AAuB3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAsB,6BAA6B,CAAC,EAClD,kBAAkB,EAClB,mBAAmB,EACnB,UAAU,EACV,uBAAuB,EACvB,wBAAwB,EAC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ddress, destinationTokenAmount, destinationTokenDecimals, sourceTokenDecimals, sourceTokenPriceUsd, destinationTokenPriceUsd, depositAmount, }: {
|
|
2
|
-
originTokenAddress: string;
|
|
3
|
-
destinationTokenAmount: string;
|
|
4
|
-
destinationTokenDecimals: number;
|
|
5
|
-
sourceTokenDecimals: number;
|
|
6
|
-
sourceTokenPriceUsd: number | null;
|
|
7
|
-
destinationTokenPriceUsd: number | null;
|
|
8
|
-
depositAmount: string;
|
|
9
|
-
}): boolean;
|
|
10
|
-
//# sourceMappingURL=lifiHelpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lifiHelpers.d.ts","sourceRoot":"","sources":["../../../src/transactionIntent/utils/lifiHelpers.ts"],"names":[],"mappings":"AAMA,wBAAgB,qBAAqB,CAAC,EACpC,kBAAkB,EAClB,sBAAsB,EACtB,wBAAwB,EACxB,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACxB,aAAa,GACd,EAAE;IACD,kBAAkB,EAAE,MAAM,CAAA;IAC1B,sBAAsB,EAAE,MAAM,CAAA;IAC9B,wBAAwB,EAAE,MAAM,CAAA;IAChC,mBAAmB,EAAE,MAAM,CAAA;IAC3B,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,wBAAwB,EAAE,MAAM,GAAG,IAAI,CAAA;IACvC,aAAa,EAAE,MAAM,CAAA;CACtB,GAAG,OAAO,CA6CV"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { default as React, ReactNode } from 'react';
|
|
2
|
-
export interface FeeOption {
|
|
3
|
-
tokenAddress: string;
|
|
4
|
-
tokenSymbol: string;
|
|
5
|
-
tokenDecimals: number;
|
|
6
|
-
amount: string;
|
|
7
|
-
amountUSD: number;
|
|
8
|
-
notEnoughBalance?: boolean;
|
|
9
|
-
tokenImageUrl?: string;
|
|
10
|
-
chainId?: number;
|
|
11
|
-
amountUsdDisplay?: string;
|
|
12
|
-
}
|
|
13
|
-
export interface TokenWithBalance {
|
|
14
|
-
chainId: number;
|
|
15
|
-
contractAddress?: string;
|
|
16
|
-
balance?: string;
|
|
17
|
-
imageUrl?: string;
|
|
18
|
-
}
|
|
19
|
-
interface SelectedFeeTokenContextType {
|
|
20
|
-
selectedFeeToken: FeeOption | null;
|
|
21
|
-
setSelectedFeeToken: (token: FeeOption | null) => void;
|
|
22
|
-
clearSelectedFeeToken: () => void;
|
|
23
|
-
processedFeeOptions: FeeOption[];
|
|
24
|
-
setRawFeeOptions: (feeOptions: any[] | null | undefined, originChainId: number | undefined, availableTokens: TokenWithBalance[]) => void;
|
|
25
|
-
}
|
|
26
|
-
interface SelectedFeeTokenProviderProps {
|
|
27
|
-
children: ReactNode;
|
|
28
|
-
initialToken?: FeeOption | null;
|
|
29
|
-
}
|
|
30
|
-
export declare const SelectedFeeTokenProvider: React.FC<SelectedFeeTokenProviderProps>;
|
|
31
|
-
export declare const useSelectedFeeToken: () => SelectedFeeTokenContextType;
|
|
32
|
-
export {};
|
|
33
|
-
//# sourceMappingURL=useSelectedFeeToken.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useSelectedFeeToken.d.ts","sourceRoot":"","sources":["../../../src/widget/hooks/useSelectedFeeToken.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAOZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;AAiBd,MAAM,WAAW,SAAS;IACxB,YAAY,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAGD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAA;IACf,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,UAAU,2BAA2B;IACnC,gBAAgB,EAAE,SAAS,GAAG,IAAI,CAAA;IAClC,mBAAmB,EAAE,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,CAAA;IACtD,qBAAqB,EAAE,MAAM,IAAI,CAAA;IACjC,mBAAmB,EAAE,SAAS,EAAE,CAAA;IAChC,gBAAgB,EAAE,CAChB,UAAU,EAAE,GAAG,EAAE,GAAG,IAAI,GAAG,SAAS,EACpC,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,eAAe,EAAE,gBAAgB,EAAE,KAChC,IAAI,CAAA;CACV;AAMD,UAAU,6BAA6B;IACrC,QAAQ,EAAE,SAAS,CAAA;IACnB,YAAY,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;CAChC;AAED,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAC7C,6BAA6B,CAgN9B,CAAA;AAED,eAAO,MAAM,mBAAmB,QAAO,2BAUtC,CAAA"}
|
package/src/cctpqueue.ts
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { getTrailsApiUrl, getSequenceProjectAccessKey } from "./config.js"
|
|
2
|
-
import type { TrailsClient } from "./trailsClient.js"
|
|
3
|
-
|
|
4
|
-
// Narrow API client to one that supports queueing CCTP transfers without using 'any'
|
|
5
|
-
type CctpQueueCapable = {
|
|
6
|
-
queueCCTPTransfer: (
|
|
7
|
-
args: {
|
|
8
|
-
sourceTxHash?: string
|
|
9
|
-
metaTxHash?: string
|
|
10
|
-
sourceChainId: number
|
|
11
|
-
destinationChainId: number
|
|
12
|
-
},
|
|
13
|
-
headers?: object,
|
|
14
|
-
signal?: AbortSignal,
|
|
15
|
-
) => Promise<unknown>
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const fallbackQueueCCTPTransfer = async (args: {
|
|
19
|
-
sourceTxHash?: string
|
|
20
|
-
metaTxHash?: string
|
|
21
|
-
sourceChainId: number
|
|
22
|
-
destinationChainId: number
|
|
23
|
-
}): Promise<void> => {
|
|
24
|
-
const apiUrl = getTrailsApiUrl()
|
|
25
|
-
const accessKey = getSequenceProjectAccessKey()
|
|
26
|
-
const headers: { [key: string]: string } = {
|
|
27
|
-
"Content-Type": "application/json",
|
|
28
|
-
}
|
|
29
|
-
if (accessKey) headers["X-Access-Key"] = accessKey
|
|
30
|
-
await fetch(`${apiUrl.replace(/\/*$/, "")}/rpc/API/QueueCCTPTransfer`, {
|
|
31
|
-
method: "POST",
|
|
32
|
-
headers,
|
|
33
|
-
body: JSON.stringify(args),
|
|
34
|
-
})
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export function hasCctpQueue(client: unknown): client is CctpQueueCapable {
|
|
38
|
-
const maybe = client as { queueCCTPTransfer?: unknown } | null | undefined
|
|
39
|
-
return typeof maybe?.queueCCTPTransfer === "function"
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export async function queueCCTPTransfer({
|
|
43
|
-
trailsClient,
|
|
44
|
-
sourceTxHash,
|
|
45
|
-
sourceChainId,
|
|
46
|
-
destinationChainId,
|
|
47
|
-
}: {
|
|
48
|
-
trailsClient: TrailsClient
|
|
49
|
-
sourceTxHash: string
|
|
50
|
-
sourceChainId: number
|
|
51
|
-
destinationChainId: number
|
|
52
|
-
}): Promise<void> {
|
|
53
|
-
if (hasCctpQueue(trailsClient)) {
|
|
54
|
-
await trailsClient.queueCCTPTransfer({
|
|
55
|
-
sourceTxHash,
|
|
56
|
-
sourceChainId,
|
|
57
|
-
destinationChainId,
|
|
58
|
-
})
|
|
59
|
-
} else {
|
|
60
|
-
await fallbackQueueCCTPTransfer({
|
|
61
|
-
sourceTxHash,
|
|
62
|
-
sourceChainId,
|
|
63
|
-
destinationChainId,
|
|
64
|
-
})
|
|
65
|
-
}
|
|
66
|
-
}
|
package/src/preconditions.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type { TransactionPrecondition } from "@0xsequence/trails-api"
|
|
2
|
-
|
|
3
|
-
// Backward compatibility alias
|
|
4
|
-
export type IntentPrecondition = TransactionPrecondition
|
|
5
|
-
|
|
6
|
-
export function findPreconditionAddresses(
|
|
7
|
-
preconditions: TransactionPrecondition[],
|
|
8
|
-
originChainId: number,
|
|
9
|
-
destinationChainId: number,
|
|
10
|
-
): { originAddress?: string; destinationAddress?: string } {
|
|
11
|
-
const origin = preconditions.find(
|
|
12
|
-
(p) => p.chainId === originChainId && p.ownerAddress,
|
|
13
|
-
)
|
|
14
|
-
const destination = preconditions.find(
|
|
15
|
-
(p) => p.chainId === destinationChainId && p.ownerAddress,
|
|
16
|
-
)
|
|
17
|
-
|
|
18
|
-
return {
|
|
19
|
-
originAddress: origin?.ownerAddress,
|
|
20
|
-
destinationAddress: destination?.ownerAddress,
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export function findChainAndAddressesFromPreconditions(
|
|
25
|
-
preconditions: TransactionPrecondition[],
|
|
26
|
-
): { chainId: number; address: string }[] {
|
|
27
|
-
const addressesFromPreconditions: { chainId: number; address: string }[] = []
|
|
28
|
-
preconditions.forEach((p) => {
|
|
29
|
-
if (p.type === "tokenMinBalance" && p.ownerAddress && p.chainId) {
|
|
30
|
-
addressesFromPreconditions.push({
|
|
31
|
-
chainId: p.chainId,
|
|
32
|
-
address: p.ownerAddress,
|
|
33
|
-
})
|
|
34
|
-
}
|
|
35
|
-
})
|
|
36
|
-
return addressesFromPreconditions
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export function findFirstPreconditionForChainId(
|
|
40
|
-
preconditions: TransactionPrecondition[],
|
|
41
|
-
chainId: number,
|
|
42
|
-
): TransactionPrecondition | null {
|
|
43
|
-
const precondition = preconditions.find(
|
|
44
|
-
(p) => p.type === "tokenMinBalance" && p.chainId === chainId,
|
|
45
|
-
)
|
|
46
|
-
return precondition ?? null
|
|
47
|
-
}
|