Push Chain Documentation Hub
Get started with building shared state apps for any chain.Popular Quickstart
Push Chain Quickstart
// Import Push Chain SDK
import { PushChain, createUniversalAccount, createUniversalSigner } from '@pushchain/devnet';
// Import utility functions from viem
import { hexToBytes } from 'viem';
import { privateKeyToAccount, generatePrivateKey } from 'viem/accounts';
// Generate viem Account
const account = privateKeyToAccount(generatePrivateKey());
// Create Signer. Defaults to the Ethereum Sepolia chain
const signer = createUniversalSigner({
address: account.address,
signMessage: async (data) =>
hexToBytes(await account.signMessage({ message: { raw: data } })),
});
// Initialize SDK
const pushChain = await PushChain.initialize(signer);
// Send Transaction
const tx = await pushChain.tx.send(
[
// Defaults to the Ethereum Sepolia chain
createUniversalAccount({
address: '0x22B173e0596c6723dD1A95817052D96b97176Dd8',
}),
],
{ category: 'MY_CUSTOM_CATEGORY', data: 'Hello world!' }
);
Technical Documentation
Explore Push Chain and learn how to integrate it for building universal Apps.
Examples to showcase the power of Push Protocol’s communication stack.
Reward Points Program for contributors. Complete activities and earn points.
Looking for Push Notification or Chat protocol? they have a new home over here.