@sodax/dapp-kit 2.0.0-rc.2 → 2.0.0-rc.4
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/README.md +9 -63
- package/dist/index.d.ts +11 -4
- package/dist/index.mjs +3 -6
- package/package.json +31 -19
- package/src/providers/SodaxProvider.tsx +15 -11
- package/ai-exported/AGENTS.md +0 -134
- package/ai-exported/integration/README.md +0 -49
- package/ai-exported/integration/ai-rules.md +0 -79
- package/ai-exported/integration/architecture.md +0 -274
- package/ai-exported/integration/features/README.md +0 -29
- package/ai-exported/integration/features/auxiliary-services.md +0 -169
- package/ai-exported/integration/features/bitcoin.md +0 -87
- package/ai-exported/integration/features/bridge.md +0 -91
- package/ai-exported/integration/features/dex.md +0 -152
- package/ai-exported/integration/features/migration.md +0 -118
- package/ai-exported/integration/features/money-market.md +0 -116
- package/ai-exported/integration/features/staking.md +0 -123
- package/ai-exported/integration/features/swap.md +0 -101
- package/ai-exported/integration/quickstart.md +0 -187
- package/ai-exported/integration/recipes/README.md +0 -136
- package/ai-exported/integration/recipes/backend-queries.md +0 -157
- package/ai-exported/integration/recipes/bitcoin.md +0 -193
- package/ai-exported/integration/recipes/bridge.md +0 -174
- package/ai-exported/integration/recipes/dex.md +0 -204
- package/ai-exported/integration/recipes/invalidations.md +0 -115
- package/ai-exported/integration/recipes/migration.md +0 -212
- package/ai-exported/integration/recipes/money-market.md +0 -206
- package/ai-exported/integration/recipes/mutation-error-handling.md +0 -118
- package/ai-exported/integration/recipes/observability.md +0 -93
- package/ai-exported/integration/recipes/setup.md +0 -144
- package/ai-exported/integration/recipes/staking.md +0 -202
- package/ai-exported/integration/recipes/swap.md +0 -272
- package/ai-exported/integration/recipes/wallet-connectivity.md +0 -101
- package/ai-exported/integration/reference/README.md +0 -12
- package/ai-exported/integration/reference/glossary.md +0 -188
- package/ai-exported/integration/reference/hooks-index.md +0 -190
- package/ai-exported/integration/reference/public-api.md +0 -110
- package/ai-exported/integration/reference/querykey-conventions.md +0 -179
- package/ai-exported/migration/README.md +0 -60
- package/ai-exported/migration/ai-rules.md +0 -81
- package/ai-exported/migration/breaking-changes/hook-signatures.md +0 -233
- package/ai-exported/migration/breaking-changes/querykey-conventions.md +0 -108
- package/ai-exported/migration/breaking-changes/result-handling.md +0 -211
- package/ai-exported/migration/breaking-changes/sdk-leakage.md +0 -165
- package/ai-exported/migration/checklist.md +0 -89
- package/ai-exported/migration/features/README.md +0 -34
- package/ai-exported/migration/features/auxiliary-services.md +0 -114
- package/ai-exported/migration/features/bitcoin.md +0 -88
- package/ai-exported/migration/features/bridge.md +0 -123
- package/ai-exported/migration/features/dex.md +0 -101
- package/ai-exported/migration/features/migration.md +0 -120
- package/ai-exported/migration/features/money-market.md +0 -97
- package/ai-exported/migration/features/staking.md +0 -109
- package/ai-exported/migration/features/swap.md +0 -118
- package/ai-exported/migration/recipes.md +0 -188
- package/ai-exported/migration/reference/README.md +0 -15
- package/ai-exported/migration/reference/deleted-hooks.md +0 -110
- package/ai-exported/migration/reference/error-shape-crosswalk.md +0 -144
- package/ai-exported/migration/reference/renamed-hooks.md +0 -66
- package/dist/index.cjs +0 -2642
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -1550
- package/dist/index.mjs.map +0 -1
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
# Error shape crosswalk — v1 → v2
|
|
2
|
-
|
|
3
|
-
The shape and type of errors flowing through dapp-kit hooks changed in v2. The change is mostly SDK-level (one canonical `SodaxError<C>` replaces 7+ per-feature classes) but it surfaces in dapp-kit at the consumer level — wherever you catch or branch on errors from hooks.
|
|
4
|
-
|
|
5
|
-
## Where v2 errors appear
|
|
6
|
-
|
|
7
|
-
| Surface | v1 | v2 |
|
|
8
|
-
|---|---|---|
|
|
9
|
-
| `mutation.error` | Only on actual exceptions | Includes SDK `!ok` errors (now thrown inside `mutationFn`) |
|
|
10
|
-
| `mutation.data` | `Result<T>` (`{ ok, value, error }`) | Unwrapped success type `T`; SDK `!ok` flows to `mutation.error` |
|
|
11
|
-
| `mutateAsync` rejection | Only on exceptions | Includes SDK `!ok` rejections |
|
|
12
|
-
| `mutateAsyncSafe` `result.error` | (didn't exist) | Includes SDK `!ok` errors (re-packed from the throw) |
|
|
13
|
-
| `onError` callback | Fired only for exceptions | Fires for SDK `!ok` too |
|
|
14
|
-
|
|
15
|
-
The semantic shift is: v1 treated SDK `!ok` as "successful but with an error inside"; v2 treats it as a thrown error. See [`../breaking-changes/result-handling.md`](../breaking-changes/result-handling.md) for the full picture.
|
|
16
|
-
|
|
17
|
-
## Error class crosswalk (SDK-level — leaks through)
|
|
18
|
-
|
|
19
|
-
In v1, each SDK feature had its own error class:
|
|
20
|
-
|
|
21
|
-
```ts
|
|
22
|
-
// @ai-snippets-skip — describes deleted v1 type surface, not runnable
|
|
23
|
-
// v1
|
|
24
|
-
class MoneyMarketError<C extends MoneyMarketErrorCode> extends Error { /* ... */ }
|
|
25
|
-
class IntentError<C extends IntentErrorCode> extends Error { /* ... */ }
|
|
26
|
-
class StakingError<C extends StakingErrorCode> extends Error { /* ... */ }
|
|
27
|
-
class BridgeError<C extends BridgeErrorCode> extends Error { /* ... */ }
|
|
28
|
-
class MigrationError<C extends MigrationErrorCode> extends Error { /* ... */ }
|
|
29
|
-
class AssetServiceError<C extends AssetServiceErrorCode> extends Error { /* ... */ }
|
|
30
|
-
class ConcentratedLiquidityError<C extends ConcentratedLiquidityErrorCode> extends Error { /* ... */ }
|
|
31
|
-
// ...
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
In v2, all are consolidated:
|
|
35
|
-
|
|
36
|
-
```ts
|
|
37
|
-
// @ai-snippets-skip — type-shape reference; the real class is exported from @sodax/sdk
|
|
38
|
-
// v2
|
|
39
|
-
class SodaxError<C extends SodaxErrorCode = SodaxErrorCode> extends Error {
|
|
40
|
-
readonly code: C; // closed reason union (no feature prefix)
|
|
41
|
-
readonly feature: SodaxFeature; // 'swap' | 'moneyMarket' | 'bridge' | …
|
|
42
|
-
readonly cause?: unknown;
|
|
43
|
-
readonly context?: SodaxErrorContext;
|
|
44
|
-
}
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Discriminate via `(error.feature, error.code)` instead of class name.
|
|
48
|
-
|
|
49
|
-
## Error code crosswalk (key examples)
|
|
50
|
-
|
|
51
|
-
The SDK reduced the per-feature code unions to a unified 13-code reason vocabulary, with feature-specific context on `error.context.action` / `error.context.method`. Examples:
|
|
52
|
-
|
|
53
|
-
| v1 (per-feature) | v2 |
|
|
54
|
-
|---|---|
|
|
55
|
-
| `MoneyMarketError<'CREATE_SUPPLY_INTENT_FAILED'>` | `SodaxError<'INTENT_CREATION_FAILED'>` with `feature: 'moneyMarket'`, `context.action: 'supply'` |
|
|
56
|
-
| `MoneyMarketError<'SUPPLY_FAILED'>` | `SodaxError<'EXECUTION_FAILED'>` with `feature: 'moneyMarket'`, `context.action: 'supply'` |
|
|
57
|
-
| `IntentError<'CREATE_INTENT_FAILED'>` | `SodaxError<'INTENT_CREATION_FAILED'>` with `feature: 'swap'`, `context.action: 'createIntent'` |
|
|
58
|
-
| `IntentError<'POST_EXECUTION_FAILED'>` | `SodaxError<'EXECUTION_FAILED'>` with `feature: 'swap'`, `context.phase: 'postExecution'` |
|
|
59
|
-
| `StakingError<'STAKE_FAILED'>` | `SodaxError<'EXECUTION_FAILED'>` with `feature: 'staking'`, `context.action: 'stake'` |
|
|
60
|
-
| `BridgeError<'BRIDGE_FAILED'>` | `SodaxError<'EXECUTION_FAILED'>` with `feature: 'bridge'`, `context.action: 'bridge'` |
|
|
61
|
-
| `MigrationError<'MIGRATE_BNUSD_FORWARD_FAILED'>` | `SodaxError<'EXECUTION_FAILED'>` with `feature: 'migration'`, `context.action: 'migratebnUSD'`, `context.direction: 'forward'` |
|
|
62
|
-
| `*Error<'ALLOWANCE_CHECK_FAILED'>` | `SodaxError<'ALLOWANCE_CHECK_FAILED'>` (unchanged code; new feature/context fields) |
|
|
63
|
-
| `*Error<'APPROVE_FAILED'>` | Same |
|
|
64
|
-
| `*Error<'GAS_ESTIMATION_FAILED'>` | Same |
|
|
65
|
-
| `*Error<'RELAY_TIMEOUT'>` | `SodaxError<'RELAY_TIMEOUT'>` with `relayCode: 'RELAY_TIMEOUT'` on context |
|
|
66
|
-
|
|
67
|
-
Full crosswalk (per feature): [`../../../../sdk/ai-exported/migration/reference/error-code-crosswalk.md`](../../../../sdk/ai-exported/migration/reference/error-code-crosswalk.md).
|
|
68
|
-
|
|
69
|
-
## How to migrate error-handling code
|
|
70
|
-
|
|
71
|
-
### Pattern 1: `instanceof` checks → `isSodaxError`
|
|
72
|
-
|
|
73
|
-
```diff
|
|
74
|
-
- catch (e) {
|
|
75
|
-
- if (e instanceof MoneyMarketError) {
|
|
76
|
-
- handleMmError(e.code);
|
|
77
|
-
- }
|
|
78
|
-
- }
|
|
79
|
-
+ catch (e) {
|
|
80
|
-
+ if (isSodaxError(e) && e.feature === 'moneyMarket') {
|
|
81
|
-
+ handleMmError(e.code);
|
|
82
|
-
+ }
|
|
83
|
-
+ }
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
`isSodaxError` is exported from `@sodax/dapp-kit` (re-exported from `@sodax/sdk`).
|
|
87
|
-
|
|
88
|
-
### Pattern 2: switch on code
|
|
89
|
-
|
|
90
|
-
```diff
|
|
91
|
-
catch (e) {
|
|
92
|
-
- if (e instanceof IntentError) {
|
|
93
|
-
- switch (e.code) {
|
|
94
|
-
- case 'CREATE_INTENT_FAILED': /* ... */ break;
|
|
95
|
-
- case 'POST_EXECUTION_FAILED': /* ... */ break;
|
|
96
|
-
- case 'RELAY_TIMEOUT': /* ... */ break;
|
|
97
|
-
- }
|
|
98
|
-
- }
|
|
99
|
-
+ if (isSodaxError(e) && e.feature === 'swap') {
|
|
100
|
-
+ switch (e.code) {
|
|
101
|
-
+ case 'INTENT_CREATION_FAILED': /* was CREATE_INTENT_FAILED */ break;
|
|
102
|
-
+ case 'EXECUTION_FAILED': /* was POST_EXECUTION_FAILED — check e.context.phase */ break;
|
|
103
|
-
+ case 'RELAY_TIMEOUT': /* unchanged code */ break;
|
|
104
|
-
+ }
|
|
105
|
-
+ }
|
|
106
|
-
}
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### Pattern 3: error-text helper
|
|
110
|
-
|
|
111
|
-
If your v1 code has a helper that maps `error.code` to a UI message, write a small adapter:
|
|
112
|
-
|
|
113
|
-
```ts
|
|
114
|
-
// adapters/v1ErrorShape.ts
|
|
115
|
-
import { isSodaxError } from '@sodax/dapp-kit';
|
|
116
|
-
|
|
117
|
-
const V1_CODE_MAP: Record<string, string> = {
|
|
118
|
-
'INTENT_CREATION_FAILED': 'CREATE_INTENT_FAILED',
|
|
119
|
-
'EXECUTION_FAILED': 'POST_EXECUTION_FAILED',
|
|
120
|
-
// ... etc.
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
export function adaptToV1Code(error: unknown): string | undefined {
|
|
124
|
-
if (!isSodaxError(error)) return undefined;
|
|
125
|
-
return V1_CODE_MAP[error.code] ?? error.code;
|
|
126
|
-
}
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
Plan to delete the adapter once you've ported all error UI.
|
|
130
|
-
|
|
131
|
-
## Pitfalls
|
|
132
|
-
|
|
133
|
-
1. **`onError` callbacks fire MORE in v2.** They previously didn't fire for SDK `!ok` (success-path-with-error pattern). Now they do. Audit toasts / logs to make sure they're appropriate.
|
|
134
|
-
2. **`mutation.error` reads MORE in v2.** Same reason — SDK errors flow through it now.
|
|
135
|
-
3. **`isSodaxError(e)` is the cross-bundle-safe check.** Bare `instanceof SodaxError` may break in monorepos with multiple package copies (mixed ESM/CJS, etc.). Use the type guard.
|
|
136
|
-
4. **The `feature` field is your discriminator.** A `SodaxError` from a swap mutation has `feature: 'swap'`. A bridge mutation has `feature: 'bridge'`. The `code` is the reason; `feature` is the source.
|
|
137
|
-
|
|
138
|
-
## Cross-references
|
|
139
|
-
|
|
140
|
-
- [`../breaking-changes/result-handling.md`](../breaking-changes/result-handling.md) — semantic shift in `Result<T>` handling.
|
|
141
|
-
- [`../breaking-changes/sdk-leakage.md`](../breaking-changes/sdk-leakage.md) — broader SDK-side migrations.
|
|
142
|
-
- [`../../../../sdk/ai-exported/migration/breaking-changes/result-and-errors.md`](../../../../sdk/ai-exported/migration/breaking-changes/result-and-errors.md) — full SDK error-class consolidation.
|
|
143
|
-
- [`../../../../sdk/ai-exported/migration/reference/error-code-crosswalk.md`](../../../../sdk/ai-exported/migration/reference/error-code-crosswalk.md) — per-feature error code crosswalks.
|
|
144
|
-
- [`../../integration/architecture.md`](../../integration/architecture.md) § "SDK Result handling" — design rationale.
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
# Renamed hooks — v1 → v2
|
|
2
|
-
|
|
3
|
-
Hooks whose **name** changed between versions. Most v1 → v2 changes were signature-level (single-object params, `mutateAsyncSafe`, etc.) — actual hook renames are rare. The list below is the small set.
|
|
4
|
-
|
|
5
|
-
## Hooks renamed
|
|
6
|
-
|
|
7
|
-
| v1 | v2 | Notes |
|
|
8
|
-
|---|---|---|
|
|
9
|
-
| (none significant) | | Most hook names are stable across v1 → v2 |
|
|
10
|
-
|
|
11
|
-
### Why this list is short
|
|
12
|
-
|
|
13
|
-
The v2 canonicalization pass focused on hook **shapes** (single-object params, return-shape consolidation, mutateAsyncSafe), not naming. For most consumer code, the hook name you `import { ... }`'d in v1 is still the right hook in v2 — the breaking change is in the call shape, not the import.
|
|
14
|
-
|
|
15
|
-
## Hooks whose generic / type shape changed
|
|
16
|
-
|
|
17
|
-
These keep their name but their TypeScript signature is different. Usually requires per-call-site fixes.
|
|
18
|
-
|
|
19
|
-
| Hook | v1 → v2 change |
|
|
20
|
-
|---|---|
|
|
21
|
-
| `useSwap` | Hook init: `(spokeProvider) → ({ mutationOptions })`. Vars: `{ params } → { params, walletProvider }`. |
|
|
22
|
-
| `useSwapAllowance` | Query params: `(params, spokeProvider) → { params: { payload, srcChainKey, walletProvider } }`. SDK request nested under `params.payload`. Data unwrapped to `boolean`. |
|
|
23
|
-
| `useSwapApprove` | Return: `{ approve, isLoading } → SafeUseMutationResult` (with `mutateAsync` / `isPending`). Vars accept `CreateIntentParams \| CreateLimitOrderParams`. TData is `TxReturnType<K, false>` (chain-keyed receipt union). |
|
|
24
|
-
| `useStatus` | Now `useStatus({ params: { intentTxHash } })` — single-object shape AND key renamed from `intentHash` → `intentTxHash`. Data is `Result<SolverIntentStatusResponse, SolverErrorResponse> \| undefined` (Result-wrapped). Polls 3s. |
|
|
25
|
-
| `useQuote` | Now `useQuote({ params: { payload } })` — SDK request nested under `params.payload` (NOT directly under `params`). Data is `Result<SolverIntentQuoteResponse, SolverErrorResponse> \| undefined`. Polls 3s. |
|
|
26
|
-
| `useCancelSwap` / `useCancelLimitOrder` | TVars are FLAT (no `params` wrapper): `{ srcChainKey, intent, walletProvider }`. |
|
|
27
|
-
| `useCreateLimitOrder` | Hook init: `(spokeProvider) → ({ mutationOptions })`. Vars: `{ params, walletProvider }`. mutationKey is `['swap', 'limitOrder', 'create']`. |
|
|
28
|
-
| All MM mutations (`useSupply`/etc.) | Same as `useSwap`. Plus `srcChainKey` / `srcAddress` required in params (SDK-leakage). All four actions accept optional `dstChainKey`/`dstAddress` for cross-chain delivery (not just borrow/repay). |
|
|
29
|
-
| `useMMAllowance` | Query params: `{ params: { payload: MoneyMarketParams<K> } }`. For `'borrow'` / `'withdraw'` actions: `enabled: false` — `data` stays `undefined`. |
|
|
30
|
-
| `useUserReservesData` | Param key rename: `address → userAddress`; chain key is `spokeChainKey`. |
|
|
31
|
-
| `useUserFormattedSummary` | Same. |
|
|
32
|
-
| All staking mutations | Same as MM. Plus dedicated approve hooks per token (`useStakeApprove` ↔ `useUnstakeApprove` ↔ `useInstantUnstakeApprove`). |
|
|
33
|
-
| `useStakeRatio` | Return: `Result<bigint> → [xSodaAmount, previewDepositAmount]` (unwrapped tuple — NOT Result-wrapped in v2). |
|
|
34
|
-
| `useStakingInfo` / `useUnstakingInfo` / `useUnstakingInfoWithPenalty` / `useStakingConfig` / `useInstantUnstakeRatio` / `useConvertedAssets` | All unwrapped in v2 (hooks throw on SDK `!ok`). Branch on `isError`/`error`, not `data?.ok`. |
|
|
35
|
-
| `useUnstakingInfo` | Return shape: array → object `{ userUnstakeSodaRequests, totalUnstaking }`. `UserUnstakeInfo` items expose `id` (the requestId) and `request` (original `UnstakeSodaRequest`). |
|
|
36
|
-
| All three staking allowance hooks | Query params: `{ params: { payload: Omit<<Action>Params<K>, 'action'> } }`. Data unwrapped to `boolean`. |
|
|
37
|
-
| `useBridge` | Params: `srcChainId/dstChainId/recipient → srcChainKey/dstChainKey/recipient`. Plus field renames inside `CreateBridgeIntentParams`: `srcAsset → srcToken`, `dstAsset → dstToken`. Return: tuple → `TxHashPair` object (`{ srcChainTxHash, dstChainTxHash }`). |
|
|
38
|
-
| `useBridgeAllowance` | Query params: nested `{ params: { payload, walletProvider } }`. Data unwrapped to `boolean` (queryFn returns `false` on SDK `!ok` — does NOT throw). |
|
|
39
|
-
| `useGetBridgeableAmount` | Params: 4 fields → `{ from: XToken, to: XToken }`. Return: `bigint → BridgeLimit` object (`{ amount, decimals, type: 'DEPOSIT_LIMIT' \| 'WITHDRAWAL_LIMIT' }`). |
|
|
40
|
-
| `useGetBridgeableTokens` | Params: positional → `{ params: { from, to, token } }`. |
|
|
41
|
-
| All DEX mutations | Same as MM. `useSupplyLiquidity` now handles both mint-new and increase-existing — fan-out gated by `params.tokenId` + `params.isValidPosition`. |
|
|
42
|
-
| `useDexAllowance` | Now `{ params: { payload: CreateAssetDepositParams<K> } }`. No `walletProvider` (read-only). |
|
|
43
|
-
| `PoolKey` shape | Real fields are `currency0`, `currency1`, `fee`, `hooks?`, `poolManager`, `parameters` — NOT `poolAddress`/`token0Symbol`/etc. |
|
|
44
|
-
| `useCreate*Params` builders | All take FLAT props object — NOT `{ params }`-wrapped (`useCreateDepositParams`, `useCreateWithdrawParams`, `useCreateSupplyLiquidityParams`, `useCreateDecreaseLiquidityParams`). |
|
|
45
|
-
| `useFeeClaimSwap` (partner) | Same as MM mutation pattern. TData is `IntentAutoSwapResult` (NOT `SwapResponse`). |
|
|
46
|
-
| `useXBalances` | Params: positional → `{ params: { xService, xChainId, xTokens, address } }`. All four required. `xService` injected from `@sodax/wallet-sdk-react`. |
|
|
47
|
-
| `useEstimateGas` | Mutation; vars: `EstimateGasParams<C>` (flat, not `{ params, walletProvider }`-wrapped). |
|
|
48
|
-
| `useDeriveUserWalletAddress`, `useGetUserHubWalletAddress` | Single-object query shape. |
|
|
49
|
-
| `useStellarTrustlineCheck` | Single-object shape with `{ token, amount, chainId, walletProvider }` under `params`. |
|
|
50
|
-
| `useRequestTrustline` | Custom utility hook (NOT a canonical mutation). Takes `(token: string \| undefined)` positionally, returns `{ requestTrustline, isLoading, isRequested, error, data }`. The `requestTrustline` callback takes `{ token, amount, srcChainKey, walletProvider }`. |
|
|
51
|
-
| `useBackendOrderbook` / `useBackendAllMoneyMarketBorrowers` | Pagination MUST be nested under `params`: `{ params: { pagination: { offset, limit } } }`. |
|
|
52
|
-
| `useBackendUserIntents` | Data is `UserIntentsResponse = { items: IntentResponse[], total, offset, limit }` — NOT a bare array. Access `data?.items`. |
|
|
53
|
-
| `useBackendSubmitSwapTx` | Mutation. `apiConfig` moved from hook init to `mutate(vars)`. |
|
|
54
|
-
| All migration hooks | **NEW**: 6 per-action hooks replacing v1's single `useMigrate`. See [`deleted-hooks.md`](deleted-hooks.md). |
|
|
55
|
-
| `useMigrationAllowance` | Query params nest under `params` with inner field literally named `params` (NOT `payload`): `{ params: { params: <migration-params>, action: 'migrate' \| 'revert' } }`. |
|
|
56
|
-
| `BalnMigrateParams` (used by `useMigrateBaln`) | NEW required field `stake: boolean`. `lockupPeriod` is the `LockupPeriod` enum (5 members; values in seconds, not months). |
|
|
57
|
-
| `useTradingWalletBalance` | Return is `RadfiWalletBalance = { btcSatoshi, pendingSatoshi, externalPendingSatoshi, totalUtxos }` — NOT `{ confirmed, pending }`. |
|
|
58
|
-
| `useExpiredUtxos` | Return is `RadfiUtxo[]` (with `_id`, `txid`, `vout`, `txidVout`, `satoshi`, `amount`, `address`, `isSpent`, `status`, `source`, optional `runes`). Both this and `useTradingWalletBalance` take `{ params: { walletProvider, tradingAddress } }`. |
|
|
59
|
-
| `useRadfiAuth` | TData is `RadfiAuthResult = { accessToken, refreshToken, tradingAddress }` (3 fields — `publicKey` is persisted to localStorage but NOT returned). |
|
|
60
|
-
| All Bitcoin/Radfi mutations | Standard pattern — drop hook-init args; pass through `mutate(vars)`. |
|
|
61
|
-
|
|
62
|
-
## Cross-references
|
|
63
|
-
|
|
64
|
-
- [`deleted-hooks.md`](deleted-hooks.md) — hooks that no longer exist at all.
|
|
65
|
-
- [`../breaking-changes/hook-signatures.md`](../breaking-changes/hook-signatures.md) — shape changes in detail.
|
|
66
|
-
- [`../features/`](../features/) — per-feature porting playbooks.
|