All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
DistrustPeer | Delete /v1/node/peers/trusted/{peer} | Distrust a peering node |
GenerateDKS | Post /v1/node/dks | Generate a new distributed key |
GetAllPeers | Get /v1/node/peers | Get basic information about all configured peers |
GetConfiguration | Get /v1/node/config | Return the Wasp configuration |
GetDKSInfo | Get /v1/node/dks/{sharedAddress} | Get information about the shared address DKS configuration |
GetInfo | Get /v1/node/info | Returns private information about this node. |
GetPeeringIdentity | Get /v1/node/peers/identity | Get basic peer info of the current node |
GetTrustedPeers | Get /v1/node/peers/trusted | Get trusted peers |
GetVersion | Get /v1/node/version | Returns the node version. |
OwnerCertificate | Get /v1/node/owner/certificate | Gets the node owner |
ShutdownNode | Post /v1/node/shutdown | Shut down the node |
TrustPeer | Post /v1/node/peers/trusted | Trust a peering node |
DistrustPeer(ctx, peer).Execute()
Distrust a peering node
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
peer := "peer_example" // string | Name or PubKey (hex) of the trusted peer
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NodeApi.DistrustPeer(context.Background(), peer).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NodeApi.DistrustPeer``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
peer | string | Name or PubKey (hex) of the trusted peer |
Other parameters are passed through a pointer to a apiDistrustPeerRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DKSharesInfo GenerateDKS(ctx).DKSharesPostRequest(dKSharesPostRequest).Execute()
Generate a new distributed key
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
dKSharesPostRequest := *openapiclient.NewDKSharesPostRequest([]string{"PeerIdentities_example"}, uint32(123), uint32(123)) // DKSharesPostRequest | Request parameters
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NodeApi.GenerateDKS(context.Background()).DKSharesPostRequest(dKSharesPostRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NodeApi.GenerateDKS``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GenerateDKS`: DKSharesInfo
fmt.Fprintf(os.Stdout, "Response from `NodeApi.GenerateDKS`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGenerateDKSRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
dKSharesPostRequest | DKSharesPostRequest | Request parameters |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]PeeringNodeStatusResponse GetAllPeers(ctx).Execute()
Get basic information about all configured peers
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NodeApi.GetAllPeers(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NodeApi.GetAllPeers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAllPeers`: []PeeringNodeStatusResponse
fmt.Fprintf(os.Stdout, "Response from `NodeApi.GetAllPeers`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetAllPeersRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
map[string]string GetConfiguration(ctx).Execute()
Return the Wasp configuration
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NodeApi.GetConfiguration(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NodeApi.GetConfiguration``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetConfiguration`: map[string]string
fmt.Fprintf(os.Stdout, "Response from `NodeApi.GetConfiguration`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetConfigurationRequest struct via the builder pattern
map[string]string
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DKSharesInfo GetDKSInfo(ctx, sharedAddress).Execute()
Get information about the shared address DKS configuration
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
sharedAddress := "sharedAddress_example" // string | SharedAddress (Bech32)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NodeApi.GetDKSInfo(context.Background(), sharedAddress).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NodeApi.GetDKSInfo``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDKSInfo`: DKSharesInfo
fmt.Fprintf(os.Stdout, "Response from `NodeApi.GetDKSInfo`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
sharedAddress | string | SharedAddress (Bech32) |
Other parameters are passed through a pointer to a apiGetDKSInfoRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InfoResponse GetInfo(ctx).Execute()
Returns private information about this node.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NodeApi.GetInfo(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NodeApi.GetInfo``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetInfo`: InfoResponse
fmt.Fprintf(os.Stdout, "Response from `NodeApi.GetInfo`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetInfoRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PeeringNodeIdentityResponse GetPeeringIdentity(ctx).Execute()
Get basic peer info of the current node
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NodeApi.GetPeeringIdentity(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NodeApi.GetPeeringIdentity``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetPeeringIdentity`: PeeringNodeIdentityResponse
fmt.Fprintf(os.Stdout, "Response from `NodeApi.GetPeeringIdentity`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetPeeringIdentityRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]PeeringNodeIdentityResponse GetTrustedPeers(ctx).Execute()
Get trusted peers
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NodeApi.GetTrustedPeers(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NodeApi.GetTrustedPeers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTrustedPeers`: []PeeringNodeIdentityResponse
fmt.Fprintf(os.Stdout, "Response from `NodeApi.GetTrustedPeers`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetTrustedPeersRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VersionResponse GetVersion(ctx).Execute()
Returns the node version.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NodeApi.GetVersion(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NodeApi.GetVersion``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetVersion`: VersionResponse
fmt.Fprintf(os.Stdout, "Response from `NodeApi.GetVersion`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetVersionRequest struct via the builder pattern
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
NodeOwnerCertificateResponse OwnerCertificate(ctx).Execute()
Gets the node owner
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NodeApi.OwnerCertificate(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NodeApi.OwnerCertificate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `OwnerCertificate`: NodeOwnerCertificateResponse
fmt.Fprintf(os.Stdout, "Response from `NodeApi.OwnerCertificate`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiOwnerCertificateRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ShutdownNode(ctx).Execute()
Shut down the node
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NodeApi.ShutdownNode(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NodeApi.ShutdownNode``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiShutdownNodeRequest struct via the builder pattern
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TrustPeer(ctx).PeeringTrustRequest(peeringTrustRequest).Execute()
Trust a peering node
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
peeringTrustRequest := *openapiclient.NewPeeringTrustRequest("Name_example", "localhost:4000", "0x0000") // PeeringTrustRequest | Info of the peer to trust
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NodeApi.TrustPeer(context.Background()).PeeringTrustRequest(peeringTrustRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NodeApi.TrustPeer``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Other parameters are passed through a pointer to a apiTrustPeerRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
peeringTrustRequest | PeeringTrustRequest | Info of the peer to trust |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]