sdk

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

README

BSN Hub Go SDK

BSN Hub GO SDK makes a simple package of API provided by BSN Hub, which provides great convenience for users to quickly develop applications based on BSN Hub.

install

Requirement
  • Go version above 1.14.0
Use Go Mod
require (
    github.com/bianjieai/bsnhub-sdk-go latest
)

Usage

Init Client

The initialization SDK code is as follows:

import (
    "github.com/bianjieai/irita-sdk-go/types"
    "github.com/bianjieai/irita-sdk-go/types/store"
    sdk "github.com/bianjieai/bsnhub-sdk-go"
    ...
)

options := []types.Option{
    types.KeyDAOOption(store.NewMemory(nil)),
    types.TimeoutOption(10),
}

cfg, err := types.NewClientConfig(nodeURI, chainID, options...)
if err != nil {
    panic(err)
}

client := sdk.NewIRITAClient(cfg)
oracleClient := sdk.OracleClient(client)

...

For more usage, please refer to irita-sdk-go.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewIRITAClient

func NewIRITAClient(cfg types.ClientConfig) sdk.IRITAClient

func OracleClient

func OracleClient(client sdk.IRITAClient) oracle.OracleI

Types

This section is empty.

Directories

Path Synopsis
modules

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL