@funkit/connect 11.4.0 → 11.5.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.
Files changed (80) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/dist/clients/{chunk-5MY7WMEJ.js → chunk-3U55HYGJ.js} +2 -2
  3. package/dist/clients/{chunk-BPDLF2R6.js → chunk-DSZHYQPX.js} +1 -1
  4. package/dist/clients/chunk-MSLPLXR2.js +30 -0
  5. package/dist/clients/{chunk-3Y5EIONT.js → chunk-UMU5S2WF.js} +30 -39
  6. package/dist/clients/chunk-WCQ6HJ27.js +13 -0
  7. package/dist/clients/{chunk-XJTRLB7W.js → chunk-ZEDRWRYA.js} +15 -13
  8. package/dist/clients/fanatics.js +4 -4
  9. package/dist/clients/internal/nado/withdrawalCallback.js +2 -9
  10. package/dist/clients/internal/nado/withdrawalConfig.d.ts +4 -9
  11. package/dist/clients/internal/nado/withdrawalConfig.js +3 -7
  12. package/dist/clients/internal/nado/withdrawalErrors.d.ts +6 -10
  13. package/dist/clients/internal/nado/withdrawalErrors.js +1 -2
  14. package/dist/clients/internal/nado/withdrawalForm.css +82 -74
  15. package/dist/clients/internal/nado/withdrawalForm.d.ts +1 -1
  16. package/dist/clients/internal/nado/withdrawalForm.js +12 -45
  17. package/dist/clients/internal/nado/withdrawalStatus.d.ts +1 -15
  18. package/dist/clients/internal/nado/withdrawalStatus.js +11 -61
  19. package/dist/clients/lighter.css +260 -252
  20. package/dist/clients/lighter.js +6 -9
  21. package/dist/clients/nado.d.ts +2 -2
  22. package/dist/clients/nado.js +10 -16
  23. package/dist/clients/polymarket/PolymarketDepositAccountDropdown.css +263 -255
  24. package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +3 -3
  25. package/dist/clients/polymarket/index.css +263 -255
  26. package/dist/clients/polymarket/index.js +3 -3
  27. package/dist/components/Dropdown/BaseDropdown.css.d.ts +1 -0
  28. package/dist/components/Dropdown/BaseDropdown.d.ts +0 -1
  29. package/dist/consts/funkit.d.ts +2 -0
  30. package/dist/hooks/track/analytics/events.d.ts +35 -3
  31. package/dist/hooks/track/analytics/resolveExecutionProgressContext.d.ts +1 -0
  32. package/dist/hooks/track/analytics/useDepositAnalytics.d.ts +11 -3
  33. package/dist/hooks/track/analytics/useTrackExecutionProgressEvents.d.ts +1 -0
  34. package/dist/hooks/track/analytics/useWithdrawalAnalytics.d.ts +24 -1
  35. package/dist/hooks/useBluvo.d.ts +7 -2
  36. package/dist/hooks/useSwappedTheme.d.ts +3 -0
  37. package/dist/index.css +93 -85
  38. package/dist/index.js +12822 -12797
  39. package/dist/modals/WithdrawalModal/LighterWithdrawal.d.ts +5 -11
  40. package/dist/modals/WithdrawalModal/RecipientAddress.d.ts +3 -1
  41. package/dist/modals/WithdrawalModal/WithdrawAmountInput.d.ts +3 -1
  42. package/dist/providers/FunkitCheckoutContext/types.d.ts +1 -1
  43. package/dist/providers/FunkitProvider.d.ts +1 -0
  44. package/dist/shadow/adoptStyles.d.ts +5 -0
  45. package/dist/shadow-css.d.ts +1 -0
  46. package/dist/shadow-css.js +2 -0
  47. package/dist/utils/swapped.d.ts +8 -6
  48. package/dist/wallets/walletConnectors/index.js +9 -9
  49. package/package.json +11 -6
  50. package/shadow-css/package.json +3 -0
  51. package/dist/clients/chunk-2576N7PQ.js +0 -44
  52. package/dist/clients/chunk-3P2C436B.js +0 -20
  53. package/dist/clients/chunk-63XTVHO3.js +0 -19
  54. package/dist/clients/chunk-6T6URLBM.js +0 -33
  55. package/dist/clients/chunk-EQFVPSR2.js +0 -40
  56. package/dist/clients/chunk-FM7SFGAV.js +0 -106
  57. package/dist/clients/chunk-JFDRLSYM.js +0 -42
  58. package/dist/clients/chunk-TZGKB6WY.js +0 -160
  59. package/dist/clients/chunk-VIAEAD75.js +0 -61
  60. package/dist/clients/chunk-WZRW6WUM.js +0 -112
  61. package/dist/clients/chunk-Z7HTQFEO.js +0 -69
  62. package/dist/clients/internal/nado/consts.d.ts +0 -22
  63. package/dist/clients/internal/nado/consts.js +0 -15
  64. package/dist/clients/internal/nado/encoding.d.ts +0 -25
  65. package/dist/clients/internal/nado/encoding.js +0 -11
  66. package/dist/clients/internal/nado/errors.d.ts +0 -68
  67. package/dist/clients/internal/nado/errors.js +0 -19
  68. package/dist/clients/internal/nado/fetch.d.ts +0 -15
  69. package/dist/clients/internal/nado/fetch.js +0 -9
  70. package/dist/clients/internal/nado/gateway.d.ts +0 -61
  71. package/dist/clients/internal/nado/gateway.js +0 -17
  72. package/dist/clients/internal/nado/hooks.d.ts +0 -208
  73. package/dist/clients/internal/nado/hooks.js +0 -21
  74. package/dist/clients/internal/nado/indexer.d.ts +0 -43
  75. package/dist/clients/internal/nado/indexer.js +0 -13
  76. package/dist/clients/internal/nado/typedData.d.ts +0 -80
  77. package/dist/clients/internal/nado/typedData.js +0 -10
  78. package/dist/clients/internal/nado/withdrawalTypes.d.ts +0 -49
  79. package/dist/clients/internal/nado/withdrawalTypes.js +0 -1
  80. package/dist/utils/safeBigInt.d.ts +0 -5
