SDK Installation

SDK Installation

# NPM
npm install @logia/sdk

# Yarn
yarn add @logia/sdk
import Logia from '@logia/sdk';

const logia = new Logia({ network: 'mainnet' });

Signing & Verifying Private Actions

Signing a private transaction:

const note = await logia.createNote({
  asset: 'USDC',
  amount: 10.0
});

const proof = await logia.generateProof(note, recipientAddress);

Verifying a transaction (merchant side or agent):

const isValid = await logia.verifyProof(proof);
if (isValid) {
  console.log('Payment verified successfully');
}

Creating Private Transactions

  • Select an asset and amount

  • Generate a private note or use an existing note

  • Create a zero-knowledge proof locally

  • Submit the transaction via Logia SDK or smart contract

Example:

const tx = await logia.sendPrivate({
  note,
  to: recipientAddress,
  amount: 5.25
});
console.log('Transaction submitted:', tx.hash);

Integrating Logia Into Any App (Web2 + Web3)

  • Web3 dApps: Use the SDK to replace normal wallet calls with Logia private transactions.

  • Web2 Apps: Implement x402 payment requests; Logia handles privacy-proof generation and fulfillment automatically.

  • Agents / Bots: Automate payments without exposing identity or wallet history.

Integration is minimal, if your app can accept an x402 payment, it can use Logia.

Last updated