Documentation ¶
Overview ¶
Package sdk is the entrance of the entire SDK function. SDKConfig is used to configure SDK parameters.
The SDK mainly provides the functions of the following modules, including: admin, bank, keys, nft, params, record, service, token, validator
As a quick start:
options := []types.Option{ types.KeyDAOOption(store.NewMemory(nil)), } cfg, err := types.NewClientConfig(nodeURI, chainID, options...) if err != nil { panic(err) } client := sdk.NewIRITAClient(cfg)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IRITAClient ¶
type IRITAClient struct { types.BaseClient Token token.TokenI Record record.RecordI Validator validator.ValidatorI Identity identity.IdentityI NFT nft.NFTI Admin admin.AdminI Params params.ParamsI Bank bank.BankI Service service.ServiceI Key keys.KeyI // contains filtered or unexported fields }
func NewIRITAClient ¶
func NewIRITAClient(cfg types.ClientConfig) IRITAClient
func (*IRITAClient) AppCodec ¶
func (s *IRITAClient) AppCodec() *std.Codec
func (*IRITAClient) Codec ¶
func (s *IRITAClient) Codec() *codec.Codec
func (*IRITAClient) Manager ¶
func (s *IRITAClient) Manager() types.BaseClient
func (*IRITAClient) RegisterModule ¶
func (s *IRITAClient) RegisterModule(ms ...types.Module)
func (*IRITAClient) SetOutput ¶
func (s *IRITAClient) SetOutput(w io.Writer)
Directories ¶
Path | Synopsis |
---|---|
client
|
|
types
Package types defines a custom wrapper for google.protobuf.Any which supports cached values as well as InterfaceRegistry which keeps track of types which can be used with Any for both security and introspection
|
Package types defines a custom wrapper for google.protobuf.Any which supports cached values as well as InterfaceRegistry which keeps track of types which can be used with Any for both security and introspection |
Package modules is to warpped the API provided by each module of IRITA
|
Package modules is to warpped the API provided by each module of IRITA |
bank
Package bank is mainly used to transfer coins between accounts,query account balances, and implement interface rpc.BankI As a quick start: TransferNFT coins to other account client := test.NewClient() amt := types.NewIntWithDecimal(1, 18) coins := types.NewCoins(types.NewCoin("point", amt)) to := "caa1rgnu8grzt6mwnjg7jss7w0sfyjn67g4em9njf5" baseTx := types.BaseTx{ From: "test1", Gas: 20000, Memo: "test", Mode: types.Commit, } result,err := client.BankI.Send(to,coins,baseTx) fmt.Println(result) BurnNFT some coins from your account client := test.NewClient() amt := types.NewIntWithDecimal(1, 18) coins := types.NewCoins(types.NewCoin("point", amt)) baseTx := types.BaseTx{ From: "test1", Gas: 20000, Memo: "test", Mode: types.Commit, } result,err := client.BankI.BurnNFT(coins, baseTx) fmt.Println(result) Set account memo client := test.NewClient() result,err := client.BankI.SetMemoRegexp("testMemo", baseTx) fmt.Println(result) Queries account information client := test.NewClient() result,err := client.BankI.QueryAccount("caa1rgnu8grzt6mwnjg7jss7w0sfyjn67g4em9njf5") fmt.Println(result) Queries the token information client := test.NewClient() result,err := client.BankI.QueryTokenStats("point") fmt.Println(result)
|
Package bank is mainly used to transfer coins between accounts,query account balances, and implement interface rpc.BankI As a quick start: TransferNFT coins to other account client := test.NewClient() amt := types.NewIntWithDecimal(1, 18) coins := types.NewCoins(types.NewCoin("point", amt)) to := "caa1rgnu8grzt6mwnjg7jss7w0sfyjn67g4em9njf5" baseTx := types.BaseTx{ From: "test1", Gas: 20000, Memo: "test", Mode: types.Commit, } result,err := client.BankI.Send(to,coins,baseTx) fmt.Println(result) BurnNFT some coins from your account client := test.NewClient() amt := types.NewIntWithDecimal(1, 18) coins := types.NewCoins(types.NewCoin("point", amt)) baseTx := types.BaseTx{ From: "test1", Gas: 20000, Memo: "test", Mode: types.Commit, } result,err := client.BankI.BurnNFT(coins, baseTx) fmt.Println(result) Set account memo client := test.NewClient() result,err := client.BankI.SetMemoRegexp("testMemo", baseTx) fmt.Println(result) Queries account information client := test.NewClient() result,err := client.BankI.QueryAccount("caa1rgnu8grzt6mwnjg7jss7w0sfyjn67g4em9njf5") fmt.Println(result) Queries the token information client := test.NewClient() result,err := client.BankI.QueryTokenStats("point") fmt.Println(result) |
keys
Package keys allows you to manage your local tendermint keystore (wallets) for iris.
|
Package keys allows you to manage your local tendermint keystore (wallets) for iris. |
service
Package service bridge the gap between the blockchain world and the conventional business application world, by mediating a complete lifecycle of off-chain services -- from their definition, binding (provider registration), invocation, to their governance (profiling and dispute resolution).
|
Package service bridge the gap between the blockchain world and the conventional business application world, by mediating a complete lifecycle of off-chain services -- from their definition, binding (provider registration), invocation, to their governance (profiling and dispute resolution). |
token
Package token allows individuals and companies to create and issue their own tokens.
|
Package token allows individuals and companies to create and issue their own tokens. |
uuid
reference: https://github.com/binance-chain/go-sdk/blob/master/common/uuid/codec.go reference: https://github.com/binance-chain/go-sdk/blob/master/common/uuid/generator.go Package uuid reference: https://github.com/binance-chain/go-sdk/blob/master/common/uuid/uuid.go
|
reference: https://github.com/binance-chain/go-sdk/blob/master/common/uuid/codec.go reference: https://github.com/binance-chain/go-sdk/blob/master/common/uuid/generator.go Package uuid reference: https://github.com/binance-chain/go-sdk/blob/master/common/uuid/uuid.go |
Click to show internal directories.
Click to hide internal directories.