Skip to content

Releases: atomicassets/atomicmarket-sdk

v2.5.0

Choose a tag to compare

@robrigo robrigo released this 04 Sep 18:19
27d9b51

Builds the deposit that funds a market balance, instead of leaving it to each integration.

Features

  • deposit builds the settlement token's transfer to the market contract with memo deposit, from the token contract the caller names, on the builder and the generator alike. purchaseSaleActions now 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

Choose a tag to compare

@robrigo robrigo released this 17 Aug 22:51
437300b

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. encodeURIComponent leaves a dot alone, so the URL parser inside fetch used 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

Choose a tag to compare

@robrigo robrigo released this 17 Aug 21:55
2c91723

Reads the settled royalty ledger, so a consumer no longer has to page the payout logs itself.

Breaking changes

  • IRoyaltyConfig, IRoyaltyTemplateRule, and IRoyaltyAttributeRule gain required market_contract, collection_name, and timestamp fields, and the attribute rule gains lookup_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, and getRoyaltyAccount cover the AtomicMarket v2 payout ledger: every settled royalty, the count behind it, and one account's totals per token symbol. Payout filters travel as RoyaltyPayoutApiParams, whose primary boundary ranges over log_global_sequence. The account totals take the date window alone, because that route groups the boundary column away. (#23)
  • IRoyaltyPayout and IRoyaltyAccountTotal type the two new row shapes, and RoyaltyListingType, RoyaltyPayoutCategory, and RoyaltyPayoutSort pin the strings the indexer serves and filters on. (#23)
  • IRoyaltyConfig, IRoyaltyTemplateRule, and IRoyaltyAttributeRule carry the market_contract, collection_name, and four timestamps of their rows, and the attribute rule also carries its lookup_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

Choose a tag to compare

@robrigo robrigo released this 16 Aug 18:11
36aee58

Adds the auction, buy-offer and template-buy-offer builders and aligns the purchase path with the v2 contract.

Breaking changes

  • purchaseSaleActions throws when asset_ids has more than one entry. On AtomicMarket v2 a bundle purchase commits with the buyer charged and nothing delivered. Set allow_v1_bundle_sale: true on chains still running v1, where bundles are ordinary listings. (#19)
  • deriveSettlementAmount matches 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)
  • purchaseSaleActions requires settlement_quantity in settlement_symbol on the cross-symbol branch, and on a same-symbol sale it must equal listing_price with intended_delphi_median set to '0'. (#19)
  • purchaseSaleActions picks its branch from the contract's settlement discriminator, full symbol equality between listing_price and settlement_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 MarketActionBuilder and MarketActionGenerator: announceauct, cancelauct, auctionbid, auctclaimbuy, auctclaimsel, assertauct, createbuyo, cancelbuyo, declinebuyo, createtbuyo, canceltbuyo. (#20)
  • announceAuctionActions, acceptBuyofferActions and fulfillTemplateBuyofferActions compose the multi-action flows. acceptbuyo and fulfilltbuyo read 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, AcceptBuyofferInput and FulfillTemplateBuyofferInput are exported beside PurchaseSaleInput and AnnounceSaleInput. (#20)

Other changes

  • sideEffects: false in package.json, matching the sibling @atomichub/atomicassets package, 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

Choose a tag to compare

@robrigo robrigo released this 05 Aug 01:07
e2e96c5

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 DataOptions key 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.field rather than data: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 plain data.field form 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

Choose a tag to compare

@robrigo robrigo released this 05 Aug 01:07
1c0bf0e

Composes the purchase and listing flows and adds the delphi settlement helpers.

Features

  • purchaseSaleActions composes assertsale, the deposit transfer, and purchasesale. announceSaleActions composes announcesale and the atomicassets createoffer carrying the sale memo. Both emit authorization-free action data in the order the market contract expects. (#16)
  • purchaseSaleActions throws when a delphi-priced sale arrives without a settlement_quantity, because that omission pays the wrong amount rather than failing the transaction. (#16)
  • deriveSettlementAmount reproduces the market contract's settlement math with BigInt, the float formula losing precision at on-chain magnitudes. formatQuantity renders raw integer amounts as chain quantities. (#16)
  • DelphiPairSpec projects a supported pair from getConfig and 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_precision is typed number rather than the literal 2, so a pair read from the API feeds a DelphiPairSpec directly. (#16)
  • regmarket and withdraw action 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

Choose a tag to compare

@robrigo robrigo released this 31 Jul 21:35
30b49b7

Adds the sale lifecycle and RAM payment actions, plus the /v2/sales routes.

Features

  • Adds the sale lifecycle actions to MarketActionBuilder and MarketActionGenerator: announcesale, cancelsale, assertsale, purchasesale. The uint64 fields, the listing ids and intended_delphi_median, are strings, so 64-bit values pass through without precision loss. (#14)
  • RAM payment actions paysaleram, payauctram and paybuyoram move the RAM cost of a listing's table row onto the payer. Any account may pay, signing as the payer. (#14)
  • Adds getSalesV2 and countSalesV2 for the /v2/sales route, a newer materialized index with the same row shape as /v1/sales. /v2/sales omits Waiting sales, so a state filter that includes Waiting belongs on the v1 route. (#14)
  • countOffers joins getOffers, both taking the new MarketOfferApiParams, 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

Choose a tag to compare

@robrigo robrigo released this 17 Aug 16:52
95aeb55

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/Params are replaced by root exports, for example import { 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)
  • BuyofferState names 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 removed BuyofferState.Listed and BuyofferState.Sold no longer compiles and moves to the corrected names. (#13)

Features

  • The package has no third-party runtime dependencies. The built-in fetch replaces node-fetch, and a custom fetch can 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, getRoyaltyTemplateRules and getRoyaltyAttributeRules. (#1)
  • Adds MarketActionBuilder, a synchronous builder for royalty-config actions, alongside MarketActionGenerator, which covers the six royalty-configuration actions and their deletes. (#1)
  • Exports typed on-chain table rows and the AtomicMarketActions action-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_fee to sales, auctions and buyoffers. (#1)
  • TemplateBuyofferState is new. The template buyoffer routes number their states from Listed, 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.ts now splits the value import NETWORK_ENDPOINTS from the type-only AtomicHubNetwork, so esbuild drops the type from the emitted graph. The CJS build was never affected. (#7)
  • IBuyoffer matches what the published atomicmarket 1.1.6 returns. It carries buyoffer_id, memo and decline_memo, where it used to carry auction_id and neither memo field. (#1)

Other changes

  • The @atomichub/atomicassets dependency 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