Socket
Book a DemoInstallSign in
Socket

clique-wallet-sdk

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clique-wallet-sdk

A wallet SDK for Clique

latest
Source
npmnpm
Version
0.4.1
Version published
Weekly downloads
25
92.31%
Maintainers
1
Weekly downloads
 
Created
Source

Clique Wallet SDK

A Solana wallet SDK for Clique, providing React components and utilities for wallet integration.

Example

cd example
npm install
npm run dev

publish
npm login
npm publish

Usage

1. Login

  • Add context to the root
import { WalletProvider, Network } from "clique-wallet-sdk";
const BASE_URL =
process.env.NEXT_PUBLIC_WALLET_BASE_URL ||
"https://wallet.sit.clique-test.tech";
const SOLANA_RPC_URL =
process.env.NEXT_PUBLIC_SOLANA_RPC_URL;

...
  <html>
  <body>
      <WalletProvider
          config={{
              baseURL: BASE_URL,
              solanaCluster: {
              name: "mainnet-beta",
              rpcUrl: SOLANA_RPC_URL,
              },
              defaultNetwork: Network.Solana,
          }}
          >
              {children}
          </WalletProvider>
  </body>
  </html>
  • Connect wallet
 import { useActiveWallet, useConnect } from "clique-wallet-sdk";

 ...

 const { wallet } = useActiveWallet();
 const { disconnect, connect } = useConnect();
 const walletAddress = wallet?.solanaAddress ?? ""; // get address

  const handleLogout = () => {
     disconnect()
 };
 const handleLogin = () => {
     connect()
 }

2. Sign transaction and send transaction

       import { useActiveWallet, useConnect } from "clique-wallet-sdk";

        const { wallet: activeWallet } = useActiveWallet();
       ...
       // construct the transaction
       const transaction = new Transaction()

        //  sign and send transaction
      const signed = await activeWallet.signSolanaTransaction(transaction);
      const signature = await activeWallet.sendSolanaTransaction(
        signed.serialize()
      );
      const latestBlockHash = await connection.getLatestBlockhash();
      // wait for transaction to be confirmed
      await confirmTransaction(
        {
          signature,
          lastValidBlockHeight: latestBlockHash.lastValidBlockHeight,
        },
        "confirmed"
      );

3. Use coinbase onramp to buy crypto token


import { useCoinbaseOnramp } from 'clique-wallet-sdk'

...
const {getCoinbaseOnrampUrl} = useCoinbaseOnramp()

const handleCoinbaseOnramp = async() => {
  const url = async getCoinbaseOnrampUrl()
  if(url) {
    window.open(url,'_blank'); //go to Coinbase onramp flow
  }
}

Keywords

solana

FAQs

Package last updated on 28 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts