modules

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package modules is to warpped the API provided by each module of IRITA

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBaseClient

func NewBaseClient(cfg sdk.ClientConfig, encodingConfig sdk.EncodingConfig, logger log.Logger) sdk.BaseClient

NewBaseClient return the baseClient for every sub modules

func NewGRPCClient added in v1.1.0

func NewGRPCClient(url string) grpcClient

func NewLocker

func NewLocker(size int) *locker

NewLocker implement the function of lock, can lock resources according to conditions

func NewRPCClient

func NewRPCClient(
	remote string,
	cdc *codec.LegacyAmino,
	txDecoder sdk.TxDecoder,
	logger log.Logger,
	timeout uint,
) sdk.TmClient

Types

This section is empty.

Directories

Path Synopsis
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 := "iaa1rgnu8grzt6mwnjg7jss7w0sfyjn67g4et0hzfz" 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("iaa1rgnu8grzt6mwnjg7jss7w0sfyjn67g4et0hzfz") 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 := "iaa1rgnu8grzt6mwnjg7jss7w0sfyjn67g4et0hzfz" 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("iaa1rgnu8grzt6mwnjg7jss7w0sfyjn67g4et0hzfz") fmt.Println(result) Queries the token information client := test.NewClient() result,err := client.BankI.QueryTokenStats("point") fmt.Println(result)
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.
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).

Jump to

Keyboard shortcuts

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