Inbound Transaction Start
This event is used to "mint" new tokens from the outside world into the Ledger module's attention.
Event Signature
An Inbound Transaction Start event has the following form:
{
"id": "{eventId}",
"pubkey": "{minterPubkey}",
"created_at": timestamp,
"kind": 1112,
"tags": [
["p", "{ledgerPubkey}"],
["p", "{minterPubkey}"],
["t", "inbound-transaction-start"],
...,
],
"content": "{inboundTransactionContent}",
"sig": "{signature}"
}
Note:
- the
.pubkey
is the URLx module's pubkey (ie. the minter), - the
.kind
field is1112
(ie. a regular event), - the first
"p"
tag points to the Ledger module's pubkey, - the second
"p"
tag points to the URLx module's pubkey, - the
"t"
tag sub-kind isinbound-transaction-start
.
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 InboundTransactionStartContent = {
tokens: Record<string, bigint>,
memo?: string,
};
Emitters
This event is emitted by:
- The URLx module, when an invoice is paid to its name.
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.