SettleMint
Events

token.transfer.retracted

A token transfer event was retracted because a reorg invalidated its pending or final source.

A token transfer event was retracted because a reorg invalidated its pending or final source.

Delivery contract

FieldValue
Event typetoken.transfer.retracted
Version1
Lifecycle stateretracted
Counter-signed receiptsRecommended for endpoints that consume this event
SDK typeWebhook.TokenTransferRetractedV1

This row gives advice only. DALP waits for a counter-signed receipt only if the webhook endpoint's counterSignedReceipts value is true when DALP queues the delivery. When the value is false, a normal 2xx response completes the delivery.

Related references:

  • idxr_token

Payload schema

{
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "tokenAddress": {
          "type": "string"
        },
        "chainId": {
          "type": "integer",
          "exclusiveMinimum": 0
        },
        "from": {
          "type": "string"
        },
        "to": {
          "type": "string"
        },
        "amount": {
          "type": "string"
        },
        "transactionHash": {
          "type": "string"
        },
        "blockNumber": {
          "type": "integer",
          "minimum": 0
        },
        "logIndex": {
          "type": "integer",
          "minimum": 0
        },
        "supersedes": {
          "type": "string",
          "pattern": "^evt_[a-zA-Z0-9]+$"
        },
        "reorgBlockNumber": {
          "type": "integer",
          "minimum": 0
        }
      },
      "required": [
        "tokenAddress",
        "chainId",
        "from",
        "to",
        "amount",
        "transactionHash",
        "blockNumber",
        "logIndex",
        "supersedes",
        "reorgBlockNumber"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "tokenAddress": {
          "type": "string"
        },
        "chainId": {
          "type": "integer",
          "exclusiveMinimum": 0
        },
        "from": {
          "type": "string"
        },
        "to": {
          "type": "string"
        },
        "amount": {
          "type": "string"
        },
        "transactionHash": {
          "type": "string"
        },
        "supersedes": {
          "type": "string",
          "pattern": "^evt_[a-zA-Z0-9]+$"
        },
        "reorgBlockNumber": {
          "type": "integer",
          "minimum": 0
        }
      },
      "required": [
        "tokenAddress",
        "chainId",
        "from",
        "to",
        "amount",
        "transactionHash",
        "supersedes",
        "reorgBlockNumber"
      ],
      "additionalProperties": false
    }
  ]
}

TypeScript SDK example

import { verifyWebhook } from "@settlemint/dalp-sdk/verify-webhook";
import type { Webhook } from "@settlemint/dalp-sdk";

const result = await verifyWebhook({
  rawBody,
  headers,
  secret: process.env.DALP_WEBHOOK_SECRET!,
});

if (!result.ok) {
  throw new Error(`Webhook verification failed: ${result.code}`);
}

if (result.event.type === "token.transfer.retracted") {
  const event: Webhook.Event<"token.transfer.retracted"> = result.event;
  console.log(event.payload);
}

curl example

curl -X POST https://consumer.example.com/dalp/webhooks \
  -H "content-type: application/json" \
  -H "webhook-id: evt_d415bc91e5ce089916eda10223a66c55" \
  -H "webhook-timestamp: 1778112000" \
  -H "webhook-signature: v1,docs-example-signature" \
  --data '{"evt_id":"evt_d415bc91e5ce089916eda10223a66c55","lifecycle_state":"retracted","supersedes":"evt_tokenTransfer001","payload":{"tokenAddress":"0x5555555555555555555555555555555555555555","chainId":537001,"from":"0x6666666666666666666666666666666666666666","to":"0x7777777777777777777777777777777777777777","amount":"250000000000000000000","transactionHash":"0xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc","blockNumber":18445240,"logIndex":7,"supersedes":"evt_tokenTransfer001","reorgBlockNumber":18445201},"related":{"idxr_token":"idxr_token_example"},"type":"token.transfer.retracted","version":1,"request":{"idempotency_key":"idem_01JZP7R5W8M9N0P1Q2R3S4T5"}}'

Version history

  • v1: Initial registry entry for token.transfer.retracted.

Deprecation

This event type is not deprecated.

Manifest

The machine-readable AsyncAPI entry is published in the DALP events manifest.

On this page