Documentation Hub
Get started with building shared state apps for any chain.Quickstart
Everything you will need to get up and running in 2 minutes or less!Explore Quickstart
Core SDK Quickstart
// 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
});
UI-Kit Quickstart
// 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 (
<PushUniversalWalletProvider
config={walletConfig}
>
// Abstracts Core SDK
// Access from usePushChainClient()
<PushUniversalAccountButton />
</PushUniversalWalletProvider>
);
}
Tooling
Everything you will need to get up and running in 2 minutes or less!Explore Tooling
Tutorials
Tutorials to enable you to build your first Universal Application.Explore Tutorials