The client to use AvalancheWalletCoreClient
The parameters for the transaction SendXPTransactionParameters
The transaction hash SendXPTransactionReturnType
import { createWalletCoreClient, http } from '@avalanche-sdk/client'
import { avalanche } from '@avalanche-sdk/client/chains'
import { sendXPTransaction } from '@avalanche-sdk/client/methods/wallet'
const client = createWalletCoreClient({
chain: avalanche,
transport: {
type: "custom",
provider: window.avalanche!,
},
})
const txHash = await sendXPTransaction(client, {
txOrTxHex: "0x...",
chainAlias: "P",
})
Send an transaction to the X, P or C chain