Kugo is a golang client library for interacting with Kupo, a chain-indexer for Cardano.
⚠️ This is a pre-release package: until we release v1.0.0, the interface may change as we identify the optimal usage patterns.
$ go get github.com/SundaeSwap-finance/kugo
ctx := context.Background()
k := kugo.New(WithEndpoint("http://localhost:1442"))
matches, err := k.Matches(ctx,
OnlyUnspent(),
Address("addr1vyc29pvl2uyzqt8nwxrcxnf558ffm27u3d9calxn8tdudjgz4xq9p"),
)
if err != nil {
return fmt.Errorf("failed to fetch matches: %w", err)
}
We don't yet have our own documentation set up, but the code is fairly simple to follow.
We currently support three methods:
.Matches(...)
: query UTXOs that match various supported criteria.Patterns(...)
: query what patterns are currently being indexed by Kupo.Checkpoints(...)
: query "checkpoints" (block/slot combinations) that kupo is aware of
For more information, please refer to the Kupo documentation.
Want to contribute? See CONTRIBUTING.md to know how.