Txbox.Transactions.Tx (Txbox v0.3.3) View Source
Transaction schema module.
Txbox adds a single table to your database containing all of the transaction, channel and meta data.
For any transaction, the only required attribute is the txid. If no channel
is specified, the transaction will be added to the Txbox.default_channel/0.
Optionally any of the following attributes can be set:
:rawtx- The raw transaction data. Must be given as a rawbinary/0, not a hex encoded string.:tags- A list of tags which can be used for organising and filtering transactions.:meta- A map containing structured metadata about the transaction. SeeTxbox.Transactions.Meta.t/0.:data- A map containing any other arbitarry fields.
When searching Txbox, the data from :tags and :meta are incorporated into
full text search.
Txbox automatically syncs the transaction with your configured miner, and
updates the :status attribute with a cached response from the miner's Merchant
API. See t:Txbox.Transactions.Status.t/0.
Link to this section Summary
Link to this section Types
Specs
t() :: %Txbox.Transactions.Tx{
__meta__: term(),
block_height: integer(),
channel: String.t(),
data: map(),
guid: binary(),
inserted_at: DateTime.t(),
mapi_responses: term(),
meta: Txbox.Transactions.Meta.t(),
rawtx: binary(),
state: String.t(),
status: term(),
tags: [String.t()],
txid: String.t(),
updated_at: DateTime.t()
}
Transaction schema