Overview
Headless marketplace policy and settlement primitives for AbsoluteJS applications.
@absolutejs/marketplacev0.1.7betaCommerce & GrowthProvider-agnostic marketplace primitives for listings, criteria orders, auctions, trades, and atomic collectible settlement.
bun add @absolutejs/marketplaceHeadless marketplace policy and settlement primitives for AbsoluteJS applications.
It models fixed-price listings, criteria-based buy orders, auctions, direct trades, opaque pagination cursors, asset matching, seller-paid fees, anti-sniping, idempotency, and explicit state transitions without choosing a database or web framework.
The package deliberately emits a settlement plan instead of pretending independent wallet and ownership calls are atomic. Adapters must commit the wallet entries, asset transfer, entity status, and idempotency record in one database transaction.
Outcomes
Headless marketplace policy and settlement primitives for AbsoluteJS applications.
It models fixed-price listings, criteria-based buy orders, auctions, direct trades, opaque pagination cursors, asset matching, seller-paid fees, anti-sniping, idempotency, and explicit state transitions without choosing a database or web framework.
The package deliberately emits a settlement plan instead of pretending independent wallet and ownership calls are atomic. Adapters must commit the wallet entries, asset transfer, entity status, and idempotency record in one database transaction.
Hardening checklist
Follow in order
Working example for Settlement planning.
import {
criteriaFromAsset,
matchesAssetCriteria,
planSaleSettlement
} from '@absolutejs/marketplace';
const wanted = criteriaFromAsset(copy, 'exact', 100);
if (matchesAssetCriteria(candidate, wanted)) {
const plan = planSaleSettlement({
idempotencyKey: 'sale:42',
assetId: candidate.id,
buyerAccountId: 'wallet:buyer',
sellerAccountId: 'wallet:seller',
platformAccountId: 'wallet:platform',
grossCents: 2500
});
// Apply `plan.entries` and the ownership transfer in one storage transaction.
}Supported entry points declared by this project’s package manifest. Internal dist paths are not part of the package contract.
Public package entry point declared in package.json.
Scripts declared by this project’s package manifest.
Search the declarations exported by the current package type files. Expand a symbol to inspect its source-backed signature.
type MarketplacePolicy = {
wallet: WalletPolicy;
minimumListingCents: Cents;
minimumBidIncrementCents: Cents;
maximumActiveListings: number;
maximumActiveBuyOrders: number;
maximumActiveAuctions: number;
maximumTradeAssetsPerSide: number;
maximumOrderDays: number;
maximumAuctionHours: number;
antiSnipeWindowMs: number;
antiSnipeExtensionMs: number;
maximumAuctionExtensions: number;
};@absolutejs/marketplace