Skip to content

Releases: selimaytac/hashspan

@hashspan/x402@0.5.0

Choose a tag to compare

@github-actions github-actions released this 01 Oct 23:54
1d8b447

Patch Changes

  • Updated dependencies [2c2ddb6, 7ca4af6]:
    • @hashspan/core@0.5.0
    • @hashspan/viem@0.5.0

@hashspan/x402@0.4.0

Choose a tag to compare

@github-actions github-actions released this 01 Oct 20:46
041ccdf

Minor Changes

  • #98 20a830a Thanks @selimaytac! - Add @hashspan/x402: withHashspan(client, { reader }) registers hooks on an x402Client, so each payment made
    through @x402/fetch, @x402/axios or @x402/mcp becomes a payment {chainId} span with the payer, recipient,
    asset, amount, scheme, resource and settlement, and, with a reader, a linked confirm span for the settling
    transaction (ADR 0013). The confirm span does not check that the reported transaction is the payment, and revert
    reasons of settlements are replayed only with decodeRevertReason: true. Payments without a response end as
    timeout; x402 v1 and non-EVM payments are not traced.

Patch Changes

@hashspan/viem@0.5.0

Choose a tag to compare

@github-actions github-actions released this 01 Oct 23:54
1d8b447

Patch Changes

@hashspan/viem@0.4.0

Choose a tag to compare

@github-actions github-actions released this 01 Oct 20:46
041ccdf

Minor Changes

  • #109 c92f9e3 Thanks @selimaytac! - sendTransaction and writeContract now run while their send span is the active span, so spans that wallet, RPC or
    HTTP instrumentation creates for the call nest under the send span instead of beside it (ADR 0015). Background
    confirmations and the code after the call stay under the caller. Sends of clients without a chain are recorded after
    the call and do not nest; with a tracker from @hashspan/core before 0.4, the call runs in the caller's context as
    before.

Patch Changes

  • #108 3a382f2 Thanks @selimaytac! - waitForTransactionReceipt keeps every option when another extension applied before withHashspan() copies its
    arguments with a spread. Since 0.3.2 only onReplaced was an own property of the options the adapter passed on, so
    such a copy lost hash, timeout and confirmations.
  • Updated dependencies [c20d91d, 15f16ba, 990a2ea, 2f424f2, 905d2f8]:
    • @hashspan/core@0.4.0

@hashspan/viem@0.3.2

Choose a tag to compare

@github-actions github-actions released this 01 Oct 13:45
7e298db

