Skip to content

@odatano/nightgate 0.29.0

Choose a tag to compare

@maxalexweber1 maxalexweber1 released this 29 Sep 21:24
· 65 commits to main since this release
92e969e

@odatano/nightgate 0.29.0

Sponsored shielded swaps, sponsored mints without a token list entry, and grant lists checked when they are written; one additive column.

  • sponsorSwap(makerHalfB64, takerHalfB64, sponsorSessionId, idempotencyKey?): two proven halves, bound or unbound, as offer file (swapoffer1...) or base64; checked, merged, dust paid, submitted. Job result { txHash, swap: { gives, wants } }.
  • Swap conditions: offer only, one type given and one wanted per half, both in allowedTokenTypes, never NIGHT, halves mirror, merge balances.
  • Off by default: NIGHTGATE_SPONSOR_ALLOW_SWAPS / policy file allowSwaps, plus sponsorSwap in the grant's allowedActions. NIGHTGATE_SPONSOR_SWAP_MAX_INPUTS (4).
  • NIGHTGATE_SPONSOR_ALLOW_CONTRACT_MINTS / policy file allowContractMints (default off): the offer of a token minted by a call of the same transaction is sponsored without allowedTokenTypes. AgentGrants.mintedTokenTypes: types of landed mints, listed for that grant while contract mints are sponsored. Admin getSponsorPolicy(grantId?): platform policy, source, load time, effective policy of a grant or why it is empty.
  • createAgentGrant / updateAgentGrant: 400 for lists the platform policy leaves nothing of. Grant token types outside the platform list: no offers sponsored, other calls keep working (was 403 on every sponsored call).
  • @odatano/nightgate-tx 0.8.0: createSwapWallet (shielded-only sync, buildHalf, takeOffer), offer files (encodeOffer, decodeOffer, readSwapTerms), walletSync: 'shielded', walletState, recipients, deriveRoleSeeds, ng.sponsorSwap.
  • Transactions.txType: shielded_transfer / dust_registration for call-free transactions once decoded (was contract_call).

Full Changelog: v0.28.2...v0.29.0