Skip to main content
Version: v1.7.0

Go SDK

GitHub

Getting Started

Prerequisites

Installation

Go Reference

go get -u github.com/maestro-org/go-sdk@main

Usage

import "github.com/maestro-org/go-sdk/client"

maestroClient := client.NewClient("<PROJECT_API_KEY>", "<NETWORK>")
  • To generate an API key, create a free account here!
  • Network options: preview, preprod, mainnet, sanchonet

Example

package main

import (
"fmt"

"github.com/maestro-org/go-sdk/client"
)

func main() {
maestroClient := client.NewClient("<PROJECT_API_KEY>", "mainnet")
blockInfo, err := maestroClient.BlockInfo(9005859)
if err != nil {
fmt.Printf("Failed to retrieve block info: %s\n", err)
}
fmt.Println(blockInfo.Data.AbsoluteSlot)
}

Documentation