Documentation
¶
Index ¶
- Variables
- func SetSandboxWrappers(chainID string) error
- type ContractEvent
- type EventProcessor
- type IClientService
- type WasmClientContext
- func (s *WasmClientContext) CurrentChainID() wasmtypes.ScChainID
- func (s *WasmClientContext) CurrentKeyPair() *cryptolib.KeyPair
- func (s *WasmClientContext) CurrentSvcClient() IClientService
- func (s *WasmClientContext) FnCall(req *wasmrequests.CallRequest) []byte
- func (s *WasmClientContext) FnChainID() wasmtypes.ScChainID
- func (s *WasmClientContext) FnPost(req *wasmrequests.PostRequest) []byte
- func (s *WasmClientContext) InitFuncCallContext()
- func (s *WasmClientContext) InitViewCallContext(hContract wasmtypes.ScHname) wasmtypes.ScHname
- func (s *WasmClientContext) Register(handler wasmlib.IEventHandlers)
- func (s *WasmClientContext) ServiceContractName(contractName string)
- func (s *WasmClientContext) SignRequests(keyPair *cryptolib.KeyPair)
- func (s *WasmClientContext) Unregister(handler wasmlib.IEventHandlers)
- func (s *WasmClientContext) WaitRequest(reqID ...wasmtypes.ScRequestID)
- type WasmClientService
- func (sc *WasmClientService) CallViewByHname(hContract, hFunction wasmtypes.ScHname, args []byte) ([]byte, error)
- func (sc *WasmClientService) CurrentChainID() wasmtypes.ScChainID
- func (sc *WasmClientService) PostRequest(chainID wasmtypes.ScChainID, hContract, hFunction wasmtypes.ScHname, ...) (reqID wasmtypes.ScRequestID, err error)
- func (sc *WasmClientService) SubscribeEvents(callback EventProcessor) error
- func (sc *WasmClientService) UnsubscribeEvents()
- func (sc *WasmClientService) WaitUntilRequestProcessed(reqID wasmtypes.ScRequestID, timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
HrpForClient = iotago.NetworkPrefix("")
)
Functions ¶
func SetSandboxWrappers ¶
Types ¶
type ContractEvent ¶
type EventProcessor ¶
type EventProcessor func(event *ContractEvent)
type IClientService ¶
type IClientService interface {
CallViewByHname(hContract, hFunction wasmtypes.ScHname, args []byte) ([]byte, error)
CurrentChainID() wasmtypes.ScChainID
PostRequest(chainID wasmtypes.ScChainID, hContract, hFunction wasmtypes.ScHname, args []byte, allowance *wasmlib.ScAssets, keyPair *cryptolib.KeyPair) (wasmtypes.ScRequestID, error)
SubscribeEvents(callback EventProcessor) error
UnsubscribeEvents()
WaitUntilRequestProcessed(reqID wasmtypes.ScRequestID, timeout time.Duration) error
}
type WasmClientContext ¶
type WasmClientContext struct {
Err error
ReqID wasmtypes.ScRequestID
// contains filtered or unexported fields
}
func NewWasmClientContext ¶
func NewWasmClientContext(svcClient IClientService, scName string) *WasmClientContext
func (*WasmClientContext) CurrentChainID ¶
func (s *WasmClientContext) CurrentChainID() wasmtypes.ScChainID
func (*WasmClientContext) CurrentKeyPair ¶ added in v1.0.3
func (s *WasmClientContext) CurrentKeyPair() *cryptolib.KeyPair
func (*WasmClientContext) CurrentSvcClient ¶ added in v1.0.3
func (s *WasmClientContext) CurrentSvcClient() IClientService
func (*WasmClientContext) FnCall ¶ added in v1.0.3
func (s *WasmClientContext) FnCall(req *wasmrequests.CallRequest) []byte
func (*WasmClientContext) FnChainID ¶ added in v1.0.3
func (s *WasmClientContext) FnChainID() wasmtypes.ScChainID
func (*WasmClientContext) FnPost ¶ added in v1.0.3
func (s *WasmClientContext) FnPost(req *wasmrequests.PostRequest) []byte
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 wasmlib.IEventHandlers)
func (*WasmClientContext) ServiceContractName ¶
func (s *WasmClientContext) ServiceContractName(contractName string)
func (*WasmClientContext) SignRequests ¶
func (s *WasmClientContext) SignRequests(keyPair *cryptolib.KeyPair)
func (*WasmClientContext) Unregister ¶
func (s *WasmClientContext) Unregister(handler wasmlib.IEventHandlers)
func (*WasmClientContext) WaitRequest ¶
func (s *WasmClientContext) WaitRequest(reqID ...wasmtypes.ScRequestID)
type WasmClientService ¶
type WasmClientService struct {
// contains filtered or unexported fields
}
WasmClientService TODO should be linked to a chain and holds the nonces for signers for that chain
func NewWasmClientService ¶
func NewWasmClientService(waspAPI string, chainID string) *WasmClientService
func (*WasmClientService) CallViewByHname ¶
func (*WasmClientService) CurrentChainID ¶ added in v1.0.3
func (sc *WasmClientService) CurrentChainID() wasmtypes.ScChainID
func (*WasmClientService) PostRequest ¶
func (*WasmClientService) SubscribeEvents ¶
func (sc *WasmClientService) SubscribeEvents(callback EventProcessor) error
func (*WasmClientService) UnsubscribeEvents ¶ added in v1.0.3
func (sc *WasmClientService) UnsubscribeEvents()
func (*WasmClientService) WaitUntilRequestProcessed ¶
func (sc *WasmClientService) WaitUntilRequestProcessed(reqID wasmtypes.ScRequestID, timeout time.Duration) error
Click to show internal directories.
Click to hide internal directories.