Wallet Provider
Internal Transaction Error

Internal Transaction Error

This event is used to communicate errors encountered when trying to transfer tokens between pubkeys in the Ledger module.

Event Signature

An Internal Transaction Error event has the following form:

{
  "id": "{eventId}",
  "pubkey": "{ledgerPubkey}",
  "created_at": timestamp,
  "kind": 1112,
  "tags": [
    ["p", "{senderPubkey}"],
    ["p", "{receiverPubkey}"],
    ["e", "{internalTransactionEventId}"],
    ["t", "internal-transaction-error"],
    ...,
  ],
  "content": "{internalTransactionErrorContent}",
  "sig": "{signature}"
}

Note:

  • the .pubkey is the Ledger module's pubkey,
  • the .kind field is 1112 (ie. a regular event),
  • the first "p" tag points to the sender client's pubkey,
  • the second "p" tag points to the receiver client's pubkey,
  • the "t" tag sub-kind is internal-transaction-error.

The content itself is the JSON serialization of an object of the following form:

{
    "messages": [
      "{errorMessage}"
    ]
}

An example TypeScript type definition for this event's content is:

type InternalTransactionErrorContent = {
    messages: [string],
};

Emitters

This event is emitted by:

Targets

This event is targeted towards:

  • The sender client.

Listeners

This event is listened for by:

  • The sender client.
  • The receiver client.
  • Any other agent listening for this event will learn about failures to transfer funds between pubkeys.