configuration/Web3Wallet
Type Aliases
Web3Wallet
Web3Wallet: {
getAddress
: () =>Promise
\<BlockchainAddress
|undefined
> |BlockchainAddress
|undefined
;getBlockchainId
: () =>Promise
\<BlockchainId
> |BlockchainId
;isConnected
: () =>Promise
\<boolean
> |boolean
;namespace
:BlockchainNamespace
;sendTransaction
: (params
) =>Promise
\<TxHash
>;sign
: (params
) =>Promise
\<WalletSignatureResponse
>; }
These methods are used to interact with any web3 wallet.
Type declaration
getAddress()
getAddress: () =>
Promise
\<BlockchainAddress
|undefined
> |BlockchainAddress
|undefined
get the address of the wallet
Returns
Promise
\<BlockchainAddress
| undefined
> | BlockchainAddress
| undefined
getBlockchainId()?
optional
getBlockchainId: () =>Promise
\<BlockchainId
> |BlockchainId
get the blockchain id of the wallet, if not defined, some actions will be unavailable
Returns
Promise
\<BlockchainId
> | BlockchainId
isConnected()
isConnected: () =>
Promise
\<boolean
> |boolean
check if the wallet is connected
Returns
Promise
\<boolean
> | boolean
namespace
namespace:
BlockchainNamespace
the namespace of the wallet
sendTransaction()?
optional
sendTransaction: (params
) =>Promise
\<TxHash
>
send a transaction using the wallet, if not defined, some actions will be unavailable
Parameters
• params
• params.data: TransactionData
Returns
Promise
\<TxHash
>
sign()
sign: (
params
) =>Promise
\<WalletSignatureResponse
>
sign a message using the wallet, and get the public key that signed it
Parameters
• params
• params.message: string
Returns
Promise
\<WalletSignatureResponse
>
Variables
Web3Wallet
Web3Wallet:
ZodObject
\<{getAddress
:ZodFunction
\<ZodTuple
\<[],ZodUnknown
>,ZodUnion
\<[ZodPromise
\<ZodOptional
\<ZodUnion
\<[ZodEffects
\<ZodEffects
\<..., ..., ...>, `0x${(...)}`,string
>,ZodUnion
\<[..., ...]>,ZodEffects
\<ZodString
,string
,string
>,ZodString
]>>>,ZodOptional
\<ZodUnion
\<[ZodEffects
\<ZodEffects
\<ZodString
,string
,string
>, `0x${string}`,string
>,ZodUnion
\<[ZodEffects
\<..., ..., ...>,ZodEffects
\<..., ..., ...>]>,ZodEffects
\<ZodString
,string
,string
>,ZodString
]>>]>>;getBlockchainId
:ZodOptional
\<ZodFunction
\<ZodTuple
\<[],ZodUnknown
>,ZodUnion
\<[ZodPromise
\<ZodUnion
\<[ZodEffects
\<ZodEnum
\<...>, ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ...,unknown
>,ZodEffects
\<ZodEnum
\<...>,NEXERA_TEZOS_CHAINS
,unknown
>,ZodEffects
\<ZodEnum
\<...>,NEXERA_COSMOS_CHAINS
,unknown
>,ZodEffects
\<ZodEnum
\<...>, ... | ...,unknown
>]>>,ZodUnion
\<[ZodEffects
\<ZodEnum
\<[..., ..., ..., ..., ..., ..., ...]>,ETHEREUM
|ARBITRUM
|ARBITRUM_SEPOLIA
|OPTIMISM
|OPTIMISM_SEPOLIA
|AVALANCHE
|AVALANCHE_FUJI
|POLYGON
|POLYGON_AMOY
|SEPOLIA
|BASE
|BASE_SEPOLIA
|MOONBEAM
|MOONRIVER
|BNB
|BNB_TESTNET
|SWISSTRONIK_TESTNET
,unknown
>,ZodEffects
\<ZodEnum
\<[..., ...]>,NEXERA_TEZOS_CHAINS
,unknown
>,ZodEffects
\<ZodEnum
\<[..., ...]>,NEXERA_COSMOS_CHAINS
,unknown
>,ZodEffects
\<ZodEnum
\<[..., ...]>,"0x534e5f4d41494e"
|"0x534e5f5345504f4c4941"
,unknown
>]>]>>>;isConnected
:ZodFunction
\<ZodTuple
\<[],ZodUnknown
>,ZodUnion
\<[ZodPromise
\<ZodBoolean
>,ZodBoolean
]>>;namespace
:BlockchainNamespace
;sendTransaction
:ZodOptional
\<ZodFunction
\<ZodTuple
\<[ZodObject
\<{data
:TransactionData
; },"strip"
,ZodTypeAny
, {data
:TransactionData
; }, {data
:TransactionData
; }>],ZodUnknown
>,ZodPromise
\<ZodOptional
\<ZodEffects
\<ZodEffects
\<ZodString
,string
,string
>, `0x${string}`,string
>>>>>;sign
:ZodFunction
\<ZodTuple
\<[ZodObject
\<{message
:ZodString
; },"strip"
,ZodTypeAny
, {message
:string
; }, {message
:string
; }>],ZodUnknown
>,ZodPromise
\<ZodType
\<WalletSignatureResponse
,ZodTypeDef
,WalletSignatureResponse
>>>; },"strip"
,ZodTypeAny
, {getAddress
: (...args
) =>undefined
|string
|Promise
\<undefined
|string
>;getBlockchainId
: (...args
) =>ETHEREUM
|ARBITRUM
|ARBITRUM_SEPOLIA
|OPTIMISM
|OPTIMISM_SEPOLIA
|AVALANCHE
|AVALANCHE_FUJI
|POLYGON
|POLYGON_AMOY
|SEPOLIA
|BASE
|BASE_SEPOLIA
|MOONBEAM
|MOONRIVER
|BNB
|BNB_TESTNET
|SWISSTRONIK_TESTNET
|"0x534e5f4d41494e"
|"0x534e5f5345504f4c4941"
|TEZOS
|TEZOS_GHOSTNET
|COSMOS
|COSMOS_TESTNET
|Promise
\<ETHEREUM
|ARBITRUM
|ARBITRUM_SEPOLIA
|OPTIMISM
|OPTIMISM_SEPOLIA
|AVALANCHE
|AVALANCHE_FUJI
|POLYGON
|POLYGON_AMOY
|SEPOLIA
|BASE
|BASE_SEPOLIA
|MOONBEAM
|MOONRIVER
|BNB
|BNB_TESTNET
|SWISSTRONIK_TESTNET
|"0x534e5f4d41494e"
|"0x534e5f5345504f4c4941"
|TEZOS
|TEZOS_GHOSTNET
|COSMOS
|COSMOS_TESTNET
>;isConnected
: (...args
) =>boolean
|Promise
\<boolean
>;namespace
:BlockchainNamespace
;sendTransaction
: (...args
) =>Promise
\<undefined
| `0x${string}`>;sign
: (...args
) =>Promise
\<WalletSignatureResponse
>; }, {getAddress
: (...args
) =>undefined
|string
|Promise
\<undefined
|string
>;getBlockchainId
: (...args
) =>unknown
;isConnected
: (...args
) =>boolean
|Promise
\<boolean
>;namespace
:BlockchainNamespace
;sendTransaction
: (...args
) =>Promise
\<undefined
|string
>;sign
: (...args
) =>Promise
\<WalletSignatureResponse
>; }>
Type declaration
getAddress
getAddress:
ZodFunction
\<ZodTuple
\<[],ZodUnknown
>,ZodUnion
\<[ZodPromise
\<ZodOptional
\<ZodUnion
\<[ZodEffects
\<ZodEffects
\<..., ..., ...>, `0x${(...)}`,string
>,ZodUnion
\<[..., ...]>,ZodEffects
\<ZodString
,string
,string
>,ZodString
]>>>,ZodOptional
\<ZodUnion
\<[ZodEffects
\<ZodEffects
\<ZodString
,string
,string
>, `0x${string}`,string
>,ZodUnion
\<[ZodEffects
\<..., ..., ...>,ZodEffects
\<..., ..., ...>]>,ZodEffects
\<ZodString
,string
,string
>,ZodString
]>>]>>
getBlockchainId
getBlockchainId:
ZodOptional
\<ZodFunction
\<ZodTuple
\<[],ZodUnknown
>,ZodUnion
\<[ZodPromise
\<ZodUnion
\<[ZodEffects
\<ZodEnum
\<...>, ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ...,unknown
>,ZodEffects
\<ZodEnum
\<...>,NEXERA_TEZOS_CHAINS
,unknown
>,ZodEffects
\<ZodEnum
\<...>,NEXERA_COSMOS_CHAINS
,unknown
>,ZodEffects
\<ZodEnum
\<...>, ... | ...,unknown
>]>>,ZodUnion
\<[ZodEffects
\<ZodEnum
\<[..., ..., ..., ..., ..., ..., ...]>,ETHEREUM
|ARBITRUM
|ARBITRUM_SEPOLIA
|OPTIMISM
|OPTIMISM_SEPOLIA
|AVALANCHE
|AVALANCHE_FUJI
|POLYGON
|POLYGON_AMOY
|SEPOLIA
|BASE
|BASE_SEPOLIA
|MOONBEAM
|MOONRIVER
|BNB
|BNB_TESTNET
|SWISSTRONIK_TESTNET
,unknown
>,ZodEffects
\<ZodEnum
\<[..., ...]>,NEXERA_TEZOS_CHAINS
,unknown
>,ZodEffects
\<ZodEnum
\<[..., ...]>,NEXERA_COSMOS_CHAINS
,unknown
>,ZodEffects
\<ZodEnum
\<[..., ...]>,"0x534e5f4d41494e"
|"0x534e5f5345504f4c4941"
,unknown
>]>]>>>
isConnected
isConnected:
ZodFunction
\<ZodTuple
\<[],ZodUnknown
>,ZodUnion
\<[ZodPromise
\<ZodBoolean
>,ZodBoolean
]>>
namespace
namespace:
ZodEnum
\<["tezos"
,"eip155"
,"aptos"
,"polkadot"
,"starknet"
,"cosmos"
,"solana"
,"cardano"
]> =BlockchainNamespace
sendTransaction
sendTransaction:
ZodOptional
\<ZodFunction
\<ZodTuple
\<[ZodObject
\<{data
:TransactionData
; },"strip"
,ZodTypeAny
, {data
:TransactionData
; }, {data
:TransactionData
; }>],ZodUnknown
>,ZodPromise
\<ZodOptional
\<ZodEffects
\<ZodEffects
\<ZodString
,string
,string
>, `0x${string}`,string
>>>>>
sign
sign:
ZodFunction
\<ZodTuple
\<[ZodObject
\<{message
:ZodString
; },"strip"
,ZodTypeAny
, {message
:string
; }, {message
:string
; }>],ZodUnknown
>,ZodPromise
\<ZodType
\<WalletSignatureResponse
,ZodTypeDef
,WalletSignatureResponse
>>>