Documentation ¶
Index ¶
- Constants
- type Config
- type ServiceClientWrapper
- func (s ServiceClientWrapper) AddKey(name string, passphrase string) (addr string, mnemonic string, err error)
- func (s ServiceClientWrapper) BindService(serviceName string, deposit string, pricing string, options string, qos uint64) error
- func (s ServiceClientWrapper) BuildBaseTx() types.BaseTx
- func (s ServiceClientWrapper) DefineService(serviceName string, description string, authorDescription string, ...) error
- func (s ServiceClientWrapper) DeleteKey(name string, passphrase string) error
- func (s ServiceClientWrapper) ExportKey(name string, passphrase string) (keyArmor string, err error)
- func (s ServiceClientWrapper) ImportKey(name string, passphrase string, keyArmor string) (addr string, err error)
- func (s ServiceClientWrapper) RecoverKey(name string, passphrase string, mnemonic string) (addr string, err error)
- func (s ServiceClientWrapper) ShowKey(name string, passphrase string) (addr string, err error)
- func (s ServiceClientWrapper) SubscribeServiceRequest(serviceName string, cb service.RespondCallback) error
Constants ¶
View Source
const ( Prefix = "iservice" ChainID = "chain_id" NodeRPCAddr = "node_rpc_addr" NodeGRPCAddr = "node_grpc_addr" KeyPath = "key_path" KeyName = "key_name" Passphrase = "passphrase" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ChainID string `yaml:"chain_id"` NodeRPCAddr string `yaml:"node_rpc_addr"` NodeGRPCAddr string `yaml:"node_grpc_addr"` KeyPath string `yaml:"key_path"` KeyName string `yaml:"key_name"` Passphrase string `yaml:"passphrase"` }
Config is a config struct for iservice
type ServiceClientWrapper ¶
type ServiceClientWrapper struct { ChainID string NodeRPCAddr string NodeGRPCAddr string KeyPath string KeyName string Passphrase string ServiceClient servicesdk.ServiceClient }
ServiceClientWrapper defines a wrapper for service client
func MakeServiceClientWrapper ¶
func MakeServiceClientWrapper(config Config) ServiceClientWrapper
MakeServiceClientWrapper builds a ServiceClientWrapper from the given config
func NewServiceClientWrapper ¶
func NewServiceClientWrapper( chainID string, nodeRPCAddr string, nodeGRPCAddr string, keyPath string, keyName string, passphrase string, ) ServiceClientWrapper
NewServiceClientWrapper constructs a new ServiceClientWrapper
func (ServiceClientWrapper) AddKey ¶
func (s ServiceClientWrapper) AddKey(name string, passphrase string) (addr string, mnemonic string, err error)
AddKey adds a key with the specified name and passphrase
func (ServiceClientWrapper) BindService ¶
func (s ServiceClientWrapper) BindService( serviceName string, deposit string, pricing string, options string, qos uint64, ) error
BindService wraps iservice.BindService
func (ServiceClientWrapper) BuildBaseTx ¶
func (s ServiceClientWrapper) BuildBaseTx() types.BaseTx
BuildBaseTx builds a base tx
func (ServiceClientWrapper) DefineService ¶
func (s ServiceClientWrapper) DefineService( serviceName string, description string, authorDescription string, tags []string, schemas string, ) error
DefineService wraps iservice.DefineService
func (ServiceClientWrapper) DeleteKey ¶
func (s ServiceClientWrapper) DeleteKey(name string, passphrase string) error
DeleteKey deletes the specified key
func (ServiceClientWrapper) ExportKey ¶
func (s ServiceClientWrapper) ExportKey(name string, passphrase string) (keyArmor string, err error)
ExportKey exports the given key
func (ServiceClientWrapper) ImportKey ¶
func (s ServiceClientWrapper) ImportKey(name string, passphrase string, keyArmor string) (addr string, err error)
ImportKey imports the specified key
func (ServiceClientWrapper) RecoverKey ¶
func (s ServiceClientWrapper) RecoverKey(name string, passphrase string, mnemonic string) (addr string, err error)
RecoverKey recover the specified key
func (ServiceClientWrapper) ShowKey ¶
func (s ServiceClientWrapper) ShowKey(name string, passphrase string) (addr string, err error)
ShowKey queries the given key
func (ServiceClientWrapper) SubscribeServiceRequest ¶
func (s ServiceClientWrapper) SubscribeServiceRequest(serviceName string, cb service.RespondCallback) error
SubscribeServiceRequest wraps service.SubscribeServiceRequest
Click to show internal directories.
Click to hide internal directories.