Skip to main content

Solana Connect

Connection Example

import { Web3Kit, ChainType } from "@tokenup/web3kit";
import { web3 } from "@web3jskit/coin-solana";

interface IConnectRes {
publicKey: web3.PublicKey;
}

async function connect() {
const web3Kit = new Web3Kit();
const serRes: IConnectRes = await web3Kit.request({
chainType: ChainType.Solana,
methodName: "connect",
});
}

Request Parameters

{
chainType: ChainType.Solana,
methodName: "connect",
};

Return Value

{
publicKey, // Authorized user wallet
}