Skip to content

Latest commit

 

History

History
405 lines (259 loc) · 10.7 KB

MinersApi.md

File metadata and controls

405 lines (259 loc) · 10.7 KB

\MinersApi

All URIs are relative to http://..

Method HTTP request Description
GetMinersAddresses Get /miners/addresses List miner's addresses
GetWalletsWalletNameMinerAddresses Get /wallets/{wallet_name}/miner-addresses List all miner addresses per group
PostMinersCpuMining Post /miners/cpu-mining Execute an action on CPU miner. !!! for test only !!!
PostMinersCpuMiningMineOneBlock Post /miners/cpu-mining/mine-one-block Mine a block on CPU miner. !!! for test only !!!
PostWalletsWalletNameDeriveNextMinerAddresses Post /wallets/{wallet_name}/derive-next-miner-addresses Derive your next miner addresses for each group
PutMinersAddresses Put /miners/addresses Update miner's addresses, but better to use user.conf instead

GetMinersAddresses

MinerAddresses GetMinersAddresses(ctx).Execute()

List miner's addresses

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.MinersApi.GetMinersAddresses(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `MinersApi.GetMinersAddresses``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetMinersAddresses`: MinerAddresses
    fmt.Fprintf(os.Stdout, "Response from `MinersApi.GetMinersAddresses`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetMinersAddressesRequest struct via the builder pattern

Return type

MinerAddresses

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetWalletsWalletNameMinerAddresses

[]MinerAddressesInfo GetWalletsWalletNameMinerAddresses(ctx, walletName).Execute()

List all miner addresses per group

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    walletName := "walletName_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.MinersApi.GetWalletsWalletNameMinerAddresses(context.Background(), walletName).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `MinersApi.GetWalletsWalletNameMinerAddresses``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetWalletsWalletNameMinerAddresses`: []MinerAddressesInfo
    fmt.Fprintf(os.Stdout, "Response from `MinersApi.GetWalletsWalletNameMinerAddresses`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
walletName string

Other Parameters

Other parameters are passed through a pointer to a apiGetWalletsWalletNameMinerAddressesRequest struct via the builder pattern

Name Type Description Notes

Return type

[]MinerAddressesInfo

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PostMinersCpuMining

bool PostMinersCpuMining(ctx).Action(action).Execute()

Execute an action on CPU miner. !!! for test only !!!

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    action := "start-mining" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.MinersApi.PostMinersCpuMining(context.Background()).Action(action).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `MinersApi.PostMinersCpuMining``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `PostMinersCpuMining`: bool
    fmt.Fprintf(os.Stdout, "Response from `MinersApi.PostMinersCpuMining`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiPostMinersCpuMiningRequest struct via the builder pattern

Name Type Description Notes
action string

Return type

bool

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PostMinersCpuMiningMineOneBlock

bool PostMinersCpuMiningMineOneBlock(ctx).FromGroup(fromGroup).ToGroup(toGroup).Execute()

Mine a block on CPU miner. !!! for test only !!!

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    fromGroup := int32(56) // int32 | 
    toGroup := int32(56) // int32 | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.MinersApi.PostMinersCpuMiningMineOneBlock(context.Background()).FromGroup(fromGroup).ToGroup(toGroup).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `MinersApi.PostMinersCpuMiningMineOneBlock``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `PostMinersCpuMiningMineOneBlock`: bool
    fmt.Fprintf(os.Stdout, "Response from `MinersApi.PostMinersCpuMiningMineOneBlock`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiPostMinersCpuMiningMineOneBlockRequest struct via the builder pattern

Name Type Description Notes
fromGroup int32
toGroup int32

Return type

bool

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PostWalletsWalletNameDeriveNextMinerAddresses

[]AddressInfo PostWalletsWalletNameDeriveNextMinerAddresses(ctx, walletName).Execute()

Derive your next miner addresses for each group

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    walletName := "walletName_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.MinersApi.PostWalletsWalletNameDeriveNextMinerAddresses(context.Background(), walletName).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `MinersApi.PostWalletsWalletNameDeriveNextMinerAddresses``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `PostWalletsWalletNameDeriveNextMinerAddresses`: []AddressInfo
    fmt.Fprintf(os.Stdout, "Response from `MinersApi.PostWalletsWalletNameDeriveNextMinerAddresses`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
walletName string

Other Parameters

Other parameters are passed through a pointer to a apiPostWalletsWalletNameDeriveNextMinerAddressesRequest struct via the builder pattern

Name Type Description Notes

Return type

[]AddressInfo

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PutMinersAddresses

PutMinersAddresses(ctx).MinerAddresses(minerAddresses).Execute()

Update miner's addresses, but better to use user.conf instead

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    minerAddresses := *openapiclient.NewMinerAddresses([]string{"Addresses_example"}) // MinerAddresses | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.MinersApi.PutMinersAddresses(context.Background()).MinerAddresses(minerAddresses).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `MinersApi.PutMinersAddresses``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiPutMinersAddressesRequest struct via the builder pattern

Name Type Description Notes
minerAddresses MinerAddresses

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]