Skip to main content

Non Custodial Flow

LaserSell never touches your private key. Every transaction follows this pattern:
  1. Build: The API returns a base64 encoded unsigned VersionedTransaction.
  2. Sign: You decode, sign, and re encode locally using your keypair.
  3. Submit: You send the signed transaction to the Solana network via a send target.

Loading a Keypair

All SDKs expect a Solana keypair. The standard format is a JSON file containing an array of 64 bytes (as used by solana-keygen).

Signing Functions

Standard Sign

Decodes the unsigned transaction, signs it with your keypair, and returns a signed VersionedTransaction object.

Fast Sign (TypeScript)

The TypeScript SDK provides signUnsignedTxB64Fast, which signs the raw bytes in place without deserializing through VersionedTransaction. This avoids allocation on the hot path and returns the signed transaction as a base64 string directly.

Sign and Send (One Step)

Combines signing and submission into a single call.

Submitting the Signed Transaction

After signing, submit to the Solana network using a send target:

Error Types

Signing and submission errors are surfaced through TxSubmitError:

Security Best Practices

  • Never log or transmit your private key.
  • Load keys from environment variables or encrypted files in production.
  • Verify the wallet address matches the user_pubkey used in the build request. The API constructs the transaction for that specific signer.