Documentation ¶
Index ¶
- type Block
- type CovenantAction
- type DBTX
- type GetAddressInfoRow
- type GetBlockByHashRow
- type GetBlockByHeightRow
- type GetBlocksParams
- type GetBlocksRow
- type GetLastNameBlockHeightByActionAndHashParams
- type GetMempoolTransactionsParams
- type GetNameBidsByHashParams
- type GetNameBidsByHashRow
- type GetNameCountsByHashRow
- type GetNameOtherActionsByHashParams
- type GetNameOtherActionsByHashRow
- type GetNameRecordsByHashParams
- type GetNameRecordsByHashRow
- type GetReservedNameRow
- type GetTransactionByTxidRow
- type GetTransactionsByBlockHeightParams
- type GetTransactionsByBlockHeightRow
- type GetTxOutputsByAddressParams
- type GetTxOutputsByAddressRow
- type GetTxOutputsByTxidRow
- type InsertBlockParams
- type InsertTransactionParams
- type InsertTxInputParams
- type InsertTxOutputParams
- type Queries
- func (q *Queries) AddressExists(ctx context.Context, address string) (bool, error)
- func (q *Queries) DeleteBlocksAfterHeight(ctx context.Context, height int32) error
- func (q *Queries) DeleteMempool(ctx context.Context) error
- func (q *Queries) GetAddressInfo(ctx context.Context, address string) (GetAddressInfoRow, error)
- func (q *Queries) GetBlockByHash(ctx context.Context, hash types.Bytes) (GetBlockByHashRow, error)
- func (q *Queries) GetBlockByHeight(ctx context.Context, height int32) (GetBlockByHeightRow, error)
- func (q *Queries) GetBlockHashByHeight(ctx context.Context, height int32) (types.Bytes, error)
- func (q *Queries) GetBlocks(ctx context.Context, arg GetBlocksParams) ([]GetBlocksRow, error)
- func (q *Queries) GetBlocksMaxHeight(ctx context.Context) (int32, error)
- func (q *Queries) GetLastNameBlockHeightByActionAndHash(ctx context.Context, arg GetLastNameBlockHeightByActionAndHashParams) (int32, error)
- func (q *Queries) GetMempoolTransactions(ctx context.Context, arg GetMempoolTransactionsParams) ([]Transaction, error)
- func (q *Queries) GetNameBidsByHash(ctx context.Context, arg GetNameBidsByHashParams) ([]GetNameBidsByHashRow, error)
- func (q *Queries) GetNameCountsByHash(ctx context.Context, nameHash types.Bytes) (GetNameCountsByHashRow, error)
- func (q *Queries) GetNameOtherActionsByHash(ctx context.Context, arg GetNameOtherActionsByHashParams) ([]GetNameOtherActionsByHashRow, error)
- func (q *Queries) GetNameRecordsByHash(ctx context.Context, arg GetNameRecordsByHashParams) ([]GetNameRecordsByHashRow, error)
- func (q *Queries) GetReservedName(ctx context.Context, name string) (GetReservedNameRow, error)
- func (q *Queries) GetTransactionByTxid(ctx context.Context, txid types.Bytes) (GetTransactionByTxidRow, error)
- func (q *Queries) GetTransactionsByBlockHeight(ctx context.Context, arg GetTransactionsByBlockHeightParams) ([]GetTransactionsByBlockHeightRow, error)
- func (q *Queries) GetTxInputsByTxid(ctx context.Context, txid types.Bytes) ([]TxInput, error)
- func (q *Queries) GetTxOutputsByAddress(ctx context.Context, arg GetTxOutputsByAddressParams) ([]GetTxOutputsByAddressRow, error)
- func (q *Queries) GetTxOutputsByTxid(ctx context.Context, txid types.Bytes) ([]GetTxOutputsByTxidRow, error)
- func (q *Queries) InsertBlock(ctx context.Context, arg InsertBlockParams) error
- func (q *Queries) InsertTransaction(ctx context.Context, arg InsertTransactionParams) error
- func (q *Queries) InsertTxInput(ctx context.Context, arg InsertTxInputParams) error
- func (q *Queries) InsertTxOutput(ctx context.Context, arg InsertTxOutputParams) error
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type ReservedName
- type Transaction
- type TxInput
- type TxOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct { Hash types.Bytes Height int32 Weight int32 Size int64 Version int32 HashMerkleRoot types.Bytes WitnessRoot types.Bytes TreeRoot types.Bytes ReservedRoot types.Bytes Mask types.Bytes Time int32 Bits types.Bytes Difficulty float64 Chainwork types.Bytes Nonce int64 ExtraNonce types.Bytes Orphan bool }
type CovenantAction ¶
type CovenantAction string
const ( CovenantActionNONE CovenantAction = "NONE" CovenantActionCLAIM CovenantAction = "CLAIM" CovenantActionOPEN CovenantAction = "OPEN" CovenantActionBID CovenantAction = "BID" CovenantActionREVEAL CovenantAction = "REVEAL" CovenantActionREDEEM CovenantAction = "REDEEM" CovenantActionREGISTER CovenantAction = "REGISTER" CovenantActionUPDATE CovenantAction = "UPDATE" CovenantActionRENEW CovenantAction = "RENEW" CovenantActionTRANSFER CovenantAction = "TRANSFER" CovenantActionFINALIZE CovenantAction = "FINALIZE" CovenantActionREVOKE CovenantAction = "REVOKE" )
func (*CovenantAction) Scan ¶
func (e *CovenantAction) Scan(src interface{}) error
type GetAddressInfoRow ¶
type GetBlockByHashRow ¶
type GetBlockByHashRow struct { Hash types.Bytes Height int32 Weight int32 Size int64 Version int32 HashMerkleRoot types.Bytes WitnessRoot types.Bytes TreeRoot types.Bytes ReservedRoot types.Bytes Mask types.Bytes Time int32 Bits types.Bytes Difficulty float64 Chainwork types.Bytes Nonce int64 ExtraNonce types.Bytes Orphan bool TxsCount int32 }
type GetBlockByHeightRow ¶
type GetBlockByHeightRow struct { Hash types.Bytes Height int32 Weight int32 Size int64 Version int32 HashMerkleRoot types.Bytes WitnessRoot types.Bytes TreeRoot types.Bytes ReservedRoot types.Bytes Mask types.Bytes Time int32 Bits types.Bytes Difficulty float64 Chainwork types.Bytes Nonce int64 ExtraNonce types.Bytes Orphan bool TxsCount int32 }
type GetBlocksParams ¶
type GetBlocksRow ¶
type GetBlocksRow struct { Hash types.Bytes Height int32 Weight int32 Size int64 Version int32 HashMerkleRoot types.Bytes WitnessRoot types.Bytes TreeRoot types.Bytes ReservedRoot types.Bytes Mask types.Bytes Time int32 Bits types.Bytes Difficulty float64 Chainwork types.Bytes Nonce int64 ExtraNonce types.Bytes Orphan bool TxsCount int32 }
type GetLastNameBlockHeightByActionAndHashParams ¶
type GetLastNameBlockHeightByActionAndHashParams struct { CovenantAction CovenantAction CovenantNameHash *types.Bytes }
type GetNameBidsByHashParams ¶
type GetNameBidsByHashRow ¶
type GetNameBidsByHashRow struct { BidTxid types.Bytes BlockHeightNotNull int32 RevealTxid types.Bytes RevealHeightNotNull int32 RevealIndexNotNull int32 LockupValue int64 RevealValueNotNull int64 }
func (*GetNameBidsByHashRow) BlockHeight ¶
func (row *GetNameBidsByHashRow) BlockHeight() *int32
func (*GetNameBidsByHashRow) Index ¶
func (row *GetNameBidsByHashRow) Index() *int32
func (*GetNameBidsByHashRow) RevealHeight ¶
func (row *GetNameBidsByHashRow) RevealHeight() *int32
func (*GetNameBidsByHashRow) RevealIndex ¶
func (row *GetNameBidsByHashRow) RevealIndex() *int32
func (*GetNameBidsByHashRow) RevealValue ¶
func (row *GetNameBidsByHashRow) RevealValue() *int64
type GetNameCountsByHashRow ¶
type GetNameOtherActionsByHashRow ¶
type GetNameOtherActionsByHashRow struct { Txid types.Bytes BlockHeightNotNull int32 CovenantAction CovenantAction }
func (*GetNameOtherActionsByHashRow) BlockHeight ¶
func (row *GetNameOtherActionsByHashRow) BlockHeight() *int32
type GetNameRecordsByHashRow ¶
func (*GetNameRecordsByHashRow) BlockHeight ¶
func (row *GetNameRecordsByHashRow) BlockHeight() *int32
type GetReservedNameRow ¶
type GetTransactionByTxidRow ¶
type GetTransactionByTxidRow struct { Txid types.Bytes WitnessTx types.Bytes Fee int64 Rate int64 BlockHash *types.Bytes Index sql.NullInt32 Version int32 Locktime int32 Size int64 BlockHeightNotNull int32 }
func (*GetTransactionByTxidRow) BlockHeight ¶
func (row *GetTransactionByTxidRow) BlockHeight() *int32
type GetTransactionsByBlockHeightRow ¶
type GetTransactionsByBlockHeightRow struct { Txid types.Bytes WitnessTx types.Bytes Fee int64 Rate int64 BlockHash *types.Bytes Index sql.NullInt32 Version int32 Locktime int32 Size int64 BlockHeightNotNull int32 }
func (*GetTransactionsByBlockHeightRow) BlockHeight ¶
func (row *GetTransactionsByBlockHeightRow) BlockHeight() *int32
type GetTxOutputsByAddressRow ¶
type GetTxOutputsByAddressRow struct { Txid types.Bytes Index int32 Value int64 Address string CovenantAction CovenantAction CovenantNameHash *types.Bytes CovenantHeight *types.Bytes CovenantName *types.Bytes CovenantBidHash *types.Bytes CovenantNonce *types.Bytes CovenantRecordData *types.Bytes CovenantBlockHash *types.Bytes CovenantVersion *types.Bytes CovenantAddress *types.Bytes CovenantClaimHeight *types.Bytes CovenantRenewalCount *types.Bytes HashPrevoutNotNull types.Bytes IndexPrevoutNotNull int64 SpendHeightNotNull int32 HeightNotNull int32 Name string }
func (*GetTxOutputsByAddressRow) HashPrevout ¶
func (row *GetTxOutputsByAddressRow) HashPrevout() *types.Bytes
func (*GetTxOutputsByAddressRow) Height ¶
func (row *GetTxOutputsByAddressRow) Height() *int32
func (*GetTxOutputsByAddressRow) IndexPrevout ¶
func (row *GetTxOutputsByAddressRow) IndexPrevout() *int64
func (*GetTxOutputsByAddressRow) SpendHeight ¶
func (row *GetTxOutputsByAddressRow) SpendHeight() *int32
type GetTxOutputsByTxidRow ¶
type GetTxOutputsByTxidRow struct { Txid types.Bytes Index int32 Value int64 Address string CovenantAction CovenantAction CovenantNameHash *types.Bytes CovenantHeight *types.Bytes CovenantName *types.Bytes CovenantBidHash *types.Bytes CovenantNonce *types.Bytes CovenantRecordData *types.Bytes CovenantBlockHash *types.Bytes CovenantVersion *types.Bytes CovenantAddress *types.Bytes CovenantClaimHeight *types.Bytes CovenantRenewalCount *types.Bytes Name string }
type InsertBlockParams ¶
type InsertBlockParams struct { Hash types.Bytes Height int32 Weight int32 Size int64 Version int32 HashMerkleRoot types.Bytes WitnessRoot types.Bytes TreeRoot types.Bytes ReservedRoot types.Bytes Mask types.Bytes Time int32 Bits types.Bytes Difficulty float64 Chainwork types.Bytes Nonce int64 ExtraNonce types.Bytes }
type InsertTransactionParams ¶
type InsertTxInputParams ¶
type InsertTxOutputParams ¶
type InsertTxOutputParams struct { Txid types.Bytes Index int32 Value int64 Address string CovenantAction CovenantAction CovenantNameHash *types.Bytes CovenantHeight *types.Bytes CovenantName *types.Bytes CovenantBidHash *types.Bytes CovenantNonce *types.Bytes CovenantRecordData *types.Bytes CovenantBlockHash *types.Bytes CovenantVersion *types.Bytes CovenantAddress *types.Bytes CovenantClaimHeight *types.Bytes CovenantRenewalCount *types.Bytes }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AddressExists ¶
func (*Queries) DeleteBlocksAfterHeight ¶
func (*Queries) GetAddressInfo ¶
This query takes a lot of time, perhaps can be optimized further
func (*Queries) GetBlockByHash ¶
func (*Queries) GetBlockByHeight ¶
func (*Queries) GetBlockHashByHeight ¶
func (*Queries) GetBlocks ¶
func (q *Queries) GetBlocks(ctx context.Context, arg GetBlocksParams) ([]GetBlocksRow, error)
func (*Queries) GetBlocksMaxHeight ¶
func (*Queries) GetLastNameBlockHeightByActionAndHash ¶
func (*Queries) GetMempoolTransactions ¶
func (q *Queries) GetMempoolTransactions(ctx context.Context, arg GetMempoolTransactionsParams) ([]Transaction, error)
func (*Queries) GetNameBidsByHash ¶
func (q *Queries) GetNameBidsByHash(ctx context.Context, arg GetNameBidsByHashParams) ([]GetNameBidsByHashRow, error)
func (*Queries) GetNameCountsByHash ¶
func (*Queries) GetNameOtherActionsByHash ¶
func (q *Queries) GetNameOtherActionsByHash(ctx context.Context, arg GetNameOtherActionsByHashParams) ([]GetNameOtherActionsByHashRow, error)
func (*Queries) GetNameRecordsByHash ¶
func (q *Queries) GetNameRecordsByHash(ctx context.Context, arg GetNameRecordsByHashParams) ([]GetNameRecordsByHashRow, error)
func (*Queries) GetReservedName ¶
func (*Queries) GetTransactionByTxid ¶
func (*Queries) GetTransactionsByBlockHeight ¶
func (q *Queries) GetTransactionsByBlockHeight(ctx context.Context, arg GetTransactionsByBlockHeightParams) ([]GetTransactionsByBlockHeightRow, error)
func (*Queries) GetTxInputsByTxid ¶
func (*Queries) GetTxOutputsByAddress ¶
func (q *Queries) GetTxOutputsByAddress(ctx context.Context, arg GetTxOutputsByAddressParams) ([]GetTxOutputsByAddressRow, error)
This query can be optimized to be very quick by removing join for the name, however as it's still quicker than the GetAddressInfo I've left the name for the sake of simplicity
func (*Queries) GetTxOutputsByTxid ¶
func (*Queries) InsertBlock ¶
func (q *Queries) InsertBlock(ctx context.Context, arg InsertBlockParams) error
func (*Queries) InsertTransaction ¶
func (q *Queries) InsertTransaction(ctx context.Context, arg InsertTransactionParams) error
func (*Queries) InsertTxInput ¶
func (q *Queries) InsertTxInput(ctx context.Context, arg InsertTxInputParams) error
func (*Queries) InsertTxOutput ¶
func (q *Queries) InsertTxOutput(ctx context.Context, arg InsertTxOutputParams) error
type ReservedName ¶
type Transaction ¶
type TxOutput ¶
type TxOutput struct { Txid types.Bytes Index int32 Value int64 Address string CovenantAction CovenantAction CovenantNameHash *types.Bytes CovenantHeight *types.Bytes CovenantName *types.Bytes CovenantBidHash *types.Bytes CovenantNonce *types.Bytes CovenantRecordData *types.Bytes CovenantBlockHash *types.Bytes CovenantVersion *types.Bytes CovenantAddress *types.Bytes CovenantClaimHeight *types.Bytes CovenantRenewalCount *types.Bytes }
Click to show internal directories.
Click to hide internal directories.