Skip to content

SundaeSwap-finance/kugo

Repository files navigation

Kugo

Licence

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.

QuickStart

Getting started

$ 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)
}

How to use

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.

Contributing

Want to contribute? See CONTRIBUTING.md to know how.

About

A go client library for Kupo

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages