@funkit/connect 12.15.3 → 12.17.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/CHANGELOG.md +80 -0
- package/dist/clients/axiom.d.ts +11 -3
- package/dist/clients/axiom.js +3 -1
- package/dist/clients/{chunk-7JYLS7IF.js → chunk-2L6IKKNH.js} +48 -32
- package/dist/clients/{chunk-6IH7AWFA.js → chunk-HANOVGPH.js} +1 -1
- package/dist/clients/{chunk-OB5GKTP2.js → chunk-LVR6RQMO.js} +1 -1
- package/dist/clients/chunk-R25GIAD5.js +59 -0
- package/dist/clients/{chunk-UZ3NA7HN.js → chunk-TWP5LFPX.js} +5 -5
- package/dist/clients/{chunk-BKK2BFIP.js → chunk-V4RIF2NR.js} +1 -1
- package/dist/clients/fanatics.js +2 -2
- package/dist/clients/internal/nado/withdrawalCallback.js +3 -3
- package/dist/clients/internal/nado/withdrawalErrors.js +2 -2
- package/dist/clients/internal/nado/withdrawalForm.js +4 -4
- package/dist/clients/internal/nado/withdrawalStatus.js +3 -3
- package/dist/clients/lighter.d.ts +29 -16
- package/dist/clients/lighter.js +149 -68
- package/dist/clients/mallard.js +2 -2
- package/dist/clients/nado.js +3 -3
- package/dist/consts/customers.d.ts +12 -1
- package/dist/domains/convert/assets.d.ts +22 -0
- package/dist/domains/convert/balances.d.ts +35 -0
- package/dist/domains/convert/errors.d.ts +38 -0
- package/dist/domains/convert/execution.d.ts +39 -0
- package/dist/domains/convert/inputAmount.d.ts +24 -0
- package/dist/domains/convert/quote.d.ts +24 -0
- package/dist/domains/convert/recipient.d.ts +21 -0
- package/dist/domains/convert/settlement.d.ts +47 -0
- package/dist/domains/convert/sourceWallet.d.ts +29 -0
- package/dist/domains/convert/submit.d.ts +46 -0
- package/dist/domains/convert/types.d.ts +165 -0
- package/dist/domains/nativeFeeReserve.d.ts +29 -0
- package/dist/domains/quote.d.ts +14 -1
- package/dist/hooks/queries/useWithdrawFops.d.ts +6 -0
- package/dist/hooks/queries/useWithdrawalQuote.d.ts +4 -1
- package/dist/hooks/statsig/index.d.ts +1 -1
- package/dist/hooks/track/WithdrawModalEvent.d.ts +1 -0
- package/dist/hooks/track/analytics/events.d.ts +59 -1
- package/dist/hooks/track/analytics/mappers.d.ts +5 -10
- package/dist/hooks/track/analytics/resolveIframeStepNavigation.d.ts +18 -0
- package/dist/hooks/track/analytics/useDepositAnalytics.d.ts +2 -2
- package/dist/hooks/track/analytics/useTrackSwappedIframeEvents.d.ts +5 -0
- package/dist/hooks/track/analytics/useWithdrawalAnalytics.d.ts +2 -2
- package/dist/hooks/track/useQuoteAttemptCounter.d.ts +2 -0
- package/dist/hooks/useConvertAssets.d.ts +9 -0
- package/dist/hooks/useConvertBalances.d.ts +44 -0
- package/dist/hooks/useConvertExecute.d.ts +77 -0
- package/dist/hooks/useConvertInputAmount.d.ts +26 -0
- package/dist/hooks/useConvertMaxAmount.d.ts +11 -0
- package/dist/hooks/useConvertQuote.d.ts +33 -0
- package/dist/hooks/useConvertTransactionStatus.d.ts +23 -0
- package/dist/hooks/useMaxSpendableAmount.d.ts +19 -0
- package/dist/hooks/usePrepareConvertSubmit.d.ts +22 -0
- package/dist/hooks/useStepQueryReadiness.d.ts +45 -15
- package/dist/hooks/useSwappedBuyingCrypto.d.ts +13 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2572 -1800
- package/dist/modals/CheckoutModal/SwappedIframe/swappedIframeReady.track.d.ts +8 -0
- package/dist/modals/CheckoutModal/stepTransition.d.ts +1 -2
- package/dist/modals/WithdrawalModal/LighterWithdrawal.d.ts +48 -15
- package/dist/modals/WithdrawalModal/WithdrawAmountInput.d.ts +3 -1
- package/dist/modals/WithdrawalModal/WithdrawalContent.d.ts +4 -1
- package/dist/modals/WithdrawalModal/useMaxWithdrawableAmount.d.ts +10 -0
- package/dist/modals/WithdrawalModal/withdrawalFormHelpers.d.ts +28 -8
- package/dist/providers/FunkitCheckoutContext/types.d.ts +7 -0
- package/dist/providers/FunkitQuoteContext.track.d.ts +23 -3
- package/dist/providers/FunkitStatsigWhnProvider.d.ts +0 -11
- package/dist/providers/SwappedProvider.d.ts +11 -2
- package/dist/utils/customer.d.ts +34 -4
- package/dist/wallets/walletConnectors/index.js +41 -41
- package/package.json +6 -6
- package/dist/clients/chunk-6EU6CXNH.js +0 -20
- package/dist/hooks/statsig/useExperimentV2.d.ts +0 -8
- package/dist/utils/statsig/client.d.ts +0 -4
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { AmountUnit } from '../../components/TokenSwapWidget/AmountUnitToggle/useAmountUnitToggle';
|
|
2
|
+
/**
|
|
3
|
+
* A typed amount in source base units, or `undefined` when empty or unpriced.
|
|
4
|
+
* - Token mode parses the typed digits, so nothing passes through a float.
|
|
5
|
+
* - USD mode divides by the live price, so it's as exact as that price.
|
|
6
|
+
*/
|
|
7
|
+
export declare function parseConvertInputToBaseUnits({ inputValue, unit, tokenAmount, decimals, }: {
|
|
8
|
+
inputValue: string;
|
|
9
|
+
unit: AmountUnit;
|
|
10
|
+
/** The unit toggle's token amount; only read in USD mode. */
|
|
11
|
+
tokenAmount: number | undefined;
|
|
12
|
+
decimals: number;
|
|
13
|
+
}): bigint | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Max as plain field text in the current unit, rounded down so the field never
|
|
16
|
+
* shows more than the user has. Display only: the exact amount is kept apart.
|
|
17
|
+
* Empty in USD mode without a price, rather than a token amount under a `$`.
|
|
18
|
+
*/
|
|
19
|
+
export declare function formatConvertMaxInput({ baseUnits, decimals, unit, unitPriceUsd, }: {
|
|
20
|
+
baseUnits: bigint;
|
|
21
|
+
decimals: number;
|
|
22
|
+
unit: AmountUnit;
|
|
23
|
+
unitPriceUsd: number | undefined;
|
|
24
|
+
}): string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { FeeBreakdownV2 } from '@funkit/api-base';
|
|
2
|
+
import type { RelayQuote } from '@funkit/fun-relay';
|
|
3
|
+
import type { ConvertResolvedAsset } from './types';
|
|
4
|
+
/** One exact-in Convert quote, with what the screen reads from it. */
|
|
5
|
+
export interface ConvertQuote {
|
|
6
|
+
/** The full response; execution reads `metadata.relayQuote` from it. */
|
|
7
|
+
response: RelayQuote;
|
|
8
|
+
/** Relay's expected output, in destination base units. */
|
|
9
|
+
amountOutBaseUnits: string | undefined;
|
|
10
|
+
/** Fee rows and the exchange rate. */
|
|
11
|
+
feeBreakdown: FeeBreakdownV2;
|
|
12
|
+
}
|
|
13
|
+
interface ConvertQuoteRequest {
|
|
14
|
+
apiKey: string;
|
|
15
|
+
sourceAsset: ConvertResolvedAsset;
|
|
16
|
+
destinationAsset: ConvertResolvedAsset;
|
|
17
|
+
amountInBaseUnits: bigint;
|
|
18
|
+
/** The source wallet that signs. */
|
|
19
|
+
userAddress: string;
|
|
20
|
+
recipientAddress: string;
|
|
21
|
+
}
|
|
22
|
+
/** Requests an exact-in quote for a Convert pair. Returns the quote and the fee breakdown. */
|
|
23
|
+
export declare function fetchConvertQuote({ apiKey, sourceAsset, destinationAsset, amountInBaseUnits, userAddress, recipientAddress, }: ConvertQuoteRequest): Promise<ConvertQuote>;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ConvertRecipientAddresses, ConvertResolvedAsset, ConvertVm } from './types';
|
|
2
|
+
export type ConvertRecipientUnavailableReason = 'unsupportedChain' | 'missingAddress' | 'invalidAddress' | 'resolverFailed';
|
|
3
|
+
export type ConvertRecipientSelection = {
|
|
4
|
+
status: 'available';
|
|
5
|
+
/** Checksummed for EVM and Hypercore, validated base58 for Solana. */
|
|
6
|
+
address: string;
|
|
7
|
+
} | {
|
|
8
|
+
status: 'unavailable';
|
|
9
|
+
reason: ConvertRecipientUnavailableReason;
|
|
10
|
+
};
|
|
11
|
+
/** The host's default recipient for a VM, before any per-asset override. */
|
|
12
|
+
export declare function getDefaultConvertRecipient(vm: ConvertVm, recipientAddresses: ConvertRecipientAddresses): string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Resolves and validates where a destination asset's funds land: the host's
|
|
15
|
+
* custom recipient if it returns one, else the VM default. The custom resolver
|
|
16
|
+
* is not called for a chain Convert can't execute on.
|
|
17
|
+
*/
|
|
18
|
+
export declare function selectConvertRecipient({ asset, recipientAddresses, }: {
|
|
19
|
+
asset: ConvertResolvedAsset;
|
|
20
|
+
recipientAddresses: ConvertRecipientAddresses;
|
|
21
|
+
}): Promise<ConvertRecipientSelection>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type DirectExecution } from '@funkit/api-base';
|
|
2
|
+
import type { ConvertSubmissionIds } from './execution';
|
|
3
|
+
import type { ConvertQuote } from './quote';
|
|
4
|
+
import type { ConvertResolvedAsset, ConvertSuccessResult, ConvertVm } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* Tags the record as a conversion. Nothing on the backend parses this; the
|
|
7
|
+
* address stays third, where analytics reads a source address.
|
|
8
|
+
*/
|
|
9
|
+
export declare function buildConvertSourceOfFund(vm: ConvertVm, address: string): string;
|
|
10
|
+
/** One submitted conversion, with everything its record and result need. */
|
|
11
|
+
export interface ConvertExecutionContext {
|
|
12
|
+
submission: ConvertSubmissionIds;
|
|
13
|
+
quote: ConvertQuote;
|
|
14
|
+
amountInBaseUnits: bigint;
|
|
15
|
+
sourceAsset: ConvertResolvedAsset;
|
|
16
|
+
sourceVm: ConvertVm;
|
|
17
|
+
sourceAddress: string;
|
|
18
|
+
destinationAsset: ConvertResolvedAsset;
|
|
19
|
+
recipientAddress: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Registers the deposit as a direct execution so the backend tracks its
|
|
23
|
+
* settlement with Relay, the same as a checkout or withdrawal. Returns the
|
|
24
|
+
* record as registered, which is enough to start polling its status.
|
|
25
|
+
*/
|
|
26
|
+
export declare function createConvertDirectExecution({ context, apiKey, userId, }: {
|
|
27
|
+
context: ConvertExecutionContext;
|
|
28
|
+
apiKey: string;
|
|
29
|
+
userId: string;
|
|
30
|
+
}): Promise<DirectExecution>;
|
|
31
|
+
/** What a settled conversion's direct execution reports beyond its status. */
|
|
32
|
+
export interface ConvertSettlement {
|
|
33
|
+
/** Relay's route id, for when the quote didn't carry one. */
|
|
34
|
+
requestId: string | undefined;
|
|
35
|
+
destinationTxIds: string[];
|
|
36
|
+
/** Relay's record of the filled request; never the quote. */
|
|
37
|
+
settledAmountOutBaseUnits: string | undefined;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Reads the Convert extras from a direct execution Relay settled successfully;
|
|
41
|
+
* `useCheckoutDirectExecutionHistory` already decides whether it did.
|
|
42
|
+
*/
|
|
43
|
+
export declare function readConvertSettlement(directExecution: DirectExecution): ConvertSettlement;
|
|
44
|
+
export declare function buildConvertSuccessResult({ context, settlement, }: {
|
|
45
|
+
context: ConvertExecutionContext;
|
|
46
|
+
settlement: ConvertSettlement;
|
|
47
|
+
}): ConvertSuccessResult;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ConvertSourceWallet, ConvertVm, GetConvertSourceWallet } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Which wallet kind a source chain needs, or `undefined` when Convert can't
|
|
4
|
+
* execute there. EVM needs the chain registered in `@funkit/chains` (wagmi
|
|
5
|
+
* chain list, icons, explorers), which is what keeps Arc out for now.
|
|
6
|
+
*/
|
|
7
|
+
export declare function resolveConvertVm(chainId: string): ConvertVm | undefined;
|
|
8
|
+
export type ConvertSourceUnavailableReason = 'unsupportedChain' | 'vmMismatch' | 'invalidWalletAddress' | 'resolverFailed';
|
|
9
|
+
export type ConvertSourceWalletSelection = {
|
|
10
|
+
status: 'available';
|
|
11
|
+
vm: ConvertVm;
|
|
12
|
+
wallet: ConvertSourceWallet;
|
|
13
|
+
/** Checksummed for EVM and Hypercore, validated base58 for Solana. */
|
|
14
|
+
address: string;
|
|
15
|
+
} | {
|
|
16
|
+
status: 'unavailable';
|
|
17
|
+
reason: ConvertSourceUnavailableReason;
|
|
18
|
+
};
|
|
19
|
+
/** Accepts a resolved wallet only if it is the kind the source chain needs. */
|
|
20
|
+
export declare function checkConvertSourceWallet(chainId: string, wallet: ConvertSourceWallet): ConvertSourceWalletSelection;
|
|
21
|
+
/**
|
|
22
|
+
* Resolves and validates the wallet for a source chain. The resolver is not
|
|
23
|
+
* called for a chain Convert can't execute on, since a host resolver may do
|
|
24
|
+
* real work (Polygon confirms the Polymarket proxy with their relayer).
|
|
25
|
+
*/
|
|
26
|
+
export declare function selectConvertSourceWallet({ chainId, getSourceWallet, }: {
|
|
27
|
+
chainId: string;
|
|
28
|
+
getSourceWallet: GetConvertSourceWallet;
|
|
29
|
+
}): Promise<ConvertSourceWalletSelection>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ConvertQuote } from './quote';
|
|
2
|
+
import type { ConvertResolvedAsset } from './types';
|
|
3
|
+
/** Why a submit stopped before signing. Nothing was sent. */
|
|
4
|
+
export type ConvertSubmitBlockReason =
|
|
5
|
+
/** No quote on screen to confirm. */
|
|
6
|
+
'noQuote'
|
|
7
|
+
/** The fresh balance read failed or left this asset out. */
|
|
8
|
+
| 'balanceUnavailable'
|
|
9
|
+
/** A native EVM source's gas price hasn't loaded, so Max is unknown. */
|
|
10
|
+
| 'feeReserveLoading'
|
|
11
|
+
/** The amount is above the fresh balance less its fee reserve. */
|
|
12
|
+
| 'insufficientBalance'
|
|
13
|
+
/** The quote doesn't say what the user receives. */
|
|
14
|
+
| 'quoteMissingReceiveAmount'
|
|
15
|
+
/** The quote prices the source in different decimals than the SDK resolved. */
|
|
16
|
+
| 'decimalsMismatch';
|
|
17
|
+
/**
|
|
18
|
+
* The pre-sign check's outcome. Only `ready` may sign, and it signs the quote
|
|
19
|
+
* on screen, like withdrawal. Nothing here edits the amount: an over-balance
|
|
20
|
+
* amount is reported with the fresh Max, for the screen to offer like
|
|
21
|
+
* checkout's "Deposit max balance".
|
|
22
|
+
*/
|
|
23
|
+
export type ConvertSubmitPreparation = {
|
|
24
|
+
status: 'ready';
|
|
25
|
+
quote: ConvertQuote;
|
|
26
|
+
}
|
|
27
|
+
/** `maxBaseUnits` is 0 when nothing is left after the fee reserve. */
|
|
28
|
+
| {
|
|
29
|
+
status: 'blocked';
|
|
30
|
+
reason: 'insufficientBalance';
|
|
31
|
+
maxBaseUnits: bigint;
|
|
32
|
+
} | {
|
|
33
|
+
status: 'blocked';
|
|
34
|
+
reason: Exclude<ConvertSubmitBlockReason, 'insufficientBalance'>;
|
|
35
|
+
error?: unknown;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* The source decimals Relay priced the quote in, when it reports them. A
|
|
39
|
+
* mismatch means the amount and the host's balance were both scaled with the
|
|
40
|
+
* wrong decimals, which the balance check can't see.
|
|
41
|
+
*/
|
|
42
|
+
export declare function getQuoteSourceDecimals(quote: ConvertQuote): number | undefined;
|
|
43
|
+
export declare function hasQuoteDecimalsMismatch({ quote, sourceAsset, }: {
|
|
44
|
+
quote: ConvertQuote;
|
|
45
|
+
sourceAsset: ConvertResolvedAsset;
|
|
46
|
+
}): boolean;
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import type { HypercoreSigner } from '@funkit/connect-core/clients/hypercore';
|
|
2
|
+
import type { SolanaWalletSigner } from '../../interfaces/solanaWallet';
|
|
3
|
+
import type { WithdrawalClient } from '../../wallets/Wallet';
|
|
4
|
+
/** Relay's names for the VMs a Convert source or destination can live on. */
|
|
5
|
+
export type ConvertVm = 'evm' | 'svm' | 'hypevm';
|
|
6
|
+
/**
|
|
7
|
+
* A token the host lists for Convert, by Fun chain id and token address.
|
|
8
|
+
* Every chain's native asset (ETH, BNB, SOL, Hypercore perps USDC) uses the
|
|
9
|
+
* `NATIVE_TOKEN` placeholder, the same as deposit configs; the SDK resolves
|
|
10
|
+
* chain-specific ids from it. Balance entries name these same addresses.
|
|
11
|
+
* Decimals are resolved from Fun's asset list, not supplied here.
|
|
12
|
+
* @experimental
|
|
13
|
+
*/
|
|
14
|
+
export interface ConvertAsset {
|
|
15
|
+
chainId: string;
|
|
16
|
+
address: string;
|
|
17
|
+
symbol: string;
|
|
18
|
+
/**
|
|
19
|
+
* Icon to show for this token. Optional: without it the SDK uses Fun's
|
|
20
|
+
* asset list, then a symbol-based default. Must be an http(s) URL.
|
|
21
|
+
*/
|
|
22
|
+
iconSrc?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A listed asset with the decimals the SDK resolved from Fun's asset list, so
|
|
26
|
+
* the host never has to. What {@link GetConvertBalances} receives.
|
|
27
|
+
* @experimental
|
|
28
|
+
*/
|
|
29
|
+
export interface ConvertResolvedAsset extends ConvertAsset {
|
|
30
|
+
decimals: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The wallet that signs on one source chain, in the shape the SDK already
|
|
34
|
+
* executes with:
|
|
35
|
+
* - `evm`: a {@link WithdrawalClient}. `sendTransaction` must return a real
|
|
36
|
+
* on-chain hash; `sendTransactions` is opt-in and must also return a tx hash,
|
|
37
|
+
* never a wallet calls id. Its `adaptedWallet` isn't read: Solana and
|
|
38
|
+
* Hypercore sources use their own entries below.
|
|
39
|
+
* - `svm`: a {@link SolanaWalletSigner}. `signAndSendTransaction` resolves the
|
|
40
|
+
* 64-byte signature; when both signing methods are supplied the SDK uses
|
|
41
|
+
* `signTransaction` and submits itself.
|
|
42
|
+
* - `hypevm`: a {@link HypercoreSigner}; the SDK builds the Relay action wallet
|
|
43
|
+
* from it.
|
|
44
|
+
* @experimental
|
|
45
|
+
*/
|
|
46
|
+
export type ConvertSourceWallet = {
|
|
47
|
+
vm: 'evm';
|
|
48
|
+
wallet: Omit<WithdrawalClient, 'adaptedWallet'>;
|
|
49
|
+
} | {
|
|
50
|
+
vm: 'svm';
|
|
51
|
+
signer: SolanaWalletSigner;
|
|
52
|
+
} | {
|
|
53
|
+
vm: 'hypevm';
|
|
54
|
+
signer: HypercoreSigner;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Resolves the signing wallet for a source chain. Called when the user picks a
|
|
58
|
+
* source or flips direction, never for chains they haven't chosen. Polygon
|
|
59
|
+
* resolves to the Polymarket proxy client, other EVM chains to the EOA.
|
|
60
|
+
* @experimental
|
|
61
|
+
*/
|
|
62
|
+
export type GetConvertSourceWallet = (params: {
|
|
63
|
+
chainId: string;
|
|
64
|
+
}) => Promise<ConvertSourceWallet>;
|
|
65
|
+
/**
|
|
66
|
+
* One listed asset's balance, as the host read it: a base-unit integer string
|
|
67
|
+
* in the decimals the SDK passed. `"0"` means a real zero.
|
|
68
|
+
* @experimental
|
|
69
|
+
*/
|
|
70
|
+
export interface ConvertAssetBalance {
|
|
71
|
+
chainId: string;
|
|
72
|
+
address: string;
|
|
73
|
+
balance: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Reads live balances for the assets it's given, in one call.
|
|
77
|
+
* - Polled with every listed asset while the Convert screen is open.
|
|
78
|
+
* - Called with only the source asset right before signing; answer for
|
|
79
|
+
* exactly the assets passed.
|
|
80
|
+
* - Read fresh from the host's balance source, not from page state.
|
|
81
|
+
* - Exclude anything the user can't move (Hypercore locked collateral, margin).
|
|
82
|
+
* - Leave out any asset that couldn't be read; the SDK shows it as
|
|
83
|
+
* unavailable, never as 0. Don't throw: an omission already says
|
|
84
|
+
* everything a throw could, per asset instead of for all of them.
|
|
85
|
+
* @experimental
|
|
86
|
+
*/
|
|
87
|
+
export type GetConvertBalances = (params: {
|
|
88
|
+
assets: ConvertResolvedAsset[];
|
|
89
|
+
}) => Promise<ConvertAssetBalance[]>;
|
|
90
|
+
/** A chain-native transaction id: an EVM hash or a base58 Solana signature. */
|
|
91
|
+
export interface ConvertTransaction {
|
|
92
|
+
chainId: string;
|
|
93
|
+
txId: string;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Fired once, after Relay reports destination settlement. A source receipt
|
|
97
|
+
* alone never fires it.
|
|
98
|
+
* @experimental
|
|
99
|
+
*/
|
|
100
|
+
export interface ConvertSuccessResult {
|
|
101
|
+
requestId: string;
|
|
102
|
+
source: ConvertResolvedAsset & {
|
|
103
|
+
walletAddress: string;
|
|
104
|
+
};
|
|
105
|
+
destination: ConvertResolvedAsset & {
|
|
106
|
+
walletAddress: string;
|
|
107
|
+
};
|
|
108
|
+
amountInBaseUnits: string;
|
|
109
|
+
quotedAmountOutBaseUnits: string;
|
|
110
|
+
/** Only when the provider reports a measured amount; never the quote. */
|
|
111
|
+
settledAmountOutBaseUnits?: string;
|
|
112
|
+
/** May be empty for a leg with no reported on-chain transaction. */
|
|
113
|
+
sourceTransactions: ConvertTransaction[];
|
|
114
|
+
destinationTransactions: ConvertTransaction[];
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Where a conversion stopped:
|
|
118
|
+
* - `preSign`: the pre-sign check rejected the quote; nothing was signed.
|
|
119
|
+
* - `source`: the source-chain step (signing, sending, switching chain)
|
|
120
|
+
* failed before funds moved; safe to retry.
|
|
121
|
+
* - `unknown`: it may have been submitted but can't be tracked; check the
|
|
122
|
+
* wallet, and never retry.
|
|
123
|
+
* - `settlement`: Relay's fill on the destination failed or was refunded.
|
|
124
|
+
* @experimental
|
|
125
|
+
*/
|
|
126
|
+
export type ConvertErrorStage = 'preSign' | 'source' | 'unknown' | 'settlement';
|
|
127
|
+
/** @experimental */
|
|
128
|
+
export interface ConvertErrorResult {
|
|
129
|
+
stage: ConvertErrorStage;
|
|
130
|
+
/** The user declined a signature; not worth alerting on. */
|
|
131
|
+
userRejected: boolean;
|
|
132
|
+
/** For logs and debugging; not localized or meant for display. */
|
|
133
|
+
message: string;
|
|
134
|
+
/** Whatever was thrown, untouched: a viem, Relay or host wallet error. */
|
|
135
|
+
error: unknown;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Where converted funds land, by destination VM. No signing happens on the
|
|
139
|
+
* destination side. A destination with no resolvable recipient is shown as
|
|
140
|
+
* unavailable.
|
|
141
|
+
* @experimental
|
|
142
|
+
*/
|
|
143
|
+
export interface ConvertRecipientAddresses {
|
|
144
|
+
evm?: string;
|
|
145
|
+
svm?: string;
|
|
146
|
+
/** Falls back to `evm`; Hyperliquid accounts share the EVM address. */
|
|
147
|
+
hypevm?: string;
|
|
148
|
+
/**
|
|
149
|
+
* Recipient for one destination asset when it differs from the VM default,
|
|
150
|
+
* e.g. a Polymarket proxy for pUSD. Return undefined to use the default.
|
|
151
|
+
*/
|
|
152
|
+
getCustomRecipient?: (asset: ConvertResolvedAsset) => Promise<string | undefined>;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Everything the Convert screen needs from the host, in one place.
|
|
156
|
+
* @experimental
|
|
157
|
+
*/
|
|
158
|
+
export interface ConvertConfig {
|
|
159
|
+
assets: ConvertAsset[];
|
|
160
|
+
recipientAddresses: ConvertRecipientAddresses;
|
|
161
|
+
getSourceWallet: GetConvertSourceWallet;
|
|
162
|
+
getBalances: GetConvertBalances;
|
|
163
|
+
onSuccess?: (result: ConvertSuccessResult) => void;
|
|
164
|
+
onError?: (error: ConvertErrorResult) => void;
|
|
165
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Dnum } from 'dnum';
|
|
2
|
+
/**
|
|
3
|
+
* SOL held back when the source is native SOL, which also pays the fee.
|
|
4
|
+
* - The rent-exempt minimum: Solana rejects leaving the payer between 0 and it
|
|
5
|
+
* (0.00089088 SOL before SIMD-0437 began lowering it in 2026).
|
|
6
|
+
* - Headroom for the priority fee added at signing, which quotes leave out
|
|
7
|
+
* (up to ~56k lamports on Relay SOL deposits in Oct 2026).
|
|
8
|
+
*/
|
|
9
|
+
export declare const SOLANA_NATIVE_FEE_RESERVE = "0.0025";
|
|
10
|
+
/**
|
|
11
|
+
* Which fee reserve a source token needs, by the VM that charges the fee:
|
|
12
|
+
* - `evm`: native ETH/BNB/POL; reserve live gas.
|
|
13
|
+
* - `svm`: native SOL; reserve {@link SOLANA_NATIVE_FEE_RESERVE}.
|
|
14
|
+
*
|
|
15
|
+
* `undefined` when the fee isn't paid from this token (ERC-20, SPL, Hypercore USDC).
|
|
16
|
+
*/
|
|
17
|
+
export type NativeFeeReserveType = 'evm' | 'svm';
|
|
18
|
+
export declare function getNativeFeeReserveType(chainId: string, tokenAddress: string): NativeFeeReserveType | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* The most a source token can send: the balance less its fee reserve, floored
|
|
21
|
+
* at zero, in the balance's decimals. An EVM native source without a gas
|
|
22
|
+
* reserve (a chain that can't be priced) gets the full balance.
|
|
23
|
+
*/
|
|
24
|
+
export declare function getMaxSpendableAmount({ balance, chainId, tokenAddress, evmGasReserve, }: {
|
|
25
|
+
balance: Dnum;
|
|
26
|
+
chainId: string;
|
|
27
|
+
tokenAddress: string;
|
|
28
|
+
evmGasReserve?: Dnum;
|
|
29
|
+
}): Dnum;
|
package/dist/domains/quote.d.ts
CHANGED
|
@@ -44,6 +44,18 @@ export interface CheckedAssetAmount {
|
|
|
44
44
|
minTargetAssetAmount?: Dnum;
|
|
45
45
|
}
|
|
46
46
|
export declare function checkAssetAmount(checkoutItem: FunkitActiveCheckoutItem, finalEstimation: FunkitCheckoutQuoteResult, wagmiConfig: Config, walletAddress: Address, brokerage?: BrokerageDetails): Promise<CheckedAssetAmount>;
|
|
47
|
+
export type QuotePhaseResult = {
|
|
48
|
+
phase: 'base';
|
|
49
|
+
quote: CheckoutQuoteResponse;
|
|
50
|
+
status: 'success';
|
|
51
|
+
} | {
|
|
52
|
+
phase: 'final';
|
|
53
|
+
quote: FunkitCheckoutQuoteResult;
|
|
54
|
+
status: 'success';
|
|
55
|
+
} | {
|
|
56
|
+
phase: 'base' | 'final';
|
|
57
|
+
status: 'failed';
|
|
58
|
+
};
|
|
47
59
|
export interface CheckoutQuoteParams {
|
|
48
60
|
checkoutItem: FunkitActiveCheckoutItem;
|
|
49
61
|
walletAddress: Address;
|
|
@@ -57,8 +69,9 @@ export interface CheckoutQuoteParams {
|
|
|
57
69
|
**/
|
|
58
70
|
senderAddress?: Address;
|
|
59
71
|
isWithdrawal?: boolean;
|
|
72
|
+
onQuotePhaseSettled?: (result: QuotePhaseResult) => void;
|
|
60
73
|
}
|
|
61
|
-
export declare function getQuoteAndEstimation({ checkoutItem, walletAddress, apiKey, newPaymentMethodInfo, wagmiConfig, loginType, directExecutionInfo, senderAddress, isWithdrawal, }: CheckoutQuoteParams): Promise<{
|
|
74
|
+
export declare function getQuoteAndEstimation({ checkoutItem, walletAddress, apiKey, newPaymentMethodInfo, wagmiConfig, loginType, directExecutionInfo, senderAddress, isWithdrawal, onQuotePhaseSettled, }: CheckoutQuoteParams): Promise<{
|
|
62
75
|
baseQuote: CheckoutQuoteResponse;
|
|
63
76
|
checkedAssetAmount: CheckedAssetAmount;
|
|
64
77
|
finalEstimation: FunkitCheckoutQuoteResult;
|
|
@@ -13,6 +13,12 @@ export declare const useWithdrawFops: (params: {
|
|
|
13
13
|
* is resolved, so the first /fops call never goes out uncapped.
|
|
14
14
|
*/
|
|
15
15
|
enabled?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Whether an `enabled: false` caller gate is actively pending and expected
|
|
18
|
+
* to become true. Keeps readiness from waiting on deliberately disabled
|
|
19
|
+
* queries.
|
|
20
|
+
*/
|
|
21
|
+
enablePending?: boolean;
|
|
16
22
|
}) => {
|
|
17
23
|
data: GetFopsResponse | undefined;
|
|
18
24
|
isLoading: boolean;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import type { FunCheckoutStep } from '../../modals/CheckoutModal/FunCheckoutStep';
|
|
2
|
+
import type { WithdrawalModalStep } from '../../modals/WithdrawalModal/types';
|
|
1
3
|
import { type FunkitWithdrawalConfig } from '../../providers/FunkitCheckoutContext';
|
|
2
4
|
interface CheckoutQuoteParams {
|
|
5
|
+
analyticsStep: FunCheckoutStep | WithdrawalModalStep;
|
|
3
6
|
recipientAddress: string;
|
|
4
7
|
selectedChainId: string | undefined;
|
|
5
8
|
selectedTokenAddress: string | null | undefined;
|
|
@@ -12,7 +15,7 @@ export declare const PLACEHOLDER_WITHDRAWAL_WALLET_ADDRESS = "0x0000000000000000
|
|
|
12
15
|
/**
|
|
13
16
|
* Simplified quoting logic used for withdrawal UI only.
|
|
14
17
|
*/
|
|
15
|
-
export declare function useWithdrawalQuote({ recipientAddress, selectedChainId, selectedTokenAddress, selectedTokenSymbol, config, isEnabled, }: CheckoutQuoteParams): {
|
|
18
|
+
export declare function useWithdrawalQuote({ analyticsStep, recipientAddress, selectedChainId, selectedTokenAddress, selectedTokenSymbol, config, isEnabled, }: CheckoutQuoteParams): {
|
|
16
19
|
quoteEnabled: boolean;
|
|
17
20
|
withdrawalWalletAddress: `0x${string}`;
|
|
18
21
|
data: {
|
|
@@ -7,6 +7,7 @@ export declare enum WithdrawModalEvent {
|
|
|
7
7
|
CASH_FOP_SELECTED = "fw::cash_fop_selected",
|
|
8
8
|
FINAL_QUOTE = "fw::quote::final_quote",
|
|
9
9
|
VIEW_TRANSACTION_BREAKDOWN = "fw::quote::view_transaction_breakdown",
|
|
10
|
+
QUERY_WITHDRAW_FOPS = "fw::query::withdraw_fops",
|
|
10
11
|
PENDING_CALLBACK = "fw::pending_callback",
|
|
11
12
|
SUCCESS = "fw::success",
|
|
12
13
|
SWAPPED_IFRAME_READY = "fw::swapped::ready",
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { QuoteMode } from '../../../domains/quoteMode';
|
|
2
|
-
import type { DirectExecutionType } from '@funkit/api-base';
|
|
2
|
+
import type { DirectExecutionType, FormOfPaymentType } from '@funkit/api-base';
|
|
3
3
|
import type { CheckoutStatus } from '../../../domains/checkout';
|
|
4
4
|
import type { PaymentMethodType } from '../../../hooks/usePaymentSources';
|
|
5
5
|
import type { FunCheckoutStep } from '../../../modals/CheckoutModal/FunCheckoutStep';
|
|
6
6
|
import type { AmountSelectionType } from '../../../modals/CheckoutModal/InputAmount/state';
|
|
7
7
|
import type { WithdrawalModalStep } from '../../../modals/WithdrawalModal/types';
|
|
8
8
|
import type { FunNotificationType } from '../../../components/FunNotification/FunNotification';
|
|
9
|
+
import type { PaymentMethod } from '@funkit/connect-core';
|
|
9
10
|
/**
|
|
10
11
|
* Analytics v2 — the improved, explicit Statsig event scheme that will replace
|
|
11
12
|
* the `fc::`/`fw::` enums in `../CheckoutModalEvent.ts` / `../WithdrawModalEvent.ts`.
|
|
@@ -28,8 +29,12 @@ export declare enum AnalyticsEvent {
|
|
|
28
29
|
DEPOSIT_TRANSACTION_BREAKDOWN_CLICKED = "fc_deposit_transaction_breakdown_clicked",
|
|
29
30
|
DEPOSIT_TRANSACTION_SUBMITTED = "fc_deposit_transaction_submitted",
|
|
30
31
|
ERROR_SHOWN = "fc_error_shown",
|
|
32
|
+
IFRAME_STEP_VIEWED = "fc_iframe_step_viewed",
|
|
31
33
|
MODAL_CLOSED = "fc_modal_closed",
|
|
32
34
|
MODAL_OPENED = "fc_modal_opened",
|
|
35
|
+
PERF_IFRAME_READY = "fc_perf_iframe_ready",
|
|
36
|
+
PERF_QUOTE = "fc_perf_quote",
|
|
37
|
+
PERF_STEP_READY = "fc_perf_step_ready",
|
|
33
38
|
STEP_VIEWED = "fc_step_viewed",
|
|
34
39
|
TAB_SWITCHED = "fc_tab_switched",
|
|
35
40
|
WITHDRAWAL_AMOUNT_CONFIRMED = "fc_withdrawal_amount_confirmed",
|
|
@@ -274,6 +279,21 @@ export type StepViewedProperties = {
|
|
|
274
279
|
*/
|
|
275
280
|
step_index: number;
|
|
276
281
|
};
|
|
282
|
+
/** Payload specific to {@link AnalyticsEvent.IFRAME_STEP_VIEWED}. */
|
|
283
|
+
export type IframeStepViewedProperties = {
|
|
284
|
+
iframe_step: string;
|
|
285
|
+
iframe_step_index: number;
|
|
286
|
+
/**
|
|
287
|
+
* True when `iframe_step` already appears in the current iframe-controller
|
|
288
|
+
* navigation history. This is inferred from recurrence, not an observed Back
|
|
289
|
+
* action, so a forward loop to a previously visited step may also be `true`.
|
|
290
|
+
*/
|
|
291
|
+
is_back_navigation: boolean;
|
|
292
|
+
payment_method: string;
|
|
293
|
+
payment_rail: 'swapped';
|
|
294
|
+
prev_iframe_step: string | null;
|
|
295
|
+
step: AnalyticsStep;
|
|
296
|
+
};
|
|
277
297
|
export type DepositTransferInteractionAction = 'address_copied' | 'chain_changed' | 'token_changed';
|
|
278
298
|
export type DepositTransferInteractedProperties = PaymentMethodProperties & {
|
|
279
299
|
action: DepositTransferInteractionAction;
|
|
@@ -296,6 +316,40 @@ export type WithdrawalMethodSelectedProperties = PaymentMethodProperties & {
|
|
|
296
316
|
connection_status: ConnectionStatus | null;
|
|
297
317
|
payment_rail: AnalyticsPaymentRail | null;
|
|
298
318
|
};
|
|
319
|
+
/** Payload specific to {@link AnalyticsEvent.PERF_QUOTE}. */
|
|
320
|
+
export type PerfQuoteProperties = DepositAssetContextProperties & {
|
|
321
|
+
execution_type: DirectExecutionType | null;
|
|
322
|
+
/** 1-based quote request index within the checkout and quote flow. */
|
|
323
|
+
quote_attempt: number;
|
|
324
|
+
/** 'base' measures time-to-first-quote; 'final' measures time-to-full-quote. */
|
|
325
|
+
quote_phase: 'base' | 'final';
|
|
326
|
+
source_amount: string | null;
|
|
327
|
+
status: 'failed' | 'success';
|
|
328
|
+
step: AnalyticsStep;
|
|
329
|
+
target_amount: string | null;
|
|
330
|
+
total_ms: number;
|
|
331
|
+
trade_type: QuoteMode;
|
|
332
|
+
};
|
|
333
|
+
export type PerfStepReadyProperties = {
|
|
334
|
+
[query_timing_ms: `query_timing_ms.${string}`]: number;
|
|
335
|
+
is_first: boolean;
|
|
336
|
+
payment_method: PaymentMethod | Lowercase<FormOfPaymentType> | null;
|
|
337
|
+
step: AnalyticsStep;
|
|
338
|
+
total_ms: number;
|
|
339
|
+
};
|
|
340
|
+
/** Payload specific to {@link AnalyticsEvent.PERF_IFRAME_READY}. */
|
|
341
|
+
export type PerfIframeReadyProperties = {
|
|
342
|
+
/** First time this checkout's Swapped iframe reported ready. */
|
|
343
|
+
is_first: boolean;
|
|
344
|
+
payment_method: string;
|
|
345
|
+
payment_rail: 'swapped';
|
|
346
|
+
step: AnalyticsStep;
|
|
347
|
+
/**
|
|
348
|
+
* User-visible wait time (from step mount to ready).
|
|
349
|
+
* May be ~0 if iframe was already fully preloaded.
|
|
350
|
+
*/
|
|
351
|
+
total_ms: number;
|
|
352
|
+
};
|
|
299
353
|
export type WithdrawalTransferInteractionAction = 'address_autofilled' | 'address_changed' | 'amount_changed' | 'chain_changed' | 'max_button_clicked' | 'token_changed';
|
|
300
354
|
/** Payload specific to {@link AnalyticsEvent.WITHDRAWAL_TRANSFER_INTERACTED}. */
|
|
301
355
|
export type WithdrawalTransferInteractedProperties = PaymentMethodProperties & {
|
|
@@ -357,8 +411,12 @@ export type AnalyticsEventProperties = {
|
|
|
357
411
|
[AnalyticsEvent.DEPOSIT_TRANSACTION_BREAKDOWN_CLICKED]: TransactionBreakdownClickedProperties;
|
|
358
412
|
[AnalyticsEvent.DEPOSIT_TRANSACTION_SUBMITTED]: TransactionSubmittedProperties;
|
|
359
413
|
[AnalyticsEvent.ERROR_SHOWN]: ErrorShownProperties;
|
|
414
|
+
[AnalyticsEvent.IFRAME_STEP_VIEWED]: IframeStepViewedProperties;
|
|
360
415
|
[AnalyticsEvent.MODAL_CLOSED]: ModalClosedProperties;
|
|
361
416
|
[AnalyticsEvent.MODAL_OPENED]: ModalOpenedProperties;
|
|
417
|
+
[AnalyticsEvent.PERF_IFRAME_READY]: PerfIframeReadyProperties;
|
|
418
|
+
[AnalyticsEvent.PERF_QUOTE]: PerfQuoteProperties;
|
|
419
|
+
[AnalyticsEvent.PERF_STEP_READY]: PerfStepReadyProperties;
|
|
362
420
|
[AnalyticsEvent.STEP_VIEWED]: StepViewedProperties;
|
|
363
421
|
[AnalyticsEvent.TAB_SWITCHED]: TabSwitchedProperties;
|
|
364
422
|
[AnalyticsEvent.WITHDRAWAL_AMOUNT_CONFIRMED]: WithdrawalAmountConfirmedProperties;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { FormOfPaymentType, type MeldServiceProvider } from '@funkit/api-base';
|
|
1
|
+
import { FormOfPaymentType, type MeldServiceProvider, type SwappedFormOfPayment } from '@funkit/api-base';
|
|
2
2
|
import { PaymentMethod, type PaymentMethodInfo } from '../../../domains/paymentMethods';
|
|
3
|
-
import type { AnalyticsFlow, AnalyticsStep, PaymentMethodProperties } from './events';
|
|
4
3
|
import { FunCheckoutStep } from '../../../modals/CheckoutModal/FunCheckoutStep';
|
|
5
4
|
import type { CheckoutModalState } from '../../../modals/CheckoutModal/stepTransition';
|
|
6
|
-
import
|
|
5
|
+
import { WithdrawalModalStep } from '../../../modals/WithdrawalModal/types';
|
|
6
|
+
import type { AnalyticsFlow, AnalyticsStep, PaymentMethodProperties } from './events';
|
|
7
7
|
/** Round analytics amounts before Statsig stringifies event metadata. */
|
|
8
8
|
export declare function formatAnalyticsAmount(amount: number | null): string | null;
|
|
9
9
|
export declare function formatAnalyticsStep(step: FunCheckoutStep | WithdrawalModalStep): AnalyticsStep;
|
|
@@ -19,10 +19,5 @@ export declare function resolvePaymentMethodProperties(args: {
|
|
|
19
19
|
paymentMethodInfo: PaymentMethodInfo;
|
|
20
20
|
serviceProvider?: MeldServiceProvider;
|
|
21
21
|
}, connectorId: string | undefined): PaymentMethodProperties;
|
|
22
|
-
export declare function mapSwappedFopTypeToPaymentMethod(fopType: FormOfPaymentType): PaymentMethod |
|
|
23
|
-
|
|
24
|
-
* Explicit, non-recursive stringify for a flat analytics payload. Statsig
|
|
25
|
-
* event metadata must be Record<string, string>; values are stringified and
|
|
26
|
-
* null/undefined values (e.g. a not-applicable provider) are omitted.
|
|
27
|
-
*/
|
|
28
|
-
export declare function toStatsigMetadata(payload: Record<string, string | number | boolean | null | undefined>): Record<string, string>;
|
|
22
|
+
export declare function mapSwappedFopTypeToPaymentMethod(fopType: FormOfPaymentType): PaymentMethod | Lowercase<FormOfPaymentType>;
|
|
23
|
+
export declare function getWithdrawalAnalyticsPaymentMethod(step: WithdrawalModalStep, selectedFop?: Pick<SwappedFormOfPayment, 'fopType'> | null): PaymentMethod | Lowercase<FormOfPaymentType> | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const INITIAL_SWAPPED_IFRAME_STEP = "EMPTY";
|
|
2
|
+
export declare const UNKNOWN_SWAPPED_IFRAME_STEP = "UNKNOWN";
|
|
3
|
+
/**
|
|
4
|
+
* Narrows the runtime value received over postMessage without preventing
|
|
5
|
+
* Swapped from introducing new enum-like steps.
|
|
6
|
+
*/
|
|
7
|
+
export declare function sanitizeSwappedIframeStep(step: unknown): string;
|
|
8
|
+
export interface IframeStepNavigationResult {
|
|
9
|
+
history: string[];
|
|
10
|
+
index: number;
|
|
11
|
+
isBackNavigation: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Infers back-navigation purely from step recurrence, since the Swapped embed
|
|
15
|
+
* doesn't report navigation direction. A step already in history is treated
|
|
16
|
+
* as a rewind (history truncated to that point); a new step is appended.
|
|
17
|
+
*/
|
|
18
|
+
export declare function resolveIframeStepNavigation(history: readonly string[], nextStep: string): IframeStepNavigationResult;
|
|
@@ -37,8 +37,8 @@ export type TrackDepositAmountConfirmedArgs = {
|
|
|
37
37
|
};
|
|
38
38
|
export type TrackDepositMethodSelectedArgs = {
|
|
39
39
|
connectionStatus?: ConnectionStatus;
|
|
40
|
-
/**
|
|
41
|
-
paymentMethod: PaymentMethod | FormOfPaymentType
|
|
40
|
+
/** Swapped methods without a PaymentMethod equivalent use their lowercase FOP type. */
|
|
41
|
+
paymentMethod: PaymentMethod | Lowercase<FormOfPaymentType>;
|
|
42
42
|
paymentRail?: AnalyticsPaymentRail;
|
|
43
43
|
/** Selected checkout provider, such as a Bluvo exchange. */
|
|
44
44
|
provider?: string;
|
|
@@ -16,8 +16,8 @@ export type TrackWithdrawalAmountConfirmedArgs = {
|
|
|
16
16
|
};
|
|
17
17
|
export type TrackWithdrawalMethodSelectedArgs = {
|
|
18
18
|
connectionStatus?: ConnectionStatus;
|
|
19
|
-
/**
|
|
20
|
-
paymentMethod: PaymentMethod | FormOfPaymentType
|
|
19
|
+
/** Swapped methods without a PaymentMethod equivalent use their lowercase FOP type. */
|
|
20
|
+
paymentMethod: PaymentMethod | Lowercase<FormOfPaymentType>;
|
|
21
21
|
paymentRail?: AnalyticsPaymentRail;
|
|
22
22
|
/** Selected checkout provider, such as a Bluvo exchange or a Lighter method id. */
|
|
23
23
|
provider?: string;
|