OST Platform SDK for Go
OST is a complete technology solution enabling mainstream businesses to easily launch blockchain-based economies without requiring blockchain development.
At the core of OST is the concept of OST-powered Brand Tokens (BTs). BTs are white-label cryptocurrency tokens with utility representations running on highly-scalable Ethereum-based side blockchains, backed by OST tokens staked on Ethereum mainnet. Within a business’s token economy, BTs can only be transferred to whitelisted user addresses. This ensures that they stay within the token economy.
The OST technology stack is designed to give businesses everything they need to integrate, test, and deploy BTs. Within the OST suite of products, developers can use OST Platform to create, test, and launch Brand Tokens backed by OST.
OST APIs and server-side SDKs make it simple and easy for developers to integrate blockchain tokens into their apps.
Integrating an OST SDK into your application can begin as soon as you create an account with OST Platform, requiring only three steps:
- Sign-up on https://platform.ost.com.
- Create your Brand Token in OST Platform.
- Obtain an API Key and API Secret from https://platform.ost.com/mainnet/developer.
> go get github.com/tsirysndr/ost-sdk-go
Import the package into your project.
import "github.com/tsirysndr/ost-sdk-go"
Construct a new OST client, then use the various services on the client to access different parts of the OST API. For example:
// the latest valid API endpoint is "https://api.ost.com/mainnet/v2/"
config := ost.Config{
Endpoint: "<API_ENDPOINT>",
ApiKey: "<YOUR_API_KEY>",
ApiSecret: "<YOUR_API_SECRET>",
}
client := ost.NewClient(config)
If a user's private key is lost, they could lose access to their tokens. To tackle this risk, OST promotes a mobile-first approach and provides mobile (client) and server SDKs.
- The server SDKs enable you to register users with OST Platform.
- The client SDKs provide the additional support required for the ownership and management of Brand Tokens by users so that they can create keys and control their tokens.
To register users with OST Platform, you can use the services provided in the Users module.
Create a User with OST Platform:
r, _ := client.Users.Create()
res, _ := json.Marshal(r)
fmt.Println(string(res))
Get User Detail:
r, _ := client.Users.Get("b6504ca4-9263-4998-8036-c90e648c48de")
res, _ := json.Marshal(r)
fmt.Println(string(res))
Get Users List:
r, _ := client.Users.GetList()
res, _ := json.Marshal(r)
fmt.Println(string(res))
Currently the following services are supported:
- Create User
- Get User
- List Users
- Register Device
- Get Device
- List Devices in the Economy
- List Devices of a User
- Get Session
- List Sessions in the Economy
- List Sessions of a User
- List All Rules
- Get Price Point
- Execute Company to User Transaction
- Get Transaction
- List Transactions in the economy
- List Transactions of a user
- Get Balance
- Get Token
- Get Recovery Owner
- Get Chain Information
- Get Device Manager
- Get Available Base Token
- Create WebHook
- Get WebHook
- List WebHooks
- Update WebHook
- Delete WebHook
👤 Tsiry Sandratraina
- Twitter: @tsiry_sndr
- Github: @tsirysndr
Give a ⭐️ if this project helped you!