@sodax/wallet-sdk-react 1.5.6-beta → 2.0.0-rc.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 +103 -145
- package/ai-exported/AGENTS.md +122 -0
- package/ai-exported/integration/README.md +102 -0
- package/ai-exported/integration/ai-rules.md +136 -0
- package/ai-exported/integration/architecture.md +181 -0
- package/ai-exported/integration/examples/01-minimal-evm.tsx +75 -0
- package/ai-exported/integration/examples/02-multi-chain-modal.tsx +169 -0
- package/ai-exported/integration/examples/03-nextjs-app-router.tsx +99 -0
- package/ai-exported/integration/examples/04-walletconnect-setup.tsx +89 -0
- package/ai-exported/integration/examples/README.md +29 -0
- package/ai-exported/integration/recipes/batch-operations.md +223 -0
- package/ai-exported/integration/recipes/bridge-to-sdk.md +164 -0
- package/ai-exported/integration/recipes/chain-detection.md +254 -0
- package/ai-exported/integration/recipes/connect-button.md +156 -0
- package/ai-exported/integration/recipes/multi-chain-modal.md +199 -0
- package/ai-exported/integration/recipes/setup.md +158 -0
- package/ai-exported/integration/recipes/sign-message.md +137 -0
- package/ai-exported/integration/recipes/sub-path-imports.md +95 -0
- package/ai-exported/integration/recipes/switch-chain.md +141 -0
- package/ai-exported/integration/recipes/walletconnect-setup.md +139 -0
- package/ai-exported/integration/reference/api-surface.md +175 -0
- package/ai-exported/integration/reference/chain-support.md +78 -0
- package/ai-exported/integration/reference/connectors.md +74 -0
- package/ai-exported/integration/reference/hooks.md +204 -0
- package/ai-exported/integration/reference/wallet-brands.md +106 -0
- package/ai-exported/migration/README.md +49 -0
- package/ai-exported/migration/ai-rules.md +144 -0
- package/ai-exported/migration/breaking-changes.md +305 -0
- package/ai-exported/migration/checklist.md +159 -0
- package/ai-exported/migration/recipes/connect-button.md +166 -0
- package/ai-exported/migration/recipes/multi-chain-modal.md +244 -0
- package/ai-exported/migration/recipes/ssr-setup.md +162 -0
- package/ai-exported/migration/recipes/walletconnect-migration.md +168 -0
- package/ai-exported/migration/reference/components.md +73 -0
- package/ai-exported/migration/reference/config.md +307 -0
- package/ai-exported/migration/reference/hooks.md +278 -0
- package/ai-exported/migration/reference/imports.md +157 -0
- package/dist/XConnector-B9YQTVJ4.d.ts +146 -0
- package/dist/chunk-2BOUGCJ7.mjs +150 -0
- package/dist/chunk-2BOUGCJ7.mjs.map +1 -0
- package/dist/chunk-66BAUK56.mjs +202 -0
- package/dist/chunk-66BAUK56.mjs.map +1 -0
- package/dist/chunk-7ULB6DW4.mjs +102 -0
- package/dist/chunk-7ULB6DW4.mjs.map +1 -0
- package/dist/chunk-BKJB527E.mjs +125 -0
- package/dist/chunk-BKJB527E.mjs.map +1 -0
- package/dist/chunk-BXJLBR4G.mjs +88 -0
- package/dist/chunk-BXJLBR4G.mjs.map +1 -0
- package/dist/chunk-E5IAZ7E6.mjs +186 -0
- package/dist/chunk-E5IAZ7E6.mjs.map +1 -0
- package/dist/chunk-MAQ47Q52.mjs +33 -0
- package/dist/chunk-MAQ47Q52.mjs.map +1 -0
- package/dist/chunk-MXZVF5HR.mjs +34 -0
- package/dist/chunk-MXZVF5HR.mjs.map +1 -0
- package/dist/chunk-N5A2TMF6.mjs +33 -0
- package/dist/chunk-N5A2TMF6.mjs.map +1 -0
- package/dist/chunk-NY7U7OJW.mjs +64 -0
- package/dist/chunk-NY7U7OJW.mjs.map +1 -0
- package/dist/chunk-PJLEJVAU.mjs +140 -0
- package/dist/chunk-PJLEJVAU.mjs.map +1 -0
- package/dist/chunk-PLCA4ZDJ.mjs +1585 -0
- package/dist/chunk-PLCA4ZDJ.mjs.map +1 -0
- package/dist/chunk-TZMKDXFA.mjs +3 -0
- package/dist/chunk-TZMKDXFA.mjs.map +1 -0
- package/dist/chunk-X2MHIWXO.mjs +100 -0
- package/dist/chunk-X2MHIWXO.mjs.map +1 -0
- package/dist/chunk-XZ7CHO2S.mjs +41 -0
- package/dist/chunk-XZ7CHO2S.mjs.map +1 -0
- package/dist/config-OlnzyEUE.d.ts +146 -0
- package/dist/index.cjs +2784 -1594
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +768 -1498
- package/dist/index.mjs +463 -2004
- package/dist/index.mjs.map +1 -1
- package/dist/xchains/bitcoin/index.cjs +1927 -0
- package/dist/xchains/bitcoin/index.cjs.map +1 -0
- package/dist/xchains/bitcoin/index.d.ts +125 -0
- package/dist/xchains/bitcoin/index.mjs +16 -0
- package/dist/xchains/bitcoin/index.mjs.map +1 -0
- package/dist/xchains/evm/index.cjs +316 -0
- package/dist/xchains/evm/index.cjs.map +1 -0
- package/dist/xchains/evm/index.d.ts +39 -0
- package/dist/xchains/evm/index.mjs +5 -0
- package/dist/xchains/evm/index.mjs.map +1 -0
- package/dist/xchains/icon/index.cjs +311 -0
- package/dist/xchains/icon/index.cjs.map +1 -0
- package/dist/xchains/icon/index.d.ts +37 -0
- package/dist/xchains/icon/index.mjs +7 -0
- package/dist/xchains/icon/index.mjs.map +1 -0
- package/dist/xchains/injective/index.cjs +223 -0
- package/dist/xchains/injective/index.cjs.map +1 -0
- package/dist/xchains/injective/index.d.ts +35 -0
- package/dist/xchains/injective/index.mjs +5 -0
- package/dist/xchains/injective/index.mjs.map +1 -0
- package/dist/xchains/near/index.cjs +190 -0
- package/dist/xchains/near/index.cjs.map +1 -0
- package/dist/xchains/near/index.d.ts +34 -0
- package/dist/xchains/near/index.mjs +6 -0
- package/dist/xchains/near/index.mjs.map +1 -0
- package/dist/xchains/solana/index.cjs +186 -0
- package/dist/xchains/solana/index.cjs.map +1 -0
- package/dist/xchains/solana/index.d.ts +26 -0
- package/dist/xchains/solana/index.mjs +7 -0
- package/dist/xchains/solana/index.mjs.map +1 -0
- package/dist/xchains/stacks/index.cjs +240 -0
- package/dist/xchains/stacks/index.cjs.map +1 -0
- package/dist/xchains/stacks/index.d.ts +36 -0
- package/dist/xchains/stacks/index.mjs +5 -0
- package/dist/xchains/stacks/index.mjs.map +1 -0
- package/dist/xchains/stellar/index.cjs +322 -0
- package/dist/xchains/stellar/index.cjs.map +1 -0
- package/dist/xchains/stellar/index.d.ts +44 -0
- package/dist/xchains/stellar/index.mjs +6 -0
- package/dist/xchains/stellar/index.mjs.map +1 -0
- package/dist/xchains/sui/index.cjs +248 -0
- package/dist/xchains/sui/index.cjs.map +1 -0
- package/dist/xchains/sui/index.d.ts +37 -0
- package/dist/xchains/sui/index.mjs +7 -0
- package/dist/xchains/sui/index.mjs.map +1 -0
- package/docs/ADDING_A_NEW_CHAIN.md +440 -0
- package/docs/ARCHITECTURE.md +291 -0
- package/docs/BATCH_OPERATIONS.md +267 -0
- package/docs/CHAIN_DETECTION.md +216 -0
- package/docs/CONFIGURE_PROVIDER.md +360 -0
- package/docs/CONNECTORS.md +247 -0
- package/docs/CONNECT_FLOW.md +276 -0
- package/docs/EVM_SWITCH_CHAIN.md +161 -0
- package/docs/SIGN_MESSAGE.md +213 -0
- package/docs/SUB_PATH_EXPORTS.md +246 -0
- package/docs/WALLETCONNECT.md +154 -0
- package/docs/WALLET_MODAL.md +331 -0
- package/docs/WALLET_PROVIDER_BRIDGE.md +226 -0
- package/package.json +34 -9
- package/skills/SKILLS.md +84 -0
- package/skills/bridge-to-sdk.md +148 -0
- package/skills/connect-button.md +116 -0
- package/skills/evm-only-walletconnect.md +111 -0
- package/skills/multi-chain-modal.md +178 -0
- package/skills/setup.md +107 -0
- package/dist/index.d.cts +0 -1579
- package/src/Hydrate.ts +0 -65
- package/src/SodaxWalletProvider.tsx +0 -97
- package/src/actions/getXChainType.ts +0 -8
- package/src/actions/getXService.ts +0 -33
- package/src/actions/index.ts +0 -2
- package/src/assets/wallets/hana.svg +0 -6
- package/src/assets/wallets/havah.svg +0 -76
- package/src/assets/wallets/keplr.svg +0 -30
- package/src/assets/wallets/metamask.svg +0 -60
- package/src/assets/wallets/phantom.svg +0 -4
- package/src/assets/wallets/sui.svg +0 -20
- package/src/core/XConnector.ts +0 -54
- package/src/core/XService.ts +0 -85
- package/src/core/index.ts +0 -2
- package/src/hooks/index.ts +0 -11
- package/src/hooks/useEthereumChainId.ts +0 -44
- package/src/hooks/useEvmSwitchChain.ts +0 -91
- package/src/hooks/useWalletProvider.ts +0 -206
- package/src/hooks/useXAccount.ts +0 -51
- package/src/hooks/useXAccounts.ts +0 -56
- package/src/hooks/useXBalances.ts +0 -65
- package/src/hooks/useXConnect.ts +0 -118
- package/src/hooks/useXConnection.ts +0 -72
- package/src/hooks/useXConnectors.ts +0 -72
- package/src/hooks/useXDisconnect.ts +0 -73
- package/src/hooks/useXService.ts +0 -8
- package/src/hooks/useXSignMessage.ts +0 -82
- package/src/index.ts +0 -19
- package/src/types/index.ts +0 -22
- package/src/useXWagmiStore.ts +0 -116
- package/src/utils/index.ts +0 -21
- package/src/xchains/bitcoin/BitcoinXConnector.ts +0 -34
- package/src/xchains/bitcoin/BitcoinXService.ts +0 -40
- package/src/xchains/bitcoin/OKXXConnector.ts +0 -117
- package/src/xchains/bitcoin/UnisatXConnector.ts +0 -117
- package/src/xchains/bitcoin/XverseXConnector.ts +0 -232
- package/src/xchains/bitcoin/index.ts +0 -7
- package/src/xchains/bitcoin/useBitcoinXConnectors.ts +0 -14
- package/src/xchains/evm/EvmXConnector.ts +0 -27
- package/src/xchains/evm/EvmXService.ts +0 -211
- package/src/xchains/evm/index.ts +0 -3
- package/src/xchains/icon/IconHanaXConnector.ts +0 -39
- package/src/xchains/icon/IconXService.ts +0 -117
- package/src/xchains/icon/actions.ts +0 -28
- package/src/xchains/icon/iconex/index.tsx +0 -46
- package/src/xchains/icon/index.ts +0 -2
- package/src/xchains/injective/InjectiveXConnector.ts +0 -60
- package/src/xchains/injective/InjectiveXService.ts +0 -62
- package/src/xchains/injective/actions.ts +0 -32
- package/src/xchains/injective/index.ts +0 -2
- package/src/xchains/near/NearXConnector.ts +0 -42
- package/src/xchains/near/NearXService.ts +0 -46
- package/src/xchains/near/useNearXConnectors.ts +0 -23
- package/src/xchains/solana/SolanaXConnector.ts +0 -26
- package/src/xchains/solana/SolanaXService.ts +0 -46
- package/src/xchains/solana/index.ts +0 -2
- package/src/xchains/stacks/StacksXConnector.ts +0 -63
- package/src/xchains/stacks/StacksXService.ts +0 -59
- package/src/xchains/stacks/constants.ts +0 -42
- package/src/xchains/stacks/index.ts +0 -4
- package/src/xchains/stacks/useStacksXConnectors.ts +0 -7
- package/src/xchains/stellar/CustomSorobanServer.ts +0 -93
- package/src/xchains/stellar/StellarWalletsKitXConnector.ts +0 -53
- package/src/xchains/stellar/StellarXService.ts +0 -93
- package/src/xchains/stellar/actions.ts +0 -24
- package/src/xchains/stellar/index.tsx +0 -2
- package/src/xchains/stellar/useStellarXConnectors.ts +0 -21
- package/src/xchains/stellar/utils.ts +0 -49
- package/src/xchains/sui/SuiXConnector.ts +0 -28
- package/src/xchains/sui/SuiXService.ts +0 -66
- package/src/xchains/sui/index.ts +0 -2
package/dist/index.d.cts
DELETED
|
@@ -1,1579 +0,0 @@
|
|
|
1
|
-
import { ChainId, ChainType, XToken, IBitcoinWalletProvider, BtcWalletAddressType, RpcConfig, IEvmWalletProvider, ISuiWalletProvider, IIconWalletProvider, IInjectiveWalletProvider, IStellarWalletProvider, ISolanaWalletProvider, INearWalletProvider, IStacksWalletProvider } from '@sodax/types';
|
|
2
|
-
export { BtcWalletAddressType } from '@sodax/types';
|
|
3
|
-
import { AddressPurpose } from 'sats-connect';
|
|
4
|
-
import * as wagmi from 'wagmi';
|
|
5
|
-
import { State, Config, Connector } from 'wagmi';
|
|
6
|
-
import * as viem_chains from 'viem/chains';
|
|
7
|
-
import * as wagmi_chains from 'wagmi/chains';
|
|
8
|
-
import * as viem from 'viem';
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import { IconService } from 'icon-sdk-js';
|
|
11
|
-
import { IndexerGrpcAccountPortfolioApi, ChainGrpcWasmApi } from '@injectivelabs/sdk-ts';
|
|
12
|
-
import { MsgBroadcaster } from '@injectivelabs/wallet-core';
|
|
13
|
-
import { WalletStrategy } from '@injectivelabs/wallet-strategy';
|
|
14
|
-
import { Wallet } from '@injectivelabs/wallet-base';
|
|
15
|
-
import { Connection } from '@solana/web3.js';
|
|
16
|
-
import { WalletContextState } from '@solana/wallet-adapter-react';
|
|
17
|
-
import { StellarWalletsKit } from '@creit.tech/stellar-wallets-kit';
|
|
18
|
-
import * as StellarSdk from '@stellar/stellar-sdk';
|
|
19
|
-
import { SorobanRpc, Transaction, Memo, MemoType, Operation, FeeBumpTransaction } from '@stellar/stellar-sdk';
|
|
20
|
-
import { StacksNetwork } from '@stacks/network';
|
|
21
|
-
import { StacksProvider } from '@stacks/connect';
|
|
22
|
-
import { UseMutationResult, UseQueryResult } from '@tanstack/react-query';
|
|
23
|
-
import * as immer from 'immer';
|
|
24
|
-
import * as zustand_middleware from 'zustand/middleware';
|
|
25
|
-
import * as zustand from 'zustand';
|
|
26
|
-
|
|
27
|
-
declare function getXChainType(xChainId: ChainId | undefined): ChainType | undefined;
|
|
28
|
-
|
|
29
|
-
type XAccount = {
|
|
30
|
-
address: string | undefined;
|
|
31
|
-
xChainType: ChainType | undefined;
|
|
32
|
-
publicKey?: string;
|
|
33
|
-
};
|
|
34
|
-
type XConnection = {
|
|
35
|
-
xAccount: XAccount;
|
|
36
|
-
xConnectorId: string;
|
|
37
|
-
};
|
|
38
|
-
type CurrencyKey = string;
|
|
39
|
-
declare enum WalletId {
|
|
40
|
-
METAMASK = "metamask",
|
|
41
|
-
HANA = "hana",
|
|
42
|
-
PHANTOM = "phantom",
|
|
43
|
-
SUI = "sui",
|
|
44
|
-
KEPLR = "keplr"
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Base class for wallet provider connectors that handles connection management and wallet interactions
|
|
49
|
-
*
|
|
50
|
-
* @abstract
|
|
51
|
-
* @class XConnector
|
|
52
|
-
* @property {ChainType} xChainType - The blockchain type this connector supports
|
|
53
|
-
* @property {string} name - Display name of the wallet provider
|
|
54
|
-
* @property {string} _id - Unique identifier for the connector
|
|
55
|
-
* @property {string | undefined} _icon - Optional icon URL for the wallet provider
|
|
56
|
-
*/
|
|
57
|
-
declare abstract class XConnector {
|
|
58
|
-
/** The blockchain type this connector supports */
|
|
59
|
-
readonly xChainType: ChainType;
|
|
60
|
-
/** Display name of the wallet provider */
|
|
61
|
-
readonly name: string;
|
|
62
|
-
/** Unique identifier for the connector */
|
|
63
|
-
private readonly _id;
|
|
64
|
-
/** Optional icon URL for the wallet provider */
|
|
65
|
-
private readonly _icon?;
|
|
66
|
-
constructor(xChainType: ChainType, name: string, id: string);
|
|
67
|
-
/**
|
|
68
|
-
* Connects to the wallet provider
|
|
69
|
-
* @returns Promise resolving to the connected account, or undefined if connection fails
|
|
70
|
-
*/
|
|
71
|
-
abstract connect(): Promise<XAccount | undefined>;
|
|
72
|
-
/**
|
|
73
|
-
* Disconnects from the wallet provider
|
|
74
|
-
*/
|
|
75
|
-
abstract disconnect(): Promise<void>;
|
|
76
|
-
/** Get the unique identifier for this connector */
|
|
77
|
-
get id(): string;
|
|
78
|
-
/** Get the optional icon URL for this wallet provider */
|
|
79
|
-
get icon(): string | undefined;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Abstract base class for blockchain service implementations.
|
|
84
|
-
*
|
|
85
|
-
* The XService class serves as a foundation for implementing blockchain-specific services
|
|
86
|
-
* in a multi-chain environment. It provides a standardized interface for:
|
|
87
|
-
* 1. Managing wallet connectors for different blockchain types
|
|
88
|
-
* 2. Querying token balances across different chains
|
|
89
|
-
*
|
|
90
|
-
* Each blockchain implementation (e.g., Solana, EVM chains) extends this class
|
|
91
|
-
* to provide chain-specific functionality while maintaining a consistent interface.
|
|
92
|
-
*
|
|
93
|
-
* @abstract
|
|
94
|
-
* @class XService
|
|
95
|
-
* @property {ChainType} xChainType - The blockchain type this service handles (e.g., 'SOLANA', 'EVM')
|
|
96
|
-
* @property {XConnector[]} xConnectors - Available wallet connectors for this chain
|
|
97
|
-
*
|
|
98
|
-
*/
|
|
99
|
-
declare abstract class XService {
|
|
100
|
-
/** The blockchain type this service handles */
|
|
101
|
-
readonly xChainType: ChainType;
|
|
102
|
-
/** Available wallet connectors for this chain */
|
|
103
|
-
private xConnectors;
|
|
104
|
-
constructor(xChainType: ChainType);
|
|
105
|
-
/**
|
|
106
|
-
* Gets the balance of a specific token for an address
|
|
107
|
-
* @param address The wallet address to check
|
|
108
|
-
* @param xToken The token to get the balance for
|
|
109
|
-
* @returns Promise resolving to the token balance as a bigint
|
|
110
|
-
*/
|
|
111
|
-
getBalance(address: string | undefined, xToken: XToken): Promise<bigint>;
|
|
112
|
-
/**
|
|
113
|
-
* Gets balances for multiple tokens for an address
|
|
114
|
-
* @param address The wallet address to check
|
|
115
|
-
* @param xTokens Array of tokens to get balances for
|
|
116
|
-
* @returns Promise resolving to object mapping token addresses to balances
|
|
117
|
-
*/
|
|
118
|
-
getBalances(address: string | undefined, xTokens: readonly XToken[]): Promise<Record<string, bigint>>;
|
|
119
|
-
/**
|
|
120
|
-
* Gets all available connectors for this chain
|
|
121
|
-
*/
|
|
122
|
-
getXConnectors(): XConnector[];
|
|
123
|
-
/**
|
|
124
|
-
* Sets the available connectors for this chain
|
|
125
|
-
*/
|
|
126
|
-
setXConnectors(xConnectors: XConnector[]): void;
|
|
127
|
-
/**
|
|
128
|
-
* Gets a specific connector by its ID
|
|
129
|
-
* @param xConnectorId The connector ID to look up
|
|
130
|
-
* @returns The matching connector or undefined if not found
|
|
131
|
-
*/
|
|
132
|
-
getXConnectorById(xConnectorId: string): XConnector | undefined;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
declare function getXService(xChainType: ChainType): XService;
|
|
136
|
-
|
|
137
|
-
declare const isNativeToken: (xToken: XToken) => boolean;
|
|
138
|
-
declare const getWagmiChainId: (xChainId: ChainId) => number;
|
|
139
|
-
|
|
140
|
-
declare class BitcoinXService extends XService {
|
|
141
|
-
private static instance;
|
|
142
|
-
private rpcUrl;
|
|
143
|
-
private constructor();
|
|
144
|
-
static getInstance(rpcUrl?: string): BitcoinXService;
|
|
145
|
-
getBalance(address: string | undefined, xToken: XToken): Promise<bigint>;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Abstract base class for Bitcoin wallet connectors.
|
|
150
|
-
* Subclasses implement wallet-specific connection logic (Unisat, Xverse, OKX).
|
|
151
|
-
*/
|
|
152
|
-
declare abstract class BitcoinXConnector extends XConnector {
|
|
153
|
-
constructor(name: string, id: string);
|
|
154
|
-
getXService(): BitcoinXService;
|
|
155
|
-
abstract connect(): Promise<XAccount | undefined>;
|
|
156
|
-
abstract disconnect(): Promise<void>;
|
|
157
|
-
/**
|
|
158
|
-
* Returns an IBitcoinWalletProvider instance after connecting.
|
|
159
|
-
* Used by useSpokeProvider to build BitcoinSpokeProvider.
|
|
160
|
-
*/
|
|
161
|
-
abstract getWalletProvider(): IBitcoinWalletProvider | undefined;
|
|
162
|
-
/**
|
|
163
|
-
* Recreates a walletProvider from the browser extension window object
|
|
164
|
-
* and stored xAccount data (no connect() call, no popup).
|
|
165
|
-
* Used to restore provider after page reload without requiring reconnect.
|
|
166
|
-
*/
|
|
167
|
-
abstract recreateWalletProvider(xAccount: XAccount): IBitcoinWalletProvider | undefined;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
interface UnisatWallet {
|
|
171
|
-
getAccounts(): Promise<string[]>;
|
|
172
|
-
getPublicKey(): Promise<string>;
|
|
173
|
-
signPsbt(psbtHex: string, options?: {
|
|
174
|
-
autoFinalized?: boolean;
|
|
175
|
-
}): Promise<string>;
|
|
176
|
-
signMessage(message: string, type?: 'bip322-simple' | 'ecdsa'): Promise<string>;
|
|
177
|
-
requestAccounts(): Promise<string[]>;
|
|
178
|
-
sendBitcoin(address: string, satoshis: number): Promise<string>;
|
|
179
|
-
}
|
|
180
|
-
declare global {
|
|
181
|
-
interface Window {
|
|
182
|
-
unisat?: UnisatWallet;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
declare class UnisatXConnector extends BitcoinXConnector {
|
|
186
|
-
private walletProvider;
|
|
187
|
-
constructor();
|
|
188
|
-
static isAvailable(): boolean;
|
|
189
|
-
get icon(): string;
|
|
190
|
-
connect(): Promise<XAccount | undefined>;
|
|
191
|
-
disconnect(): Promise<void>;
|
|
192
|
-
getWalletProvider(): IBitcoinWalletProvider | undefined;
|
|
193
|
-
recreateWalletProvider(xAccount: XAccount): IBitcoinWalletProvider | undefined;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
declare class XverseXConnector extends BitcoinXConnector {
|
|
197
|
-
private walletProvider;
|
|
198
|
-
/** Address purpose used when connecting. Taproot (Ordinals) by default to match Radfi. */
|
|
199
|
-
addressPurpose: AddressPurpose;
|
|
200
|
-
constructor();
|
|
201
|
-
/** Set address purpose and persist to localStorage. */
|
|
202
|
-
setAddressPurpose(type: BtcWalletAddressType): void;
|
|
203
|
-
static isAvailable(): boolean;
|
|
204
|
-
get icon(): string;
|
|
205
|
-
connect(): Promise<XAccount | undefined>;
|
|
206
|
-
disconnect(): Promise<void>;
|
|
207
|
-
getWalletProvider(): IBitcoinWalletProvider | undefined;
|
|
208
|
-
recreateWalletProvider(xAccount: XAccount): IBitcoinWalletProvider | undefined;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
interface OKXBitcoinWallet {
|
|
212
|
-
getAccounts(): Promise<string[]>;
|
|
213
|
-
getPublicKey(): Promise<string>;
|
|
214
|
-
signPsbt(psbtHex: string, options?: {
|
|
215
|
-
autoFinalized?: boolean;
|
|
216
|
-
}): Promise<string>;
|
|
217
|
-
signMessage(message: string, type?: 'bip322-simple' | 'ecdsa'): Promise<string>;
|
|
218
|
-
connect(): Promise<{
|
|
219
|
-
address: string;
|
|
220
|
-
publicKey: string;
|
|
221
|
-
}>;
|
|
222
|
-
sendBitcoin(toAddress: string, satoshis: number): Promise<string>;
|
|
223
|
-
}
|
|
224
|
-
declare global {
|
|
225
|
-
interface Window {
|
|
226
|
-
okxwallet?: {
|
|
227
|
-
bitcoin?: OKXBitcoinWallet;
|
|
228
|
-
};
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
declare class OKXXConnector extends BitcoinXConnector {
|
|
232
|
-
private walletProvider;
|
|
233
|
-
constructor();
|
|
234
|
-
static isAvailable(): boolean;
|
|
235
|
-
get icon(): string;
|
|
236
|
-
connect(): Promise<XAccount | undefined>;
|
|
237
|
-
disconnect(): Promise<void>;
|
|
238
|
-
getWalletProvider(): IBitcoinWalletProvider | undefined;
|
|
239
|
-
recreateWalletProvider(xAccount: XAccount): IBitcoinWalletProvider | undefined;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* Hook to return available Bitcoin wallet connectors from the globally registered xService.
|
|
244
|
-
*/
|
|
245
|
-
declare function useBitcoinXConnectors(): BitcoinXConnector[];
|
|
246
|
-
|
|
247
|
-
type WagmiOptions = {
|
|
248
|
-
reconnectOnMount?: boolean;
|
|
249
|
-
ssr?: boolean;
|
|
250
|
-
};
|
|
251
|
-
type SodaxWalletProviderOptions = {
|
|
252
|
-
wagmi?: WagmiOptions;
|
|
253
|
-
solana?: {
|
|
254
|
-
autoConnect?: boolean;
|
|
255
|
-
};
|
|
256
|
-
sui?: {
|
|
257
|
-
autoConnect?: boolean;
|
|
258
|
-
};
|
|
259
|
-
};
|
|
260
|
-
type SodaxWalletProviderProps = {
|
|
261
|
-
children: React.ReactNode;
|
|
262
|
-
rpcConfig: RpcConfig;
|
|
263
|
-
options?: SodaxWalletProviderOptions;
|
|
264
|
-
initialState?: State;
|
|
265
|
-
};
|
|
266
|
-
declare const SodaxWalletProvider: ({ children, rpcConfig, options, initialState }: SodaxWalletProviderProps) => React.JSX.Element;
|
|
267
|
-
|
|
268
|
-
declare const createWagmiConfig: (config: RpcConfig, options?: WagmiOptions) => Config<readonly [{
|
|
269
|
-
blockExplorers: {
|
|
270
|
-
readonly default: {
|
|
271
|
-
readonly name: "Etherscan";
|
|
272
|
-
readonly url: "https://etherscan.io";
|
|
273
|
-
readonly apiUrl: "https://api.etherscan.io/api";
|
|
274
|
-
};
|
|
275
|
-
};
|
|
276
|
-
contracts: {
|
|
277
|
-
readonly ensRegistry: {
|
|
278
|
-
readonly address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";
|
|
279
|
-
};
|
|
280
|
-
readonly ensUniversalResolver: {
|
|
281
|
-
readonly address: "0xce01f8eee7E479C928F8919abD53E553a36CeF67";
|
|
282
|
-
readonly blockCreated: 19258213;
|
|
283
|
-
};
|
|
284
|
-
readonly multicall3: {
|
|
285
|
-
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
286
|
-
readonly blockCreated: 14353601;
|
|
287
|
-
};
|
|
288
|
-
};
|
|
289
|
-
ensTlds?: readonly string[] | undefined;
|
|
290
|
-
id: 1;
|
|
291
|
-
name: "Ethereum";
|
|
292
|
-
nativeCurrency: {
|
|
293
|
-
readonly name: "Ether";
|
|
294
|
-
readonly symbol: "ETH";
|
|
295
|
-
readonly decimals: 18;
|
|
296
|
-
};
|
|
297
|
-
rpcUrls: {
|
|
298
|
-
readonly default: {
|
|
299
|
-
readonly http: readonly ["https://eth.merkle.io"];
|
|
300
|
-
};
|
|
301
|
-
};
|
|
302
|
-
sourceId?: number | undefined | undefined;
|
|
303
|
-
testnet?: boolean | undefined | undefined;
|
|
304
|
-
custom?: Record<string, unknown> | undefined;
|
|
305
|
-
fees?: viem.ChainFees<undefined> | undefined;
|
|
306
|
-
formatters?: undefined;
|
|
307
|
-
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
308
|
-
}, {
|
|
309
|
-
blockExplorers: {
|
|
310
|
-
readonly default: {
|
|
311
|
-
readonly name: "SnowTrace";
|
|
312
|
-
readonly url: "https://snowtrace.io";
|
|
313
|
-
readonly apiUrl: "https://api.snowtrace.io";
|
|
314
|
-
};
|
|
315
|
-
};
|
|
316
|
-
contracts: {
|
|
317
|
-
readonly multicall3: {
|
|
318
|
-
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
319
|
-
readonly blockCreated: 11907934;
|
|
320
|
-
};
|
|
321
|
-
};
|
|
322
|
-
ensTlds?: readonly string[] | undefined;
|
|
323
|
-
id: 43114;
|
|
324
|
-
name: "Avalanche";
|
|
325
|
-
nativeCurrency: {
|
|
326
|
-
readonly decimals: 18;
|
|
327
|
-
readonly name: "Avalanche";
|
|
328
|
-
readonly symbol: "AVAX";
|
|
329
|
-
};
|
|
330
|
-
rpcUrls: {
|
|
331
|
-
readonly default: {
|
|
332
|
-
readonly http: readonly ["https://api.avax.network/ext/bc/C/rpc"];
|
|
333
|
-
};
|
|
334
|
-
};
|
|
335
|
-
sourceId?: number | undefined | undefined;
|
|
336
|
-
testnet?: boolean | undefined | undefined;
|
|
337
|
-
custom?: Record<string, unknown> | undefined;
|
|
338
|
-
fees?: viem.ChainFees<undefined> | undefined;
|
|
339
|
-
formatters?: undefined;
|
|
340
|
-
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
341
|
-
}, {
|
|
342
|
-
blockExplorers: {
|
|
343
|
-
readonly default: {
|
|
344
|
-
readonly name: "Arbiscan";
|
|
345
|
-
readonly url: "https://arbiscan.io";
|
|
346
|
-
readonly apiUrl: "https://api.arbiscan.io/api";
|
|
347
|
-
};
|
|
348
|
-
};
|
|
349
|
-
contracts: {
|
|
350
|
-
readonly multicall3: {
|
|
351
|
-
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
352
|
-
readonly blockCreated: 7654707;
|
|
353
|
-
};
|
|
354
|
-
};
|
|
355
|
-
ensTlds?: readonly string[] | undefined;
|
|
356
|
-
id: 42161;
|
|
357
|
-
name: "Arbitrum One";
|
|
358
|
-
nativeCurrency: {
|
|
359
|
-
readonly name: "Ether";
|
|
360
|
-
readonly symbol: "ETH";
|
|
361
|
-
readonly decimals: 18;
|
|
362
|
-
};
|
|
363
|
-
rpcUrls: {
|
|
364
|
-
readonly default: {
|
|
365
|
-
readonly http: readonly ["https://arb1.arbitrum.io/rpc"];
|
|
366
|
-
};
|
|
367
|
-
};
|
|
368
|
-
sourceId?: number | undefined | undefined;
|
|
369
|
-
testnet?: boolean | undefined | undefined;
|
|
370
|
-
custom?: Record<string, unknown> | undefined;
|
|
371
|
-
fees?: viem.ChainFees<undefined> | undefined;
|
|
372
|
-
formatters?: undefined;
|
|
373
|
-
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
374
|
-
}, {
|
|
375
|
-
blockExplorers: {
|
|
376
|
-
readonly default: {
|
|
377
|
-
readonly name: "Basescan";
|
|
378
|
-
readonly url: "https://basescan.org";
|
|
379
|
-
readonly apiUrl: "https://api.basescan.org/api";
|
|
380
|
-
};
|
|
381
|
-
};
|
|
382
|
-
contracts: {
|
|
383
|
-
readonly disputeGameFactory: {
|
|
384
|
-
readonly 1: {
|
|
385
|
-
readonly address: "0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e";
|
|
386
|
-
};
|
|
387
|
-
};
|
|
388
|
-
readonly l2OutputOracle: {
|
|
389
|
-
readonly 1: {
|
|
390
|
-
readonly address: "0x56315b90c40730925ec5485cf004d835058518A0";
|
|
391
|
-
};
|
|
392
|
-
};
|
|
393
|
-
readonly multicall3: {
|
|
394
|
-
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
395
|
-
readonly blockCreated: 5022;
|
|
396
|
-
};
|
|
397
|
-
readonly portal: {
|
|
398
|
-
readonly 1: {
|
|
399
|
-
readonly address: "0x49048044D57e1C92A77f79988d21Fa8fAF74E97e";
|
|
400
|
-
readonly blockCreated: 17482143;
|
|
401
|
-
};
|
|
402
|
-
};
|
|
403
|
-
readonly l1StandardBridge: {
|
|
404
|
-
readonly 1: {
|
|
405
|
-
readonly address: "0x3154Cf16ccdb4C6d922629664174b904d80F2C35";
|
|
406
|
-
readonly blockCreated: 17482143;
|
|
407
|
-
};
|
|
408
|
-
};
|
|
409
|
-
readonly gasPriceOracle: {
|
|
410
|
-
readonly address: "0x420000000000000000000000000000000000000F";
|
|
411
|
-
};
|
|
412
|
-
readonly l1Block: {
|
|
413
|
-
readonly address: "0x4200000000000000000000000000000000000015";
|
|
414
|
-
};
|
|
415
|
-
readonly l2CrossDomainMessenger: {
|
|
416
|
-
readonly address: "0x4200000000000000000000000000000000000007";
|
|
417
|
-
};
|
|
418
|
-
readonly l2Erc721Bridge: {
|
|
419
|
-
readonly address: "0x4200000000000000000000000000000000000014";
|
|
420
|
-
};
|
|
421
|
-
readonly l2StandardBridge: {
|
|
422
|
-
readonly address: "0x4200000000000000000000000000000000000010";
|
|
423
|
-
};
|
|
424
|
-
readonly l2ToL1MessagePasser: {
|
|
425
|
-
readonly address: "0x4200000000000000000000000000000000000016";
|
|
426
|
-
};
|
|
427
|
-
};
|
|
428
|
-
ensTlds?: readonly string[] | undefined;
|
|
429
|
-
id: 8453;
|
|
430
|
-
name: "Base";
|
|
431
|
-
nativeCurrency: {
|
|
432
|
-
readonly name: "Ether";
|
|
433
|
-
readonly symbol: "ETH";
|
|
434
|
-
readonly decimals: 18;
|
|
435
|
-
};
|
|
436
|
-
rpcUrls: {
|
|
437
|
-
readonly default: {
|
|
438
|
-
readonly http: readonly ["https://mainnet.base.org"];
|
|
439
|
-
};
|
|
440
|
-
};
|
|
441
|
-
sourceId: 1;
|
|
442
|
-
testnet?: boolean | undefined | undefined;
|
|
443
|
-
custom?: Record<string, unknown> | undefined;
|
|
444
|
-
fees?: viem.ChainFees<undefined> | undefined;
|
|
445
|
-
formatters: {
|
|
446
|
-
readonly block: {
|
|
447
|
-
exclude: [] | undefined;
|
|
448
|
-
format: (args: wagmi_chains.OpStackRpcBlock) => {
|
|
449
|
-
baseFeePerGas: bigint | null;
|
|
450
|
-
blobGasUsed: bigint;
|
|
451
|
-
difficulty: bigint;
|
|
452
|
-
excessBlobGas: bigint;
|
|
453
|
-
extraData: viem.Hex;
|
|
454
|
-
gasLimit: bigint;
|
|
455
|
-
gasUsed: bigint;
|
|
456
|
-
hash: `0x${string}` | null;
|
|
457
|
-
logsBloom: `0x${string}` | null;
|
|
458
|
-
miner: `0x${string}`;
|
|
459
|
-
mixHash: viem.Hash;
|
|
460
|
-
nonce: `0x${string}` | null;
|
|
461
|
-
number: bigint | null;
|
|
462
|
-
parentBeaconBlockRoot?: `0x${string}` | undefined;
|
|
463
|
-
parentHash: viem.Hash;
|
|
464
|
-
receiptsRoot: viem.Hex;
|
|
465
|
-
sealFields: viem.Hex[];
|
|
466
|
-
sha3Uncles: viem.Hash;
|
|
467
|
-
size: bigint;
|
|
468
|
-
stateRoot: viem.Hash;
|
|
469
|
-
timestamp: bigint;
|
|
470
|
-
totalDifficulty: bigint | null;
|
|
471
|
-
transactions: `0x${string}`[] | viem_chains.OpStackTransaction<boolean>[];
|
|
472
|
-
transactionsRoot: viem.Hash;
|
|
473
|
-
uncles: viem.Hash[];
|
|
474
|
-
withdrawals?: viem.Withdrawal[] | undefined | undefined;
|
|
475
|
-
withdrawalsRoot?: `0x${string}` | undefined;
|
|
476
|
-
} & {};
|
|
477
|
-
type: "block";
|
|
478
|
-
};
|
|
479
|
-
readonly transaction: {
|
|
480
|
-
exclude: [] | undefined;
|
|
481
|
-
format: (args: wagmi_chains.OpStackRpcTransaction) => ({
|
|
482
|
-
blockHash: `0x${string}` | null;
|
|
483
|
-
blockNumber: bigint | null;
|
|
484
|
-
from: `0x${string}`;
|
|
485
|
-
gas: bigint;
|
|
486
|
-
hash: viem.Hash;
|
|
487
|
-
input: viem.Hex;
|
|
488
|
-
nonce: number;
|
|
489
|
-
r: viem.Hex;
|
|
490
|
-
s: viem.Hex;
|
|
491
|
-
to: `0x${string}` | null;
|
|
492
|
-
transactionIndex: number | null;
|
|
493
|
-
typeHex: viem.Hex | null;
|
|
494
|
-
v: bigint;
|
|
495
|
-
value: bigint;
|
|
496
|
-
yParity: number;
|
|
497
|
-
gasPrice?: undefined | undefined;
|
|
498
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
499
|
-
maxFeePerGas: bigint;
|
|
500
|
-
maxPriorityFeePerGas: bigint;
|
|
501
|
-
isSystemTx?: boolean;
|
|
502
|
-
mint?: bigint | undefined | undefined;
|
|
503
|
-
sourceHash: viem.Hex;
|
|
504
|
-
type: "deposit";
|
|
505
|
-
} | {
|
|
506
|
-
r: viem.Hex;
|
|
507
|
-
s: viem.Hex;
|
|
508
|
-
v: bigint;
|
|
509
|
-
to: `0x${string}` | null;
|
|
510
|
-
from: `0x${string}`;
|
|
511
|
-
gas: bigint;
|
|
512
|
-
nonce: number;
|
|
513
|
-
value: bigint;
|
|
514
|
-
blockHash: `0x${string}` | null;
|
|
515
|
-
blockNumber: bigint | null;
|
|
516
|
-
hash: viem.Hash;
|
|
517
|
-
input: viem.Hex;
|
|
518
|
-
transactionIndex: number | null;
|
|
519
|
-
typeHex: viem.Hex | null;
|
|
520
|
-
accessList?: undefined | undefined;
|
|
521
|
-
authorizationList?: undefined | undefined;
|
|
522
|
-
blobVersionedHashes?: undefined | undefined;
|
|
523
|
-
chainId?: number | undefined;
|
|
524
|
-
yParity?: undefined | undefined;
|
|
525
|
-
type: "legacy";
|
|
526
|
-
gasPrice: bigint;
|
|
527
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
528
|
-
maxFeePerGas?: undefined | undefined;
|
|
529
|
-
maxPriorityFeePerGas?: undefined | undefined;
|
|
530
|
-
isSystemTx?: undefined | undefined;
|
|
531
|
-
mint?: undefined | undefined;
|
|
532
|
-
sourceHash?: undefined | undefined;
|
|
533
|
-
} | {
|
|
534
|
-
blockHash: `0x${string}` | null;
|
|
535
|
-
blockNumber: bigint | null;
|
|
536
|
-
from: `0x${string}`;
|
|
537
|
-
gas: bigint;
|
|
538
|
-
hash: viem.Hash;
|
|
539
|
-
input: viem.Hex;
|
|
540
|
-
nonce: number;
|
|
541
|
-
r: viem.Hex;
|
|
542
|
-
s: viem.Hex;
|
|
543
|
-
to: `0x${string}` | null;
|
|
544
|
-
transactionIndex: number | null;
|
|
545
|
-
typeHex: viem.Hex | null;
|
|
546
|
-
v: bigint;
|
|
547
|
-
value: bigint;
|
|
548
|
-
yParity: number;
|
|
549
|
-
accessList: viem.AccessList;
|
|
550
|
-
authorizationList?: undefined | undefined;
|
|
551
|
-
blobVersionedHashes?: undefined | undefined;
|
|
552
|
-
chainId: number;
|
|
553
|
-
type: "eip2930";
|
|
554
|
-
gasPrice: bigint;
|
|
555
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
556
|
-
maxFeePerGas?: undefined | undefined;
|
|
557
|
-
maxPriorityFeePerGas?: undefined | undefined;
|
|
558
|
-
isSystemTx?: undefined | undefined;
|
|
559
|
-
mint?: undefined | undefined;
|
|
560
|
-
sourceHash?: undefined | undefined;
|
|
561
|
-
} | {
|
|
562
|
-
blockHash: `0x${string}` | null;
|
|
563
|
-
blockNumber: bigint | null;
|
|
564
|
-
from: `0x${string}`;
|
|
565
|
-
gas: bigint;
|
|
566
|
-
hash: viem.Hash;
|
|
567
|
-
input: viem.Hex;
|
|
568
|
-
nonce: number;
|
|
569
|
-
r: viem.Hex;
|
|
570
|
-
s: viem.Hex;
|
|
571
|
-
to: `0x${string}` | null;
|
|
572
|
-
transactionIndex: number | null;
|
|
573
|
-
typeHex: viem.Hex | null;
|
|
574
|
-
v: bigint;
|
|
575
|
-
value: bigint;
|
|
576
|
-
yParity: number;
|
|
577
|
-
accessList: viem.AccessList;
|
|
578
|
-
authorizationList?: undefined | undefined;
|
|
579
|
-
blobVersionedHashes?: undefined | undefined;
|
|
580
|
-
chainId: number;
|
|
581
|
-
type: "eip1559";
|
|
582
|
-
gasPrice?: undefined | undefined;
|
|
583
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
584
|
-
maxFeePerGas: bigint;
|
|
585
|
-
maxPriorityFeePerGas: bigint;
|
|
586
|
-
isSystemTx?: undefined | undefined;
|
|
587
|
-
mint?: undefined | undefined;
|
|
588
|
-
sourceHash?: undefined | undefined;
|
|
589
|
-
} | {
|
|
590
|
-
blockHash: `0x${string}` | null;
|
|
591
|
-
blockNumber: bigint | null;
|
|
592
|
-
from: `0x${string}`;
|
|
593
|
-
gas: bigint;
|
|
594
|
-
hash: viem.Hash;
|
|
595
|
-
input: viem.Hex;
|
|
596
|
-
nonce: number;
|
|
597
|
-
r: viem.Hex;
|
|
598
|
-
s: viem.Hex;
|
|
599
|
-
to: `0x${string}` | null;
|
|
600
|
-
transactionIndex: number | null;
|
|
601
|
-
typeHex: viem.Hex | null;
|
|
602
|
-
v: bigint;
|
|
603
|
-
value: bigint;
|
|
604
|
-
yParity: number;
|
|
605
|
-
accessList: viem.AccessList;
|
|
606
|
-
authorizationList?: undefined | undefined;
|
|
607
|
-
blobVersionedHashes: readonly viem.Hex[];
|
|
608
|
-
chainId: number;
|
|
609
|
-
type: "eip4844";
|
|
610
|
-
gasPrice?: undefined | undefined;
|
|
611
|
-
maxFeePerBlobGas: bigint;
|
|
612
|
-
maxFeePerGas: bigint;
|
|
613
|
-
maxPriorityFeePerGas: bigint;
|
|
614
|
-
isSystemTx?: undefined | undefined;
|
|
615
|
-
mint?: undefined | undefined;
|
|
616
|
-
sourceHash?: undefined | undefined;
|
|
617
|
-
} | {
|
|
618
|
-
blockHash: `0x${string}` | null;
|
|
619
|
-
blockNumber: bigint | null;
|
|
620
|
-
from: `0x${string}`;
|
|
621
|
-
gas: bigint;
|
|
622
|
-
hash: viem.Hash;
|
|
623
|
-
input: viem.Hex;
|
|
624
|
-
nonce: number;
|
|
625
|
-
r: viem.Hex;
|
|
626
|
-
s: viem.Hex;
|
|
627
|
-
to: `0x${string}` | null;
|
|
628
|
-
transactionIndex: number | null;
|
|
629
|
-
typeHex: viem.Hex | null;
|
|
630
|
-
v: bigint;
|
|
631
|
-
value: bigint;
|
|
632
|
-
yParity: number;
|
|
633
|
-
accessList: viem.AccessList;
|
|
634
|
-
authorizationList: viem.SignedAuthorizationList;
|
|
635
|
-
blobVersionedHashes?: undefined | undefined;
|
|
636
|
-
chainId: number;
|
|
637
|
-
type: "eip7702";
|
|
638
|
-
gasPrice?: undefined | undefined;
|
|
639
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
640
|
-
maxFeePerGas: bigint;
|
|
641
|
-
maxPriorityFeePerGas: bigint;
|
|
642
|
-
isSystemTx?: undefined | undefined;
|
|
643
|
-
mint?: undefined | undefined;
|
|
644
|
-
sourceHash?: undefined | undefined;
|
|
645
|
-
}) & {};
|
|
646
|
-
type: "transaction";
|
|
647
|
-
};
|
|
648
|
-
readonly transactionReceipt: {
|
|
649
|
-
exclude: [] | undefined;
|
|
650
|
-
format: (args: wagmi_chains.OpStackRpcTransactionReceipt) => {
|
|
651
|
-
blobGasPrice?: bigint | undefined;
|
|
652
|
-
blobGasUsed?: bigint | undefined;
|
|
653
|
-
blockHash: viem.Hash;
|
|
654
|
-
blockNumber: bigint;
|
|
655
|
-
contractAddress: `0x${string}` | null | undefined;
|
|
656
|
-
cumulativeGasUsed: bigint;
|
|
657
|
-
effectiveGasPrice: bigint;
|
|
658
|
-
from: `0x${string}`;
|
|
659
|
-
gasUsed: bigint;
|
|
660
|
-
logs: viem.Log<bigint, number, false>[];
|
|
661
|
-
logsBloom: viem.Hex;
|
|
662
|
-
root?: `0x${string}` | undefined;
|
|
663
|
-
status: "success" | "reverted";
|
|
664
|
-
to: `0x${string}` | null;
|
|
665
|
-
transactionHash: viem.Hash;
|
|
666
|
-
transactionIndex: number;
|
|
667
|
-
type: viem.TransactionType;
|
|
668
|
-
l1GasPrice: bigint | null;
|
|
669
|
-
l1GasUsed: bigint | null;
|
|
670
|
-
l1Fee: bigint | null;
|
|
671
|
-
l1FeeScalar: number | null;
|
|
672
|
-
} & {};
|
|
673
|
-
type: "transactionReceipt";
|
|
674
|
-
};
|
|
675
|
-
};
|
|
676
|
-
serializers: {
|
|
677
|
-
readonly transaction: typeof wagmi_chains.serializeTransactionOpStack;
|
|
678
|
-
};
|
|
679
|
-
}, {
|
|
680
|
-
blockExplorers: {
|
|
681
|
-
readonly default: {
|
|
682
|
-
readonly name: "BscScan";
|
|
683
|
-
readonly url: "https://bscscan.com";
|
|
684
|
-
readonly apiUrl: "https://api.bscscan.com/api";
|
|
685
|
-
};
|
|
686
|
-
};
|
|
687
|
-
contracts: {
|
|
688
|
-
readonly multicall3: {
|
|
689
|
-
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
690
|
-
readonly blockCreated: 15921452;
|
|
691
|
-
};
|
|
692
|
-
};
|
|
693
|
-
ensTlds?: readonly string[] | undefined;
|
|
694
|
-
id: 56;
|
|
695
|
-
name: "BNB Smart Chain";
|
|
696
|
-
nativeCurrency: {
|
|
697
|
-
readonly decimals: 18;
|
|
698
|
-
readonly name: "BNB";
|
|
699
|
-
readonly symbol: "BNB";
|
|
700
|
-
};
|
|
701
|
-
rpcUrls: {
|
|
702
|
-
readonly default: {
|
|
703
|
-
readonly http: readonly ["https://56.rpc.thirdweb.com"];
|
|
704
|
-
};
|
|
705
|
-
};
|
|
706
|
-
sourceId?: number | undefined | undefined;
|
|
707
|
-
testnet?: boolean | undefined | undefined;
|
|
708
|
-
custom?: Record<string, unknown> | undefined;
|
|
709
|
-
fees?: viem.ChainFees<undefined> | undefined;
|
|
710
|
-
formatters?: undefined;
|
|
711
|
-
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
712
|
-
}, {
|
|
713
|
-
blockExplorers: {
|
|
714
|
-
readonly default: {
|
|
715
|
-
readonly name: "Sonic Explorer";
|
|
716
|
-
readonly url: "https://sonicscan.org";
|
|
717
|
-
};
|
|
718
|
-
};
|
|
719
|
-
contracts: {
|
|
720
|
-
readonly multicall3: {
|
|
721
|
-
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
722
|
-
readonly blockCreated: 60;
|
|
723
|
-
};
|
|
724
|
-
};
|
|
725
|
-
ensTlds?: readonly string[] | undefined;
|
|
726
|
-
id: 146;
|
|
727
|
-
name: "Sonic";
|
|
728
|
-
nativeCurrency: {
|
|
729
|
-
readonly decimals: 18;
|
|
730
|
-
readonly name: "Sonic";
|
|
731
|
-
readonly symbol: "S";
|
|
732
|
-
};
|
|
733
|
-
rpcUrls: {
|
|
734
|
-
readonly default: {
|
|
735
|
-
readonly http: readonly ["https://rpc.soniclabs.com"];
|
|
736
|
-
};
|
|
737
|
-
};
|
|
738
|
-
sourceId?: number | undefined | undefined;
|
|
739
|
-
testnet: false;
|
|
740
|
-
custom?: Record<string, unknown> | undefined;
|
|
741
|
-
fees?: viem.ChainFees<undefined> | undefined;
|
|
742
|
-
formatters?: undefined;
|
|
743
|
-
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
744
|
-
}, {
|
|
745
|
-
blockExplorers: {
|
|
746
|
-
readonly default: {
|
|
747
|
-
readonly name: "Optimism Explorer";
|
|
748
|
-
readonly url: "https://optimistic.etherscan.io";
|
|
749
|
-
readonly apiUrl: "https://api-optimistic.etherscan.io/api";
|
|
750
|
-
};
|
|
751
|
-
};
|
|
752
|
-
contracts: {
|
|
753
|
-
readonly disputeGameFactory: {
|
|
754
|
-
readonly 1: {
|
|
755
|
-
readonly address: "0xe5965Ab5962eDc7477C8520243A95517CD252fA9";
|
|
756
|
-
};
|
|
757
|
-
};
|
|
758
|
-
readonly l2OutputOracle: {
|
|
759
|
-
readonly 1: {
|
|
760
|
-
readonly address: "0xdfe97868233d1aa22e815a266982f2cf17685a27";
|
|
761
|
-
};
|
|
762
|
-
};
|
|
763
|
-
readonly multicall3: {
|
|
764
|
-
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
765
|
-
readonly blockCreated: 4286263;
|
|
766
|
-
};
|
|
767
|
-
readonly portal: {
|
|
768
|
-
readonly 1: {
|
|
769
|
-
readonly address: "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed";
|
|
770
|
-
};
|
|
771
|
-
};
|
|
772
|
-
readonly l1StandardBridge: {
|
|
773
|
-
readonly 1: {
|
|
774
|
-
readonly address: "0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1";
|
|
775
|
-
};
|
|
776
|
-
};
|
|
777
|
-
readonly gasPriceOracle: {
|
|
778
|
-
readonly address: "0x420000000000000000000000000000000000000F";
|
|
779
|
-
};
|
|
780
|
-
readonly l1Block: {
|
|
781
|
-
readonly address: "0x4200000000000000000000000000000000000015";
|
|
782
|
-
};
|
|
783
|
-
readonly l2CrossDomainMessenger: {
|
|
784
|
-
readonly address: "0x4200000000000000000000000000000000000007";
|
|
785
|
-
};
|
|
786
|
-
readonly l2Erc721Bridge: {
|
|
787
|
-
readonly address: "0x4200000000000000000000000000000000000014";
|
|
788
|
-
};
|
|
789
|
-
readonly l2StandardBridge: {
|
|
790
|
-
readonly address: "0x4200000000000000000000000000000000000010";
|
|
791
|
-
};
|
|
792
|
-
readonly l2ToL1MessagePasser: {
|
|
793
|
-
readonly address: "0x4200000000000000000000000000000000000016";
|
|
794
|
-
};
|
|
795
|
-
};
|
|
796
|
-
ensTlds?: readonly string[] | undefined;
|
|
797
|
-
id: 10;
|
|
798
|
-
name: "OP Mainnet";
|
|
799
|
-
nativeCurrency: {
|
|
800
|
-
readonly name: "Ether";
|
|
801
|
-
readonly symbol: "ETH";
|
|
802
|
-
readonly decimals: 18;
|
|
803
|
-
};
|
|
804
|
-
rpcUrls: {
|
|
805
|
-
readonly default: {
|
|
806
|
-
readonly http: readonly ["https://mainnet.optimism.io"];
|
|
807
|
-
};
|
|
808
|
-
};
|
|
809
|
-
sourceId: 1;
|
|
810
|
-
testnet?: boolean | undefined | undefined;
|
|
811
|
-
custom?: Record<string, unknown> | undefined;
|
|
812
|
-
fees?: viem.ChainFees<undefined> | undefined;
|
|
813
|
-
formatters: {
|
|
814
|
-
readonly block: {
|
|
815
|
-
exclude: [] | undefined;
|
|
816
|
-
format: (args: wagmi_chains.OpStackRpcBlock) => {
|
|
817
|
-
baseFeePerGas: bigint | null;
|
|
818
|
-
blobGasUsed: bigint;
|
|
819
|
-
difficulty: bigint;
|
|
820
|
-
excessBlobGas: bigint;
|
|
821
|
-
extraData: viem.Hex;
|
|
822
|
-
gasLimit: bigint;
|
|
823
|
-
gasUsed: bigint;
|
|
824
|
-
hash: `0x${string}` | null;
|
|
825
|
-
logsBloom: `0x${string}` | null;
|
|
826
|
-
miner: `0x${string}`;
|
|
827
|
-
mixHash: viem.Hash;
|
|
828
|
-
nonce: `0x${string}` | null;
|
|
829
|
-
number: bigint | null;
|
|
830
|
-
parentBeaconBlockRoot?: `0x${string}` | undefined;
|
|
831
|
-
parentHash: viem.Hash;
|
|
832
|
-
receiptsRoot: viem.Hex;
|
|
833
|
-
sealFields: viem.Hex[];
|
|
834
|
-
sha3Uncles: viem.Hash;
|
|
835
|
-
size: bigint;
|
|
836
|
-
stateRoot: viem.Hash;
|
|
837
|
-
timestamp: bigint;
|
|
838
|
-
totalDifficulty: bigint | null;
|
|
839
|
-
transactions: `0x${string}`[] | viem_chains.OpStackTransaction<boolean>[];
|
|
840
|
-
transactionsRoot: viem.Hash;
|
|
841
|
-
uncles: viem.Hash[];
|
|
842
|
-
withdrawals?: viem.Withdrawal[] | undefined | undefined;
|
|
843
|
-
withdrawalsRoot?: `0x${string}` | undefined;
|
|
844
|
-
} & {};
|
|
845
|
-
type: "block";
|
|
846
|
-
};
|
|
847
|
-
readonly transaction: {
|
|
848
|
-
exclude: [] | undefined;
|
|
849
|
-
format: (args: wagmi_chains.OpStackRpcTransaction) => ({
|
|
850
|
-
blockHash: `0x${string}` | null;
|
|
851
|
-
blockNumber: bigint | null;
|
|
852
|
-
from: `0x${string}`;
|
|
853
|
-
gas: bigint;
|
|
854
|
-
hash: viem.Hash;
|
|
855
|
-
input: viem.Hex;
|
|
856
|
-
nonce: number;
|
|
857
|
-
r: viem.Hex;
|
|
858
|
-
s: viem.Hex;
|
|
859
|
-
to: `0x${string}` | null;
|
|
860
|
-
transactionIndex: number | null;
|
|
861
|
-
typeHex: viem.Hex | null;
|
|
862
|
-
v: bigint;
|
|
863
|
-
value: bigint;
|
|
864
|
-
yParity: number;
|
|
865
|
-
gasPrice?: undefined | undefined;
|
|
866
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
867
|
-
maxFeePerGas: bigint;
|
|
868
|
-
maxPriorityFeePerGas: bigint;
|
|
869
|
-
isSystemTx?: boolean;
|
|
870
|
-
mint?: bigint | undefined | undefined;
|
|
871
|
-
sourceHash: viem.Hex;
|
|
872
|
-
type: "deposit";
|
|
873
|
-
} | {
|
|
874
|
-
r: viem.Hex;
|
|
875
|
-
s: viem.Hex;
|
|
876
|
-
v: bigint;
|
|
877
|
-
to: `0x${string}` | null;
|
|
878
|
-
from: `0x${string}`;
|
|
879
|
-
gas: bigint;
|
|
880
|
-
nonce: number;
|
|
881
|
-
value: bigint;
|
|
882
|
-
blockHash: `0x${string}` | null;
|
|
883
|
-
blockNumber: bigint | null;
|
|
884
|
-
hash: viem.Hash;
|
|
885
|
-
input: viem.Hex;
|
|
886
|
-
transactionIndex: number | null;
|
|
887
|
-
typeHex: viem.Hex | null;
|
|
888
|
-
accessList?: undefined | undefined;
|
|
889
|
-
authorizationList?: undefined | undefined;
|
|
890
|
-
blobVersionedHashes?: undefined | undefined;
|
|
891
|
-
chainId?: number | undefined;
|
|
892
|
-
yParity?: undefined | undefined;
|
|
893
|
-
type: "legacy";
|
|
894
|
-
gasPrice: bigint;
|
|
895
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
896
|
-
maxFeePerGas?: undefined | undefined;
|
|
897
|
-
maxPriorityFeePerGas?: undefined | undefined;
|
|
898
|
-
isSystemTx?: undefined | undefined;
|
|
899
|
-
mint?: undefined | undefined;
|
|
900
|
-
sourceHash?: undefined | undefined;
|
|
901
|
-
} | {
|
|
902
|
-
blockHash: `0x${string}` | null;
|
|
903
|
-
blockNumber: bigint | null;
|
|
904
|
-
from: `0x${string}`;
|
|
905
|
-
gas: bigint;
|
|
906
|
-
hash: viem.Hash;
|
|
907
|
-
input: viem.Hex;
|
|
908
|
-
nonce: number;
|
|
909
|
-
r: viem.Hex;
|
|
910
|
-
s: viem.Hex;
|
|
911
|
-
to: `0x${string}` | null;
|
|
912
|
-
transactionIndex: number | null;
|
|
913
|
-
typeHex: viem.Hex | null;
|
|
914
|
-
v: bigint;
|
|
915
|
-
value: bigint;
|
|
916
|
-
yParity: number;
|
|
917
|
-
accessList: viem.AccessList;
|
|
918
|
-
authorizationList?: undefined | undefined;
|
|
919
|
-
blobVersionedHashes?: undefined | undefined;
|
|
920
|
-
chainId: number;
|
|
921
|
-
type: "eip2930";
|
|
922
|
-
gasPrice: bigint;
|
|
923
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
924
|
-
maxFeePerGas?: undefined | undefined;
|
|
925
|
-
maxPriorityFeePerGas?: undefined | undefined;
|
|
926
|
-
isSystemTx?: undefined | undefined;
|
|
927
|
-
mint?: undefined | undefined;
|
|
928
|
-
sourceHash?: undefined | undefined;
|
|
929
|
-
} | {
|
|
930
|
-
blockHash: `0x${string}` | null;
|
|
931
|
-
blockNumber: bigint | null;
|
|
932
|
-
from: `0x${string}`;
|
|
933
|
-
gas: bigint;
|
|
934
|
-
hash: viem.Hash;
|
|
935
|
-
input: viem.Hex;
|
|
936
|
-
nonce: number;
|
|
937
|
-
r: viem.Hex;
|
|
938
|
-
s: viem.Hex;
|
|
939
|
-
to: `0x${string}` | null;
|
|
940
|
-
transactionIndex: number | null;
|
|
941
|
-
typeHex: viem.Hex | null;
|
|
942
|
-
v: bigint;
|
|
943
|
-
value: bigint;
|
|
944
|
-
yParity: number;
|
|
945
|
-
accessList: viem.AccessList;
|
|
946
|
-
authorizationList?: undefined | undefined;
|
|
947
|
-
blobVersionedHashes?: undefined | undefined;
|
|
948
|
-
chainId: number;
|
|
949
|
-
type: "eip1559";
|
|
950
|
-
gasPrice?: undefined | undefined;
|
|
951
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
952
|
-
maxFeePerGas: bigint;
|
|
953
|
-
maxPriorityFeePerGas: bigint;
|
|
954
|
-
isSystemTx?: undefined | undefined;
|
|
955
|
-
mint?: undefined | undefined;
|
|
956
|
-
sourceHash?: undefined | undefined;
|
|
957
|
-
} | {
|
|
958
|
-
blockHash: `0x${string}` | null;
|
|
959
|
-
blockNumber: bigint | null;
|
|
960
|
-
from: `0x${string}`;
|
|
961
|
-
gas: bigint;
|
|
962
|
-
hash: viem.Hash;
|
|
963
|
-
input: viem.Hex;
|
|
964
|
-
nonce: number;
|
|
965
|
-
r: viem.Hex;
|
|
966
|
-
s: viem.Hex;
|
|
967
|
-
to: `0x${string}` | null;
|
|
968
|
-
transactionIndex: number | null;
|
|
969
|
-
typeHex: viem.Hex | null;
|
|
970
|
-
v: bigint;
|
|
971
|
-
value: bigint;
|
|
972
|
-
yParity: number;
|
|
973
|
-
accessList: viem.AccessList;
|
|
974
|
-
authorizationList?: undefined | undefined;
|
|
975
|
-
blobVersionedHashes: readonly viem.Hex[];
|
|
976
|
-
chainId: number;
|
|
977
|
-
type: "eip4844";
|
|
978
|
-
gasPrice?: undefined | undefined;
|
|
979
|
-
maxFeePerBlobGas: bigint;
|
|
980
|
-
maxFeePerGas: bigint;
|
|
981
|
-
maxPriorityFeePerGas: bigint;
|
|
982
|
-
isSystemTx?: undefined | undefined;
|
|
983
|
-
mint?: undefined | undefined;
|
|
984
|
-
sourceHash?: undefined | undefined;
|
|
985
|
-
} | {
|
|
986
|
-
blockHash: `0x${string}` | null;
|
|
987
|
-
blockNumber: bigint | null;
|
|
988
|
-
from: `0x${string}`;
|
|
989
|
-
gas: bigint;
|
|
990
|
-
hash: viem.Hash;
|
|
991
|
-
input: viem.Hex;
|
|
992
|
-
nonce: number;
|
|
993
|
-
r: viem.Hex;
|
|
994
|
-
s: viem.Hex;
|
|
995
|
-
to: `0x${string}` | null;
|
|
996
|
-
transactionIndex: number | null;
|
|
997
|
-
typeHex: viem.Hex | null;
|
|
998
|
-
v: bigint;
|
|
999
|
-
value: bigint;
|
|
1000
|
-
yParity: number;
|
|
1001
|
-
accessList: viem.AccessList;
|
|
1002
|
-
authorizationList: viem.SignedAuthorizationList;
|
|
1003
|
-
blobVersionedHashes?: undefined | undefined;
|
|
1004
|
-
chainId: number;
|
|
1005
|
-
type: "eip7702";
|
|
1006
|
-
gasPrice?: undefined | undefined;
|
|
1007
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
1008
|
-
maxFeePerGas: bigint;
|
|
1009
|
-
maxPriorityFeePerGas: bigint;
|
|
1010
|
-
isSystemTx?: undefined | undefined;
|
|
1011
|
-
mint?: undefined | undefined;
|
|
1012
|
-
sourceHash?: undefined | undefined;
|
|
1013
|
-
}) & {};
|
|
1014
|
-
type: "transaction";
|
|
1015
|
-
};
|
|
1016
|
-
readonly transactionReceipt: {
|
|
1017
|
-
exclude: [] | undefined;
|
|
1018
|
-
format: (args: wagmi_chains.OpStackRpcTransactionReceipt) => {
|
|
1019
|
-
blobGasPrice?: bigint | undefined;
|
|
1020
|
-
blobGasUsed?: bigint | undefined;
|
|
1021
|
-
blockHash: viem.Hash;
|
|
1022
|
-
blockNumber: bigint;
|
|
1023
|
-
contractAddress: `0x${string}` | null | undefined;
|
|
1024
|
-
cumulativeGasUsed: bigint;
|
|
1025
|
-
effectiveGasPrice: bigint;
|
|
1026
|
-
from: `0x${string}`;
|
|
1027
|
-
gasUsed: bigint;
|
|
1028
|
-
logs: viem.Log<bigint, number, false>[];
|
|
1029
|
-
logsBloom: viem.Hex;
|
|
1030
|
-
root?: `0x${string}` | undefined;
|
|
1031
|
-
status: "success" | "reverted";
|
|
1032
|
-
to: `0x${string}` | null;
|
|
1033
|
-
transactionHash: viem.Hash;
|
|
1034
|
-
transactionIndex: number;
|
|
1035
|
-
type: viem.TransactionType;
|
|
1036
|
-
l1GasPrice: bigint | null;
|
|
1037
|
-
l1GasUsed: bigint | null;
|
|
1038
|
-
l1Fee: bigint | null;
|
|
1039
|
-
l1FeeScalar: number | null;
|
|
1040
|
-
} & {};
|
|
1041
|
-
type: "transactionReceipt";
|
|
1042
|
-
};
|
|
1043
|
-
};
|
|
1044
|
-
serializers: {
|
|
1045
|
-
readonly transaction: typeof wagmi_chains.serializeTransactionOpStack;
|
|
1046
|
-
};
|
|
1047
|
-
}, {
|
|
1048
|
-
blockExplorers: {
|
|
1049
|
-
readonly default: {
|
|
1050
|
-
readonly name: "PolygonScan";
|
|
1051
|
-
readonly url: "https://polygonscan.com";
|
|
1052
|
-
readonly apiUrl: "https://api.polygonscan.com/api";
|
|
1053
|
-
};
|
|
1054
|
-
};
|
|
1055
|
-
contracts: {
|
|
1056
|
-
readonly multicall3: {
|
|
1057
|
-
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
1058
|
-
readonly blockCreated: 25770160;
|
|
1059
|
-
};
|
|
1060
|
-
};
|
|
1061
|
-
ensTlds?: readonly string[] | undefined;
|
|
1062
|
-
id: 137;
|
|
1063
|
-
name: "Polygon";
|
|
1064
|
-
nativeCurrency: {
|
|
1065
|
-
readonly name: "POL";
|
|
1066
|
-
readonly symbol: "POL";
|
|
1067
|
-
readonly decimals: 18;
|
|
1068
|
-
};
|
|
1069
|
-
rpcUrls: {
|
|
1070
|
-
readonly default: {
|
|
1071
|
-
readonly http: readonly ["https://polygon-rpc.com"];
|
|
1072
|
-
};
|
|
1073
|
-
};
|
|
1074
|
-
sourceId?: number | undefined | undefined;
|
|
1075
|
-
testnet?: boolean | undefined | undefined;
|
|
1076
|
-
custom?: Record<string, unknown> | undefined;
|
|
1077
|
-
fees?: viem.ChainFees<undefined> | undefined;
|
|
1078
|
-
formatters?: undefined;
|
|
1079
|
-
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
1080
|
-
}, {
|
|
1081
|
-
blockExplorers: {
|
|
1082
|
-
readonly default: {
|
|
1083
|
-
readonly name: "HyperEVMScan";
|
|
1084
|
-
readonly url: "https://hyperevmscan.io/";
|
|
1085
|
-
};
|
|
1086
|
-
};
|
|
1087
|
-
contracts: {
|
|
1088
|
-
readonly multicall3: {
|
|
1089
|
-
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
1090
|
-
readonly blockCreated: 13051;
|
|
1091
|
-
};
|
|
1092
|
-
};
|
|
1093
|
-
ensTlds?: readonly string[] | undefined;
|
|
1094
|
-
id: 999;
|
|
1095
|
-
name: "HyperEVM";
|
|
1096
|
-
nativeCurrency: {
|
|
1097
|
-
readonly decimals: 18;
|
|
1098
|
-
readonly name: "HYPE";
|
|
1099
|
-
readonly symbol: "HYPE";
|
|
1100
|
-
};
|
|
1101
|
-
rpcUrls: {
|
|
1102
|
-
readonly default: {
|
|
1103
|
-
readonly http: readonly ["https://rpc.hyperliquid.xyz/evm"];
|
|
1104
|
-
};
|
|
1105
|
-
};
|
|
1106
|
-
sourceId?: number | undefined;
|
|
1107
|
-
testnet?: boolean | undefined;
|
|
1108
|
-
custom?: Record<string, unknown> | undefined;
|
|
1109
|
-
fees?: viem.ChainFees<undefined> | undefined;
|
|
1110
|
-
formatters?: undefined;
|
|
1111
|
-
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
1112
|
-
}, {
|
|
1113
|
-
blockExplorers: {
|
|
1114
|
-
readonly default: {
|
|
1115
|
-
readonly name: "LightLink Phoenix Explorer";
|
|
1116
|
-
readonly url: "https://phoenix.lightlink.io";
|
|
1117
|
-
};
|
|
1118
|
-
};
|
|
1119
|
-
contracts: {
|
|
1120
|
-
readonly multicall3: {
|
|
1121
|
-
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
1122
|
-
readonly blockCreated: 125499184;
|
|
1123
|
-
};
|
|
1124
|
-
};
|
|
1125
|
-
ensTlds?: readonly string[] | undefined;
|
|
1126
|
-
id: 1890;
|
|
1127
|
-
name: "LightLink Phoenix Mainnet";
|
|
1128
|
-
nativeCurrency: {
|
|
1129
|
-
readonly decimals: 18;
|
|
1130
|
-
readonly name: "Ether";
|
|
1131
|
-
readonly symbol: "ETH";
|
|
1132
|
-
};
|
|
1133
|
-
rpcUrls: {
|
|
1134
|
-
readonly default: {
|
|
1135
|
-
readonly http: readonly ["https://replicator.phoenix.lightlink.io/rpc/v1"];
|
|
1136
|
-
};
|
|
1137
|
-
};
|
|
1138
|
-
sourceId?: number | undefined | undefined;
|
|
1139
|
-
testnet: false;
|
|
1140
|
-
custom?: Record<string, unknown> | undefined;
|
|
1141
|
-
fees?: viem.ChainFees<undefined> | undefined;
|
|
1142
|
-
formatters?: undefined;
|
|
1143
|
-
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
1144
|
-
readonly network: "lightlink-phoenix";
|
|
1145
|
-
}, {
|
|
1146
|
-
blockExplorers: {
|
|
1147
|
-
readonly default: {
|
|
1148
|
-
readonly name: "KaiaScan";
|
|
1149
|
-
readonly url: "https://kaiascan.io";
|
|
1150
|
-
readonly apiUrl: "https://api-cypress.klaytnscope.com/api";
|
|
1151
|
-
};
|
|
1152
|
-
};
|
|
1153
|
-
contracts: {
|
|
1154
|
-
readonly multicall3: {
|
|
1155
|
-
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
1156
|
-
readonly blockCreated: 96002415;
|
|
1157
|
-
};
|
|
1158
|
-
};
|
|
1159
|
-
ensTlds?: readonly string[] | undefined;
|
|
1160
|
-
id: 8217;
|
|
1161
|
-
name: "Kaia";
|
|
1162
|
-
nativeCurrency: {
|
|
1163
|
-
readonly decimals: 18;
|
|
1164
|
-
readonly name: "Kaia";
|
|
1165
|
-
readonly symbol: "KAIA";
|
|
1166
|
-
};
|
|
1167
|
-
rpcUrls: {
|
|
1168
|
-
readonly default: {
|
|
1169
|
-
readonly http: readonly ["https://public-en.node.kaia.io"];
|
|
1170
|
-
};
|
|
1171
|
-
};
|
|
1172
|
-
sourceId?: number | undefined | undefined;
|
|
1173
|
-
testnet?: boolean | undefined | undefined;
|
|
1174
|
-
custom?: Record<string, unknown> | undefined;
|
|
1175
|
-
fees?: viem.ChainFees<undefined> | undefined;
|
|
1176
|
-
formatters?: undefined;
|
|
1177
|
-
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
1178
|
-
}, {
|
|
1179
|
-
blockExplorers: {
|
|
1180
|
-
readonly default: {
|
|
1181
|
-
readonly name: "Routescan";
|
|
1182
|
-
readonly url: "https://redbelly.routescan.io";
|
|
1183
|
-
readonly apiUrl: "https://api.routescan.io/v2/network/mainnet/evm/151/etherscan/api";
|
|
1184
|
-
};
|
|
1185
|
-
};
|
|
1186
|
-
contracts?: {
|
|
1187
|
-
[x: string]: viem.ChainContract | {
|
|
1188
|
-
[sourceId: number]: viem.ChainContract | undefined;
|
|
1189
|
-
} | undefined;
|
|
1190
|
-
ensRegistry?: viem.ChainContract | undefined;
|
|
1191
|
-
ensUniversalResolver?: viem.ChainContract | undefined;
|
|
1192
|
-
multicall3?: viem.ChainContract | undefined;
|
|
1193
|
-
universalSignatureVerifier?: viem.ChainContract | undefined;
|
|
1194
|
-
} | undefined;
|
|
1195
|
-
ensTlds?: readonly string[] | undefined;
|
|
1196
|
-
id: 151;
|
|
1197
|
-
name: "Redbelly Network Mainnet";
|
|
1198
|
-
nativeCurrency: {
|
|
1199
|
-
readonly name: "Redbelly Native Coin";
|
|
1200
|
-
readonly symbol: "RBNT";
|
|
1201
|
-
readonly decimals: 18;
|
|
1202
|
-
};
|
|
1203
|
-
rpcUrls: {
|
|
1204
|
-
readonly default: {
|
|
1205
|
-
readonly http: readonly ["https://governors.mainnet.redbelly.network"];
|
|
1206
|
-
};
|
|
1207
|
-
};
|
|
1208
|
-
sourceId?: number | undefined | undefined;
|
|
1209
|
-
testnet: false;
|
|
1210
|
-
custom?: Record<string, unknown> | undefined;
|
|
1211
|
-
fees?: viem.ChainFees<undefined> | undefined;
|
|
1212
|
-
formatters?: undefined;
|
|
1213
|
-
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
1214
|
-
}], {
|
|
1215
|
-
1: viem.HttpTransport<undefined, false>;
|
|
1216
|
-
43114: viem.HttpTransport<undefined, false>;
|
|
1217
|
-
42161: viem.HttpTransport<undefined, false>;
|
|
1218
|
-
8453: viem.HttpTransport<undefined, false>;
|
|
1219
|
-
56: viem.HttpTransport<undefined, false>;
|
|
1220
|
-
146: viem.HttpTransport<undefined, false>;
|
|
1221
|
-
10: viem.HttpTransport<undefined, false>;
|
|
1222
|
-
137: viem.HttpTransport<undefined, false>;
|
|
1223
|
-
999: viem.HttpTransport<undefined, false>;
|
|
1224
|
-
1890: viem.HttpTransport<undefined, false>;
|
|
1225
|
-
151: viem.HttpTransport<undefined, false>;
|
|
1226
|
-
8217: viem.HttpTransport<undefined, false>;
|
|
1227
|
-
}, readonly wagmi.CreateConnectorFn[]>;
|
|
1228
|
-
/**
|
|
1229
|
-
* Service class for handling EVM chain interactions.
|
|
1230
|
-
* Implements singleton pattern and provides methods for wallet/chain operations.
|
|
1231
|
-
*/
|
|
1232
|
-
declare class EvmXService extends XService {
|
|
1233
|
-
private static instance;
|
|
1234
|
-
wagmiConfig: Config | undefined;
|
|
1235
|
-
private constructor();
|
|
1236
|
-
getXConnectors(): never[];
|
|
1237
|
-
static getInstance(): EvmXService;
|
|
1238
|
-
_getTokenBalance(address: string | undefined, chainId: number, tokenAddress: string): Promise<bigint>;
|
|
1239
|
-
_getChainBalance(address: string | undefined, chainId: number): Promise<bigint>;
|
|
1240
|
-
getBalance(address: string | undefined, xToken: XToken): Promise<bigint>;
|
|
1241
|
-
getBalances(address: string | undefined, xTokens: XToken[]): Promise<{}>;
|
|
1242
|
-
}
|
|
1243
|
-
|
|
1244
|
-
declare class EvmXConnector extends XConnector {
|
|
1245
|
-
connector: Connector;
|
|
1246
|
-
constructor(connector: Connector);
|
|
1247
|
-
connect(): Promise<XAccount | undefined>;
|
|
1248
|
-
disconnect(): Promise<void>;
|
|
1249
|
-
get id(): string;
|
|
1250
|
-
get icon(): string | undefined;
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
declare class IconXService extends XService {
|
|
1254
|
-
private static instance;
|
|
1255
|
-
iconService: IconService;
|
|
1256
|
-
private constructor();
|
|
1257
|
-
static getInstance(): IconXService;
|
|
1258
|
-
private getAggregateData;
|
|
1259
|
-
getBalances(address: string | undefined, xTokens: XToken[]): Promise<{}>;
|
|
1260
|
-
}
|
|
1261
|
-
|
|
1262
|
-
declare class IconHanaXConnector extends XConnector {
|
|
1263
|
-
constructor();
|
|
1264
|
-
connect(): Promise<XAccount | undefined>;
|
|
1265
|
-
disconnect(): Promise<void>;
|
|
1266
|
-
get icon(): string;
|
|
1267
|
-
}
|
|
1268
|
-
|
|
1269
|
-
declare class InjectiveXService extends XService {
|
|
1270
|
-
private static instance;
|
|
1271
|
-
walletStrategy: WalletStrategy;
|
|
1272
|
-
indexerGrpcAccountPortfolioApi: IndexerGrpcAccountPortfolioApi;
|
|
1273
|
-
chainGrpcWasmApi: ChainGrpcWasmApi;
|
|
1274
|
-
msgBroadcaster: MsgBroadcaster;
|
|
1275
|
-
private constructor();
|
|
1276
|
-
static getInstance(): InjectiveXService;
|
|
1277
|
-
getBalance(address: string | undefined, xToken: XToken): Promise<bigint>;
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
declare class InjectiveXConnector extends XConnector {
|
|
1281
|
-
private wallet;
|
|
1282
|
-
constructor(name: string, wallet: Wallet);
|
|
1283
|
-
getXService(): InjectiveXService;
|
|
1284
|
-
connect(): Promise<XAccount | undefined>;
|
|
1285
|
-
disconnect(): Promise<void>;
|
|
1286
|
-
get icon(): string | undefined;
|
|
1287
|
-
}
|
|
1288
|
-
|
|
1289
|
-
declare class SolanaXService extends XService {
|
|
1290
|
-
private static instance;
|
|
1291
|
-
connection: Connection | undefined;
|
|
1292
|
-
wallet: WalletContextState | undefined;
|
|
1293
|
-
private constructor();
|
|
1294
|
-
static getInstance(): SolanaXService;
|
|
1295
|
-
getBalance(address: string | undefined, xToken: XToken): Promise<bigint>;
|
|
1296
|
-
}
|
|
1297
|
-
|
|
1298
|
-
declare class SolanaXConnector extends XConnector {
|
|
1299
|
-
wallet: any;
|
|
1300
|
-
constructor(wallet: any);
|
|
1301
|
-
getXService(): SolanaXService;
|
|
1302
|
-
connect(): Promise<XAccount | undefined>;
|
|
1303
|
-
disconnect(): Promise<void>;
|
|
1304
|
-
get icon(): any;
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1307
|
-
declare class CustomSorobanServer extends SorobanRpc.Server {
|
|
1308
|
-
private readonly customHeaders;
|
|
1309
|
-
constructor(serverUrl: string, customHeaders: Record<string, string>);
|
|
1310
|
-
simulateTransaction(tx: Transaction<Memo<MemoType>, Operation[]>): Promise<SorobanRpc.Api.SimulateTransactionResponse>;
|
|
1311
|
-
sendTransaction(tx: Transaction | FeeBumpTransaction): Promise<SorobanRpc.Api.SendTransactionResponse>;
|
|
1312
|
-
getTransaction(hash: string): Promise<SorobanRpc.Api.GetTransactionResponse>;
|
|
1313
|
-
}
|
|
1314
|
-
|
|
1315
|
-
declare class StellarXService extends XService {
|
|
1316
|
-
private static instance;
|
|
1317
|
-
walletsKit: StellarWalletsKit;
|
|
1318
|
-
server: StellarSdk.Horizon.Server;
|
|
1319
|
-
sorobanServer: CustomSorobanServer;
|
|
1320
|
-
private constructor();
|
|
1321
|
-
static getInstance(): StellarXService;
|
|
1322
|
-
getBalance(address: string | undefined, xToken: XToken): Promise<bigint>;
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
|
-
type StellarWalletType = {
|
|
1326
|
-
icon: string;
|
|
1327
|
-
id: string;
|
|
1328
|
-
isAvailable: boolean;
|
|
1329
|
-
name: string;
|
|
1330
|
-
type: string;
|
|
1331
|
-
url: string;
|
|
1332
|
-
};
|
|
1333
|
-
declare class StellarWalletsKitXConnector extends XConnector {
|
|
1334
|
-
_wallet: StellarWalletType;
|
|
1335
|
-
constructor(wallet: StellarWalletType);
|
|
1336
|
-
getXService(): StellarXService;
|
|
1337
|
-
connect(): Promise<XAccount | undefined>;
|
|
1338
|
-
disconnect(): Promise<void>;
|
|
1339
|
-
get icon(): string;
|
|
1340
|
-
}
|
|
1341
|
-
|
|
1342
|
-
declare class SuiXService extends XService {
|
|
1343
|
-
private static instance;
|
|
1344
|
-
suiClient: any;
|
|
1345
|
-
suiWallet: any;
|
|
1346
|
-
suiAccount: any;
|
|
1347
|
-
private constructor();
|
|
1348
|
-
static getInstance(): SuiXService;
|
|
1349
|
-
getBalances(address: string | undefined, xTokens: readonly XToken[]): Promise<Record<string, bigint>>;
|
|
1350
|
-
}
|
|
1351
|
-
|
|
1352
|
-
declare class SuiXConnector extends XConnector {
|
|
1353
|
-
wallet: any;
|
|
1354
|
-
constructor(wallet: any);
|
|
1355
|
-
getXService(): SuiXService;
|
|
1356
|
-
connect(): Promise<XAccount | undefined>;
|
|
1357
|
-
disconnect(): Promise<void>;
|
|
1358
|
-
get icon(): any;
|
|
1359
|
-
}
|
|
1360
|
-
|
|
1361
|
-
declare class StacksXService extends XService {
|
|
1362
|
-
private static instance;
|
|
1363
|
-
network: StacksNetwork | undefined;
|
|
1364
|
-
private constructor();
|
|
1365
|
-
static getInstance(): StacksXService;
|
|
1366
|
-
getBalance(address: string | undefined, xToken: XToken): Promise<bigint>;
|
|
1367
|
-
}
|
|
1368
|
-
|
|
1369
|
-
interface StacksProviderConfig {
|
|
1370
|
-
/** The provider ID matching the window path, e.g. 'LeatherProvider' or 'XverseProviders.BitcoinProvider' */
|
|
1371
|
-
id: string;
|
|
1372
|
-
name: string;
|
|
1373
|
-
icon: string;
|
|
1374
|
-
installUrl?: string;
|
|
1375
|
-
}
|
|
1376
|
-
declare class StacksXConnector extends XConnector {
|
|
1377
|
-
private readonly config;
|
|
1378
|
-
constructor(config: StacksProviderConfig);
|
|
1379
|
-
connect(): Promise<XAccount | undefined>;
|
|
1380
|
-
disconnect(): Promise<void>;
|
|
1381
|
-
get icon(): string;
|
|
1382
|
-
getProvider(): StacksProvider | undefined;
|
|
1383
|
-
}
|
|
1384
|
-
|
|
1385
|
-
declare const STACKS_PROVIDERS: StacksProviderConfig[];
|
|
1386
|
-
|
|
1387
|
-
declare function useStacksXConnectors(): StacksXConnector[];
|
|
1388
|
-
|
|
1389
|
-
declare function useXAccount(chainIdentifier?: ChainType | ChainId): XAccount;
|
|
1390
|
-
|
|
1391
|
-
declare function useXAccounts(): Partial<Record<"ICON" | "EVM" | "INJECTIVE" | "SUI" | "STELLAR" | "SOLANA" | "STACKS" | "NEAR" | "BITCOIN", XAccount>>;
|
|
1392
|
-
|
|
1393
|
-
/**
|
|
1394
|
-
* Hook for connecting to various blockchain wallets across different chains
|
|
1395
|
-
*
|
|
1396
|
-
* Handles connection logic for EVM, SUI, Solana and other supported chains.
|
|
1397
|
-
* Sets up wallet connections and stores connection state in XWagmiStore.
|
|
1398
|
-
*
|
|
1399
|
-
* @param {void} - No parameters required
|
|
1400
|
-
* @returns {UseMutationResult<XAccount | undefined, Error, XConnector>} Mutation result containing:
|
|
1401
|
-
* - mutateAsync: Function to connect a wallet
|
|
1402
|
-
* - isPending: Boolean indicating if connection is in progress
|
|
1403
|
-
* - error: Any error that occurred
|
|
1404
|
-
* - data: Connected account data if successful
|
|
1405
|
-
*
|
|
1406
|
-
* @example
|
|
1407
|
-
* ```ts
|
|
1408
|
-
* const { mutateAsync: connect, isPending } = useXConnect();
|
|
1409
|
-
*
|
|
1410
|
-
* const handleConnect = async (connector: XConnector) => {
|
|
1411
|
-
* try {
|
|
1412
|
-
* await connect(connector);
|
|
1413
|
-
* } catch (err) {
|
|
1414
|
-
* console.error(err);
|
|
1415
|
-
* }
|
|
1416
|
-
* };
|
|
1417
|
-
* ```
|
|
1418
|
-
*/
|
|
1419
|
-
declare function useXConnect(): UseMutationResult<XAccount | undefined, Error, XConnector>;
|
|
1420
|
-
|
|
1421
|
-
/**
|
|
1422
|
-
* Hook for accessing connection details for a specific blockchain
|
|
1423
|
-
*
|
|
1424
|
-
* Retrieves the current connection state for the specified chain type,
|
|
1425
|
-
* including the connected account and connector ID.
|
|
1426
|
-
*
|
|
1427
|
-
* @param {ChainType} xChainType - The type of blockchain to get connection details for
|
|
1428
|
-
* @returns {XConnection | undefined} Connection details including account and connector ID, or undefined if not connected
|
|
1429
|
-
*
|
|
1430
|
-
* @example
|
|
1431
|
-
* ```ts
|
|
1432
|
-
* const connection = useXConnection('EVM');
|
|
1433
|
-
*
|
|
1434
|
-
* if (connection) {
|
|
1435
|
-
* console.log('Connected account:', connection.xAccount.address);
|
|
1436
|
-
* console.log('Using connector:', connection.xConnectorId);
|
|
1437
|
-
* }
|
|
1438
|
-
* ```
|
|
1439
|
-
*/
|
|
1440
|
-
declare function useXConnection(xChainType: ChainType | undefined): XConnection | undefined;
|
|
1441
|
-
|
|
1442
|
-
/**
|
|
1443
|
-
* Hook to retrieve available wallet connectors for a specific blockchain type.
|
|
1444
|
-
*
|
|
1445
|
-
* This hook aggregates wallet connectors from different blockchain ecosystems:
|
|
1446
|
-
* - EVM: Uses wagmi connectors
|
|
1447
|
-
* - Sui: Uses Sui wallet adapters
|
|
1448
|
-
* - Stellar: Uses custom Stellar connectors
|
|
1449
|
-
* - Solana: Uses Solana wallet adapters (filtered to installed wallets only)
|
|
1450
|
-
*
|
|
1451
|
-
* @param xChainType - The blockchain type to get connectors for ('EVM' | 'SUI' | 'STELLAR' | 'SOLANA' | 'NEAR' | 'STACKS')
|
|
1452
|
-
* @returns An array of XConnector instances compatible with the specified chain type
|
|
1453
|
-
*/
|
|
1454
|
-
declare function useXConnectors(xChainType: ChainType | undefined): XConnector[];
|
|
1455
|
-
|
|
1456
|
-
/**
|
|
1457
|
-
* Hook for disconnecting from a specific blockchain wallet
|
|
1458
|
-
*
|
|
1459
|
-
* Handles disconnection logic for EVM, SUI, Solana and other supported chains.
|
|
1460
|
-
* Clears connection state from XWagmiStore.
|
|
1461
|
-
*
|
|
1462
|
-
* @param {void} - No parameters required
|
|
1463
|
-
* @returns {(xChainType: ChainType) => Promise<void>} Async function that disconnects from the specified chain
|
|
1464
|
-
*
|
|
1465
|
-
* @example
|
|
1466
|
-
* ```ts
|
|
1467
|
-
* const disconnect = useXDisconnect();
|
|
1468
|
-
*
|
|
1469
|
-
* const handleDisconnect = async (xChainType: ChainType) => {
|
|
1470
|
-
* await disconnect(xChainType);
|
|
1471
|
-
* };
|
|
1472
|
-
* ```
|
|
1473
|
-
*/
|
|
1474
|
-
declare function useXDisconnect(): (xChainType: ChainType) => Promise<void>;
|
|
1475
|
-
|
|
1476
|
-
declare function useXService(xChainType: ChainType | undefined): XService | undefined;
|
|
1477
|
-
|
|
1478
|
-
/**
|
|
1479
|
-
* Hook to fetch token balances for multiple tokens on a specific chain
|
|
1480
|
-
*
|
|
1481
|
-
* @param params - Query parameters object
|
|
1482
|
-
* @param params.xChainId - Chain identifier (e.g. '0xa86a.avax', '0x1.base', '0x2.bsc', '0x89.polygon', '0x1.optimism')
|
|
1483
|
-
* @param params.xTokens - Array of token objects to fetch balances for.
|
|
1484
|
-
* @param params.address - Wallet address to fetch balances for. If undefined, returns empty object
|
|
1485
|
-
*
|
|
1486
|
-
* @returns UseQueryResult containing an object mapping token addresses to their balances as bigints.
|
|
1487
|
-
* The balances are denominated in the token's smallest unit (e.g. wei for ETH).
|
|
1488
|
-
* Returns empty object if wallet is not connected or service is unavailable.
|
|
1489
|
-
*/
|
|
1490
|
-
/**
|
|
1491
|
-
* @example
|
|
1492
|
-
* ```tsx
|
|
1493
|
-
* // Example usage in a component
|
|
1494
|
-
* function TokenBalances({ tokens }: { tokens: XToken[] }) {
|
|
1495
|
-
* const { address } = useXAccount('EVM');
|
|
1496
|
-
* const { data: balances } = useXBalances({
|
|
1497
|
-
* xChainId: '0xa86a.avax',
|
|
1498
|
-
* xTokens: tokens,
|
|
1499
|
-
* address,
|
|
1500
|
-
* });
|
|
1501
|
-
*
|
|
1502
|
-
* return (
|
|
1503
|
-
* <div>
|
|
1504
|
-
* {tokens.map(token => (
|
|
1505
|
-
* <div key={token.address}>
|
|
1506
|
-
* {token.symbol}: {formatUnits(balances?.[token.address] || 0n, token.decimals)}
|
|
1507
|
-
* </div>
|
|
1508
|
-
* ))}
|
|
1509
|
-
* </div>
|
|
1510
|
-
* );
|
|
1511
|
-
* }
|
|
1512
|
-
* ```
|
|
1513
|
-
*/
|
|
1514
|
-
declare function useXBalances({ xChainId, xTokens, address, }: {
|
|
1515
|
-
xChainId: ChainId;
|
|
1516
|
-
xTokens: readonly XToken[];
|
|
1517
|
-
address: string | undefined;
|
|
1518
|
-
}): UseQueryResult<{
|
|
1519
|
-
[key: string]: bigint;
|
|
1520
|
-
}>;
|
|
1521
|
-
|
|
1522
|
-
interface UseEvmSwitchChainReturn {
|
|
1523
|
-
isWrongChain: boolean;
|
|
1524
|
-
handleSwitchChain: () => void;
|
|
1525
|
-
}
|
|
1526
|
-
declare const useEvmSwitchChain: (expectedXChainId: ChainId) => UseEvmSwitchChainReturn;
|
|
1527
|
-
|
|
1528
|
-
/**
|
|
1529
|
-
* Hook to get the appropriate wallet provider based on the chain type.
|
|
1530
|
-
* Supports EVM, SUI, ICON, INJECTIVE, STELLAR, SOLANA and NEAR chains.
|
|
1531
|
-
*
|
|
1532
|
-
* @param {ChainId | undefined} spokeChainId - The chain ID to get the wallet provider for. Can be any valid ChainId value.
|
|
1533
|
-
* @returns {EvmWalletProvider | SuiWalletProvider | IconWalletProvider | InjectiveWalletProvider | undefined}
|
|
1534
|
-
* The appropriate wallet provider instance for the given chain ID, or undefined if:
|
|
1535
|
-
* - No chain ID is provided
|
|
1536
|
-
* - Chain type is not supported
|
|
1537
|
-
* - Required wallet provider options are not available
|
|
1538
|
-
*
|
|
1539
|
-
* @example
|
|
1540
|
-
* ```tsx
|
|
1541
|
-
* // Get wallet provider for a specific chain
|
|
1542
|
-
* const walletProvider = useWalletProvider('sui');
|
|
1543
|
-
* ```
|
|
1544
|
-
*/
|
|
1545
|
-
declare function useWalletProvider(spokeChainId: ChainId | undefined): IEvmWalletProvider | ISuiWalletProvider | IIconWalletProvider | IInjectiveWalletProvider | IStellarWalletProvider | ISolanaWalletProvider | IBitcoinWalletProvider | INearWalletProvider | IStacksWalletProvider | undefined;
|
|
1546
|
-
|
|
1547
|
-
type SignMessageReturnType = `0x${string}` | Uint8Array | string | undefined;
|
|
1548
|
-
declare function useXSignMessage(): UseMutationResult<SignMessageReturnType, Error, {
|
|
1549
|
-
xChainType: ChainType;
|
|
1550
|
-
message: string;
|
|
1551
|
-
}, unknown>;
|
|
1552
|
-
|
|
1553
|
-
type XWagmiStore = {
|
|
1554
|
-
xServices: Partial<Record<ChainType, XService>>;
|
|
1555
|
-
xConnections: Partial<Record<ChainType, XConnection>>;
|
|
1556
|
-
setXConnection: (xChainType: ChainType, xConnection: XConnection) => void;
|
|
1557
|
-
unsetXConnection: (xChainType: ChainType) => void;
|
|
1558
|
-
};
|
|
1559
|
-
declare const useXWagmiStore: zustand.UseBoundStore<Omit<Omit<Omit<zustand.StoreApi<XWagmiStore>, "setState"> & {
|
|
1560
|
-
setState<A extends string | {
|
|
1561
|
-
type: string;
|
|
1562
|
-
}>(partial: XWagmiStore | Partial<XWagmiStore> | ((state: XWagmiStore) => XWagmiStore | Partial<XWagmiStore>), replace?: boolean | undefined, action?: A | undefined): void;
|
|
1563
|
-
}, "persist"> & {
|
|
1564
|
-
persist: {
|
|
1565
|
-
setOptions: (options: Partial<zustand_middleware.PersistOptions<XWagmiStore, unknown>>) => void;
|
|
1566
|
-
clearStorage: () => void;
|
|
1567
|
-
rehydrate: () => Promise<void> | void;
|
|
1568
|
-
hasHydrated: () => boolean;
|
|
1569
|
-
onHydrate: (fn: (state: XWagmiStore) => void) => () => void;
|
|
1570
|
-
onFinishHydration: (fn: (state: XWagmiStore) => void) => () => void;
|
|
1571
|
-
getOptions: () => Partial<zustand_middleware.PersistOptions<XWagmiStore, unknown>>;
|
|
1572
|
-
};
|
|
1573
|
-
}, "setState"> & {
|
|
1574
|
-
setState(nextStateOrUpdater: XWagmiStore | Partial<XWagmiStore> | ((state: immer.WritableDraft<XWagmiStore>) => void), shouldReplace?: boolean | undefined, action?: string | {
|
|
1575
|
-
type: string;
|
|
1576
|
-
} | undefined): void;
|
|
1577
|
-
}>;
|
|
1578
|
-
|
|
1579
|
-
export { BitcoinXConnector, BitcoinXService, type CurrencyKey, EvmXConnector, EvmXService, IconHanaXConnector, IconXService, InjectiveXConnector, InjectiveXService, OKXXConnector, STACKS_PROVIDERS, SodaxWalletProvider, type SodaxWalletProviderOptions, type SodaxWalletProviderProps, SolanaXConnector, SolanaXService, type StacksProviderConfig, StacksXConnector, StacksXService, StellarWalletsKitXConnector, StellarXService, SuiXConnector, SuiXService, UnisatXConnector, type WagmiOptions, WalletId, type XAccount, type XConnection, XConnector, XService, XverseXConnector, createWagmiConfig as createWagmi, createWagmiConfig, getWagmiChainId, getXChainType, getXService, isNativeToken, useBitcoinXConnectors, useEvmSwitchChain, useStacksXConnectors, useWalletProvider, useXAccount, useXAccounts, useXBalances, useXConnect, useXConnection, useXConnectors, useXDisconnect, useXService, useXSignMessage, useXWagmiStore };
|