AmmoraDOCS
GIWA Sepolia
NFT SDK Beta
Docs/GETTING STARTED/Ammora SDK
GETTING STARTED

Build with Ammora

Plan launch, liquidity, position, and fee-sharing transactions with live-state validation and exact integer math.

Live on GIWA Testnet

Ammora launch, liquidity, position, and fee-sharing workflows are available on GIWA Sepolia (chain ID 91342).

npm install @ammora-protocol/sdk@0.2.0-beta.2 viem

import {
  ALCClient,
  ALMMClient,
  ARLClient,
  AFSClient,
  giwaSepoliaVNext,
} from "@ammora-protocol/sdk";

What Ammora is

Ammora is a modular EVM liquidity stack for launching a token, creating its first market, managing liquidity, and distributing the fees that market produces. The contracts hold and settle state on-chain; the TypeScript SDK turns application intent into reviewable calldata, approval requirements, quotes, and live-state preflight results.

SurfaceUse it forCore model
Ammora Launch Curve (ALC)Token launch and graduationSegmented on-chain price discovery before migration
Ammora Liquidity Market Maker (ALMM)Bin-based liquidityFixed-price bins with strategy-shaped liquidity
Ammora Range Liquidity (ARL)Range or full-range liquidityConcentrated sqrt-price math or constant-product compounding
Ammora Fee Sharing (AFS)Revenue distributionImmutable weighted recipients with cumulative fee-per-share accounting

One SDK, two execution surfaces

Offline builders and connected clients intentionally solve different problems. Pick the smallest surface that still knows enough current state to protect the user.

SurfaceWhat it doesWhen to choose it
BuildersValidate local parameters and encode calldata without RPC readsBackends that already own discovery, simulation, and state freshness
Connected clientsRead contracts, bind quotes, inspect policy and authority, and return approvals plus calldataWallet applications and launch workflows affected by live state
  • Address-agnostic builders for every protocol surface
  • Connected ALC, ALMM, ARL, and AFS workflows
  • Pure bigint math re-exported from @ammora-protocol/math
Builders are not preflight

A syntactically valid transaction can still revert or target stale state. Use a connected planner whenever pool state, registry state, ownership, policy, fee configuration, or a deadline affects validity.

The planning lifecycle

Every production integration should make the same boundary transitions explicit. The SDK plans transactions; the wallet remains the only component allowed to sign and submit them.

  1. 1
    Describe intent

    Choose the product and supply a launch configuration, bin range, liquidity cap, swap amount, or recipient split.

  2. 2
    Resolve live state

    Read the chain, contract bindings, pool state, token policy, position owner, registry entry, nonces, and fee settings.

  3. 3
    Quote and constrain

    Convert the quote into minimum output, maximum input, minimum shares, active-bin movement, price-range, and deadline constraints.

  4. 4
    Inspect approvals

    Display token, spender, amount, permission, and expected sender for every setup transaction.

  5. 5
    Simulate, sign, resolve

    Simulate with the signing account, submit through the wallet, and decode the receipt before planning a dependent step.

Units and rounding

Ammora uses integer math throughout. Token amounts are raw ERC-20 units, fees and slippage are generally basis points, and price or accounting accumulators use fixed-point scales such as Q128. Never convert execution-critical values through JavaScript number.

ValueMeaning
bigint token amountRaw token units using the token's decimals
1 basis point1 / 10,000, or 0.01%
Q128Fixed-point scale of 2^128 used for prices or cumulative growth
Minimum output/shareQuoted value reduced by the selected slippage tolerance
Rounding direction is part of safety

Required inputs round up; outputs and user credits generally round down. Use SDK quote fields instead of recomputing them with floating-point arithmetic.

Choose a starting path

Start from the user outcome, not from a contract name. Each product page explains the underlying model before the SDK workflow.

  • Launching a new token: read the ALC guide, then the transaction workflow
  • Supplying strategy liquidity: read ALMM and choose a bin shape
  • Creating a long-lived market: compare ARL concentrated and compounding modes
  • Splitting accumulated fees: design recipients and the source path in AFS
  • Operating production infrastructure: finish with the security model
Was this page helpful?