Patch Changes

  • #79 1051084 Thanks @selimaytac! - Tracing writeContract no longer runs getters inside the ABI. To find the function selector and to decode revert
    reasons, the adapter now uses a copy of the needed ABI items (the called function's overloads and the errors) made
    of own data properties only, so an ABI built at runtime with accessors encodes the same call as without tracing.

  • #78 6cf7e8a Thanks @selimaytac! - A traced waitForTransactionReceipt behaves like viem's own with any options object: frozen options no longer throw
    "Cannot redefine property: onReplaced", and an onReplaced callback inherited from a prototype is called again.
    The adapter now passes viem an object whose prototype is the caller's options instead of a copy.

@hashspan/viem@0.3.1

Choose a tag to compare

@github-actions github-actions released this 01 Oct 12:01
9a4f024

Patch Changes

  • #72 f8828e3 Thanks @selimaytac! - Tracing no longer runs getters on call arguments. The adapters read the fields they record (such as to, value,
    network or a transaction's fields) only from own data properties, so a getter with side effects, or one that
    returns a different value per read, now sees the same reads as without tracing; a field behind a getter is left out
    of the span. A waitForTransactionReceipt call whose hash or onReplaced is a getter is passed on untraced.

  • #73 d8748f9 Thanks @selimaytac! - watch() records nothing, with a diag warning, when its chainId option contradicts the chain of the client it
    was given, instead of polling that client and ending the confirm span as a timeout for the wrong chain.

@hashspan/core@0.5.0

Choose a tag to compare

@github-actions github-actions released this 01 Oct 23:54
1d8b447

Minor Changes

  • #127 2c2ddb6 Thanks @selimaytac! - Add blockchain.payment.settled_amount: the amount the settling party reports it settled, recorded as reported next
    to blockchain.payment.amount, which keeps the amount the payer knew. With x402's upto scheme, it shows what was
    actually charged when that is less than the authorized maximum.

  • #120 7ca4af6 Thanks @selimaytac! - A confirm span that gave up waiting, on its own timeout or in flush(), no longer records blockchain.tx.status
    timeout, as announced in 0.4.0 (ADR 0016). It keeps error status and error.type timeout; query that instead.
    blockchain.tx.status now comes only from chain data (success, reverted, replaced), and the semantic
    conventions schema version is 0.2.0-dev. The deprecated constant BLOCKCHAIN_TX_STATUS_VALUE_TIMEOUT stays
    exported until 1.0.

@hashspan/core@0.4.0

Choose a tag to compare

@github-actions github-actions released this 01 Oct 20:46
041ccdf

Minor Changes

  • #107 c20d91d Thanks @selimaytac! - Deprecate the value timeout of blockchain.tx.status and the constant BLOCKCHAIN_TX_STATUS_VALUE_TIMEOUT
    (ADR 0016). blockchain.tx.status describes the transaction as the chain recorded it; a confirm span that gave up
    waiting already records error status and error.type timeout, so query that instead. The value is still recorded
    in this release and stops being recorded in the next minor release; the constant is removed in 1.0.

  • #94 15f16ba Thanks @selimaytac! - Handle methods take an options object: send.end({ hash }, { endTime }), send.fail(error, { endTime, errorType }),
    confirm.end(receipt, { endTime }), confirm.timeout({ endTime }) and confirm.fail(error, { endTime }) (ADR 0014).
    The positional forms still work and are deprecated until 1.0: send.end(hash, endTime),
    send.fail(error, endTime, { errorType }), confirm.end(receipt, endTime), confirm.timeout(endTime) and
    confirm.fail(error, endTime). An end time that is not a Date, an HrTime or a finite number is ignored.

  • #92 990a2ea Thanks @selimaytac! - Add tracker.startPayment(), which records a payment that another party settles on chain, such as an x402
    facilitator, as a payment {chainId} span with the new blockchain.payment.* and x402.* attributes. A settlement
    with a transaction hash links that transaction's confirm span to the payment span (ADR 0013). The settling party's
    report never replaces what the payer knew: its payer and amount fill only fields the input left empty, and its hash
    does not take over a link the tracker already has. A payment whose
    outcome was never learned ends with timeout(): error.type timeout and no blockchain.payment.status. The
    paymentResource option sets how much of the paid resource's URL x402.resource records: origin (default), path
    or off, at most 512 characters.

  • #93 2f424f2 Thanks @selimaytac! - TxTracker and its handles are produced by createTxTracker() only and are not meant to be implemented: members
    may be added to them in minor releases (ADR 0014). This release adds startPayment to the tracker and context to
    the send handle, so a hand-written tracker no longer type-checks; use createTxTracker() instead, which adapters
    accept to share one tracker between them.

  • #103 905d2f8 Thanks @selimaytac! - SendHandle.context is the parent context with the send span set: run the call that sends the transaction in it,
    e.g. await context.with(send.context, () => sendSomehow()), so that spans of wallet, RPC or HTTP instrumentation
    nest under the send span (ADR 0015). When starting the send span fails, it is the parent context.

@hashspan/cdp@0.5.0

Choose a tag to compare

@github-actions github-actions released this 01 Oct 23:54
1d8b447

Patch Changes

  • Updated dependencies [2c2ddb6, 7ca4af6]:
    • @hashspan/core@0.5.0
    • @hashspan/viem@0.5.0

@hashspan/cdp@0.4.0

Choose a tag to compare

@github-actions github-actions released this 01 Oct 20:46
041ccdf

Minor Changes

  • #110 0707134 Thanks @selimaytac! - Traced CDP calls now run while their send span is the active span, so spans that HTTP instrumentation creates for the
    CDP API request nest under the send span instead of beside it (ADR 0015). Background confirmations and the code after
    the call stay under the caller; with a tracker from @hashspan/core before 0.4, the call runs in the caller's context
    as before.

Patch Changes