Skip to main content

Signer

signer

Gets the Pubkey of the connected account aka the user's wallet.

turbo::solana
pub fn signer() -> Pubkey

Basic Usage

Import the solana module:

use turbo::solana;

You can get a user's public key like so in your game loop:

let signer_pubkey = solana::signer();