Skip to main content

Overview

LocalWallet handles cryptographic key management and transaction signing for the LFG SDK.

Static Methods

fromMnemonic()

Create a wallet from a BIP39 mnemonic phrase.
string
required
12 or 24-word BIP39 mnemonic phrase
string
required
Address prefix (use "lfg" for LFG DEX)
Returns: Promise<LocalWallet>

fromPrivateKey()

Create a wallet from a private key.
string
required
Private key as hex string (with or without 0x prefix)
string
required
Address prefix (use "lfg")
Returns: Promise<LocalWallet>

Properties

address

The wallet’s public address.
Type: string

pubKey

The wallet’s public key.
Type: PubKey | undefined

Usage Examples

Environment Variables

Wallet Factory

Never commit private keys or mnemonics to version control. Always use environment variables or secure secret management.

Wallets Guide

Complete wallet management guide

SubaccountInfo

Create trading subaccounts

Security

Security best practices