Wallet Provider
Outbound Transaction Start

Outbound Transaction Start

This event is used to "burn" exiting tokens in the Ledger module.

Event Signature

An Outbound Transaction Start event has the following form:

{
  "id": "{eventId}",
  "pubkey": "{minterPubkey}",
  "created_at": timestamp,
  "kind": 1112,
  "tags": [
    ["p", "{ledgerPubkey}"],
    ["p", "{minterPubkey}"],
    ["t", "outbound-transaction-start"],
    ...,
  ],
  "content": "{outboundTransactionContent}",
  "sig": "{signature}"
}

Note:

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

{
    "tokens": {
        "{tokenName}": tokenAmount,
        ...,
    },
    "memo": "{memoString}"
}

Where the .memo entry is optional. Each tokenAmount must be positive, and each tokenName must exist in the Ledger module (notice that the BTC token is expressed in milli-satoshis).

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

type OutboundTransactionStartContent = {
    tokens: Record<string, bigint>,
    memo?: string,
};

Emitters

This event is emitted by:

  • The URLx module, when paying an invoice.

Targets

This event is targeted towards:

  • The Ledger module.

Listeners

This event is listened for by:

  • The Ledger module.
  • Any other agent listening for this event will learn about the cash flow of the URLx module.