Documentation
¶
Index ¶
- type IClientService
- type IEventHandler
- type WasmClientContext
- func (s *WasmClientContext) CurrentChainID() wasmtypes.ScChainID
- func (s *WasmClientContext) ExportName(index int32, name string)
- func (s *WasmClientContext) InitFuncCallContext()
- func (s *WasmClientContext) InitViewCallContext(hContract wasmtypes.ScHname) wasmtypes.ScHname
- func (s *WasmClientContext) Register(handler IEventHandler) error
- func (s *WasmClientContext) Sandbox(funcNr int32, args []byte) []byte
- func (s *WasmClientContext) ServiceContractName(contractName string)
- func (s *WasmClientContext) SignRequests(keyPair *cryptolib.KeyPair)
- func (s *WasmClientContext) StateDelete(key []byte)
- func (s *WasmClientContext) StateExists(key []byte) bool
- func (s *WasmClientContext) StateGet(key []byte) []byte
- func (s *WasmClientContext) StateSet(key, value []byte)
- func (s *WasmClientContext) Unregister(handler IEventHandler)
- func (s *WasmClientContext) WaitEvent() error
- func (s *WasmClientContext) WaitRequest(reqID ...wasmtypes.ScRequestID) error
- type WasmClientService
- func (sc *WasmClientService) CallViewByHname(chainID wasmtypes.ScChainID, hContract, hFunction wasmtypes.ScHname, ...) ([]byte, error)
- func (sc *WasmClientService) PostRequest(chainID wasmtypes.ScChainID, hContract, hFunction wasmtypes.ScHname, ...) (reqID wasmtypes.ScRequestID, err error)
- func (sc *WasmClientService) SubscribeEvents(msg chan []string, done chan bool) error
- func (sc *WasmClientService) WaitUntilRequestProcessed(chainID wasmtypes.ScChainID, reqID wasmtypes.ScRequestID, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IClientService ¶
type IClientService interface {
CallViewByHname(chainID wasmtypes.ScChainID, hContract, hFunction wasmtypes.ScHname, args []byte) ([]byte, error)
PostRequest(chainID wasmtypes.ScChainID, hContract, hFunction wasmtypes.ScHname, args []byte, allowance *wasmlib.ScAssets, keyPair *cryptolib.KeyPair) (wasmtypes.ScRequestID, error)
SubscribeEvents(msg chan []string, done chan bool) error
WaitUntilRequestProcessed(chainID wasmtypes.ScChainID, reqID wasmtypes.ScRequestID, timeout time.Duration) error
}
type IEventHandler ¶
type WasmClientContext ¶
type WasmClientContext struct {
Err error
ReqID wasmtypes.ScRequestID
// contains filtered or unexported fields
}
func NewWasmClientContext ¶
func NewWasmClientContext(svcClient IClientService, chainID wasmtypes.ScChainID, scName string) *WasmClientContext
func (*WasmClientContext) CurrentChainID ¶
func (s *WasmClientContext) CurrentChainID() wasmtypes.ScChainID
func (*WasmClientContext) ExportName ¶
func (s *WasmClientContext) ExportName(index int32, name string)
func (*WasmClientContext) InitFuncCallContext ¶
func (s *WasmClientContext) InitFuncCallContext()
func (*WasmClientContext) InitViewCallContext ¶
func (s *WasmClientContext) InitViewCallContext(hContract wasmtypes.ScHname) wasmtypes.ScHname
func (*WasmClientContext) Register ¶
func (s *WasmClientContext) Register(handler IEventHandler) error
func (*WasmClientContext) Sandbox ¶
func (s *WasmClientContext) Sandbox(funcNr int32, args []byte) []byte
func (*WasmClientContext) ServiceContractName ¶
func (s *WasmClientContext) ServiceContractName(contractName string)
overrides default contract name
func (*WasmClientContext) SignRequests ¶
func (s *WasmClientContext) SignRequests(keyPair *cryptolib.KeyPair)
func (*WasmClientContext) StateDelete ¶
func (s *WasmClientContext) StateDelete(key []byte)
func (*WasmClientContext) StateExists ¶
func (s *WasmClientContext) StateExists(key []byte) bool
func (*WasmClientContext) StateGet ¶
func (s *WasmClientContext) StateGet(key []byte) []byte
func (*WasmClientContext) StateSet ¶
func (s *WasmClientContext) StateSet(key, value []byte)
func (*WasmClientContext) Unregister ¶
func (s *WasmClientContext) Unregister(handler IEventHandler)
func (*WasmClientContext) WaitEvent ¶
func (s *WasmClientContext) WaitEvent() error
func (*WasmClientContext) WaitRequest ¶
func (s *WasmClientContext) WaitRequest(reqID ...wasmtypes.ScRequestID) error
type WasmClientService ¶
type WasmClientService struct {
// contains filtered or unexported fields
}
func DefaultWasmClientService ¶
func DefaultWasmClientService() *WasmClientService
func NewWasmClientService ¶
func NewWasmClientService(waspAPI, eventPort string) *WasmClientService
func (*WasmClientService) CallViewByHname ¶
func (*WasmClientService) PostRequest ¶
func (*WasmClientService) SubscribeEvents ¶
func (sc *WasmClientService) SubscribeEvents(msg chan []string, done chan bool) error
func (*WasmClientService) WaitUntilRequestProcessed ¶
func (sc *WasmClientService) WaitUntilRequestProcessed(chainID wasmtypes.ScChainID, reqID wasmtypes.ScRequestID, timeout time.Duration) error
Click to show internal directories.
Click to hide internal directories.