Skip to content

GatewayLabs/gateway-go-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gateway Javascript SDK

report-card Join Discord Run Eslint & Test cases Coverage Status

Introduction

A GO SDK for the Gateway API. We are still developing and testing go sdk. Right now the go sdk is in beta stage and code might change in future.

Features

  • Full type information for methods and responses.
  • Bearer Token Support
  • Supports Go 1.22.8+.

Installation

Using Go Get

go get github.com/Gateway-DAO/gateway-go-sdk/client@v0.0.12-beta

Gateway Client

To setup the gateway client we will authenticate with a bearer-token,or use wallet private key as follows

The wallet private key is not send anywhere and is just used to sign messages on behalf of developer using it to aviod to manage jwt token himself. This way we minimize jwt expiration errors on API and provide smoother developer experience

If you are using bearer token make sure you add token without Bearer as we add Bearer automatically when you make request. Else it will give you Unauthorized error even if your token is correct For example

This library supports Bearer Token along. Do not share your authentication token with people you don’t trust. This gives the user control over your account and they will be able to manage Data Assets (and more) with it. Use environment variables to keep it safe.

Examples

Make sure to add try catch blocks around methods to catch all the validation and API based errors.

More examples

We have created a separate repository which have more examples you can access it here

Error Handling

Incase of any API errors we will throw a custom message which is a string which has all neccessary info regarding error. Make sure to use try catch blocks to handle those.

License

The Gateway GO SDK is licensed under the MIT License.

Contributing

If you want to support the active development of the SDK. Please go through our Contribution guide

Code of Conduct

Please read our Code of Conduct before contributing or engaging in discussions.

Security

If you discover a security vulnerability within this package, please open a ticket on Discord. All security vulnerabilities will be promptly addressed.

Support

We are always here to help you. Please talk to us on Discord for any queries.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages