Documentation
¶
Index ¶
- func ApplyGetTxHistoryOptions(opts ...GetTxHistoryOption) (*getTxHistoryOption, error)
- func ApplyGetVtxosOptions(opts ...GetVtxosOption) (*getVtxosOption, error)
- func ApplyPageOptions(opts ...PageOption) (*pageOption, error)
- type AssetInfo
- type Batch
- type ChainWithExpiry
- type CommitmentTx
- type ConnectorsResponse
- type ForfeitTxsResponse
- type GetTxHistoryOption
- type GetVtxosOption
- func WithOutpoints(outpoints []types.Outpoint) GetVtxosOption
- func WithPendingOnly() GetVtxosOption
- func WithRecoverableOnly() GetVtxosOption
- func WithScripts(scripts []string) GetVtxosOption
- func WithSpendableOnly() GetVtxosOption
- func WithSpentOnly() GetVtxosOption
- func WithTimeRange(before, after int64) GetVtxosOption
- func WithVtxosPage(page *PageRequest) GetVtxosOption
- type Indexer
- type IndexerChainedTxType
- type PageOption
- type PageRequest
- type PageResponse
- type ScriptEvent
- type ScriptEventData
- type TxData
- type TxHistoryResponse
- type TxNode
- type TxNodes
- type VirtualTxsResponse
- type VtxoChainResponse
- type VtxoTreeLeavesResponse
- type VtxoTreeResponse
- type VtxosResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyGetTxHistoryOptions ¶
func ApplyGetTxHistoryOptions(opts ...GetTxHistoryOption) (*getTxHistoryOption, error)
func ApplyGetVtxosOptions ¶
func ApplyGetVtxosOptions(opts ...GetVtxosOption) (*getVtxosOption, error)
func ApplyPageOptions ¶
func ApplyPageOptions(opts ...PageOption) (*pageOption, error)
Types ¶
type ChainWithExpiry ¶
type ChainWithExpiry struct {
Txid string
ExpiresAt int64
Type IndexerChainedTxType
Spends []string
}
type CommitmentTx ¶
type ConnectorsResponse ¶
type ConnectorsResponse struct {
Tree []TxNode
Page *PageResponse
}
type ForfeitTxsResponse ¶
type ForfeitTxsResponse struct {
Txids []string
Page *PageResponse
}
type GetTxHistoryOption ¶
type GetTxHistoryOption func(*getTxHistoryOption) error
GetTxHistoryOption is a functional option for GetTxHistory requests.
func WithEndTime ¶
func WithEndTime(endTime time.Time) GetTxHistoryOption
func WithStartTime ¶
func WithStartTime(startTime time.Time) GetTxHistoryOption
type GetVtxosOption ¶
type GetVtxosOption func(*getVtxosOption) error
GetVtxosOption is a functional option for GetVtxos requests.
func WithOutpoints ¶
func WithOutpoints(outpoints []types.Outpoint) GetVtxosOption
func WithPendingOnly ¶
func WithPendingOnly() GetVtxosOption
func WithRecoverableOnly ¶
func WithRecoverableOnly() GetVtxosOption
func WithScripts ¶
func WithScripts(scripts []string) GetVtxosOption
func WithSpendableOnly ¶
func WithSpendableOnly() GetVtxosOption
func WithSpentOnly ¶
func WithSpentOnly() GetVtxosOption
func WithTimeRange ¶
func WithTimeRange(before, after int64) GetVtxosOption
func WithVtxosPage ¶
func WithVtxosPage(page *PageRequest) GetVtxosOption
type Indexer ¶
type Indexer interface {
GetCommitmentTx(ctx context.Context, txid string) (*CommitmentTx, error)
GetVtxoTree(
ctx context.Context, batchOutpoint types.Outpoint, opts ...PageOption,
) (*VtxoTreeResponse, error)
GetFullVtxoTree(
ctx context.Context, batchOutpoint types.Outpoint, opts ...PageOption,
) ([]tree.TxTreeNode, error)
GetVtxoTreeLeaves(
ctx context.Context, batchOutpoint types.Outpoint, opts ...PageOption,
) (*VtxoTreeLeavesResponse, error)
GetForfeitTxs(
ctx context.Context, txid string, opts ...PageOption,
) (*ForfeitTxsResponse, error)
GetConnectors(
ctx context.Context, txid string, opts ...PageOption,
) (*ConnectorsResponse, error)
GetVtxos(ctx context.Context, opts ...GetVtxosOption) (*VtxosResponse, error)
GetVtxoChain(
ctx context.Context, outpoint types.Outpoint, opts ...PageOption,
) (*VtxoChainResponse, error)
GetVirtualTxs(
ctx context.Context, txids []string, opts ...PageOption,
) (*VirtualTxsResponse, error)
GetBatchSweepTxs(ctx context.Context, batchOutpoint types.Outpoint) ([]string, error)
NewSubscription(
ctx context.Context, scripts []string,
) (string, <-chan ScriptEvent, func(), error)
UpdateSubscription(
ctx context.Context, subscriptionId string, scriptsToAdd, scriptsToRemove []string,
) error
GetAsset(ctx context.Context, assetID string) (*AssetInfo, error)
Close()
}
type IndexerChainedTxType ¶
type IndexerChainedTxType string
const ( IndexerChainedTxTypeUnspecified IndexerChainedTxType = "unspecified" IndexerChainedTxTypeCommitment IndexerChainedTxType = "commitment" IndexerChainedTxTypeArk IndexerChainedTxType = "ark" IndexerChainedTxTypeTree IndexerChainedTxType = "tree" IndexerChainedTxTypeCheckpoint IndexerChainedTxType = "checkpoint" )
type PageOption ¶
type PageOption func(*pageOption) error
PageOption is a functional option for paginated requests.
func WithPage ¶
func WithPage(page *PageRequest) PageOption
type PageRequest ¶
type PageResponse ¶
type ScriptEvent ¶
type ScriptEvent struct {
Data *ScriptEventData
Connection *types.StreamConnectionEvent
Err error
}
type ScriptEventData ¶
type TxHistoryResponse ¶
type TxHistoryResponse struct {
History []types.Transaction
Page *PageResponse
}
type VirtualTxsResponse ¶
type VirtualTxsResponse struct {
Txs []string
Page *PageResponse
}
type VtxoChainResponse ¶
type VtxoChainResponse struct {
Chain []ChainWithExpiry
Page *PageResponse
}
type VtxoTreeLeavesResponse ¶
type VtxoTreeLeavesResponse struct {
Leaves []types.Outpoint
Page *PageResponse
}
type VtxoTreeResponse ¶
type VtxoTreeResponse struct {
Tree []TxNode
Page *PageResponse
}
type VtxosResponse ¶
type VtxosResponse struct {
Vtxos []types.Vtxo
Page *PageResponse
}
Click to show internal directories.
Click to hide internal directories.