github.com/aeternity/aepp-sdk-go/v4@v4.0.1/swagguard/node/client/external/external_client.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  package external
     4  
     5  // This file was generated by the swagger tool.
     6  // Editing this file might prove futile when you re-run the swagger generate command
     7  
     8  import (
     9  	"github.com/go-openapi/runtime"
    10  
    11  	strfmt "github.com/go-openapi/strfmt"
    12  )
    13  
    14  // New creates a new external API client.
    15  func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client {
    16  	return &Client{transport: transport, formats: formats}
    17  }
    18  
    19  /*
    20  Client for external API
    21  */
    22  type Client struct {
    23  	transport runtime.ClientTransport
    24  	formats   strfmt.Registry
    25  }
    26  
    27  /*
    28  GetAccountByPubkey Get an account by public key
    29  */
    30  func (a *Client) GetAccountByPubkey(params *GetAccountByPubkeyParams) (*GetAccountByPubkeyOK, error) {
    31  	// TODO: Validate the params before sending
    32  	if params == nil {
    33  		params = NewGetAccountByPubkeyParams()
    34  	}
    35  
    36  	result, err := a.transport.Submit(&runtime.ClientOperation{
    37  		ID:                 "GetAccountByPubkey",
    38  		Method:             "GET",
    39  		PathPattern:        "/accounts/{pubkey}",
    40  		ProducesMediaTypes: []string{"application/json"},
    41  		ConsumesMediaTypes: []string{""},
    42  		Schemes:            []string{"http"},
    43  		Params:             params,
    44  		Reader:             &GetAccountByPubkeyReader{formats: a.formats},
    45  		Context:            params.Context,
    46  		Client:             params.HTTPClient,
    47  	})
    48  	if err != nil {
    49  		return nil, err
    50  	}
    51  	return result.(*GetAccountByPubkeyOK), nil
    52  
    53  }
    54  
    55  /*
    56  GetAccountByPubkeyAndHash Get an account by public key after the block indicated by hash
    57  */
    58  func (a *Client) GetAccountByPubkeyAndHash(params *GetAccountByPubkeyAndHashParams) (*GetAccountByPubkeyAndHashOK, error) {
    59  	// TODO: Validate the params before sending
    60  	if params == nil {
    61  		params = NewGetAccountByPubkeyAndHashParams()
    62  	}
    63  
    64  	result, err := a.transport.Submit(&runtime.ClientOperation{
    65  		ID:                 "GetAccountByPubkeyAndHash",
    66  		Method:             "GET",
    67  		PathPattern:        "/accounts/{pubkey}/hash/{hash}",
    68  		ProducesMediaTypes: []string{"application/json"},
    69  		ConsumesMediaTypes: []string{""},
    70  		Schemes:            []string{"http"},
    71  		Params:             params,
    72  		Reader:             &GetAccountByPubkeyAndHashReader{formats: a.formats},
    73  		Context:            params.Context,
    74  		Client:             params.HTTPClient,
    75  	})
    76  	if err != nil {
    77  		return nil, err
    78  	}
    79  	return result.(*GetAccountByPubkeyAndHashOK), nil
    80  
    81  }
    82  
    83  /*
    84  GetAccountByPubkeyAndHeight Get an account by public key after the opening key block of the generation at height
    85  */
    86  func (a *Client) GetAccountByPubkeyAndHeight(params *GetAccountByPubkeyAndHeightParams) (*GetAccountByPubkeyAndHeightOK, error) {
    87  	// TODO: Validate the params before sending
    88  	if params == nil {
    89  		params = NewGetAccountByPubkeyAndHeightParams()
    90  	}
    91  
    92  	result, err := a.transport.Submit(&runtime.ClientOperation{
    93  		ID:                 "GetAccountByPubkeyAndHeight",
    94  		Method:             "GET",
    95  		PathPattern:        "/accounts/{pubkey}/height/{height}",
    96  		ProducesMediaTypes: []string{"application/json"},
    97  		ConsumesMediaTypes: []string{""},
    98  		Schemes:            []string{"http"},
    99  		Params:             params,
   100  		Reader:             &GetAccountByPubkeyAndHeightReader{formats: a.formats},
   101  		Context:            params.Context,
   102  		Client:             params.HTTPClient,
   103  	})
   104  	if err != nil {
   105  		return nil, err
   106  	}
   107  	return result.(*GetAccountByPubkeyAndHeightOK), nil
   108  
   109  }
   110  
   111  /*
   112  GetChannelByPubkey Get channel by public key
   113  */
   114  func (a *Client) GetChannelByPubkey(params *GetChannelByPubkeyParams) (*GetChannelByPubkeyOK, error) {
   115  	// TODO: Validate the params before sending
   116  	if params == nil {
   117  		params = NewGetChannelByPubkeyParams()
   118  	}
   119  
   120  	result, err := a.transport.Submit(&runtime.ClientOperation{
   121  		ID:                 "GetChannelByPubkey",
   122  		Method:             "GET",
   123  		PathPattern:        "/channels/{pubkey}",
   124  		ProducesMediaTypes: []string{"application/json"},
   125  		ConsumesMediaTypes: []string{""},
   126  		Schemes:            []string{"http"},
   127  		Params:             params,
   128  		Reader:             &GetChannelByPubkeyReader{formats: a.formats},
   129  		Context:            params.Context,
   130  		Client:             params.HTTPClient,
   131  	})
   132  	if err != nil {
   133  		return nil, err
   134  	}
   135  	return result.(*GetChannelByPubkeyOK), nil
   136  
   137  }
   138  
   139  /*
   140  GetContract Get a contract by pubkey
   141  */
   142  func (a *Client) GetContract(params *GetContractParams) (*GetContractOK, error) {
   143  	// TODO: Validate the params before sending
   144  	if params == nil {
   145  		params = NewGetContractParams()
   146  	}
   147  
   148  	result, err := a.transport.Submit(&runtime.ClientOperation{
   149  		ID:                 "GetContract",
   150  		Method:             "GET",
   151  		PathPattern:        "/contracts/{pubkey}",
   152  		ProducesMediaTypes: []string{"application/json"},
   153  		ConsumesMediaTypes: []string{""},
   154  		Schemes:            []string{"http"},
   155  		Params:             params,
   156  		Reader:             &GetContractReader{formats: a.formats},
   157  		Context:            params.Context,
   158  		Client:             params.HTTPClient,
   159  	})
   160  	if err != nil {
   161  		return nil, err
   162  	}
   163  	return result.(*GetContractOK), nil
   164  
   165  }
   166  
   167  /*
   168  GetContractCode Get contract code by pubkey
   169  */
   170  func (a *Client) GetContractCode(params *GetContractCodeParams) (*GetContractCodeOK, error) {
   171  	// TODO: Validate the params before sending
   172  	if params == nil {
   173  		params = NewGetContractCodeParams()
   174  	}
   175  
   176  	result, err := a.transport.Submit(&runtime.ClientOperation{
   177  		ID:                 "GetContractCode",
   178  		Method:             "GET",
   179  		PathPattern:        "/contracts/{pubkey}/code",
   180  		ProducesMediaTypes: []string{"application/json"},
   181  		ConsumesMediaTypes: []string{""},
   182  		Schemes:            []string{"http"},
   183  		Params:             params,
   184  		Reader:             &GetContractCodeReader{formats: a.formats},
   185  		Context:            params.Context,
   186  		Client:             params.HTTPClient,
   187  	})
   188  	if err != nil {
   189  		return nil, err
   190  	}
   191  	return result.(*GetContractCodeOK), nil
   192  
   193  }
   194  
   195  /*
   196  GetContractPoI Get a proof of inclusion for a contract
   197  */
   198  func (a *Client) GetContractPoI(params *GetContractPoIParams) (*GetContractPoIOK, error) {
   199  	// TODO: Validate the params before sending
   200  	if params == nil {
   201  		params = NewGetContractPoIParams()
   202  	}
   203  
   204  	result, err := a.transport.Submit(&runtime.ClientOperation{
   205  		ID:                 "GetContractPoI",
   206  		Method:             "GET",
   207  		PathPattern:        "/contracts/{pubkey}/poi",
   208  		ProducesMediaTypes: []string{"application/json"},
   209  		ConsumesMediaTypes: []string{""},
   210  		Schemes:            []string{"http"},
   211  		Params:             params,
   212  		Reader:             &GetContractPoIReader{formats: a.formats},
   213  		Context:            params.Context,
   214  		Client:             params.HTTPClient,
   215  	})
   216  	if err != nil {
   217  		return nil, err
   218  	}
   219  	return result.(*GetContractPoIOK), nil
   220  
   221  }
   222  
   223  /*
   224  GetContractStore Get contract store by pubkey
   225  */
   226  func (a *Client) GetContractStore(params *GetContractStoreParams) (*GetContractStoreOK, error) {
   227  	// TODO: Validate the params before sending
   228  	if params == nil {
   229  		params = NewGetContractStoreParams()
   230  	}
   231  
   232  	result, err := a.transport.Submit(&runtime.ClientOperation{
   233  		ID:                 "GetContractStore",
   234  		Method:             "GET",
   235  		PathPattern:        "/contracts/{pubkey}/store",
   236  		ProducesMediaTypes: []string{"application/json"},
   237  		ConsumesMediaTypes: []string{""},
   238  		Schemes:            []string{"http"},
   239  		Params:             params,
   240  		Reader:             &GetContractStoreReader{formats: a.formats},
   241  		Context:            params.Context,
   242  		Client:             params.HTTPClient,
   243  	})
   244  	if err != nil {
   245  		return nil, err
   246  	}
   247  	return result.(*GetContractStoreOK), nil
   248  
   249  }
   250  
   251  /*
   252  GetCurrentGeneration Get the current generation
   253  */
   254  func (a *Client) GetCurrentGeneration(params *GetCurrentGenerationParams) (*GetCurrentGenerationOK, error) {
   255  	// TODO: Validate the params before sending
   256  	if params == nil {
   257  		params = NewGetCurrentGenerationParams()
   258  	}
   259  
   260  	result, err := a.transport.Submit(&runtime.ClientOperation{
   261  		ID:                 "GetCurrentGeneration",
   262  		Method:             "GET",
   263  		PathPattern:        "/generations/current",
   264  		ProducesMediaTypes: []string{"application/json"},
   265  		ConsumesMediaTypes: []string{""},
   266  		Schemes:            []string{"http"},
   267  		Params:             params,
   268  		Reader:             &GetCurrentGenerationReader{formats: a.formats},
   269  		Context:            params.Context,
   270  		Client:             params.HTTPClient,
   271  	})
   272  	if err != nil {
   273  		return nil, err
   274  	}
   275  	return result.(*GetCurrentGenerationOK), nil
   276  
   277  }
   278  
   279  /*
   280  GetCurrentKeyBlock Get the current key block
   281  */
   282  func (a *Client) GetCurrentKeyBlock(params *GetCurrentKeyBlockParams) (*GetCurrentKeyBlockOK, error) {
   283  	// TODO: Validate the params before sending
   284  	if params == nil {
   285  		params = NewGetCurrentKeyBlockParams()
   286  	}
   287  
   288  	result, err := a.transport.Submit(&runtime.ClientOperation{
   289  		ID:                 "GetCurrentKeyBlock",
   290  		Method:             "GET",
   291  		PathPattern:        "/key-blocks/current",
   292  		ProducesMediaTypes: []string{"application/json"},
   293  		ConsumesMediaTypes: []string{""},
   294  		Schemes:            []string{"http"},
   295  		Params:             params,
   296  		Reader:             &GetCurrentKeyBlockReader{formats: a.formats},
   297  		Context:            params.Context,
   298  		Client:             params.HTTPClient,
   299  	})
   300  	if err != nil {
   301  		return nil, err
   302  	}
   303  	return result.(*GetCurrentKeyBlockOK), nil
   304  
   305  }
   306  
   307  /*
   308  GetCurrentKeyBlockHash Get the hash of the current key block
   309  */
   310  func (a *Client) GetCurrentKeyBlockHash(params *GetCurrentKeyBlockHashParams) (*GetCurrentKeyBlockHashOK, error) {
   311  	// TODO: Validate the params before sending
   312  	if params == nil {
   313  		params = NewGetCurrentKeyBlockHashParams()
   314  	}
   315  
   316  	result, err := a.transport.Submit(&runtime.ClientOperation{
   317  		ID:                 "GetCurrentKeyBlockHash",
   318  		Method:             "GET",
   319  		PathPattern:        "/key-blocks/current/hash",
   320  		ProducesMediaTypes: []string{"application/json"},
   321  		ConsumesMediaTypes: []string{""},
   322  		Schemes:            []string{"http"},
   323  		Params:             params,
   324  		Reader:             &GetCurrentKeyBlockHashReader{formats: a.formats},
   325  		Context:            params.Context,
   326  		Client:             params.HTTPClient,
   327  	})
   328  	if err != nil {
   329  		return nil, err
   330  	}
   331  	return result.(*GetCurrentKeyBlockHashOK), nil
   332  
   333  }
   334  
   335  /*
   336  GetCurrentKeyBlockHeight Get the height of the current key block
   337  */
   338  func (a *Client) GetCurrentKeyBlockHeight(params *GetCurrentKeyBlockHeightParams) (*GetCurrentKeyBlockHeightOK, error) {
   339  	// TODO: Validate the params before sending
   340  	if params == nil {
   341  		params = NewGetCurrentKeyBlockHeightParams()
   342  	}
   343  
   344  	result, err := a.transport.Submit(&runtime.ClientOperation{
   345  		ID:                 "GetCurrentKeyBlockHeight",
   346  		Method:             "GET",
   347  		PathPattern:        "/key-blocks/current/height",
   348  		ProducesMediaTypes: []string{"application/json"},
   349  		ConsumesMediaTypes: []string{""},
   350  		Schemes:            []string{"http"},
   351  		Params:             params,
   352  		Reader:             &GetCurrentKeyBlockHeightReader{formats: a.formats},
   353  		Context:            params.Context,
   354  		Client:             params.HTTPClient,
   355  	})
   356  	if err != nil {
   357  		return nil, err
   358  	}
   359  	return result.(*GetCurrentKeyBlockHeightOK), nil
   360  
   361  }
   362  
   363  /*
   364  GetGenerationByHash Get a generation by hash
   365  */
   366  func (a *Client) GetGenerationByHash(params *GetGenerationByHashParams) (*GetGenerationByHashOK, error) {
   367  	// TODO: Validate the params before sending
   368  	if params == nil {
   369  		params = NewGetGenerationByHashParams()
   370  	}
   371  
   372  	result, err := a.transport.Submit(&runtime.ClientOperation{
   373  		ID:                 "GetGenerationByHash",
   374  		Method:             "GET",
   375  		PathPattern:        "/generations/hash/{hash}",
   376  		ProducesMediaTypes: []string{"application/json"},
   377  		ConsumesMediaTypes: []string{""},
   378  		Schemes:            []string{"http"},
   379  		Params:             params,
   380  		Reader:             &GetGenerationByHashReader{formats: a.formats},
   381  		Context:            params.Context,
   382  		Client:             params.HTTPClient,
   383  	})
   384  	if err != nil {
   385  		return nil, err
   386  	}
   387  	return result.(*GetGenerationByHashOK), nil
   388  
   389  }
   390  
   391  /*
   392  GetGenerationByHeight Get a generation by height
   393  */
   394  func (a *Client) GetGenerationByHeight(params *GetGenerationByHeightParams) (*GetGenerationByHeightOK, error) {
   395  	// TODO: Validate the params before sending
   396  	if params == nil {
   397  		params = NewGetGenerationByHeightParams()
   398  	}
   399  
   400  	result, err := a.transport.Submit(&runtime.ClientOperation{
   401  		ID:                 "GetGenerationByHeight",
   402  		Method:             "GET",
   403  		PathPattern:        "/generations/height/{height}",
   404  		ProducesMediaTypes: []string{"application/json"},
   405  		ConsumesMediaTypes: []string{""},
   406  		Schemes:            []string{"http"},
   407  		Params:             params,
   408  		Reader:             &GetGenerationByHeightReader{formats: a.formats},
   409  		Context:            params.Context,
   410  		Client:             params.HTTPClient,
   411  	})
   412  	if err != nil {
   413  		return nil, err
   414  	}
   415  	return result.(*GetGenerationByHeightOK), nil
   416  
   417  }
   418  
   419  /*
   420  GetKeyBlockByHash Get a key block by hash
   421  */
   422  func (a *Client) GetKeyBlockByHash(params *GetKeyBlockByHashParams) (*GetKeyBlockByHashOK, error) {
   423  	// TODO: Validate the params before sending
   424  	if params == nil {
   425  		params = NewGetKeyBlockByHashParams()
   426  	}
   427  
   428  	result, err := a.transport.Submit(&runtime.ClientOperation{
   429  		ID:                 "GetKeyBlockByHash",
   430  		Method:             "GET",
   431  		PathPattern:        "/key-blocks/hash/{hash}",
   432  		ProducesMediaTypes: []string{"application/json"},
   433  		ConsumesMediaTypes: []string{""},
   434  		Schemes:            []string{"http"},
   435  		Params:             params,
   436  		Reader:             &GetKeyBlockByHashReader{formats: a.formats},
   437  		Context:            params.Context,
   438  		Client:             params.HTTPClient,
   439  	})
   440  	if err != nil {
   441  		return nil, err
   442  	}
   443  	return result.(*GetKeyBlockByHashOK), nil
   444  
   445  }
   446  
   447  /*
   448  GetKeyBlockByHeight Get a key block by height
   449  */
   450  func (a *Client) GetKeyBlockByHeight(params *GetKeyBlockByHeightParams) (*GetKeyBlockByHeightOK, error) {
   451  	// TODO: Validate the params before sending
   452  	if params == nil {
   453  		params = NewGetKeyBlockByHeightParams()
   454  	}
   455  
   456  	result, err := a.transport.Submit(&runtime.ClientOperation{
   457  		ID:                 "GetKeyBlockByHeight",
   458  		Method:             "GET",
   459  		PathPattern:        "/key-blocks/height/{height}",
   460  		ProducesMediaTypes: []string{"application/json"},
   461  		ConsumesMediaTypes: []string{""},
   462  		Schemes:            []string{"http"},
   463  		Params:             params,
   464  		Reader:             &GetKeyBlockByHeightReader{formats: a.formats},
   465  		Context:            params.Context,
   466  		Client:             params.HTTPClient,
   467  	})
   468  	if err != nil {
   469  		return nil, err
   470  	}
   471  	return result.(*GetKeyBlockByHeightOK), nil
   472  
   473  }
   474  
   475  /*
   476  GetMicroBlockHeaderByHash Get a micro block header by hash
   477  */
   478  func (a *Client) GetMicroBlockHeaderByHash(params *GetMicroBlockHeaderByHashParams) (*GetMicroBlockHeaderByHashOK, error) {
   479  	// TODO: Validate the params before sending
   480  	if params == nil {
   481  		params = NewGetMicroBlockHeaderByHashParams()
   482  	}
   483  
   484  	result, err := a.transport.Submit(&runtime.ClientOperation{
   485  		ID:                 "GetMicroBlockHeaderByHash",
   486  		Method:             "GET",
   487  		PathPattern:        "/micro-blocks/hash/{hash}/header",
   488  		ProducesMediaTypes: []string{"application/json"},
   489  		ConsumesMediaTypes: []string{""},
   490  		Schemes:            []string{"http"},
   491  		Params:             params,
   492  		Reader:             &GetMicroBlockHeaderByHashReader{formats: a.formats},
   493  		Context:            params.Context,
   494  		Client:             params.HTTPClient,
   495  	})
   496  	if err != nil {
   497  		return nil, err
   498  	}
   499  	return result.(*GetMicroBlockHeaderByHashOK), nil
   500  
   501  }
   502  
   503  /*
   504  GetMicroBlockTransactionByHashAndIndex Get a micro block transaction by hash and index
   505  */
   506  func (a *Client) GetMicroBlockTransactionByHashAndIndex(params *GetMicroBlockTransactionByHashAndIndexParams) (*GetMicroBlockTransactionByHashAndIndexOK, error) {
   507  	// TODO: Validate the params before sending
   508  	if params == nil {
   509  		params = NewGetMicroBlockTransactionByHashAndIndexParams()
   510  	}
   511  
   512  	result, err := a.transport.Submit(&runtime.ClientOperation{
   513  		ID:                 "GetMicroBlockTransactionByHashAndIndex",
   514  		Method:             "GET",
   515  		PathPattern:        "/micro-blocks/hash/{hash}/transactions/index/{index}",
   516  		ProducesMediaTypes: []string{"application/json"},
   517  		ConsumesMediaTypes: []string{""},
   518  		Schemes:            []string{"http"},
   519  		Params:             params,
   520  		Reader:             &GetMicroBlockTransactionByHashAndIndexReader{formats: a.formats},
   521  		Context:            params.Context,
   522  		Client:             params.HTTPClient,
   523  	})
   524  	if err != nil {
   525  		return nil, err
   526  	}
   527  	return result.(*GetMicroBlockTransactionByHashAndIndexOK), nil
   528  
   529  }
   530  
   531  /*
   532  GetMicroBlockTransactionsByHash Get micro block transactions by hash
   533  */
   534  func (a *Client) GetMicroBlockTransactionsByHash(params *GetMicroBlockTransactionsByHashParams) (*GetMicroBlockTransactionsByHashOK, error) {
   535  	// TODO: Validate the params before sending
   536  	if params == nil {
   537  		params = NewGetMicroBlockTransactionsByHashParams()
   538  	}
   539  
   540  	result, err := a.transport.Submit(&runtime.ClientOperation{
   541  		ID:                 "GetMicroBlockTransactionsByHash",
   542  		Method:             "GET",
   543  		PathPattern:        "/micro-blocks/hash/{hash}/transactions",
   544  		ProducesMediaTypes: []string{"application/json"},
   545  		ConsumesMediaTypes: []string{""},
   546  		Schemes:            []string{"http"},
   547  		Params:             params,
   548  		Reader:             &GetMicroBlockTransactionsByHashReader{formats: a.formats},
   549  		Context:            params.Context,
   550  		Client:             params.HTTPClient,
   551  	})
   552  	if err != nil {
   553  		return nil, err
   554  	}
   555  	return result.(*GetMicroBlockTransactionsByHashOK), nil
   556  
   557  }
   558  
   559  /*
   560  GetMicroBlockTransactionsCountByHash Get micro block transaction count by hash
   561  */
   562  func (a *Client) GetMicroBlockTransactionsCountByHash(params *GetMicroBlockTransactionsCountByHashParams) (*GetMicroBlockTransactionsCountByHashOK, error) {
   563  	// TODO: Validate the params before sending
   564  	if params == nil {
   565  		params = NewGetMicroBlockTransactionsCountByHashParams()
   566  	}
   567  
   568  	result, err := a.transport.Submit(&runtime.ClientOperation{
   569  		ID:                 "GetMicroBlockTransactionsCountByHash",
   570  		Method:             "GET",
   571  		PathPattern:        "/micro-blocks/hash/{hash}/transactions/count",
   572  		ProducesMediaTypes: []string{"application/json"},
   573  		ConsumesMediaTypes: []string{""},
   574  		Schemes:            []string{"http"},
   575  		Params:             params,
   576  		Reader:             &GetMicroBlockTransactionsCountByHashReader{formats: a.formats},
   577  		Context:            params.Context,
   578  		Client:             params.HTTPClient,
   579  	})
   580  	if err != nil {
   581  		return nil, err
   582  	}
   583  	return result.(*GetMicroBlockTransactionsCountByHashOK), nil
   584  
   585  }
   586  
   587  /*
   588  GetNameEntryByName Get name entry from naming system
   589  */
   590  func (a *Client) GetNameEntryByName(params *GetNameEntryByNameParams) (*GetNameEntryByNameOK, error) {
   591  	// TODO: Validate the params before sending
   592  	if params == nil {
   593  		params = NewGetNameEntryByNameParams()
   594  	}
   595  
   596  	result, err := a.transport.Submit(&runtime.ClientOperation{
   597  		ID:                 "GetNameEntryByName",
   598  		Method:             "GET",
   599  		PathPattern:        "/names/{name}",
   600  		ProducesMediaTypes: []string{"application/json"},
   601  		ConsumesMediaTypes: []string{""},
   602  		Schemes:            []string{"http"},
   603  		Params:             params,
   604  		Reader:             &GetNameEntryByNameReader{formats: a.formats},
   605  		Context:            params.Context,
   606  		Client:             params.HTTPClient,
   607  	})
   608  	if err != nil {
   609  		return nil, err
   610  	}
   611  	return result.(*GetNameEntryByNameOK), nil
   612  
   613  }
   614  
   615  /*
   616  GetOracleByPubkey Get an oracle by public key
   617  */
   618  func (a *Client) GetOracleByPubkey(params *GetOracleByPubkeyParams) (*GetOracleByPubkeyOK, error) {
   619  	// TODO: Validate the params before sending
   620  	if params == nil {
   621  		params = NewGetOracleByPubkeyParams()
   622  	}
   623  
   624  	result, err := a.transport.Submit(&runtime.ClientOperation{
   625  		ID:                 "GetOracleByPubkey",
   626  		Method:             "GET",
   627  		PathPattern:        "/oracles/{pubkey}",
   628  		ProducesMediaTypes: []string{"application/json"},
   629  		ConsumesMediaTypes: []string{""},
   630  		Schemes:            []string{"http"},
   631  		Params:             params,
   632  		Reader:             &GetOracleByPubkeyReader{formats: a.formats},
   633  		Context:            params.Context,
   634  		Client:             params.HTTPClient,
   635  	})
   636  	if err != nil {
   637  		return nil, err
   638  	}
   639  	return result.(*GetOracleByPubkeyOK), nil
   640  
   641  }
   642  
   643  /*
   644  GetOracleQueriesByPubkey Get oracle queries by public key
   645  */
   646  func (a *Client) GetOracleQueriesByPubkey(params *GetOracleQueriesByPubkeyParams) (*GetOracleQueriesByPubkeyOK, error) {
   647  	// TODO: Validate the params before sending
   648  	if params == nil {
   649  		params = NewGetOracleQueriesByPubkeyParams()
   650  	}
   651  
   652  	result, err := a.transport.Submit(&runtime.ClientOperation{
   653  		ID:                 "GetOracleQueriesByPubkey",
   654  		Method:             "GET",
   655  		PathPattern:        "/oracles/{pubkey}/queries",
   656  		ProducesMediaTypes: []string{"application/json"},
   657  		ConsumesMediaTypes: []string{""},
   658  		Schemes:            []string{"http"},
   659  		Params:             params,
   660  		Reader:             &GetOracleQueriesByPubkeyReader{formats: a.formats},
   661  		Context:            params.Context,
   662  		Client:             params.HTTPClient,
   663  	})
   664  	if err != nil {
   665  		return nil, err
   666  	}
   667  	return result.(*GetOracleQueriesByPubkeyOK), nil
   668  
   669  }
   670  
   671  /*
   672  GetOracleQueryByPubkeyAndQueryID Get an oracle query by public key and query ID
   673  */
   674  func (a *Client) GetOracleQueryByPubkeyAndQueryID(params *GetOracleQueryByPubkeyAndQueryIDParams) (*GetOracleQueryByPubkeyAndQueryIDOK, error) {
   675  	// TODO: Validate the params before sending
   676  	if params == nil {
   677  		params = NewGetOracleQueryByPubkeyAndQueryIDParams()
   678  	}
   679  
   680  	result, err := a.transport.Submit(&runtime.ClientOperation{
   681  		ID:                 "GetOracleQueryByPubkeyAndQueryId",
   682  		Method:             "GET",
   683  		PathPattern:        "/oracles/{pubkey}/queries/{query-id}",
   684  		ProducesMediaTypes: []string{"application/json"},
   685  		ConsumesMediaTypes: []string{""},
   686  		Schemes:            []string{"http"},
   687  		Params:             params,
   688  		Reader:             &GetOracleQueryByPubkeyAndQueryIDReader{formats: a.formats},
   689  		Context:            params.Context,
   690  		Client:             params.HTTPClient,
   691  	})
   692  	if err != nil {
   693  		return nil, err
   694  	}
   695  	return result.(*GetOracleQueryByPubkeyAndQueryIDOK), nil
   696  
   697  }
   698  
   699  /*
   700  GetPeerPubkey Get peer public key
   701  */
   702  func (a *Client) GetPeerPubkey(params *GetPeerPubkeyParams) (*GetPeerPubkeyOK, error) {
   703  	// TODO: Validate the params before sending
   704  	if params == nil {
   705  		params = NewGetPeerPubkeyParams()
   706  	}
   707  
   708  	result, err := a.transport.Submit(&runtime.ClientOperation{
   709  		ID:                 "GetPeerPubkey",
   710  		Method:             "GET",
   711  		PathPattern:        "/peers/pubkey",
   712  		ProducesMediaTypes: []string{"application/json"},
   713  		ConsumesMediaTypes: []string{""},
   714  		Schemes:            []string{"http"},
   715  		Params:             params,
   716  		Reader:             &GetPeerPubkeyReader{formats: a.formats},
   717  		Context:            params.Context,
   718  		Client:             params.HTTPClient,
   719  	})
   720  	if err != nil {
   721  		return nil, err
   722  	}
   723  	return result.(*GetPeerPubkeyOK), nil
   724  
   725  }
   726  
   727  /*
   728  GetPendingAccountTransactionsByPubkey Get pending account transactions by public key
   729  */
   730  func (a *Client) GetPendingAccountTransactionsByPubkey(params *GetPendingAccountTransactionsByPubkeyParams) (*GetPendingAccountTransactionsByPubkeyOK, error) {
   731  	// TODO: Validate the params before sending
   732  	if params == nil {
   733  		params = NewGetPendingAccountTransactionsByPubkeyParams()
   734  	}
   735  
   736  	result, err := a.transport.Submit(&runtime.ClientOperation{
   737  		ID:                 "GetPendingAccountTransactionsByPubkey",
   738  		Method:             "GET",
   739  		PathPattern:        "/accounts/{pubkey}/transactions/pending",
   740  		ProducesMediaTypes: []string{"application/json"},
   741  		ConsumesMediaTypes: []string{""},
   742  		Schemes:            []string{"http"},
   743  		Params:             params,
   744  		Reader:             &GetPendingAccountTransactionsByPubkeyReader{formats: a.formats},
   745  		Context:            params.Context,
   746  		Client:             params.HTTPClient,
   747  	})
   748  	if err != nil {
   749  		return nil, err
   750  	}
   751  	return result.(*GetPendingAccountTransactionsByPubkeyOK), nil
   752  
   753  }
   754  
   755  /*
   756  GetPendingKeyBlock Get the pending key block
   757  */
   758  func (a *Client) GetPendingKeyBlock(params *GetPendingKeyBlockParams) (*GetPendingKeyBlockOK, error) {
   759  	// TODO: Validate the params before sending
   760  	if params == nil {
   761  		params = NewGetPendingKeyBlockParams()
   762  	}
   763  
   764  	result, err := a.transport.Submit(&runtime.ClientOperation{
   765  		ID:                 "GetPendingKeyBlock",
   766  		Method:             "GET",
   767  		PathPattern:        "/key-blocks/pending",
   768  		ProducesMediaTypes: []string{"application/json"},
   769  		ConsumesMediaTypes: []string{""},
   770  		Schemes:            []string{"http"},
   771  		Params:             params,
   772  		Reader:             &GetPendingKeyBlockReader{formats: a.formats},
   773  		Context:            params.Context,
   774  		Client:             params.HTTPClient,
   775  	})
   776  	if err != nil {
   777  		return nil, err
   778  	}
   779  	return result.(*GetPendingKeyBlockOK), nil
   780  
   781  }
   782  
   783  /*
   784  GetStatus Get the status of a node
   785  */
   786  func (a *Client) GetStatus(params *GetStatusParams) (*GetStatusOK, error) {
   787  	// TODO: Validate the params before sending
   788  	if params == nil {
   789  		params = NewGetStatusParams()
   790  	}
   791  
   792  	result, err := a.transport.Submit(&runtime.ClientOperation{
   793  		ID:                 "GetStatus",
   794  		Method:             "GET",
   795  		PathPattern:        "/status",
   796  		ProducesMediaTypes: []string{"application/json"},
   797  		ConsumesMediaTypes: []string{""},
   798  		Schemes:            []string{"http"},
   799  		Params:             params,
   800  		Reader:             &GetStatusReader{formats: a.formats},
   801  		Context:            params.Context,
   802  		Client:             params.HTTPClient,
   803  	})
   804  	if err != nil {
   805  		return nil, err
   806  	}
   807  	return result.(*GetStatusOK), nil
   808  
   809  }
   810  
   811  /*
   812  GetTopBlock Get the top block (either key or micro block)
   813  */
   814  func (a *Client) GetTopBlock(params *GetTopBlockParams) (*GetTopBlockOK, error) {
   815  	// TODO: Validate the params before sending
   816  	if params == nil {
   817  		params = NewGetTopBlockParams()
   818  	}
   819  
   820  	result, err := a.transport.Submit(&runtime.ClientOperation{
   821  		ID:                 "GetTopBlock",
   822  		Method:             "GET",
   823  		PathPattern:        "/blocks/top",
   824  		ProducesMediaTypes: []string{"application/json"},
   825  		ConsumesMediaTypes: []string{""},
   826  		Schemes:            []string{"http"},
   827  		Params:             params,
   828  		Reader:             &GetTopBlockReader{formats: a.formats},
   829  		Context:            params.Context,
   830  		Client:             params.HTTPClient,
   831  	})
   832  	if err != nil {
   833  		return nil, err
   834  	}
   835  	return result.(*GetTopBlockOK), nil
   836  
   837  }
   838  
   839  /*
   840  GetTransactionByHash Get a transaction by hash
   841  */
   842  func (a *Client) GetTransactionByHash(params *GetTransactionByHashParams) (*GetTransactionByHashOK, error) {
   843  	// TODO: Validate the params before sending
   844  	if params == nil {
   845  		params = NewGetTransactionByHashParams()
   846  	}
   847  
   848  	result, err := a.transport.Submit(&runtime.ClientOperation{
   849  		ID:                 "GetTransactionByHash",
   850  		Method:             "GET",
   851  		PathPattern:        "/transactions/{hash}",
   852  		ProducesMediaTypes: []string{"application/json"},
   853  		ConsumesMediaTypes: []string{""},
   854  		Schemes:            []string{"http"},
   855  		Params:             params,
   856  		Reader:             &GetTransactionByHashReader{formats: a.formats},
   857  		Context:            params.Context,
   858  		Client:             params.HTTPClient,
   859  	})
   860  	if err != nil {
   861  		return nil, err
   862  	}
   863  	return result.(*GetTransactionByHashOK), nil
   864  
   865  }
   866  
   867  /*
   868  GetTransactionInfoByHash get transaction info by hash API
   869  */
   870  func (a *Client) GetTransactionInfoByHash(params *GetTransactionInfoByHashParams) (*GetTransactionInfoByHashOK, error) {
   871  	// TODO: Validate the params before sending
   872  	if params == nil {
   873  		params = NewGetTransactionInfoByHashParams()
   874  	}
   875  
   876  	result, err := a.transport.Submit(&runtime.ClientOperation{
   877  		ID:                 "GetTransactionInfoByHash",
   878  		Method:             "GET",
   879  		PathPattern:        "/transactions/{hash}/info",
   880  		ProducesMediaTypes: []string{"application/json"},
   881  		ConsumesMediaTypes: []string{""},
   882  		Schemes:            []string{"http"},
   883  		Params:             params,
   884  		Reader:             &GetTransactionInfoByHashReader{formats: a.formats},
   885  		Context:            params.Context,
   886  		Client:             params.HTTPClient,
   887  	})
   888  	if err != nil {
   889  		return nil, err
   890  	}
   891  	return result.(*GetTransactionInfoByHashOK), nil
   892  
   893  }
   894  
   895  /*
   896  PostTransaction Post a new transaction
   897  */
   898  func (a *Client) PostTransaction(params *PostTransactionParams) (*PostTransactionOK, error) {
   899  	// TODO: Validate the params before sending
   900  	if params == nil {
   901  		params = NewPostTransactionParams()
   902  	}
   903  
   904  	result, err := a.transport.Submit(&runtime.ClientOperation{
   905  		ID:                 "PostTransaction",
   906  		Method:             "POST",
   907  		PathPattern:        "/transactions",
   908  		ProducesMediaTypes: []string{"application/json"},
   909  		ConsumesMediaTypes: []string{"application/json"},
   910  		Schemes:            []string{"http"},
   911  		Params:             params,
   912  		Reader:             &PostTransactionReader{formats: a.formats},
   913  		Context:            params.Context,
   914  		Client:             params.HTTPClient,
   915  	})
   916  	if err != nil {
   917  		return nil, err
   918  	}
   919  	return result.(*PostTransactionOK), nil
   920  
   921  }
   922  
   923  // SetTransport changes the transport on the client
   924  func (a *Client) SetTransport(transport runtime.ClientTransport) {
   925  	a.transport = transport
   926  }