### Initialize Push Chain Client and Send Transaction (JavaScript) Source: https://pushchain.github.io/push-chain-website/docs/push-chain-website/pr-preview/pr-1067/docs This snippet demonstrates how to import the Push Chain SDK, generate a wallet, create a signer, convert it to a Universal Signer, and initialize the Push Chain client. It then shows how to send a universal transaction from any chain to Push Chain. Dependencies include '@pushchain/core' and 'ethers'. ```javascript // Import Push Chain SDK import { PushChain } from '@pushchain/core'; import { ethers } from 'ethers'; // Generate wallet const wallet = ethers.Wallet.createRandom(); // Create Signer, change JsonRpcProvider to attach different chain's account const provider = new ethers.JsonRpcProvider('https://evm.rpc-testnet-donut-node1.push.org/'); const signer = wallet.connect(provider); // Convert to Universal Signer const universalSigner = await PushChain.utils.signer.toUniversal(signer); // Initialize Push Chain Client const pushChainClient = await PushChain.initialize(universalSigner, { network: PushChain.CONSTANTS.PUSH_NETWORK.TESTNET, }); // Send a universal transaction (from any chain to Push Chain) const txHash = await pushChainClient.universal.sendTransaction({ to: '0xD0DE00000447492307108Bdc7Ff6BaB33Ff37Dacc479', // To address on Push Chain value: BigInt(0), // $PC Value to send }); ``` -------------------------------- ### Integrate Push Chain UI Kit for Universal Wallet (JavaScript) Source: https://pushchain.github.io/push-chain-website/docs/push-chain-website/pr-preview/pr-1067/docs This snippet shows how to integrate the Push UI Kit into a React application to provide a universal wallet experience. It imports necessary components and hooks from '@pushchain/ui-kit' and configures the PushUniversalWalletProvider. The PushUniversalAccountButton is then rendered within the provider to abstract the Core SDK. ```javascript // Import Push UI Kit import { PushUniversalWalletProvider, PushUniversalAccountButton, usePushWalletContext, usePushChainClient, PushUI } from '@pushchain/ui-kit'; function App() { // create wallet config to pass to Provider const walletConfig = { network: PushUI.CONSTANTS.PUSH_NETWORK.TESTNET, }; return ( // Abstracts Core SDK // Access from usePushChainClient() ); } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.