Documentation ¶
Index ¶
- Variables
- type WaspClient
- func (c *WaspClient) ActivateChain(chainID isc.ChainID) error
- func (c *WaspClient) AddAccessNode(chainID isc.ChainID, pubKey string) error
- func (c *WaspClient) AuthInfo() (*shared.AuthInfoModel, error)
- func (c *WaspClient) BaseURL() string
- func (c *WaspClient) CallView(chainID isc.ChainID, hContract isc.Hname, functionName string, args dict.Dict) (dict.Dict, error)
- func (c *WaspClient) CallViewByHname(chainID isc.ChainID, hContract, hFunction isc.Hname, args dict.Dict) (dict.Dict, error)
- func (c *WaspClient) DKSharesGet(addr iotago.Address) (*model.DKSharesInfo, error)
- func (c *WaspClient) DKSharesPost(request *model.DKSharesPostRequest) (*model.DKSharesInfo, error)
- func (c *WaspClient) DeactivateChain(chainID isc.ChainID) error
- func (c *WaspClient) DeletePeeringTrusted(pubKey string) error
- func (c *WaspClient) GetChainConsensusPipeMetrics(chainID isc.ChainID) (*model.ConsensusPipeMetrics, error)
- func (c *WaspClient) GetChainConsensusWorkflowStatus(chainID isc.ChainID) (*model.ConsensusWorkflowStatus, error)
- func (c *WaspClient) GetChainInfo(chainID isc.ChainID) (*model.ChainInfo, error)
- func (c *WaspClient) GetChainNodeConnectionMetrics(chainID isc.ChainID) (*model.NodeConnectionMessagesMetrics, error)
- func (c *WaspClient) GetChainRecord(chainID isc.ChainID) (*registry.ChainRecord, error)
- func (c *WaspClient) GetChainRecordList() ([]*registry.ChainRecord, error)
- func (c *WaspClient) GetGasFeePolicy(chainID isc.ChainID) (*gas.GasFeePolicy, error)
- func (c *WaspClient) GetNodeConnectionMetrics() (*model.NodeConnectionMetrics, error)
- func (c *WaspClient) GetPeeringSelf() (*model.PeeringTrustedNode, error)
- func (c *WaspClient) GetPeeringTrusted(pubKey string) (*model.PeeringTrustedNode, error)
- func (c *WaspClient) GetPeeringTrustedList() ([]*model.PeeringTrustedNode, error)
- func (c *WaspClient) Info() (*model.InfoResponse, error)
- func (c *WaspClient) Login(username, password string) (string, error)
- func (c *WaspClient) NodeOwnershipCertificate(nodePubKey *cryptolib.PublicKey, ownerAddress iotago.Address) (governance.NodeOwnershipCertificate, error)
- func (c *WaspClient) PostOffLedgerRequest(chainID isc.ChainID, req isc.OffLedgerRequest) error
- func (c *WaspClient) PostPeeringTrusted(pubKey, netID string) (*model.PeeringTrustedNode, error)
- func (c *WaspClient) PutChainRecord(rec *registry.ChainRecord) error
- func (c *WaspClient) PutPeeringTrusted(pubKey, netID string) (*model.PeeringTrustedNode, error)
- func (c *WaspClient) RemoveAccessNode(chainID isc.ChainID, pubKey string) error
- func (c *WaspClient) RequestIDByEVMTransactionHash(chainID isc.ChainID, txHash common.Hash) (isc.RequestID, error)
- func (c *WaspClient) RequestReceipt(chainID isc.ChainID, reqID isc.RequestID) (*isc.Receipt, error)
- func (c *WaspClient) Shutdown() error
- func (c *WaspClient) StateGet(chainID isc.ChainID, key string) ([]byte, error)
- func (c *WaspClient) WaitUntilAllRequestsProcessed(chainID isc.ChainID, tx *iotago.Transaction, timeout time.Duration) ([]*isc.Receipt, error)
- func (c *WaspClient) WaitUntilRequestProcessed(chainID isc.ChainID, reqID isc.RequestID, timeout time.Duration) (*isc.Receipt, error)
- func (c *WaspClient) WithLogFunc(logFunc func(msg string, args ...interface{})) *WaspClient
- func (c *WaspClient) WithToken(token string) *WaspClient
Constants ¶
This section is empty.
Variables ¶
var ErrNotAuthorized = errors.New("unauthorized request rejected")
Functions ¶
This section is empty.
Types ¶
type WaspClient ¶
type WaspClient struct {
// contains filtered or unexported fields
}
WaspClient allows to make requests to the Wasp web API.
func NewWaspClient ¶
func NewWaspClient(baseURL string, httpClient ...http.Client) *WaspClient
NewWaspClient returns a new *WaspClient with the given baseURL and httpClient.
func (*WaspClient) ActivateChain ¶
func (c *WaspClient) ActivateChain(chainID isc.ChainID) error
ActivateChain sends a request to activate a chain in the wasp node
func (*WaspClient) AddAccessNode ¶
func (c *WaspClient) AddAccessNode(chainID isc.ChainID, pubKey string) error
func (*WaspClient) AuthInfo ¶ added in v0.3.0
func (c *WaspClient) AuthInfo() (*shared.AuthInfoModel, error)
func (*WaspClient) BaseURL ¶
func (c *WaspClient) BaseURL() string
BaseURL returns the baseURL of the client.
func (*WaspClient) CallViewByHname ¶ added in v0.3.0
func (*WaspClient) DKSharesGet ¶
func (c *WaspClient) DKSharesGet(addr iotago.Address) (*model.DKSharesInfo, error)
DKSharesGet retrieves the representation of an existing DKShare.
func (*WaspClient) DKSharesPost ¶
func (c *WaspClient) DKSharesPost(request *model.DKSharesPostRequest) (*model.DKSharesInfo, error)
DKSharesPost creates a new DKShare and returns its state.
func (*WaspClient) DeactivateChain ¶
func (c *WaspClient) DeactivateChain(chainID isc.ChainID) error
DeactivateChain sends a request to deactivate a chain in the wasp node
func (*WaspClient) DeletePeeringTrusted ¶ added in v0.2.0
func (c *WaspClient) DeletePeeringTrusted(pubKey string) error
func (*WaspClient) GetChainConsensusPipeMetrics ¶ added in v0.2.5
func (c *WaspClient) GetChainConsensusPipeMetrics(chainID isc.ChainID) (*model.ConsensusPipeMetrics, error)
func (*WaspClient) GetChainConsensusWorkflowStatus ¶ added in v0.2.4
func (c *WaspClient) GetChainConsensusWorkflowStatus(chainID isc.ChainID) (*model.ConsensusWorkflowStatus, error)
GetNodeConnectionMetrics fetches a consensus workflow status by address
func (*WaspClient) GetChainInfo ¶ added in v0.2.4
GetChainRecord fetches ChainInfo by address
func (*WaspClient) GetChainNodeConnectionMetrics ¶ added in v0.2.3
func (c *WaspClient) GetChainNodeConnectionMetrics(chainID isc.ChainID) (*model.NodeConnectionMessagesMetrics, error)
GetNodeConnectionMetrics fetches a connection to L1 metrics by address
func (*WaspClient) GetChainRecord ¶
func (c *WaspClient) GetChainRecord(chainID isc.ChainID) (*registry.ChainRecord, error)
GetChainRecord fetches a Record by address
func (*WaspClient) GetChainRecordList ¶
func (c *WaspClient) GetChainRecordList() ([]*registry.ChainRecord, error)
GetChainRecordList fetches the list of all chains in the node
func (*WaspClient) GetGasFeePolicy ¶
func (c *WaspClient) GetGasFeePolicy(chainID isc.ChainID) (*gas.GasFeePolicy, error)
func (*WaspClient) GetNodeConnectionMetrics ¶ added in v0.2.3
func (c *WaspClient) GetNodeConnectionMetrics() (*model.NodeConnectionMetrics, error)
GetNodeConnectionMetrics fetches a connection to L1 metrics for all addresses
func (*WaspClient) GetPeeringSelf ¶ added in v0.2.0
func (c *WaspClient) GetPeeringSelf() (*model.PeeringTrustedNode, error)
func (*WaspClient) GetPeeringTrusted ¶ added in v0.2.0
func (c *WaspClient) GetPeeringTrusted(pubKey string) (*model.PeeringTrustedNode, error)
func (*WaspClient) GetPeeringTrustedList ¶ added in v0.2.0
func (c *WaspClient) GetPeeringTrustedList() ([]*model.PeeringTrustedNode, error)
func (*WaspClient) Info ¶
func (c *WaspClient) Info() (*model.InfoResponse, error)
Info fetches general information about the node.
func (*WaspClient) Login ¶ added in v0.3.0
func (c *WaspClient) Login(username, password string) (string, error)
func (*WaspClient) NodeOwnershipCertificate ¶ added in v0.2.4
func (c *WaspClient) NodeOwnershipCertificate(nodePubKey *cryptolib.PublicKey, ownerAddress iotago.Address) (governance.NodeOwnershipCertificate, error)
func (*WaspClient) PostOffLedgerRequest ¶ added in v0.2.0
func (c *WaspClient) PostOffLedgerRequest(chainID isc.ChainID, req isc.OffLedgerRequest) error
func (*WaspClient) PostPeeringTrusted ¶ added in v0.2.0
func (c *WaspClient) PostPeeringTrusted(pubKey, netID string) (*model.PeeringTrustedNode, error)
func (*WaspClient) PutChainRecord ¶
func (c *WaspClient) PutChainRecord(rec *registry.ChainRecord) error
PutChainRecord sends a request to write a Record
func (*WaspClient) PutPeeringTrusted ¶ added in v0.2.0
func (c *WaspClient) PutPeeringTrusted(pubKey, netID string) (*model.PeeringTrustedNode, error)
func (*WaspClient) RemoveAccessNode ¶
func (c *WaspClient) RemoveAccessNode(chainID isc.ChainID, pubKey string) error
func (*WaspClient) RequestIDByEVMTransactionHash ¶ added in v0.3.0
func (*WaspClient) RequestReceipt ¶ added in v0.3.0
RequestReceipt fetches the processing status of a request.
func (*WaspClient) StateGet ¶ added in v0.2.0
StateGet fetches the raw value associated with the given key in the chain state
func (*WaspClient) WaitUntilAllRequestsProcessed ¶
func (c *WaspClient) WaitUntilAllRequestsProcessed(chainID isc.ChainID, tx *iotago.Transaction, timeout time.Duration) ([]*isc.Receipt, error)
WaitUntilAllRequestsProcessed blocks until all requests in the given transaction have been processed by the node
func (*WaspClient) WaitUntilRequestProcessed ¶
func (c *WaspClient) WaitUntilRequestProcessed(chainID isc.ChainID, reqID isc.RequestID, timeout time.Duration) (*isc.Receipt, error)
WaitUntilRequestProcessed blocks until the request has been processed by the node
func (*WaspClient) WithLogFunc ¶
func (c *WaspClient) WithLogFunc(logFunc func(msg string, args ...interface{})) *WaspClient
func (*WaspClient) WithToken ¶ added in v0.3.0
func (c *WaspClient) WithToken(token string) *WaspClient