Repository navigation
Releases: atomicassets/atomicmarket-sdk
Release list
v2.5.0
Builds the deposit that funds a market balance, instead of leaving it to each integration.
Features
depositbuilds the settlement token's transfer to the market contract with memodeposit, from the token contract the caller names, on the builder and the generator alike.purchaseSaleActionsnow composes it instead of assembling its own transfer, and the emitted triple is unchanged. (#28)
Commits
- 1910501 chore: keep the publish credential away from the code it publishes (#26)
- ba6dc27 chore(deps): bump js-yaml to 4.3.1 for GHSA-5p4m-2wfm-xmqj (#18)
- c332fe4 chore(deps): clear the serialize-javascript and brace-expansion advisories (#27)
- 6f3eac1 feat: add a deposit builder so every balance flow shares the memo (#28)
- 27d9b51 chore(release): 2.5.0
Full changelog: v2.4.1...v2.5.0
v2.4.1
Refuses a path id that would send the request somewhere else.
Bug fixes
- An empty id,
., or..passed to an Explorer method that puts it in a path segment now throws before the request.encodeURIComponentleaves a dot alone, so the URL parser insidefetchused to resolve the segment away and read a neighbouring route on the same origin:getRoyaltyAccount('..')requested/v1/royalties/, and an empty id turned a single-row route into its list. The thirteen readers that take an id or a name in the path, over sales, auctions, buy-offers, marketplaces, royalties, assets, and offers, all carry the check. (#25)
Commits
- 56317a2 chore(package): carry the author URL and publishConfig, and state the metadata the npm page reads (#24)
- 2991873 fix: refuse an empty or dot path id so a request cannot land on a sibling route (#25)
- 437300b chore(release): 2.4.1
Full changelog: v2.4.0...v2.4.1
v2.4.0
Reads the settled royalty ledger, so a consumer no longer has to page the payout logs itself.
Breaking changes
IRoyaltyConfig,IRoyaltyTemplateRule, andIRoyaltyAttributeRulegain requiredmarket_contract,collection_name, and timestamp fields, and the attribute rule gainslookup_hash. Reading a response is unaffected. Code that builds one of these rows by hand, such as a test mock, must supply the added fields. (#23)
Features
getRoyaltyPayouts,countRoyaltyPayouts, andgetRoyaltyAccountcover the AtomicMarket v2 payout ledger: every settled royalty, the count behind it, and one account's totals per token symbol. Payout filters travel asRoyaltyPayoutApiParams, whose primary boundary ranges overlog_global_sequence. The account totals take the date window alone, because that route groups the boundary column away. (#23)IRoyaltyPayoutandIRoyaltyAccountTotaltype the two new row shapes, andRoyaltyListingType,RoyaltyPayoutCategory, andRoyaltyPayoutSortpin the strings the indexer serves and filters on. (#23)IRoyaltyConfig,IRoyaltyTemplateRule, andIRoyaltyAttributeRulecarry themarket_contract,collection_name, and four timestamps of their rows, and the attribute rule also carries itslookup_hash. (#23)
Commits
- fd43a58 docs: add the release checklist and the script that composes a Release body (#21)
- e0fab60 docs: list a stable release since the last stable tag and read the entry for the base version (#22)
- 62c6663 feat: read the settled royalty ledger so consumers stop paging payouts by hand (#23)
- 2c91723 chore(release): 2.4.0
Full changelog: v2.3.0...v2.4.0
v2.3.0
Adds the auction, buy-offer and template-buy-offer builders and aligns the purchase path with the v2 contract.
Breaking changes
purchaseSaleActionsthrows whenasset_idshas more than one entry. On AtomicMarket v2 a bundle purchase commits with the buyer charged and nothing delivered. Setallow_v1_bundle_sale: trueon chains still running v1, where bundles are ordinary listings. (#19)deriveSettlementAmountmatches the contract's own conversion instead of the exact quotient: where the contract's double arithmetic lands one raw unit above the exact floor, so does the SDK, and that unit is the difference between a deposit that funds the purchase and one that leaves it short. It throws on a pair with a negative exponent and on a result at or past 2^64. (#19)purchaseSaleActionsrequiressettlement_quantityinsettlement_symbolon the cross-symbol branch, and on a same-symbol sale it must equallisting_pricewithintended_delphi_medianset to'0'. (#19)purchaseSaleActionspicks its branch from the contract's settlement discriminator, full symbol equality betweenlisting_priceandsettlement_symbol. A settlement symbol differing from the price in precision alone therefore settles through the oracle rather than reading as a mismatch. (#19)
Features
- Adds auction, buy-offer and template-buy-offer actions to
MarketActionBuilderandMarketActionGenerator:announceauct,cancelauct,auctionbid,auctclaimbuy,auctclaimsel,assertauct,createbuyo,cancelbuyo,declinebuyo,createtbuyo,canceltbuyo. (#20) announceAuctionActions,acceptBuyofferActionsandfulfillTemplateBuyofferActionscompose the multi-action flows.acceptbuyoandfulfilltbuyoread the last created row of the AtomicAssets offers table, so neither is safe to build alone and both are reachable only through these helpers. (#20)AnnounceAuctionInput,AcceptBuyofferInputandFulfillTemplateBuyofferInputare exported besidePurchaseSaleInputandAnnounceSaleInput. (#20)
Other changes
sideEffects: falseinpackage.json, matching the sibling@atomichub/atomicassetspackage, so bundlers may drop the package from builds that import nothing from it. (#19)
Commits
- 2e9f74a fix: make the purchase path agree with the contract it builds for (#19)
- 9ba4137 feat: cover the auction and buy-offer families so consumers stop hand-rolling payloads (#20)
- 36aee58 chore(release): 2.3.0
Full changelog: v2.2.1...v2.3.0
v2.2.1
Bug fixes
- The Explorer client percent-encodes caller-supplied path ids and custom data-filter keys, across the twelve path-building methods and the query-string builder. A sale id, marketplace or collection name, or
DataOptionskey carrying/,?,#,&, or=used to escape its own segment and reshape the request path or query. Hostile input now stays a value. (#17)
Other changes
- Typed data filters travel as
data%3Anumber.fieldrather thandata:number.field. Standards query parsers percent-decode keys before matching, so servers see the same key. This is confirmed against the live API, where the encoded and raw forms return identical filtered rows. The plaindata.fieldform is unchanged. (#17)
Commits
- ccc9217 fix: percent-encode caller-supplied path ids and data-filter keys in the Explorer client (#17)
- e2e96c5 chore(release): 2.2.1
Full changelog: v2.2.0...v2.2.1
v2.2.0
Composes the purchase and listing flows and adds the delphi settlement helpers.
Features
purchaseSaleActionscomposesassertsale, the deposit transfer, andpurchasesale.announceSaleActionscomposesannouncesaleand the atomicassetscreateoffercarrying the sale memo. Both emit authorization-free action data in the order the market contract expects. (#16)purchaseSaleActionsthrows when a delphi-priced sale arrives without asettlement_quantity, because that omission pays the wrong amount rather than failing the transaction. (#16)deriveSettlementAmountreproduces the market contract's settlement math withBigInt, the float formula losing precision at on-chain magnitudes.formatQuantityrenders raw integer amounts as chain quantities. (#16)DelphiPairSpecprojects a supported pair fromgetConfigand rejects a non-positive median or a precision outside the chain's 0 to 18, naming the field in the error. (#16)IMarketPair.data.quote_precisionis typednumberrather than the literal2, so a pair read from the API feeds aDelphiPairSpecdirectly. (#16)regmarketandwithdrawaction builders cover marketplace registration and market-balance withdrawal. (#15)
Commits
- 5a2028d feat: add regmarket and withdraw action builders (#15)
- d9051b0 feat: compose the purchase and listing flows so integrators stop hand-rolling them (#16)
- 1c0bf0e chore(release): 2.2.0
Full changelog: v2.1.0...v2.2.0
v2.1.0
Adds the sale lifecycle and RAM payment actions, plus the /v2/sales routes.
Features
- Adds the sale lifecycle actions to
MarketActionBuilderandMarketActionGenerator:announcesale,cancelsale,assertsale,purchasesale. The uint64 fields, the listing ids andintended_delphi_median, are strings, so 64-bit values pass through without precision loss. (#14) - RAM payment actions
paysaleram,payauctramandpaybuyorammove the RAM cost of a listing's table row onto the payer. Any account may pay, signing as the payer. (#14) - Adds
getSalesV2andcountSalesV2for the/v2/salesroute, a newer materialized index with the same row shape as/v1/sales./v2/salesomits Waiting sales, so a state filter that includes Waiting belongs on the v1 route. (#14) countOffersjoinsgetOffers, both taking the newMarketOfferApiParams, which widens the state filter to comma-joined multi-state queries like the sale and auction params already allow. (#14)
Commits
- 30b49b7 feat: cover the sale lifecycle, RAM payments, and v2 sales so consumers stop hand-rolling them (#14)
Full changelog: v2.0.1...v2.1.0
v2.0.1
Publishes the AtomicHub fork as @atomichub/atomicmarket, covering 2.0.0 (shipped to npm without a tag) and 2.0.1.
Breaking changes
- The package name is
@atomichub/atomicmarket. Install it under that name and change imports from'atomicmarket'. (#1) - Deep imports such as
atomicmarket/build/API/Explorer/Paramsare replaced by root exports, for exampleimport { SaleApiParams } from '@atomichub/atomicmarket'. (#1) - Numeric ABI fields (
template_id, weights, splits) are numbers. The 64-bit id fields, sale ids and rule ids, remain strings. (#1) - Node.js 20 or newer is required. (#1)
BuyofferStatenames the lifecycle the indexer reports (Pending,Declined,Canceled,Accepted,Invalid) instead of the sale lifecycle. The numeric values are unchanged, so filters built from raw numbers behave the same. Code using the removedBuyofferState.ListedandBuyofferState.Soldno longer compiles and moves to the corrected names. (#13)
Features
- The package has no third-party runtime dependencies. The built-in
fetchreplaces node-fetch, and a customfetchcan still be injected. The only dependency is the sibling@atomichub/atomicassets. (#1) - Ships dual CJS and ESM output with bundled type declarations, plus a browser IIFE build. (#1)
- Adds the v2 royalty read endpoints
getRoyaltyConfig,getRoyaltyTemplateRulesandgetRoyaltyAttributeRules. (#1) - Adds
MarketActionBuilder, a synchronous builder for royalty-config actions, alongsideMarketActionGenerator, which covers the six royalty-configuration actions and their deletes. (#1) - Exports typed on-chain table rows and the
AtomicMarketActionsaction-name constants. (#1) - Exports the market API response-object, query-parameter and enum types from the package root, so no deep
build/imports are needed. (#1) - Adds
current_collection_feeto sales, auctions and buyoffers. (#1) TemplateBuyofferStateis new. The template buyoffer routes number their states fromListed, one below the other listing types. (#13)
Bug fixes
- A bare
import ... from '@atomichub/atomicmarket'under Node ESM no longer fails with "does not provide an export named 'AtomicHubNetwork'".Networks.tsnow splits the value importNETWORK_ENDPOINTSfrom the type-onlyAtomicHubNetwork, so esbuild drops the type from the emitted graph. The CJS build was never affected. (#7) IBuyoffermatches what the publishedatomicmarket1.1.6 returns. It carriesbuyoffer_id,memoanddecline_memo, where it used to carryauction_idand neither memo field. (#1)
Other changes
- The
@atomichub/atomicassetsdependency is a registry range,^2.0.0, rather than a git ref, so the lockfile carries a tarball with an integrity hash. (#10) - npm publishing runs through the trusted publisher rather than a stored token, so releases carry provenance with no long-lived publish secret. (#8)
Commits
- 278bdfa feat!: modernize as @atomichub/atomicmarket v2.0.0 (#1)
- e8c741f ci: type-check in CI instead of leaning on the test runner (#6)
- b1fb4f8 fix: keep type-only atomicassets imports out of the esm runtime graph (#7)
- 34b95d4 chore(deps): depend on the published @atomichub/atomicassets (#10)
- c66121b ci: publish through the trusted publisher instead of a token (#8)
- d22b490 docs(readme): lead with what the library is for, not its capability list (#9)
- d21a4df chore(release): 2.0.1 (#11)
- 0e19532 fix(test): identify the pack report by shape, not by position (#12)
- 95aeb55 fix(enums): number listing states per listing type, not from the sale lifecycle (#13)
Full changelog: v1.1.2...v2.0.1