UTXO Model for Satoshi Showdown. This model defines the structure and constraints for UTXOs on the platform.
- Source:
Requires
- module:mongoose
Type Definitions
UTXOSchema
UTXO Schema definition for Satoshi Showdown. Represents Unspent Transaction Output (UTXO) data, crucial for tracking and managing cryptocurrency transactions. Includes references to users, events, and wallets, along with key transactional data like address, amount, and blockchain information.
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
userRef |
mongoose.Schema.Types.ObjectId | Reference to the User model, linking the UTXO to a specific user. |
eventRef |
mongoose.Schema.Types.ObjectId | Reference to the Event model, associating the UTXO with a particular event. |
address |
string | Address owning the UTXO. |
amount |
number | Amount of cryptocurrency (in satoshis) represented by this UTXO. |
transactionHash |
string | Hash of the transaction where this UTXO originated. |
outputIndex |
number | Output index in the transaction (vout). |
scriptPubKey |
string | ScriptPubKey for the output, defining how the UTXO can be spent. |
scriptType |
string | Type of script, e.g., 'pay-to-pubkey-hash'. |
blockHeight |
number | Block height at which this UTXO was mined (optional). |
timestamp |
Date | Timestamp of when the transaction was confirmed. |
spent |
boolean | Indicates if the UTXO has been spent. |
spendingTxHash |
string | Transaction hash that spent this UTXO (if spent). |
refund |
boolean | Marks the UTXO as part of a refund (optional). |
refundTxHash |
string | Reference to the transaction that refunded this UTXO (if applicable). |
keyPath |
string | HD wallet key path for this UTXO (optional). |
- Source: