Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 931 Bytes

File metadata and controls

28 lines (19 loc) · 931 Bytes

@lumio/shared

Shared domain types and pure utilities for the Lumio cooperative-finance platform. Consumed by @lumio/sdk, @lumio/ui, and every lumio-app package.

Install

pnpm add @lumio/shared

Usage

import { truncateAddress, formatAmount, parseAmount } from "@lumio/shared";

truncateAddress("GABCDEFG...WXYZ");   // "GABC…WXYZ"
formatAmount(12_500_000n);            // "1.25"  (7-decimal Stellar amounts)
parseAmount("1.25");                  // 12500000n

Also exports the core domain types — Member, Contribution, Proposal, Vote, Dividend, Address, Amount, ContractName, NetworkConfig — plus the STELLAR_DECIMALS constant.

License

Apache-2.0. Part of the lumio-sdk monorepo.