Quick Start

This guide shows how to interact with the LEA blockchain using the LEA Web3 SDK.

You will:

  • connect to a LEA network,
  • create a wallet,
  • derive an account,
  • query a balance,
  • and submit a simple BasePOD transaction.

All steps use the BasePOD. No Custom POD configuration is required.


Install the SDK

npm install @getlea/web3

Create a connection

Create a connection to a LEA RPC endpoint.

import { Connection } from '@getlea/web3';
const connection = Connection('devnet');

You can also pass a full RPC URL instead of a network name.

Create a wallet

Create a wallet from a BIP-39 mnemonic.

import { generateMnemonic, Wallet } from '@getlea/web3';

const mnemonic12 = await generateMnemonic();      // default 128-bit entropy
const wallet = await Wallet.fromMnemonic(mnemonic12);

The wallet manages keys and signing locally.

Derive an account

Derive an account from the wallet.

const account = await wallet.getAccount(0);
console.log(account.address);

Query the balance

import { basePodGetBalance } from '@getlea/web3';

const balance = await basePodGetBalance(connection, account.address);

console.log(balance);

Submit a transaction

Submit a simple BasePOD transfer.

import { basePodTransfer } from '@getlea/web3';

const txId = await basePodTransfer(
  connection,
  account,
  'lea1destinationaddress',
  1_000n
);

console.log(txId);

The SDK automatically:

  • publishes the account keyset if required,
  • manages transaction chaining,
  • submits the transaction,
  • and decodes the execution result.

What happens next

At this point, you have:

  • a working LEA connection,
  • a wallet and account,
  • and the ability to interact with the BasePOD.

From here, you can:

  • build application logic on top of BasePOD system programs,
  • or explore additional BasePOD features as they become available.
INFO

Smart Contract Features will be published later this year.