Overview
The Kit integration utilities allow you to convert legacy wallet adapters into Kit-compatible signers, enabling seamless use of @solana/kit’s modern architecture. DualConnection Support: All functions in this module support both legacyConnection from @solana/web3.js and Kit Rpc. Wallet adapters created with the Hermis wallet standard handle both connection types transparently through their sendTransaction and signAndSendTransaction methods.
createKitSignersFromAdapter()
Convert a wallet adapter to Kit-compatible signers.Parameters
WalletAdapter | null
required
The wallet adapter instance (must be connected)
DualConnection
required
Solana connection (supports both web3.js Connection and Kit Rpc). Network is auto-detected from the endpoint.
'mainnet' | 'devnet' | 'testnet'
Optional network override. Use this for custom RPC URLs where auto-detection might fail.
Returns
object
Object containing Kit-compatible signers
Usage with Kit
Helper Functions
adapterSupportsMessageSigning()
Check if a wallet adapter supports message signing.WalletAdapter | null
required
The wallet adapter to check
boolean
true if the adapter supports message signing, false otherwiseadapterSupportsTransactionSending()
Check if a wallet adapter supports transaction sending.WalletAdapter | null
required
The wallet adapter to check
boolean
true if the adapter supports transaction sending, false otherwiseChain Utilities
SOLANA_CHAINS
Constants for Solana chain identifiers following the Wallet Standard format.getChainId()
Get the Wallet Standard chain identifier for a network.'mainnet' | 'devnet' | 'testnet'
required
The Solana network name
`solana:${string}`
The Wallet Standard chain identifier
getNetworkFromChainId()
Get the network name from a Wallet Standard chain identifier.string
required
The Wallet Standard chain identifier
'mainnet' | 'devnet' | 'testnet' | null
The network name, or null if unknown
isSolanaChain()
Check if a chain identifier is a Solana chain.string
required
The chain identifier to check
boolean
true if the chain is a Solana chain, false otherwiseTransaction Helpers
createKitTransaction()
Create a Kit transaction message with automatic blockhash handling. Simplifies the process of building @solana/kit transactions.DualConnection
required
Solana connection for fetching latest blockhash (supports both web3.js Connection and Kit Rpc)
Address<string>
required
Address of the transaction fee payer
Instruction[]
Array of Kit instructions to include in the transaction. Defaults to empty array.
Promise<TransactionMessage>
A Kit TransactionMessage ready for signing, with blockhash and lifetime automatically set
