Documentation ¶
Index ¶
- type WaspClient
- func (c *WaspClient) ActivateChain(chID *iscp.ChainID) error
- func (c *WaspClient) BaseURL() string
- func (c *WaspClient) CallView(chainID *iscp.ChainID, hContract iscp.Hname, functionName string, ...) (dict.Dict, error)
- func (c *WaspClient) DKSharesGet(addr ledgerstate.Address) (*model.DKSharesInfo, error)
- func (c *WaspClient) DKSharesPost(request *model.DKSharesPostRequest) (*model.DKSharesInfo, error)
- func (c *WaspClient) DeactivateChain(chID *iscp.ChainID) error
- func (c *WaspClient) DeletePeeringTrusted(pubKey string) error
- func (c *WaspClient) GetChainConsensusWorkflowStatus(chID *iscp.ChainID) (*model.ConsensusWorkflowStatus, error)
- func (c *WaspClient) GetChainInfo(chID *iscp.ChainID) (*model.ChainInfo, error)
- func (c *WaspClient) GetChainNodeConnectionMetrics(chID *iscp.ChainID) (*model.NodeConnectionMessagesMetrics, error)
- func (c *WaspClient) GetChainRecord(chID *iscp.ChainID) (*registry.ChainRecord, error)
- func (c *WaspClient) GetChainRecordList() ([]*registry.ChainRecord, 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) NodeOwnershipCertificate(nodePubKey ed25519.PublicKey, ownerAddress ledgerstate.Address) (governance.NodeOwnershipCertificate, error)
- func (c *WaspClient) PostOffLedgerRequest(chainID *iscp.ChainID, req *request.OffLedger) 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) RequestStatus(chainID *iscp.ChainID, reqID iscp.RequestID) (*model.RequestStatusResponse, error)
- func (c *WaspClient) Shutdown() error
- func (c *WaspClient) StateGet(chainID *iscp.ChainID, key string) ([]byte, error)
- func (c *WaspClient) WaitUntilAllRequestsProcessed(chainID *iscp.ChainID, tx *ledgerstate.Transaction, timeout time.Duration) error
- func (c *WaspClient) WaitUntilRequestProcessed(chainID *iscp.ChainID, reqID iscp.RequestID, timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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(chID *iscp.ChainID) error
ActivateChain sends a request to activate a chain in the wasp node
func (*WaspClient) BaseURL ¶
func (c *WaspClient) BaseURL() string
BaseURL returns the baseURL of the client.
func (*WaspClient) DKSharesGet ¶
func (c *WaspClient) DKSharesGet(addr ledgerstate.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(chID *iscp.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) GetChainConsensusWorkflowStatus ¶ added in v0.2.4
func (c *WaspClient) GetChainConsensusWorkflowStatus(chID *iscp.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(chID *iscp.ChainID) (*model.NodeConnectionMessagesMetrics, error)
GetNodeConnectionMetrics fetches a connection to L1 metrics by address
func (*WaspClient) GetChainRecord ¶
func (c *WaspClient) GetChainRecord(chID *iscp.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) 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) NodeOwnershipCertificate ¶ added in v0.2.4
func (c *WaspClient) NodeOwnershipCertificate(nodePubKey ed25519.PublicKey, ownerAddress ledgerstate.Address) (governance.NodeOwnershipCertificate, error)
func (*WaspClient) PostOffLedgerRequest ¶ added in v0.2.0
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) RequestStatus ¶
func (c *WaspClient) RequestStatus(chainID *iscp.ChainID, reqID iscp.RequestID) (*model.RequestStatusResponse, error)
RequestStatus 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 *iscp.ChainID, tx *ledgerstate.Transaction, timeout time.Duration) error
WaitUntilAllRequestsProcessed blocks until all requests in the given transaction have been processed by the node
func (*WaspClient) WaitUntilRequestProcessed ¶
func (c *WaspClient) WaitUntilRequestProcessed(chainID *iscp.ChainID, reqID iscp.RequestID, timeout time.Duration) error
WaitUntilRequestProcessed blocks until the request has been processed by the node