Skip to content

Go client libray for interacting with the Alchemy API to access blockchain data ans services

Notifications You must be signed in to change notification settings

Teyz/go-alchemy-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go-Alchemy-SDK

Go Reference License: MIT Release Tests Passing

go-alchemy-sdk is a Go client library for interacting with the Alchemy API to access blockchain data and services. This library aims to provide a simple and efficient interface for developers building on top of Solana and other blockchains supported by Alchemy.

Features

  • Solana Support: Access Solana blockchain data with ease.
  • Customizable: Configure client options, including API keys and rate limits.
  • Well-Documented: Comprehensive documentation and examples.
  • Efficient: Optimized for performance and minimal overhead.

Installation

go get -u github.com/teyz/go-alchemy-sdk

Quick Start

Here’s an example to get started with the go-alchemy-sdk:

package main

import (
	"fmt"
	"log"

	alchemy "github.com/teyz/go-alchemy-sdk"
)

func main() {
	// Create a new client with your Alchemy API key
	client, err := alchemy.NewClient("your-alchemy-api-key")
	if err != nil {
		log.Fatalf("Failed to create client: %v", err)
	}

	// Example: Get the balance
	balance, err := client.GetBalance("your-solana-address")
	if err != nil {
		log.Fatalf("Failed to get balance: %v", err)
	}

	fmt.Printf("Balance: %v\n", balance)
}

Documentation

Full API documentation is available at pkg.go.dev.

Available Methods

  • GetBlock: Retrieves block.
  • GetTransaction: Fetches transaction details by hash.
  • GetBalance: Gets the balance of an Solana address.
  • And more!

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests for any improvements or additional features.

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

  • Thanks to Alchemy for providing an excellent API for blockchain developers.
  • Inspired by libraries like solana-go.

Made with ❤️ by Bastien "Teyz" Rigaud.

About

Go client libray for interacting with the Alchemy API to access blockchain data ans services

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages