@pear-protocol/symmio-client 0.3.24 → 0.3.27-alpha.1
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 +4 -0
- package/dist/index.d.mts +326 -7
- package/dist/index.d.ts +326 -7
- package/dist/index.js +360 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +353 -22
- package/dist/index.mjs.map +1 -1
- package/dist/react/index.d.mts +388 -5
- package/dist/react/index.d.ts +388 -5
- package/dist/react/index.js +853 -53
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +843 -55
- package/dist/react/index.mjs.map +1 -1
- package/dist/react/provider.js +7 -1
- package/dist/react/provider.js.map +1 -1
- package/dist/react/provider.mjs +7 -1
- package/dist/react/provider.mjs.map +1 -1
- package/package.json +2 -2
package/dist/react/index.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ import { UseMutationOptions, useQueryClient, UseMutationResult, UseQueryResult }
|
|
|
9
9
|
import * as node_modules_viem__types_actions_siwe_verifySiweMessage from 'node_modules/viem/_types/actions/siwe/verifySiweMessage';
|
|
10
10
|
import * as abitype from 'abitype';
|
|
11
11
|
import * as node_modules_viem__types_utils_ccip from 'node_modules/viem/_types/utils/ccip';
|
|
12
|
-
import * as _pear_protocol_symm_shared from '@pear-protocol/symm-shared';
|
|
13
12
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
14
13
|
import * as node_modules__pear_protocol_symm_core_dist_types from 'node_modules/@pear-protocol/symm-core/dist/types';
|
|
15
14
|
import * as zustand from 'zustand';
|
|
@@ -8391,7 +8390,7 @@ declare function useSymmCancelClose(options?: {
|
|
|
8391
8390
|
accountAddress?: Address;
|
|
8392
8391
|
overrideChainId?: number;
|
|
8393
8392
|
}>;
|
|
8394
|
-
}): _tanstack_react_query.UseMutationResult<
|
|
8393
|
+
}): _tanstack_react_query.UseMutationResult<_pear_protocol_symm_core.ApiResponse<unknown>, Error, {
|
|
8395
8394
|
quoteId: string;
|
|
8396
8395
|
authToken?: string;
|
|
8397
8396
|
accountAddress?: Address;
|
|
@@ -8453,11 +8452,375 @@ declare function useSymmWithdraw(params?: {
|
|
|
8453
8452
|
amount: bigint;
|
|
8454
8453
|
}, unknown>;
|
|
8455
8454
|
|
|
8455
|
+
type UseSymmInstantWithdrawalAuthParams = {
|
|
8456
|
+
/** Connected wallet / account owner. Defaults to the context address. */
|
|
8457
|
+
address?: Address;
|
|
8458
|
+
chainId?: number;
|
|
8459
|
+
walletClient?: WalletClient;
|
|
8460
|
+
/** SIWE domain. Defaults to `window.location.hostname`. */
|
|
8461
|
+
siweDomain?: string;
|
|
8462
|
+
};
|
|
8463
|
+
/**
|
|
8464
|
+
* Use case: manage the Instant Withdrawal bot's SIWE/JWT auth token.
|
|
8465
|
+
*
|
|
8466
|
+
* Reads any cached/persisted token on mount without side effects — the
|
|
8467
|
+
* wallet signature flow only runs when `signIn()` is invoked.
|
|
8468
|
+
*/
|
|
8469
|
+
declare function useSymmInstantWithdrawalAuth(params?: UseSymmInstantWithdrawalAuthParams): {
|
|
8470
|
+
accessToken: string | null;
|
|
8471
|
+
isAuthenticated: boolean;
|
|
8472
|
+
isLoading: boolean;
|
|
8473
|
+
error: Error | null;
|
|
8474
|
+
signIn: (options?: {
|
|
8475
|
+
force?: boolean;
|
|
8476
|
+
}) => Promise<string | null>;
|
|
8477
|
+
clear: () => void;
|
|
8478
|
+
};
|
|
8479
|
+
|
|
8480
|
+
/**
|
|
8481
|
+
* Types for the Symmio Instant Withdrawal bot API and bridge flow.
|
|
8482
|
+
*
|
|
8483
|
+
* Field names mirror the live OpenAPI spec exactly (which mixes camelCase
|
|
8484
|
+
* and snake_case across endpoints), so the shapes can be sent/received
|
|
8485
|
+
* without remapping. Where the wire format is snake_case we also provide a
|
|
8486
|
+
* normalized camelCase view for ergonomics (see `WithdrawalConfig`).
|
|
8487
|
+
*
|
|
8488
|
+
* Amounts are in wei. The API serializes them as JSON integers; on Base the
|
|
8489
|
+
* collateral (USDC, 6 decimals) keeps these well within the JS safe-integer
|
|
8490
|
+
* range, so `number` is used for response fields. Requests send amounts as
|
|
8491
|
+
* base-10 integer strings to avoid any precision loss.
|
|
8492
|
+
*/
|
|
8493
|
+
declare enum BridgeState {
|
|
8494
|
+
PENDING = "pending",
|
|
8495
|
+
EXECUTED = "executed",
|
|
8496
|
+
SETTLED = "settled",
|
|
8497
|
+
SUSPEND = "suspend"
|
|
8498
|
+
}
|
|
8499
|
+
declare enum BridgeType {
|
|
8500
|
+
INSTANT = "instant",
|
|
8501
|
+
AFTER_COOL_DOWN = "after_cool_down",
|
|
8502
|
+
NO_POLICY = "no_policy"
|
|
8503
|
+
}
|
|
8504
|
+
type FeeOption = {
|
|
8505
|
+
/** total fee in wei */
|
|
8506
|
+
fee: number;
|
|
8507
|
+
/** cooldown period in seconds */
|
|
8508
|
+
cooldown: number;
|
|
8509
|
+
/** checksummed account address */
|
|
8510
|
+
user: Address;
|
|
8511
|
+
/** requested amount in wei */
|
|
8512
|
+
amount: number;
|
|
8513
|
+
/** Unix epoch (seconds) when this option expires */
|
|
8514
|
+
validTime: number;
|
|
8515
|
+
};
|
|
8516
|
+
type FeeOptionsResponse = {
|
|
8517
|
+
count: number;
|
|
8518
|
+
options: FeeOption[];
|
|
8519
|
+
};
|
|
8520
|
+
type UnlockAccountResponse = {
|
|
8521
|
+
message: string;
|
|
8522
|
+
};
|
|
8523
|
+
/** Normalized camelCase view of the withdrawal config. */
|
|
8524
|
+
type WithdrawalConfig = {
|
|
8525
|
+
operatorFee: number;
|
|
8526
|
+
maxInstantAmount: number;
|
|
8527
|
+
instantFeeRate: number;
|
|
8528
|
+
policyValidTime: number;
|
|
8529
|
+
minWithdrawalCooldown: number;
|
|
8530
|
+
};
|
|
8531
|
+
type SpecifiedReceiver = {
|
|
8532
|
+
/** checksummed Ethereum address */
|
|
8533
|
+
address: Address;
|
|
8534
|
+
/** EIP-712 signature hex */
|
|
8535
|
+
signature: Hex;
|
|
8536
|
+
};
|
|
8537
|
+
type SelectFeePolicyResponse = {
|
|
8538
|
+
bridge_id: number;
|
|
8539
|
+
/** Unix epoch (seconds) when `processWithdrawal` will be called */
|
|
8540
|
+
execution_time: number;
|
|
8541
|
+
fee: number;
|
|
8542
|
+
};
|
|
8543
|
+
type BridgeTransaction = {
|
|
8544
|
+
bridge_id: number;
|
|
8545
|
+
user_address: Address;
|
|
8546
|
+
bridge_state: BridgeState;
|
|
8547
|
+
bridge_type: BridgeType;
|
|
8548
|
+
/** in wei */
|
|
8549
|
+
bridge_amount: number;
|
|
8550
|
+
/** in wei */
|
|
8551
|
+
fee_amount: number;
|
|
8552
|
+
/** Unix epoch seconds */
|
|
8553
|
+
bridge_transaction_time: number;
|
|
8554
|
+
/** Unix epoch seconds or null */
|
|
8555
|
+
execution_time?: number | null;
|
|
8556
|
+
};
|
|
8557
|
+
type BridgesResponse = {
|
|
8558
|
+
count: number;
|
|
8559
|
+
bridges: BridgeTransaction[] | null;
|
|
8560
|
+
};
|
|
8561
|
+
|
|
8562
|
+
/**
|
|
8563
|
+
* Use case: fetch the global Instant Withdrawal settings (operator fee,
|
|
8564
|
+
* max instant amount, fee rate, policy TTL, min cooldown). No auth required.
|
|
8565
|
+
*/
|
|
8566
|
+
declare function useSymmWithdrawalConfig(params?: {
|
|
8567
|
+
chainId?: number;
|
|
8568
|
+
query?: SymmQueryConfig;
|
|
8569
|
+
}): _tanstack_react_query.UseQueryResult<WithdrawalConfig, Error>;
|
|
8570
|
+
|
|
8571
|
+
/**
|
|
8572
|
+
* Use case: fetch the maximum amount (wei) the account can withdraw instantly
|
|
8573
|
+
* right now. Returns 0 when the account's risk factor blocks instant withdrawal.
|
|
8574
|
+
* Requires a bot auth token.
|
|
8575
|
+
*/
|
|
8576
|
+
declare function useSymmMaxInstantValue(params: {
|
|
8577
|
+
account?: Address;
|
|
8578
|
+
accessToken?: string;
|
|
8579
|
+
chainId?: number;
|
|
8580
|
+
query?: SymmQueryConfig;
|
|
8581
|
+
}): _tanstack_react_query.UseQueryResult<bigint, Error>;
|
|
8582
|
+
|
|
8583
|
+
type FeeOptionsVariables = {
|
|
8584
|
+
account: Address;
|
|
8585
|
+
amount: bigint;
|
|
8586
|
+
accessToken: string;
|
|
8587
|
+
};
|
|
8588
|
+
/**
|
|
8589
|
+
* Use case: fetch + lock fee/cooldown options for an amount (POST /v1/fee-options).
|
|
8590
|
+
*/
|
|
8591
|
+
declare function useSymmFeeOptionsMutation(params?: {
|
|
8592
|
+
chainId?: number;
|
|
8593
|
+
}, options?: {
|
|
8594
|
+
mutation?: SymmMutationConfig<FeeOptionsResponse, Error, FeeOptionsVariables>;
|
|
8595
|
+
}): _tanstack_react_query.UseMutationResult<FeeOptionsResponse, Error, FeeOptionsVariables, unknown>;
|
|
8596
|
+
/**
|
|
8597
|
+
* Use case: read the currently locked fee options for an account, if any.
|
|
8598
|
+
*/
|
|
8599
|
+
declare function useSymmPendingFeePolicy(params: {
|
|
8600
|
+
account?: Address;
|
|
8601
|
+
accessToken?: string;
|
|
8602
|
+
chainId?: number;
|
|
8603
|
+
query?: SymmQueryConfig;
|
|
8604
|
+
}): _tanstack_react_query.UseQueryResult<FeeOptionsResponse, Error>;
|
|
8605
|
+
type UnlockVariables = {
|
|
8606
|
+
account: Address;
|
|
8607
|
+
accessToken: string;
|
|
8608
|
+
};
|
|
8609
|
+
/**
|
|
8610
|
+
* Use case: clear any locked fee options (POST /v1/unlock/{account}).
|
|
8611
|
+
*/
|
|
8612
|
+
declare function useSymmUnlockAccountMutation(params?: {
|
|
8613
|
+
chainId?: number;
|
|
8614
|
+
}, options?: {
|
|
8615
|
+
mutation?: SymmMutationConfig<UnlockAccountResponse, Error, UnlockVariables>;
|
|
8616
|
+
}): _tanstack_react_query.UseMutationResult<UnlockAccountResponse, Error, UnlockVariables, unknown>;
|
|
8617
|
+
/**
|
|
8618
|
+
* Use case: "Refresh Fee Options" button — unlock then immediately re-fetch
|
|
8619
|
+
* a fresh option set in a single call.
|
|
8620
|
+
*/
|
|
8621
|
+
declare function useSymmRefreshFeeOptionsMutation(params?: {
|
|
8622
|
+
chainId?: number;
|
|
8623
|
+
}, options?: {
|
|
8624
|
+
mutation?: SymmMutationConfig<FeeOptionsResponse, Error, FeeOptionsVariables>;
|
|
8625
|
+
}): _tanstack_react_query.UseMutationResult<FeeOptionsResponse, Error, FeeOptionsVariables, unknown>;
|
|
8626
|
+
|
|
8627
|
+
/**
|
|
8628
|
+
* Use case: paginated, filterable bridge-transaction history for an account
|
|
8629
|
+
* (POST /v1/bridges/{account}/{start}/{size}).
|
|
8630
|
+
*/
|
|
8631
|
+
declare function useSymmBridges(params: {
|
|
8632
|
+
account?: Address;
|
|
8633
|
+
accessToken?: string;
|
|
8634
|
+
chainId?: number;
|
|
8635
|
+
start?: number | null;
|
|
8636
|
+
size?: number | null;
|
|
8637
|
+
bridgeState?: BridgeState | null;
|
|
8638
|
+
bridgeType?: BridgeType | null;
|
|
8639
|
+
query?: SymmQueryConfig;
|
|
8640
|
+
}): _tanstack_react_query.UseQueryResult<BridgesResponse, Error>;
|
|
8641
|
+
|
|
8642
|
+
/**
|
|
8643
|
+
* Fetches the EIP-712 select-receiver payload, has the wallet sign it, and
|
|
8644
|
+
* returns the `SpecifiedReceiver` object to attach to `select-fee-policy`.
|
|
8645
|
+
*/
|
|
8646
|
+
declare function buildSpecifiedReceiver(chainId: number, receiver: Address, bridgeId: number, walletClient: WalletClient, signerAddress: Address): Promise<SpecifiedReceiver>;
|
|
8647
|
+
type SelectFeePolicyVariables = {
|
|
8648
|
+
symmioBridgeId: number;
|
|
8649
|
+
cooldown: number;
|
|
8650
|
+
feeAmount: number;
|
|
8651
|
+
accessToken: string;
|
|
8652
|
+
/** Pre-built signed receiver. Takes precedence over `newReceiver`. */
|
|
8653
|
+
receiver?: SpecifiedReceiver | null;
|
|
8654
|
+
/** Route funds to a different address; the wallet is prompted to sign. */
|
|
8655
|
+
newReceiver?: Address;
|
|
8656
|
+
};
|
|
8657
|
+
/**
|
|
8658
|
+
* Use case: submit the chosen fee policy for a bridge (POST /v1/select-fee-policy),
|
|
8659
|
+
* optionally redirecting to a new receiver via a signed EIP-712 payload.
|
|
8660
|
+
*/
|
|
8661
|
+
declare function useSymmSelectFeePolicyMutation(params?: {
|
|
8662
|
+
chainId?: number;
|
|
8663
|
+
walletClient?: WalletClient;
|
|
8664
|
+
}, options?: {
|
|
8665
|
+
mutation?: SymmMutationConfig<SelectFeePolicyResponse, Error, SelectFeePolicyVariables>;
|
|
8666
|
+
}): _tanstack_react_query.UseMutationResult<SelectFeePolicyResponse, Error, SelectFeePolicyVariables, unknown>;
|
|
8667
|
+
|
|
8668
|
+
type SchnorrSign = {
|
|
8669
|
+
signature: bigint;
|
|
8670
|
+
owner: Address;
|
|
8671
|
+
nonce: Address;
|
|
8672
|
+
};
|
|
8673
|
+
type MuonSingleUpnlSig = {
|
|
8674
|
+
reqId: Hex;
|
|
8675
|
+
timestamp: bigint;
|
|
8676
|
+
upnl: bigint;
|
|
8677
|
+
gatewaySignature: Hex;
|
|
8678
|
+
sigs: SchnorrSign;
|
|
8679
|
+
};
|
|
8680
|
+
|
|
8681
|
+
type DeallocateParams = {
|
|
8682
|
+
amount: bigint;
|
|
8683
|
+
upnlSig: MuonSingleUpnlSig;
|
|
8684
|
+
};
|
|
8456
8685
|
type InternalTransferParams = {
|
|
8457
8686
|
recipient: Address;
|
|
8458
8687
|
amount: bigint;
|
|
8459
8688
|
};
|
|
8460
8689
|
|
|
8690
|
+
type InstantWithdrawSpeed = 'instant' | 'standard';
|
|
8691
|
+
type InstantWithdrawStatus = 'idle' | 'authenticating' | 'bridging' | 'awaitingBridgeId' | 'fetchingOptions' | 'selectingPolicy' | 'done' | 'failed';
|
|
8692
|
+
type UseSymmInstantWithdrawParams = {
|
|
8693
|
+
publicClient?: PublicClient;
|
|
8694
|
+
walletClient?: WalletClient;
|
|
8695
|
+
chainId?: number;
|
|
8696
|
+
siweDomain?: string;
|
|
8697
|
+
/** Bounded poll budget for resolving the new bridgeId (ms). Default 30s. */
|
|
8698
|
+
bridgeIdTimeoutMs?: number;
|
|
8699
|
+
};
|
|
8700
|
+
type InstantWithdrawVariables = {
|
|
8701
|
+
/**
|
|
8702
|
+
* MultiAccount sub-account to bridge from. Omit to bridge directly from a
|
|
8703
|
+
* Party-A account (EOA) on the Diamond.
|
|
8704
|
+
*/
|
|
8705
|
+
subAccount?: Address;
|
|
8706
|
+
/** Amount to withdraw, in collateral wei. */
|
|
8707
|
+
amount: bigint;
|
|
8708
|
+
/** `instant` (≈0 cooldown, fee) or `standard` (12h cooldown). Default `instant`. */
|
|
8709
|
+
speed?: InstantWithdrawSpeed;
|
|
8710
|
+
/** Optional deallocate batched before the bridge transfer (sub-account path). */
|
|
8711
|
+
deallocate?: DeallocateParams;
|
|
8712
|
+
/** Optional new receiver — the wallet is prompted to sign an EIP-712 payload. */
|
|
8713
|
+
newReceiver?: Address;
|
|
8714
|
+
/** Skip the cached token and force a fresh sign-in. */
|
|
8715
|
+
forceReauth?: boolean;
|
|
8716
|
+
};
|
|
8717
|
+
type InstantWithdrawResult = {
|
|
8718
|
+
bridgeId: number;
|
|
8719
|
+
executionTime: number;
|
|
8720
|
+
fee: number;
|
|
8721
|
+
bridgeTxHash: Hex;
|
|
8722
|
+
};
|
|
8723
|
+
/**
|
|
8724
|
+
* Use case: orchestrated single-call instant withdrawal.
|
|
8725
|
+
*
|
|
8726
|
+
* Runs: auth → (instant) max-instant-value guard → on-chain bridge →
|
|
8727
|
+
* resolve bridgeId from `/v1/bridges` → fetch fee options → select policy.
|
|
8728
|
+
* After this resolves, the bot calls `processWithdrawal` automatically at
|
|
8729
|
+
* `executionTime`; use `useSymmProcessWithdrawalMutation` for the manual path.
|
|
8730
|
+
*/
|
|
8731
|
+
declare function useSymmInstantWithdraw(params: UseSymmInstantWithdrawParams, options?: {
|
|
8732
|
+
mutation?: SymmMutationConfig<InstantWithdrawResult, Error, InstantWithdrawVariables>;
|
|
8733
|
+
}): {
|
|
8734
|
+
status: InstantWithdrawStatus;
|
|
8735
|
+
bridgeTxHash: `0x${string}` | undefined;
|
|
8736
|
+
reset: () => void;
|
|
8737
|
+
data: undefined;
|
|
8738
|
+
variables: undefined;
|
|
8739
|
+
error: null;
|
|
8740
|
+
isError: false;
|
|
8741
|
+
isIdle: true;
|
|
8742
|
+
isPending: false;
|
|
8743
|
+
isSuccess: false;
|
|
8744
|
+
mutate: _tanstack_react_query.UseMutateFunction<InstantWithdrawResult, Error, InstantWithdrawVariables, unknown>;
|
|
8745
|
+
context: unknown;
|
|
8746
|
+
failureCount: number;
|
|
8747
|
+
failureReason: Error | null;
|
|
8748
|
+
isPaused: boolean;
|
|
8749
|
+
submittedAt: number;
|
|
8750
|
+
mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<InstantWithdrawResult, Error, InstantWithdrawVariables, unknown>;
|
|
8751
|
+
} | {
|
|
8752
|
+
status: InstantWithdrawStatus;
|
|
8753
|
+
bridgeTxHash: `0x${string}` | undefined;
|
|
8754
|
+
reset: () => void;
|
|
8755
|
+
data: undefined;
|
|
8756
|
+
variables: InstantWithdrawVariables;
|
|
8757
|
+
error: null;
|
|
8758
|
+
isError: false;
|
|
8759
|
+
isIdle: false;
|
|
8760
|
+
isPending: true;
|
|
8761
|
+
isSuccess: false;
|
|
8762
|
+
mutate: _tanstack_react_query.UseMutateFunction<InstantWithdrawResult, Error, InstantWithdrawVariables, unknown>;
|
|
8763
|
+
context: unknown;
|
|
8764
|
+
failureCount: number;
|
|
8765
|
+
failureReason: Error | null;
|
|
8766
|
+
isPaused: boolean;
|
|
8767
|
+
submittedAt: number;
|
|
8768
|
+
mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<InstantWithdrawResult, Error, InstantWithdrawVariables, unknown>;
|
|
8769
|
+
} | {
|
|
8770
|
+
status: InstantWithdrawStatus;
|
|
8771
|
+
bridgeTxHash: `0x${string}` | undefined;
|
|
8772
|
+
reset: () => void;
|
|
8773
|
+
data: undefined;
|
|
8774
|
+
error: Error;
|
|
8775
|
+
variables: InstantWithdrawVariables;
|
|
8776
|
+
isError: true;
|
|
8777
|
+
isIdle: false;
|
|
8778
|
+
isPending: false;
|
|
8779
|
+
isSuccess: false;
|
|
8780
|
+
mutate: _tanstack_react_query.UseMutateFunction<InstantWithdrawResult, Error, InstantWithdrawVariables, unknown>;
|
|
8781
|
+
context: unknown;
|
|
8782
|
+
failureCount: number;
|
|
8783
|
+
failureReason: Error | null;
|
|
8784
|
+
isPaused: boolean;
|
|
8785
|
+
submittedAt: number;
|
|
8786
|
+
mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<InstantWithdrawResult, Error, InstantWithdrawVariables, unknown>;
|
|
8787
|
+
} | {
|
|
8788
|
+
status: InstantWithdrawStatus;
|
|
8789
|
+
bridgeTxHash: `0x${string}` | undefined;
|
|
8790
|
+
reset: () => void;
|
|
8791
|
+
data: InstantWithdrawResult;
|
|
8792
|
+
error: null;
|
|
8793
|
+
variables: InstantWithdrawVariables;
|
|
8794
|
+
isError: false;
|
|
8795
|
+
isIdle: false;
|
|
8796
|
+
isPending: false;
|
|
8797
|
+
isSuccess: true;
|
|
8798
|
+
mutate: _tanstack_react_query.UseMutateFunction<InstantWithdrawResult, Error, InstantWithdrawVariables, unknown>;
|
|
8799
|
+
context: unknown;
|
|
8800
|
+
failureCount: number;
|
|
8801
|
+
failureReason: Error | null;
|
|
8802
|
+
isPaused: boolean;
|
|
8803
|
+
submittedAt: number;
|
|
8804
|
+
mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<InstantWithdrawResult, Error, InstantWithdrawVariables, unknown>;
|
|
8805
|
+
};
|
|
8806
|
+
|
|
8807
|
+
/**
|
|
8808
|
+
* Use case: manual "Withdraw Now" — call `processWithdrawal(bridgeId)` on the
|
|
8809
|
+
* InstantWithdrawal contract when the bot is down or a scheduled withdrawal
|
|
8810
|
+
* hasn't executed after its `execution_time`.
|
|
8811
|
+
*/
|
|
8812
|
+
declare function useSymmProcessWithdrawalMutation(params: {
|
|
8813
|
+
publicClient?: PublicClient;
|
|
8814
|
+
walletClient?: WalletClient;
|
|
8815
|
+
chainId?: number;
|
|
8816
|
+
}, options?: {
|
|
8817
|
+
mutation?: SymmMutationConfig<Hex, Error, {
|
|
8818
|
+
bridgeId: bigint;
|
|
8819
|
+
}>;
|
|
8820
|
+
}): _tanstack_react_query.UseMutationResult<`0x${string}`, Error, {
|
|
8821
|
+
bridgeId: bigint;
|
|
8822
|
+
}, unknown>;
|
|
8823
|
+
|
|
8461
8824
|
type UseSymmCollateralParams = {
|
|
8462
8825
|
publicClient?: PublicClient;
|
|
8463
8826
|
walletClient?: WalletClient;
|
|
@@ -8946,7 +9309,7 @@ declare function useSymmCloseAllPositionsMutation(options?: {
|
|
|
8946
9309
|
*/
|
|
8947
9310
|
declare function useSymmCancelOpenMutation(options?: {
|
|
8948
9311
|
mutation?: SymmMutationConfig<unknown, Error, CancelOpenRequest>;
|
|
8949
|
-
}): _tanstack_react_query.UseMutationResult<
|
|
9312
|
+
}): _tanstack_react_query.UseMutationResult<_pear_protocol_symm_core.ApiResponse<unknown>, Error, CancelOpenRequest, unknown>;
|
|
8950
9313
|
/**
|
|
8951
9314
|
* Use case: Update position settings with automatic auth-token resolution.
|
|
8952
9315
|
*/
|
|
@@ -9002,7 +9365,7 @@ declare function useSymmSetTpslMutation(options?: {
|
|
|
9002
9365
|
*/
|
|
9003
9366
|
declare function useSymmCancelTpslMutation(options?: {
|
|
9004
9367
|
mutation?: SymmMutationConfig<unknown, Error, CancelTpslRequest>;
|
|
9005
|
-
}): _tanstack_react_query.UseMutationResult<
|
|
9368
|
+
}): _tanstack_react_query.UseMutationResult<_pear_protocol_symm_core.ApiResponse<unknown>, Error, CancelTpslRequest, unknown>;
|
|
9006
9369
|
|
|
9007
9370
|
type UseSymmTpslOrdersParams = {
|
|
9008
9371
|
accountAddress?: Address;
|
|
@@ -9433,6 +9796,7 @@ declare const symmKeys: {
|
|
|
9433
9796
|
tpslOrdersRoot: readonly ["symm", "tpslOrders"];
|
|
9434
9797
|
twapOrdersRoot: readonly ["symm", "twapOrders"];
|
|
9435
9798
|
triggerOrdersRoot: readonly ["symm", "triggerOrders"];
|
|
9799
|
+
bridgesRoot: readonly ["symm", "bridges"];
|
|
9436
9800
|
accounts: (address?: Address, chainId?: number) => readonly ["symm", "accounts", `0x${string}` | undefined, number | undefined];
|
|
9437
9801
|
accountsApi: (address?: Address, chainId?: number) => readonly ["symm", "accountsApi", `0x${string}` | undefined, number | undefined];
|
|
9438
9802
|
accountsLength: (address?: Address, chainId?: number) => readonly ["symm", "accountsLength", `0x${string}` | undefined, number | undefined];
|
|
@@ -9596,6 +9960,25 @@ declare const symmKeys: {
|
|
|
9596
9960
|
twapOrder: (orderId?: string) => readonly ["symm", "twapOrder", string | undefined];
|
|
9597
9961
|
delegation: (account?: Address, target?: Address, selectors?: readonly Hex[], chainId?: number) => readonly ["symm", "delegation", `0x${string}` | undefined, `0x${string}` | undefined, readonly `0x${string}`[] | undefined, number | undefined];
|
|
9598
9962
|
chartMetadata: (symbolsKey: string, positionKey: string) => readonly ["symm", "chartMetadata", string, string];
|
|
9963
|
+
instantWithdrawalAuth: (signerAddress?: Address, chainId?: number) => readonly ["symm", "instantWithdrawalAuth", `0x${string}` | undefined, number | undefined];
|
|
9964
|
+
withdrawalConfig: (chainId?: number) => readonly ["symm", "withdrawalConfig", number | undefined];
|
|
9965
|
+
maxInstantValue: (account?: Address, chainId?: number) => readonly ["symm", "maxInstantValue", `0x${string}` | undefined, number | undefined];
|
|
9966
|
+
pendingFeePolicy: (account?: Address, chainId?: number) => readonly ["symm", "pendingFeePolicy", `0x${string}` | undefined, number | undefined];
|
|
9967
|
+
bridges: (params?: {
|
|
9968
|
+
account?: Address;
|
|
9969
|
+
chainId?: number;
|
|
9970
|
+
start?: number | null;
|
|
9971
|
+
size?: number | null;
|
|
9972
|
+
bridgeState?: string | null;
|
|
9973
|
+
bridgeType?: string | null;
|
|
9974
|
+
}) => readonly ["symm", "bridges", {
|
|
9975
|
+
account?: Address;
|
|
9976
|
+
chainId?: number;
|
|
9977
|
+
start?: number | null;
|
|
9978
|
+
size?: number | null;
|
|
9979
|
+
bridgeState?: string | null;
|
|
9980
|
+
bridgeType?: string | null;
|
|
9981
|
+
} | undefined];
|
|
9599
9982
|
};
|
|
9600
9983
|
|
|
9601
9984
|
declare function getSymmErrorMessage(error: unknown): string;
|
|
@@ -9618,4 +10001,4 @@ type BinanceMarkPriceState = {
|
|
|
9618
10001
|
};
|
|
9619
10002
|
declare const useBinanceMarkPriceStore: zustand.UseBoundStore<zustand.StoreApi<BinanceMarkPriceState>>;
|
|
9620
10003
|
|
|
9621
|
-
export { type SymmAccountBalanceInfoLike, type SymmAccountDataLike, type SymmAccountNumericValue, type SymmAccountOverview, type SymmAccountOverviewInput, type SymmAccountOverviewQueryData, type SymmChartSelection, type SymmChartSelectionInput, type SymmChartTokenSelection, type SymmClearTriggerConfigResponse, type SymmContextValue, type SymmDelegationMutationVariables, type SymmDelegationState, type SymmDepositWithdrawalTotals, type SymmInstantTradeActionArgs, type SymmInstantTradeRequest, type SymmLeaderboardEntry, type SymmLeaderboardRequest, type SymmLeaderboardResponse, type SymmMarkPrices, type SymmMarketPositioningResponse, type SymmMutationConfig, type SymmPerformanceOverlay, type SymmPnlAssetLegLike, type SymmPnlNumericValue, type SymmPnlPositionLike, type SymmPositionPnlResult, type SymmPredictionOutcomeTriggerConfig, type SymmQueryConfig, type SymmSetTriggerConfigRequest, type SymmSetTriggerConfigResponse, type SymmStandardTriggerConfig, type SymmTokenMetadata, type SymmTokenSelectionMarket, type SymmTriggerConfig, type SymmTriggerConfigResponse, type SymmUpnlWebSocketMessage, type SymmUpnlWebSocketStatus, type UseSymmAccountCurrentPnlParams, type UseSymmAccountCurrentPnlReturn, type UseSymmAccountOverviewParams, type UseSymmAuthParams, type UseSymmChartCandlesReturn, type UseSymmClearTriggerConfigReturn, type UseSymmDelegationMutationParams, type UseSymmDelegationParams, type UseSymmHedgerMarketsParams, type UseSymmLeaderboardParams, type UseSymmLeaderboardReturn, type UseSymmMarketPositioningParams, type UseSymmMarketPositioningReturn, type UseSymmMarketsParams, type UseSymmMarketsReturn, type UseSymmOpenOrdersParams, type UseSymmSetTriggerConfigReturn, type UseSymmTokenMarkPriceReturn, type UseSymmTokenSelectionMarketsReturn, type UseSymmTokenSelectionMetadataReturn, type UseSymmTpslOrdersParams, type UseSymmTriggerConfigParams, type UseSymmTriggerConfigReturn, type UseSymmTriggerOrdersParams, type UseSymmTwapParams, type UseSymmUpnlWebSocketParams, type UseSymmUpnlWebSocketReturn, computeSymmAccountOverview, computeSymmAccountOverviewFromData, computeSymmNetDeposited, computeSymmPositionUpnl, computeSymmPositionsUpnl, getSymmAccountBalanceInfo, getSymmAccountData, getSymmErrorMessage, normalizeSymmUpnlWebSocketMessage, symmKeys, useBinanceMarkPriceStore, useSymmAccountCurrentPnl, useSymmAccountData, useSymmAccountOverview, useSymmAccountSummary, useSymmAccountsApi, useSymmAccountsLength, useSymmAccountsQuery, useSymmAccountsWithPositions, useSymmAllocateCollateralMutation, useSymmApprovalQuery, useSymmApproveMutation, useSymmAuth, useSymmAvailableMargin, useSymmBalances, useSymmCancelClose, useSymmCancelOpenMutation, useSymmCancelTpslMutation, useSymmCancelTwapOrderMutation, useSymmChartCandles, useSymmChartSelection, useSymmClearTriggerConfigMutation, useSymmCloseAllPositionsMutation, useSymmCloseOrder, useSymmClosePositionMutation, useSymmContext, useSymmCoreClient, useSymmCreateAccountMutation, useSymmDeallocateCollateralMutation, useSymmDelegateAccessMutation, useSymmDelegation, useSymmDepositAndAllocateMutation, useSymmDepositMutation, useSymmEditAccountNameMutation, useSymmFunding, useSymmFundingHistory, useSymmFundingPayments, useSymmHedgerMarketById, useSymmHedgerMarketBySymbol, useSymmHedgerMarkets, useSymmInstantTradeEnsureReadyMutation, useSymmInstantTradeExecuteMutation, useSymmInternalTransferCollateralMutation, useSymmLeaderboard, useSymmLockedParams, useSymmMarkReadNotificationMutation, useSymmMarketPositioning, useSymmMarkets, useSymmNotificationsQuery, useSymmOpenBasketMutation, useSymmOpenOrders, useSymmPendingIds, useSymmPendingInstantOpens, useSymmPerformanceOverlays, useSymmPortfolio, useSymmPositions, useSymmProposeRevokeDelegationMutation, useSymmRevokeDelegationMutation, useSymmSetTpslMutation, useSymmSetTriggerConfigMutation, useSymmSignTermsMutation, useSymmSignatureQuery, useSymmTokenMarkPrice, useSymmTokenSelectionMarkets, useSymmTokenSelectionMetadata, useSymmTpslOrders, useSymmTradeHistory, useSymmTriggerConfigQuery, useSymmTriggerOrders, useSymmTwapOrder, useSymmTwapOrdersQuery, useSymmUnreadCountQuery, useSymmUpdatePositionMutation, useSymmUpnlWebSocket, useSymmWithdraw, useSymmWsStore };
|
|
10004
|
+
export { type InstantWithdrawResult, type InstantWithdrawSpeed, type InstantWithdrawStatus, type InstantWithdrawVariables, type SymmAccountBalanceInfoLike, type SymmAccountDataLike, type SymmAccountNumericValue, type SymmAccountOverview, type SymmAccountOverviewInput, type SymmAccountOverviewQueryData, type SymmChartSelection, type SymmChartSelectionInput, type SymmChartTokenSelection, type SymmClearTriggerConfigResponse, type SymmContextValue, type SymmDelegationMutationVariables, type SymmDelegationState, type SymmDepositWithdrawalTotals, type SymmInstantTradeActionArgs, type SymmInstantTradeRequest, type SymmLeaderboardEntry, type SymmLeaderboardRequest, type SymmLeaderboardResponse, type SymmMarkPrices, type SymmMarketPositioningResponse, type SymmMutationConfig, type SymmPerformanceOverlay, type SymmPnlAssetLegLike, type SymmPnlNumericValue, type SymmPnlPositionLike, type SymmPositionPnlResult, type SymmPredictionOutcomeTriggerConfig, type SymmQueryConfig, type SymmSetTriggerConfigRequest, type SymmSetTriggerConfigResponse, type SymmStandardTriggerConfig, type SymmTokenMetadata, type SymmTokenSelectionMarket, type SymmTriggerConfig, type SymmTriggerConfigResponse, type SymmUpnlWebSocketMessage, type SymmUpnlWebSocketStatus, type UseSymmAccountCurrentPnlParams, type UseSymmAccountCurrentPnlReturn, type UseSymmAccountOverviewParams, type UseSymmAuthParams, type UseSymmChartCandlesReturn, type UseSymmClearTriggerConfigReturn, type UseSymmDelegationMutationParams, type UseSymmDelegationParams, type UseSymmHedgerMarketsParams, type UseSymmInstantWithdrawParams, type UseSymmInstantWithdrawalAuthParams, type UseSymmLeaderboardParams, type UseSymmLeaderboardReturn, type UseSymmMarketPositioningParams, type UseSymmMarketPositioningReturn, type UseSymmMarketsParams, type UseSymmMarketsReturn, type UseSymmOpenOrdersParams, type UseSymmSetTriggerConfigReturn, type UseSymmTokenMarkPriceReturn, type UseSymmTokenSelectionMarketsReturn, type UseSymmTokenSelectionMetadataReturn, type UseSymmTpslOrdersParams, type UseSymmTriggerConfigParams, type UseSymmTriggerConfigReturn, type UseSymmTriggerOrdersParams, type UseSymmTwapParams, type UseSymmUpnlWebSocketParams, type UseSymmUpnlWebSocketReturn, buildSpecifiedReceiver, computeSymmAccountOverview, computeSymmAccountOverviewFromData, computeSymmNetDeposited, computeSymmPositionUpnl, computeSymmPositionsUpnl, getSymmAccountBalanceInfo, getSymmAccountData, getSymmErrorMessage, normalizeSymmUpnlWebSocketMessage, symmKeys, useBinanceMarkPriceStore, useSymmAccountCurrentPnl, useSymmAccountData, useSymmAccountOverview, useSymmAccountSummary, useSymmAccountsApi, useSymmAccountsLength, useSymmAccountsQuery, useSymmAccountsWithPositions, useSymmAllocateCollateralMutation, useSymmApprovalQuery, useSymmApproveMutation, useSymmAuth, useSymmAvailableMargin, useSymmBalances, useSymmBridges, useSymmCancelClose, useSymmCancelOpenMutation, useSymmCancelTpslMutation, useSymmCancelTwapOrderMutation, useSymmChartCandles, useSymmChartSelection, useSymmClearTriggerConfigMutation, useSymmCloseAllPositionsMutation, useSymmCloseOrder, useSymmClosePositionMutation, useSymmContext, useSymmCoreClient, useSymmCreateAccountMutation, useSymmDeallocateCollateralMutation, useSymmDelegateAccessMutation, useSymmDelegation, useSymmDepositAndAllocateMutation, useSymmDepositMutation, useSymmEditAccountNameMutation, useSymmFeeOptionsMutation, useSymmFunding, useSymmFundingHistory, useSymmFundingPayments, useSymmHedgerMarketById, useSymmHedgerMarketBySymbol, useSymmHedgerMarkets, useSymmInstantTradeEnsureReadyMutation, useSymmInstantTradeExecuteMutation, useSymmInstantWithdraw, useSymmInstantWithdrawalAuth, useSymmInternalTransferCollateralMutation, useSymmLeaderboard, useSymmLockedParams, useSymmMarkReadNotificationMutation, useSymmMarketPositioning, useSymmMarkets, useSymmMaxInstantValue, useSymmNotificationsQuery, useSymmOpenBasketMutation, useSymmOpenOrders, useSymmPendingFeePolicy, useSymmPendingIds, useSymmPendingInstantOpens, useSymmPerformanceOverlays, useSymmPortfolio, useSymmPositions, useSymmProcessWithdrawalMutation, useSymmProposeRevokeDelegationMutation, useSymmRefreshFeeOptionsMutation, useSymmRevokeDelegationMutation, useSymmSelectFeePolicyMutation, useSymmSetTpslMutation, useSymmSetTriggerConfigMutation, useSymmSignTermsMutation, useSymmSignatureQuery, useSymmTokenMarkPrice, useSymmTokenSelectionMarkets, useSymmTokenSelectionMetadata, useSymmTpslOrders, useSymmTradeHistory, useSymmTriggerConfigQuery, useSymmTriggerOrders, useSymmTwapOrder, useSymmTwapOrdersQuery, useSymmUnlockAccountMutation, useSymmUnreadCountQuery, useSymmUpdatePositionMutation, useSymmUpnlWebSocket, useSymmWithdraw, useSymmWithdrawalConfig, useSymmWsStore };
|