@@ -1,43 +0,0 @@
1
- /**
2
- * Nado archive/indexer queries — tracks a submitted withdrawal through
3
- * sequencing so the UI can show settlement progress.
4
- *
5
- * @see {@link https://docs.nado.xyz/developer-resources/api/archive-indexer | Nado archive indexer API}
6
- */
7
- import type { Hex } from 'viem';
8
- interface NadoWithdrawalTxPayload {
9
- sender: Hex;
10
- product_id: number;
11
- /** Raw base units (native decimals). */
12
- amount: string;
13
- nonce: number | string;
14
- }
15
- export interface NadoIndexerTx {
16
- tx: {
17
- withdraw_collateral?: NadoWithdrawalTxPayload;
18
- withdraw_collateral_v2?: NadoWithdrawalTxPayload;
19
- };
20
- submission_idx: string;
21
- /** Unix seconds. */
22
- timestamp: string;
23
- }
24
- export interface NadoWithdrawalEventsResponse {
25
- /** Present in the response; settlement matching only reads `txs`. */
26
- events: unknown[];
27
- txs: NadoIndexerTx[];
28
- }
29
- /**
30
- * Sequenced withdraw-collateral (v1 + v2) events for a subaccount, newest
31
- * first. Unlike the gateway, a successful indexer response returns the
32
- * payload bare — only failures carry the `{status, error}` wrapper.
33
- */
34
- export declare function getNadoWithdrawalEvents(params: {
35
- subaccount: Hex;
36
- limit?: number;
37
- }, signal?: AbortSignal): Promise<NadoWithdrawalEventsResponse>;
38
- /**
39
- * Find the sequenced tx for a withdrawal we submitted, matched by the signed
40
- * nonce. Presence means Nado's sequencer accepted it.
41
- */
42
- export declare function findSettlementForNonce(txs: NadoIndexerTx[], nonce: bigint): NadoIndexerTx | undefined;
43
- export {};
@@ -1,13 +0,0 @@
1
- "use client";
2
- import {
3
- findSettlementForNonce,
4
- getNadoWithdrawalEvents
5
- } from "../../chunk-JFDRLSYM.js";
6
- import "../../chunk-3P2C436B.js";
7
- import "../../chunk-WZRW6WUM.js";
8
- import "../../chunk-Z7HTQFEO.js";
9
- import "../../chunk-AHYOV7AV.js";
10
- export {
11
- findSettlementForNonce,
12
- getNadoWithdrawalEvents
13
- };
@@ -1,80 +0,0 @@
1
- /**
2
- * EIP-712 typed data for Nado's `withdraw_collateral_v2` execute.
3
- *
4
- * @see {@link https://docs.nado.xyz/developer-resources/api/gateway/executes/withdraw-collateral | Nado withdraw collateral execute}
5
- */
6
- import type { Address, Hex } from 'viem';
7
- export declare const WITHDRAW_COLLATERAL_V2_TYPES: {
8
- readonly WithdrawCollateralV2: readonly [{
9
- readonly name: "sender";
10
- readonly type: "bytes32";
11
- }, {
12
- readonly name: "productId";
13
- readonly type: "uint32";
14
- }, {
15
- readonly name: "amount";
16
- readonly type: "uint128";
17
- }, {
18
- readonly name: "nonce";
19
- readonly type: "uint64";
20
- }, {
21
- readonly name: "sendTo";
22
- readonly type: "address";
23
- }, {
24
- readonly name: "appendix";
25
- readonly type: "uint128";
26
- }];
27
- };
28
- export interface WithdrawCollateralV2Params {
29
- /** Packed subaccount id (see `buildNadoSubaccountId`). */
30
- sender: Hex;
31
- productId: number;
32
- /** Raw base units in the token's native decimals — not x18. */
33
- amount: bigint;
34
- /** `tx_nonce` from the nonces query, fetched immediately before signing. */
35
- nonce: bigint;
36
- /** Payout recipient. Non-zero forces owner-wallet signing on Nado's side. */
37
- sendTo: Address;
38
- }
39
- /**
40
- * Typed data for Nado's `withdraw_collateral_v2` execute. `appendix` is
41
- * reserved by Nado and must be 0.
42
- */
43
- export declare function buildWithdrawCollateralV2TypedData(params: WithdrawCollateralV2Params): {
44
- readonly domain: {
45
- readonly name: "Nado";
46
- readonly version: "0.0.1";
47
- readonly chainId: 57073;
48
- readonly verifyingContract: `0x${string}`;
49
- };
50
- readonly types: {
51
- readonly WithdrawCollateralV2: readonly [{
52
- readonly name: "sender";
53
- readonly type: "bytes32";
54
- }, {
55
- readonly name: "productId";
56
- readonly type: "uint32";
57
- }, {
58
- readonly name: "amount";
59
- readonly type: "uint128";
60
- }, {
61
- readonly name: "nonce";
62
- readonly type: "uint64";
63
- }, {
64
- readonly name: "sendTo";
65
- readonly type: "address";
66
- }, {
67
- readonly name: "appendix";
68
- readonly type: "uint128";
69
- }];
70
- };
71
- readonly primaryType: "WithdrawCollateralV2";
72
- readonly message: {
73
- readonly sender: `0x${string}`;
74
- readonly productId: number;
75
- readonly amount: bigint;
76
- readonly nonce: bigint;
77
- readonly sendTo: `0x${string}`;
78
- readonly appendix: 0n;
79
- };
80
- };
@@ -1,10 +0,0 @@
1
- "use client";
2
- import {
3
- WITHDRAW_COLLATERAL_V2_TYPES,
4
- buildWithdrawCollateralV2TypedData
5
- } from "../../chunk-2576N7PQ.js";
6
- import "../../chunk-3P2C436B.js";
7
- export {
8
- WITHDRAW_COLLATERAL_V2_TYPES,
9
- buildWithdrawCollateralV2TypedData
10
- };
@@ -1,49 +0,0 @@
1
- /**
2
- * Nado-specific members of the shared withdrawal discriminated unions. Kept in
3
- * `clients/internal/nado/` (customer-isolated) and imported by the shared
4
- * `WithdrawalCustomerData` / `WithdrawalCustomerConfig` aliases in
5
- * `providers/FunkitCheckoutContext`. viem-only imports — no provider deps — so
6
- * the shared→customer reference stays cycle-free.
7
- */
8
- import type { Address, Hex } from 'viem';
9
- /**
10
- * The dropdown pick, flattened out of the config's `sourceTokens`. Travels whole
11
- * so identity, decimals, and product id can't be resolved from disagreeing
12
- * sources — two lookups that disagree would sign against the wrong asset or off
13
- * by a power of ten.
14
- */
15
- export interface NadoWithdrawalSourceOption {
16
- /** Nado's own key for the asset — every subaccount query is keyed on it. */
17
- productId: number;
18
- symbol: string;
19
- decimals: number;
20
- tokenAddress: Address;
21
- tokenChainId: string;
22
- iconSrc: string | undefined;
23
- }
24
- /**
25
- * Nado per-submission form selections threaded to the withdrawal callback (the
26
- * static config can't know them).
27
- * - `spotLeverage` must be explicit — Nado treats an absent value as borrowing,
28
- * so `false` fails instead of opening a borrow.
29
- * - `sequencerFeeTokenAmount` pins the fee the screen displayed, so the callback
30
- * signs the same net amount instead of re-reading a possibly-refreshed cache.
31
- * - `selectedSourceToken` is the live dropdown pick. The shared form data carries
32
- * the config's static `sourceTokenSymbol` instead, which is stale for a
33
- * multi-source flow.
34
- */
35
- export interface NadoWithdrawalCustomerData {
36
- customerName: 'nado';
37
- spotLeverage: boolean;
38
- /** Sequencer fee in the product's token units, as shown at submit. */
39
- sequencerFeeTokenAmount: number;
40
- selectedSourceToken: NadoWithdrawalSourceOption;
41
- }
42
- /** Nado config-level identity, supplied by the integrator on the withdrawal config. */
43
- export interface NadoWithdrawalCustomerConfig {
44
- customerName: 'nado';
45
- /** Connected wallet — must be the signer (Nado rejects linked signers). */
46
- walletAddress: Address;
47
- /** Packed id of the active subaccount (`buildNadoSubaccountId`); the EIP-712/execute `sender`. */
48
- subaccount: Hex;
49
- }
@@ -1 +0,0 @@
1
- "use client";
@@ -1,5 +0,0 @@
1
- /**
2
- * Convert a value to bigint without throwing. Accepts bigint, integer number,
3
- * or an integer-valued string. Anything else returns the fallback.
4
- */
5
- export declare function safeBigInt(value: unknown, fallback: bigint): bigint;