Quick Start

Quick setup

Web3 SDK

Install xRaise Wallet connector package

npm i xraise-wagmi-connector

Add xRaise connector to your web3 library and request to connect automatically

const client = createClient({
  autoConnect: false,
  provider: zkSyncProvider,
  connectors: [defaultRaiseConnector],
});
 
export default function Layout({ children }: { children: React.ReactNode }) {
  useEffect(() => {
    client.autoConnect();
  }, []);
 
  return (
    <WagmiConfig client={client}>
        {children}
      <PluggedWallet />
    </WagmiConfig>
  );
}

When the setup is complete, user transactions will trigger xRaise wallet window open when transaction is requested

Advanced features

Wallet smartcontract is implemented as a diamond proxy. This means wallet smartcontract consists of different facets with functions that can be called by using the corresponding abi. Next docs sections show what wallet features are here and how they can be used

Gaming SDK

Install xRaise Gaming SDK

npm i xraise-gaming-sdk

Ask user to connect the wallet

  // GAME_CONTRACT_1_ADDRESS calls will not require confirmations during session
  await gamingSdk.user.connect({
    sessionContracts: [GAME_CONTRACT_1_ADDRESS] 
  });

Example projects

Try out these amazing projects integrated xRaise SDK