Documentation ¶
Index ¶
- Variables
- func ClientBech32Decode(bech32 string) wasmtypes.ScAddress
- func ClientBech32Encode(scAddress wasmtypes.ScAddress) string
- func ClientHashName(name string) wasmtypes.ScHname
- type ContractEvent
- 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) error
- 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(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 ContractEvent, done chan bool) error
- func (sc *WasmClientService) WaitUntilRequestProcessed(chainID wasmtypes.ScChainID, reqID wasmtypes.ScRequestID, ...) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
HrpForClient = iotago.NetworkPrefix("")
)
Functions ¶
func ClientBech32Decode ¶
func ClientBech32Encode ¶
func ClientHashName ¶
Types ¶
type ContractEvent ¶
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, nonce uint64) (wasmtypes.ScRequestID, error) SubscribeEvents(msg chan ContractEvent, done chan bool) error WaitUntilRequestProcessed(chainID wasmtypes.ScChainID, 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, chain string, 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) error
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
}
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 ContractEvent, 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.