@avalanche-sdk/client
Version:
A TypeScript SDK for interacting with the Avalanche network through JSON-RPC APIs. This SDK provides a comprehensive set of tools to interact with all Avalanche chains (P-Chain, X-Chain, C-Chain) and various APIs, including wallet functionality for transa
30 lines • 1.18 kB
TypeScript
import { AvalancheWalletCoreClient } from "../../clients/createAvalancheWalletCoreClient.js";
import { SendXPTransactionParameters, SendXPTransactionReturnType } from "./types/sendXPTransaction.js";
/**
* Send an transaction to the X, P or C chain
* @param client - The client to use {@link AvalancheWalletCoreClient}
* @param params - The parameters for the transaction {@link SendXPTransactionParameters}
* @returns The transaction hash {@link SendXPTransactionReturnType}
*
* @example
*
* 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",
* })
*
*/
export declare function sendXPTransaction(client: AvalancheWalletCoreClient, params: SendXPTransactionParameters): Promise<SendXPTransactionReturnType>;
//# sourceMappingURL=sendXPTransaction.d.ts.map