From 26a7479295233a5bf7508486464cca2c912a031f Mon Sep 17 00:00:00 2001 From: Peter Kieltyka Date: Tue, 23 Jan 2024 17:02:48 -0500 Subject: [PATCH] update --- api/api.go | 2 ++ indexer/indexer.go | 6 ++++-- metadata/metadata.go | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/api/api.go b/api/api.go index 4cbf179d..f4ae3f90 100644 --- a/api/api.go +++ b/api/api.go @@ -11,6 +11,8 @@ type Options struct { APIServiceURL string } +// NewAPI creates a new Sequence API client instance. Please see https://sequence.build to +// get a `projectAccessKey`. func NewAPI(projectAccessKey string, options ...Options) API { opts := Options{} if len(options) > 0 { diff --git a/indexer/indexer.go b/indexer/indexer.go index 95da63ae..ae3f3a82 100644 --- a/indexer/indexer.go +++ b/indexer/indexer.go @@ -10,7 +10,9 @@ type Options struct { JWTAuthToken string } -func NewIndexer(indexerServiceURL string, projectAccessKey string, options ...Options) Indexer { +// NewIndexer creates a new Sequence Indexer client instance. See https://docs.sequence.xyz for a list of +// indexer urls, and please see https://sequence.build to get a `projectAccessKey`. +func NewIndexer(indexerURL string, projectAccessKey string, options ...Options) Indexer { opts := Options{} if len(options) > 0 { opts = options[0] @@ -27,7 +29,7 @@ func NewIndexer(indexerServiceURL string, projectAccessKey string, options ...Op client.jwtAuthHeader = fmt.Sprintf("BEARER %s", opts.JWTAuthToken) } - return NewIndexerClient(indexerServiceURL, client) + return NewIndexerClient(indexerURL, client) } type httpclient struct { diff --git a/metadata/metadata.go b/metadata/metadata.go index a1a76630..10745371 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -11,6 +11,8 @@ type Options struct { MetadataServiceURL string } +// NewMetadata creates a new Sequence Metadata client instance. Please see +// https://sequence.build to get a `projectAccessKey`. func NewMetadata(projectAccessKey string, options ...Options) Metadata { opts := Options{} if len(options) > 0 {