lamarge 0.7.0

Client for the LaMarge API: sign-in, takes, transfers, withdrawals and market making, each request checked before it is signed.
Documentation
//! The protocol: pure, I/O-free checks of every server payload against the caller's terms and
//! the pinned deployments, the pins themselves, and the payloads they rebuild, under the names
//! the TypeScript SDK's `@lamarge/sdk/protocol` gives them, in snake case.
//!
//! A check returns a [`Verified`] payload, rebuilt from the checked terms and pinned domains, or
//! a [`VerificationError`](crate::error::VerificationError) whose `kind` and `detail` name the
//! rule that failed. The [`Session`](crate::Session) flows run these checks before every
//! signature; a caller signing with its own key runs them itself, and signs only what
//! [`Verified::typed_data`] or [`Verified::message`] gives.

pub(crate) mod aster;
pub(crate) mod checks;
pub(crate) mod deliveries;
pub(crate) mod eip712;
mod entries;
pub(crate) mod escrow_proof;
pub(crate) mod fees;
pub(crate) mod gmx;
pub(crate) mod hyperliquid;
pub(crate) mod lighter;
pub(crate) mod polymarket;
pub(crate) mod poseidon;
pub(crate) mod relay;
pub(crate) mod signing;
pub(crate) mod siwe;

pub use self::{
    aster::{
        CHAIN_ID as ASTER_CHAIN_ID, TRANSFER_CHAIN_ID as ASTER_TRANSFER_CHAIN_ID,
        Transfer as AsterTransfer, client_id as aster_client_id,
    },
    checks::{
        LighterOwners,
        consents::{
            EscrowLock, EscrowWithdrawalPreparation, PaymentRefundPreparation, can_refund_payment,
            check_escrow_withdrawal, check_payment_refund, check_refund_locks,
        },
        deployment::check_registry,
        funding::{PlanTerms, check_funding_plan},
        lines::{
            LinesAuthority, LinesRequest, check_prepared_lines, check_prepared_quote, direct_pair,
            line_receive,
        },
        maker::{
            CapitalRequest as MakerIntent, MakerAuthority, QuoteTerms as QuoteIntent,
            check_close_orders, check_maker_intent, check_signed_quote,
        },
        setup::{check_aster_approval, check_permit, check_setup_kind},
        take::{
            Delivery, TakeIntent, TakeReads, check_minimum_received, check_take, lighter_accounts,
            payment_kind as take_payment_kind, signable_until,
        },
        withdrawal::{check_send, check_withdrawal, signed_at, withdrawal_cost},
    },
    eip712::{lamarge_domain, permit_domain},
    entries::*,
    escrow_proof::{
        ESCROW_PROOF_DEPLOYMENTS, ProofDeployment, RETIRED_V5_DEPLOYMENTS, check_escrow_proof_typed,
    },
    fees::{
        FEE_ON_DELIVERY, FEE_ON_PAYMENT, Fee, MAX_FEE_BPS, SwapFee, WALLET_FEE_ON_DELIVERY,
        WALLET_FEE_ON_PAYMENT, check_fee, fee_on, minimum_received, price_within, swap_fee,
        take_fee,
    },
    gmx::{TRANSFER_ROUTER as GMX_TRANSFER_ROUTER, transfer_out as gmx_transfer_out},
    lighter::{COLLATERAL_ROUTE, USDC_ASSET, fill_memo, registration_message},
    polymarket::op_hash,
    poseidon::{
        LighterTransfer, TransferTxInfo, UnreadableTransfer, hash_to_fp5, read_transfer_tx_info,
        transfer_hash, transfer_message,
    },
    relay::{
        ACCOUNT_MINIMUMS, RelayEndpoint, Transactions as BridgeTransactions, Vm as RelayVm,
        WALLETS as RELAY_WALLETS, bridge_authorization, bridge_transactions, check_bridge_nonce,
        destination_calls, from_relay_units, part_floor, relay_endpoint, relay_order_id,
        to_relay_units,
    },
    signing::Verified,
    siwe::check_login_challenge,
};
pub use crate::{
    deployments::{
        AT_ONCE_SEND_MARGIN_SECONDS, AT_ONCE_SIGNING_SECONDS, CHAINS, Chain, ENVIRONMENT_SLOTS,
        ESCROW, ESCROWS as ESCROW_DEPLOYMENTS, Escrow as EscrowDeployment, LIGHTER_MAX_TAKER_FEE,
        MAKER_TIMEOUT_SECONDS, PermitDomain, ROUTE_PAY_WINDOW_SECONDS, Slots as EnvironmentSlots,
        TAKER_TIMEOUT_SECONDS, UNLIMITED_ALLOWANCE, VENUE_DOMAINS, VenueDomain,
        WALLET_SWAP_MIN_BPS, decimal_units, is_venue_settled, venue_step, venue_units,
    },
    flows::BridgeTerms as BridgeExpectation,
};