Documentation
¶
Index ¶
- type CheckpointsFilter
- type Client
- func (c *Client) Checkpoints(ctx context.Context, filters ...CheckpointsFilter) (points []Point, err error)
- func (c *Client) Datum(ctx context.Context, datumHash string) (datum string, err error)
- func (c *Client) Matches(ctx context.Context, filters ...MatchesFilter) (matches []Match, err error)
- func (c *Client) Metadata(ctx context.Context, slotNo int, txId string) (metadatum []Metadatum, err error)
- func (c *Client) Patterns(ctx context.Context) (matches []string, err error)
- func (c *Client) Script(ctx context.Context, scriptHash string) (script *Script, err error)
- type CompatibleValue
- type Match
- type MatchesFilter
- func Address(address string) MatchesFilter
- func All() MatchesFilter
- func AssetID(assetID shared.AssetID) MatchesFilter
- func CreatedAfter(slot uint64) MatchesFilter
- func CreatedBefore(slot uint64) MatchesFilter
- func OnlySpent() MatchesFilter
- func OnlyUnspent() MatchesFilter
- func Overlapping(slot uint64) MatchesFilter
- func Pattern(pattern string) MatchesFilter
- func PolicyID(policyId string) MatchesFilter
- func SpentAfter(slot uint64) MatchesFilter
- func SpentBefore(slot uint64) MatchesFilter
- func Transaction(txHash string) MatchesFilter
- func TxOut(txOutId chainsync.TxID) MatchesFilter
- type Metadatum
- type Option
- type Options
- type Point
- type Script
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckpointsFilter ¶
type CheckpointsFilter struct {
// contains filtered or unexported fields
}
func BySlot ¶
func BySlot(slot uint64) CheckpointsFilter
func Latest ¶
func Latest() CheckpointsFilter
func Recent ¶
func Recent() CheckpointsFilter
Return a recent sampling of kupo checkpoints NOTE: equivalent to providing no filters, but useful for documenting your purpose
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Checkpoints ¶
type CompatibleValue ¶ added in v1.1.0
func (*CompatibleValue) UnmarshalJSON ¶ added in v1.1.0
func (c *CompatibleValue) UnmarshalJSON(data []byte) error
type Match ¶
type Match struct { TransactionIndex int `json:"transaction_index,omitempty"` TransactionID string `json:"transaction_id,omitempty"` OutputIndex int `json:"output_index,omitempty"` Address string `json:"address,omitempty"` DatumHash string `json:"datum_hash,omitempty"` DatumType string `json:"datum_type,omitempty"` Value CompatibleValue `json:"value,omitempty"` CreatedAt Point `json:"created_at,omitempty"` SpentAt Point `json:"spent_at,omitempty"` }
type MatchesFilter ¶
type MatchesFilter func(*matchesOptions)
func Address ¶
func Address(address string) MatchesFilter
func All ¶
func All() MatchesFilter
func AssetID ¶
func AssetID(assetID shared.AssetID) MatchesFilter
func CreatedAfter ¶
func CreatedAfter(slot uint64) MatchesFilter
func CreatedBefore ¶
func CreatedBefore(slot uint64) MatchesFilter
func OnlySpent ¶
func OnlySpent() MatchesFilter
func OnlyUnspent ¶
func OnlyUnspent() MatchesFilter
func Overlapping ¶
func Overlapping(slot uint64) MatchesFilter
func Pattern ¶
func Pattern(pattern string) MatchesFilter
func PolicyID ¶
func PolicyID(policyId string) MatchesFilter
func SpentAfter ¶
func SpentAfter(slot uint64) MatchesFilter
func SpentBefore ¶
func SpentBefore(slot uint64) MatchesFilter
func Transaction ¶ added in v0.1.1
func Transaction(txHash string) MatchesFilter
func TxOut ¶ added in v0.1.1
func TxOut(txOutId chainsync.TxID) MatchesFilter
NOTE(pi): chainsync.TxID is named poorly, and we plan to rename it at some point
type Metadatum ¶ added in v0.1.3
type Metadatum struct { Hash string Raw string Schema json.RawMessage }
type Option ¶
type Option func(*Options)
Option to kugo client
func WithEndpoint ¶
WithEndpoint allows kupo endpoint to be set; defaults to http://127.0.0.1:1442
func WithLogger ¶
WithLogger allows custom logger to be specified
func WithTimeout ¶ added in v1.1.0
Set a specific timeout for all requests
func WithoutTimeout ¶ added in v1.1.0
func WithoutTimeout() Option
Keep the http connection open as long as possible
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
Options available to kugo client
Source Files
¶
Click to show internal directories.
Click to hide internal directories.