sky_api 0.26.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +190 -0
  4. data/Rakefile +10 -0
  5. data/docs/Address.md +17 -0
  6. data/docs/ApiV1PendingTxsTransaction.md +29 -0
  7. data/docs/ApiV1PendingTxsTransactionOutputs.md +23 -0
  8. data/docs/BlockSchema.md +21 -0
  9. data/docs/BlockSchemaBody.md +17 -0
  10. data/docs/BlockVerboseSchema.md +21 -0
  11. data/docs/BlockVerboseSchemaBody.md +17 -0
  12. data/docs/BlockVerboseSchemaHeader.md +31 -0
  13. data/docs/DefaultApi.md +2767 -0
  14. data/docs/InlineResponse200.md +17 -0
  15. data/docs/InlineResponse2001.md +17 -0
  16. data/docs/InlineResponse20010.md +25 -0
  17. data/docs/InlineResponse2002.md +29 -0
  18. data/docs/InlineResponse2003.md +17 -0
  19. data/docs/InlineResponse2004.md +17 -0
  20. data/docs/InlineResponse2005.md +21 -0
  21. data/docs/InlineResponse2006.md +17 -0
  22. data/docs/InlineResponse2007.md +17 -0
  23. data/docs/InlineResponse2008.md +17 -0
  24. data/docs/InlineResponse2008Data.md +17 -0
  25. data/docs/InlineResponse2009.md +17 -0
  26. data/docs/InlineResponseDefault.md +19 -0
  27. data/docs/NetworkConnectionSchema.md +41 -0
  28. data/docs/NetworkConnectionSchemaUnconfirmedVerifyTransaction.md +21 -0
  29. data/docs/Transaction.md +21 -0
  30. data/docs/TransactionEncoded.md +25 -0
  31. data/docs/TransactionEncodedS.md +21 -0
  32. data/docs/TransactionStatus.md +23 -0
  33. data/docs/TransactionTxn.md +31 -0
  34. data/docs/TransactionV2ParamsAddress.md +17 -0
  35. data/docs/TransactionV2ParamsAddressHoursSelection.md +17 -0
  36. data/docs/TransactionV2ParamsUnspent.md +23 -0
  37. data/docs/TransactionV2ParamsUnspentHoursSelection.md +21 -0
  38. data/docs/TransactionV2ParamsUnspentTo.md +19 -0
  39. data/docs/TransactionVerbose.md +21 -0
  40. data/docs/TransactionVerboseTxn.md +35 -0
  41. data/docs/TransactionVerboseTxnInputs.md +25 -0
  42. data/docs/TransactionVerifyRequest.md +19 -0
  43. data/docs/WalletTransactionRequest.md +25 -0
  44. data/docs/WalletTransactionRequestHoursSelection.md +21 -0
  45. data/docs/WalletTransactionRequestWallet.md +23 -0
  46. data/docs/WalletTransactionSignRequest.md +23 -0
  47. data/git_push.sh +55 -0
  48. data/lib/sky_api.rb +81 -0
  49. data/lib/sky_api/api/default_api.rb +3371 -0
  50. data/lib/sky_api/api_client.rb +387 -0
  51. data/lib/sky_api/api_error.rb +57 -0
  52. data/lib/sky_api/configuration.rb +259 -0
  53. data/lib/sky_api/models/address.rb +201 -0
  54. data/lib/sky_api/models/api_v1_pending_txs_transaction.rb +256 -0
  55. data/lib/sky_api/models/api_v1_pending_txs_transaction_outputs.rb +223 -0
  56. data/lib/sky_api/models/block_schema.rb +214 -0
  57. data/lib/sky_api/models/block_schema_body.rb +198 -0
  58. data/lib/sky_api/models/block_verbose_schema.rb +214 -0
  59. data/lib/sky_api/models/block_verbose_schema_body.rb +198 -0
  60. data/lib/sky_api/models/block_verbose_schema_header.rb +259 -0
  61. data/lib/sky_api/models/inline_response200.rb +196 -0
  62. data/lib/sky_api/models/inline_response2001.rb +198 -0
  63. data/lib/sky_api/models/inline_response20010.rb +232 -0
  64. data/lib/sky_api/models/inline_response2002.rb +261 -0
  65. data/lib/sky_api/models/inline_response2003.rb +196 -0
  66. data/lib/sky_api/models/inline_response2004.rb +198 -0
  67. data/lib/sky_api/models/inline_response2005.rb +217 -0
  68. data/lib/sky_api/models/inline_response2006.rb +198 -0
  69. data/lib/sky_api/models/inline_response2007.rb +196 -0
  70. data/lib/sky_api/models/inline_response2008.rb +196 -0
  71. data/lib/sky_api/models/inline_response2008_data.rb +196 -0
  72. data/lib/sky_api/models/inline_response2009.rb +196 -0
  73. data/lib/sky_api/models/inline_response_default.rb +205 -0
  74. data/lib/sky_api/models/network_connection_schema.rb +338 -0
  75. data/lib/sky_api/models/network_connection_schema_unconfirmed_verify_transaction.rb +215 -0
  76. data/lib/sky_api/models/transaction.rb +214 -0
  77. data/lib/sky_api/models/transaction_encoded.rb +232 -0
  78. data/lib/sky_api/models/transaction_encoded_s.rb +214 -0
  79. data/lib/sky_api/models/transaction_status.rb +225 -0
  80. data/lib/sky_api/models/transaction_txn.rb +266 -0
  81. data/lib/sky_api/models/transaction_v2_params_address.rb +196 -0
  82. data/lib/sky_api/models/transaction_v2_params_address_hours_selection.rb +196 -0
  83. data/lib/sky_api/models/transaction_v2_params_unspent.rb +227 -0
  84. data/lib/sky_api/models/transaction_v2_params_unspent_hours_selection.rb +214 -0
  85. data/lib/sky_api/models/transaction_v2_params_unspent_to.rb +205 -0
  86. data/lib/sky_api/models/transaction_verbose.rb +214 -0
  87. data/lib/sky_api/models/transaction_verbose_txn.rb +284 -0
  88. data/lib/sky_api/models/transaction_verbose_txn_inputs.rb +232 -0
  89. data/lib/sky_api/models/transaction_verify_request.rb +205 -0
  90. data/lib/sky_api/models/wallet_transaction_request.rb +234 -0
  91. data/lib/sky_api/models/wallet_transaction_request_hours_selection.rb +214 -0
  92. data/lib/sky_api/models/wallet_transaction_request_wallet.rb +227 -0
  93. data/lib/sky_api/models/wallet_transaction_sign_request.rb +225 -0
  94. data/lib/sky_api/version.rb +15 -0
  95. data/sky_api.gemspec +45 -0
  96. data/spec/api/default_api_spec.rb +652 -0
  97. data/spec/api_client_spec.rb +226 -0
  98. data/spec/configuration_spec.rb +42 -0
  99. data/spec/models/address_spec.rb +41 -0
  100. data/spec/models/api_v1_pending_txs_transaction_outputs_spec.rb +59 -0
  101. data/spec/models/api_v1_pending_txs_transaction_spec.rb +77 -0
  102. data/spec/models/block_schema_body_spec.rb +41 -0
  103. data/spec/models/block_schema_spec.rb +53 -0
  104. data/spec/models/block_verbose_schema_body_spec.rb +41 -0
  105. data/spec/models/block_verbose_schema_header_spec.rb +83 -0
  106. data/spec/models/block_verbose_schema_spec.rb +53 -0
  107. data/spec/models/inline_response20010_spec.rb +65 -0
  108. data/spec/models/inline_response2001_spec.rb +41 -0
  109. data/spec/models/inline_response2002_spec.rb +77 -0
  110. data/spec/models/inline_response2003_spec.rb +41 -0
  111. data/spec/models/inline_response2004_spec.rb +41 -0
  112. data/spec/models/inline_response2005_spec.rb +53 -0
  113. data/spec/models/inline_response2006_spec.rb +41 -0
  114. data/spec/models/inline_response2007_spec.rb +41 -0
  115. data/spec/models/inline_response2008_data_spec.rb +41 -0
  116. data/spec/models/inline_response2008_spec.rb +41 -0
  117. data/spec/models/inline_response2009_spec.rb +41 -0
  118. data/spec/models/inline_response200_spec.rb +41 -0
  119. data/spec/models/inline_response_default_spec.rb +47 -0
  120. data/spec/models/network_connection_schema_spec.rb +117 -0
  121. data/spec/models/network_connection_schema_unconfirmed_verify_transaction_spec.rb +53 -0
  122. data/spec/models/transaction_encoded_s_spec.rb +53 -0
  123. data/spec/models/transaction_encoded_spec.rb +65 -0
  124. data/spec/models/transaction_spec.rb +53 -0
  125. data/spec/models/transaction_status_spec.rb +59 -0
  126. data/spec/models/transaction_txn_spec.rb +83 -0
  127. data/spec/models/transaction_v2_params_address_hours_selection_spec.rb +41 -0
  128. data/spec/models/transaction_v2_params_address_spec.rb +41 -0
  129. data/spec/models/transaction_v2_params_unspent_hours_selection_spec.rb +53 -0
  130. data/spec/models/transaction_v2_params_unspent_spec.rb +59 -0
  131. data/spec/models/transaction_v2_params_unspent_to_spec.rb +47 -0
  132. data/spec/models/transaction_verbose_spec.rb +53 -0
  133. data/spec/models/transaction_verbose_txn_inputs_spec.rb +65 -0
  134. data/spec/models/transaction_verbose_txn_spec.rb +95 -0
  135. data/spec/models/transaction_verify_request_spec.rb +47 -0
  136. data/spec/models/wallet_transaction_request_hours_selection_spec.rb +53 -0
  137. data/spec/models/wallet_transaction_request_spec.rb +65 -0
  138. data/spec/models/wallet_transaction_request_wallet_spec.rb +59 -0
  139. data/spec/models/wallet_transaction_sign_request_spec.rb +59 -0
  140. data/spec/spec_helper.rb +111 -0
  141. metadata +407 -0
@@ -0,0 +1,3371 @@
1
+ =begin
2
+ #Skycoin REST API.
3
+
4
+ #Skycoin is a next-generation cryptocurrency.
5
+
6
+ The version of the OpenAPI document: 0.26.0
7
+ Contact: contact@skycoin.net
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.0.1
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module SkyApi
16
+ class DefaultApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Returns the total number of unique address that have coins.
23
+ # @param [Hash] opts the optional parameters
24
+ # @return [InlineResponse200]
25
+ def address_count(opts = {})
26
+ data, _status_code, _headers = address_count_with_http_info(opts)
27
+ data
28
+ end
29
+
30
+ # Returns the total number of unique address that have coins.
31
+ # @param [Hash] opts the optional parameters
32
+ # @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
33
+ def address_count_with_http_info(opts = {})
34
+ if @api_client.config.debugging
35
+ @api_client.config.logger.debug 'Calling API: DefaultApi.address_count ...'
36
+ end
37
+ # resource path
38
+ local_var_path = '/api/v1/addresscount'
39
+
40
+ # query parameters
41
+ query_params = opts[:query_params] || {}
42
+
43
+ # header parameters
44
+ header_params = opts[:header_params] || {}
45
+ # HTTP header 'Accept' (if needed)
46
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
47
+
48
+ # form parameters
49
+ form_params = opts[:form_params] || {}
50
+
51
+ # http body (model)
52
+ post_body = opts[:body]
53
+
54
+ # return_type
55
+ return_type = opts[:return_type] || 'InlineResponse200'
56
+
57
+ # auth_names
58
+ auth_names = opts[:auth_names] || []
59
+
60
+ new_options = opts.merge(
61
+ :header_params => header_params,
62
+ :query_params => query_params,
63
+ :form_params => form_params,
64
+ :body => post_body,
65
+ :auth_names => auth_names,
66
+ :return_type => return_type
67
+ )
68
+
69
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
70
+ if @api_client.config.debugging
71
+ @api_client.config.logger.debug "API called: DefaultApi#address_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
72
+ end
73
+ return data, status_code, headers
74
+ end
75
+
76
+ # Returns the historical, spent outputs associated with an address
77
+ # @param address [String] address to filter by
78
+ # @param [Hash] opts the optional parameters
79
+ # @return [Array<Object>]
80
+ def address_uxouts(address, opts = {})
81
+ data, _status_code, _headers = address_uxouts_with_http_info(address, opts)
82
+ data
83
+ end
84
+
85
+ # Returns the historical, spent outputs associated with an address
86
+ # @param address [String] address to filter by
87
+ # @param [Hash] opts the optional parameters
88
+ # @return [Array<(Array<Object>, Integer, Hash)>] Array<Object> data, response status code and response headers
89
+ def address_uxouts_with_http_info(address, opts = {})
90
+ if @api_client.config.debugging
91
+ @api_client.config.logger.debug 'Calling API: DefaultApi.address_uxouts ...'
92
+ end
93
+ # verify the required parameter 'address' is set
94
+ if @api_client.config.client_side_validation && address.nil?
95
+ fail ArgumentError, "Missing the required parameter 'address' when calling DefaultApi.address_uxouts"
96
+ end
97
+ # resource path
98
+ local_var_path = '/api/v1/address_uxouts'
99
+
100
+ # query parameters
101
+ query_params = opts[:query_params] || {}
102
+ query_params[:'address'] = address
103
+
104
+ # header parameters
105
+ header_params = opts[:header_params] || {}
106
+ # HTTP header 'Accept' (if needed)
107
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
108
+
109
+ # form parameters
110
+ form_params = opts[:form_params] || {}
111
+
112
+ # http body (model)
113
+ post_body = opts[:body]
114
+
115
+ # return_type
116
+ return_type = opts[:return_type] || 'Array<Object>'
117
+
118
+ # auth_names
119
+ auth_names = opts[:auth_names] || []
120
+
121
+ new_options = opts.merge(
122
+ :header_params => header_params,
123
+ :query_params => query_params,
124
+ :form_params => form_params,
125
+ :body => post_body,
126
+ :auth_names => auth_names,
127
+ :return_type => return_type
128
+ )
129
+
130
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
131
+ if @api_client.config.debugging
132
+ @api_client.config.logger.debug "API called: DefaultApi#address_uxouts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
133
+ end
134
+ return data, status_code, headers
135
+ end
136
+
137
+ # @param [Hash] opts the optional parameters
138
+ # @return [String]
139
+ def api_v1_rawtx_get(opts = {})
140
+ data, _status_code, _headers = api_v1_rawtx_get_with_http_info(opts)
141
+ data
142
+ end
143
+
144
+ # @param [Hash] opts the optional parameters
145
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
146
+ def api_v1_rawtx_get_with_http_info(opts = {})
147
+ if @api_client.config.debugging
148
+ @api_client.config.logger.debug 'Calling API: DefaultApi.api_v1_rawtx_get ...'
149
+ end
150
+ # resource path
151
+ local_var_path = '/api/v1/rawtx'
152
+
153
+ # query parameters
154
+ query_params = opts[:query_params] || {}
155
+
156
+ # header parameters
157
+ header_params = opts[:header_params] || {}
158
+ # HTTP header 'Accept' (if needed)
159
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain'])
160
+
161
+ # form parameters
162
+ form_params = opts[:form_params] || {}
163
+
164
+ # http body (model)
165
+ post_body = opts[:body]
166
+
167
+ # return_type
168
+ return_type = opts[:return_type] || 'String'
169
+
170
+ # auth_names
171
+ auth_names = opts[:auth_names] || []
172
+
173
+ new_options = opts.merge(
174
+ :header_params => header_params,
175
+ :query_params => query_params,
176
+ :form_params => form_params,
177
+ :body => post_body,
178
+ :auth_names => auth_names,
179
+ :return_type => return_type
180
+ )
181
+
182
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
183
+ if @api_client.config.debugging
184
+ @api_client.config.logger.debug "API called: DefaultApi#api_v1_rawtx_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
185
+ end
186
+ return data, status_code, headers
187
+ end
188
+
189
+ # @param [Hash] opts the optional parameters
190
+ # @return [String]
191
+ def api_v2_metrics_get(opts = {})
192
+ data, _status_code, _headers = api_v2_metrics_get_with_http_info(opts)
193
+ data
194
+ end
195
+
196
+ # @param [Hash] opts the optional parameters
197
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
198
+ def api_v2_metrics_get_with_http_info(opts = {})
199
+ if @api_client.config.debugging
200
+ @api_client.config.logger.debug 'Calling API: DefaultApi.api_v2_metrics_get ...'
201
+ end
202
+ # resource path
203
+ local_var_path = '/api/v2/metrics'
204
+
205
+ # query parameters
206
+ query_params = opts[:query_params] || {}
207
+
208
+ # header parameters
209
+ header_params = opts[:header_params] || {}
210
+ # HTTP header 'Accept' (if needed)
211
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain'])
212
+
213
+ # form parameters
214
+ form_params = opts[:form_params] || {}
215
+
216
+ # http body (model)
217
+ post_body = opts[:body]
218
+
219
+ # return_type
220
+ return_type = opts[:return_type] || 'String'
221
+
222
+ # auth_names
223
+ auth_names = opts[:auth_names] || []
224
+
225
+ new_options = opts.merge(
226
+ :header_params => header_params,
227
+ :query_params => query_params,
228
+ :form_params => form_params,
229
+ :body => post_body,
230
+ :auth_names => auth_names,
231
+ :return_type => return_type
232
+ )
233
+
234
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
235
+ if @api_client.config.debugging
236
+ @api_client.config.logger.debug "API called: DefaultApi#api_v2_metrics_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
237
+ end
238
+ return data, status_code, headers
239
+ end
240
+
241
+ # Returns the balance of one or more addresses, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends.
242
+ # @param addrs [String] command separated list of addresses
243
+ # @param [Hash] opts the optional parameters
244
+ # @return [Object]
245
+ def balance_get(addrs, opts = {})
246
+ data, _status_code, _headers = balance_get_with_http_info(addrs, opts)
247
+ data
248
+ end
249
+
250
+ # Returns the balance of one or more addresses, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends.
251
+ # @param addrs [String] command separated list of addresses
252
+ # @param [Hash] opts the optional parameters
253
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
254
+ def balance_get_with_http_info(addrs, opts = {})
255
+ if @api_client.config.debugging
256
+ @api_client.config.logger.debug 'Calling API: DefaultApi.balance_get ...'
257
+ end
258
+ # verify the required parameter 'addrs' is set
259
+ if @api_client.config.client_side_validation && addrs.nil?
260
+ fail ArgumentError, "Missing the required parameter 'addrs' when calling DefaultApi.balance_get"
261
+ end
262
+ # resource path
263
+ local_var_path = '/api/v1/balance'
264
+
265
+ # query parameters
266
+ query_params = opts[:query_params] || {}
267
+ query_params[:'addrs'] = addrs
268
+
269
+ # header parameters
270
+ header_params = opts[:header_params] || {}
271
+ # HTTP header 'Accept' (if needed)
272
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
273
+
274
+ # form parameters
275
+ form_params = opts[:form_params] || {}
276
+
277
+ # http body (model)
278
+ post_body = opts[:body]
279
+
280
+ # return_type
281
+ return_type = opts[:return_type] || 'Object'
282
+
283
+ # auth_names
284
+ auth_names = opts[:auth_names] || []
285
+
286
+ new_options = opts.merge(
287
+ :header_params => header_params,
288
+ :query_params => query_params,
289
+ :form_params => form_params,
290
+ :body => post_body,
291
+ :auth_names => auth_names,
292
+ :return_type => return_type
293
+ )
294
+
295
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
296
+ if @api_client.config.debugging
297
+ @api_client.config.logger.debug "API called: DefaultApi#balance_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
298
+ end
299
+ return data, status_code, headers
300
+ end
301
+
302
+ # Returns the balance of one or more addresses, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends.
303
+ # @param addrs [String] command separated list of addresses
304
+ # @param [Hash] opts the optional parameters
305
+ # @return [Object]
306
+ def balance_post(addrs, opts = {})
307
+ data, _status_code, _headers = balance_post_with_http_info(addrs, opts)
308
+ data
309
+ end
310
+
311
+ # Returns the balance of one or more addresses, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends.
312
+ # @param addrs [String] command separated list of addresses
313
+ # @param [Hash] opts the optional parameters
314
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
315
+ def balance_post_with_http_info(addrs, opts = {})
316
+ if @api_client.config.debugging
317
+ @api_client.config.logger.debug 'Calling API: DefaultApi.balance_post ...'
318
+ end
319
+ # verify the required parameter 'addrs' is set
320
+ if @api_client.config.client_side_validation && addrs.nil?
321
+ fail ArgumentError, "Missing the required parameter 'addrs' when calling DefaultApi.balance_post"
322
+ end
323
+ # resource path
324
+ local_var_path = '/api/v1/balance'
325
+
326
+ # query parameters
327
+ query_params = opts[:query_params] || {}
328
+ query_params[:'addrs'] = addrs
329
+
330
+ # header parameters
331
+ header_params = opts[:header_params] || {}
332
+ # HTTP header 'Accept' (if needed)
333
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
334
+
335
+ # form parameters
336
+ form_params = opts[:form_params] || {}
337
+
338
+ # http body (model)
339
+ post_body = opts[:body]
340
+
341
+ # return_type
342
+ return_type = opts[:return_type] || 'Object'
343
+
344
+ # auth_names
345
+ auth_names = opts[:auth_names] || ['csrfAuth']
346
+
347
+ new_options = opts.merge(
348
+ :header_params => header_params,
349
+ :query_params => query_params,
350
+ :form_params => form_params,
351
+ :body => post_body,
352
+ :auth_names => auth_names,
353
+ :return_type => return_type
354
+ )
355
+
356
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
357
+ if @api_client.config.debugging
358
+ @api_client.config.logger.debug "API called: DefaultApi#balance_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
359
+ end
360
+ return data, status_code, headers
361
+ end
362
+
363
+ # Returns the balance of one or more addresses, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends.
364
+ # @param [Hash] opts the optional parameters
365
+ # @option opts [String] :hash get block by hash
366
+ # @option opts [Integer] :seq get block by sequence number
367
+ # @return [Array<BlockSchema>]
368
+ def block(opts = {})
369
+ data, _status_code, _headers = block_with_http_info(opts)
370
+ data
371
+ end
372
+
373
+ # Returns the balance of one or more addresses, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends.
374
+ # @param [Hash] opts the optional parameters
375
+ # @option opts [String] :hash get block by hash
376
+ # @option opts [Integer] :seq get block by sequence number
377
+ # @return [Array<(Array<BlockSchema>, Integer, Hash)>] Array<BlockSchema> data, response status code and response headers
378
+ def block_with_http_info(opts = {})
379
+ if @api_client.config.debugging
380
+ @api_client.config.logger.debug 'Calling API: DefaultApi.block ...'
381
+ end
382
+ # resource path
383
+ local_var_path = '/api/v1/block'
384
+
385
+ # query parameters
386
+ query_params = opts[:query_params] || {}
387
+ query_params[:'hash'] = opts[:'hash'] if !opts[:'hash'].nil?
388
+ query_params[:'seq'] = opts[:'seq'] if !opts[:'seq'].nil?
389
+
390
+ # header parameters
391
+ header_params = opts[:header_params] || {}
392
+ # HTTP header 'Accept' (if needed)
393
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
394
+
395
+ # form parameters
396
+ form_params = opts[:form_params] || {}
397
+
398
+ # http body (model)
399
+ post_body = opts[:body]
400
+
401
+ # return_type
402
+ return_type = opts[:return_type] || 'Array<BlockSchema>'
403
+
404
+ # auth_names
405
+ auth_names = opts[:auth_names] || []
406
+
407
+ new_options = opts.merge(
408
+ :header_params => header_params,
409
+ :query_params => query_params,
410
+ :form_params => form_params,
411
+ :body => post_body,
412
+ :auth_names => auth_names,
413
+ :return_type => return_type
414
+ )
415
+
416
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
417
+ if @api_client.config.debugging
418
+ @api_client.config.logger.debug "API called: DefaultApi#block\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
419
+ end
420
+ return data, status_code, headers
421
+ end
422
+
423
+ # Returns the blockchain metadata.
424
+ # @param [Hash] opts the optional parameters
425
+ # @return [Object]
426
+ def blockchain_metadata(opts = {})
427
+ data, _status_code, _headers = blockchain_metadata_with_http_info(opts)
428
+ data
429
+ end
430
+
431
+ # Returns the blockchain metadata.
432
+ # @param [Hash] opts the optional parameters
433
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
434
+ def blockchain_metadata_with_http_info(opts = {})
435
+ if @api_client.config.debugging
436
+ @api_client.config.logger.debug 'Calling API: DefaultApi.blockchain_metadata ...'
437
+ end
438
+ # resource path
439
+ local_var_path = '/api/v1/blockchain/metadata'
440
+
441
+ # query parameters
442
+ query_params = opts[:query_params] || {}
443
+
444
+ # header parameters
445
+ header_params = opts[:header_params] || {}
446
+ # HTTP header 'Accept' (if needed)
447
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
448
+
449
+ # form parameters
450
+ form_params = opts[:form_params] || {}
451
+
452
+ # http body (model)
453
+ post_body = opts[:body]
454
+
455
+ # return_type
456
+ return_type = opts[:return_type] || 'Object'
457
+
458
+ # auth_names
459
+ auth_names = opts[:auth_names] || []
460
+
461
+ new_options = opts.merge(
462
+ :header_params => header_params,
463
+ :query_params => query_params,
464
+ :form_params => form_params,
465
+ :body => post_body,
466
+ :auth_names => auth_names,
467
+ :return_type => return_type
468
+ )
469
+
470
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
471
+ if @api_client.config.debugging
472
+ @api_client.config.logger.debug "API called: DefaultApi#blockchain_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
473
+ end
474
+ return data, status_code, headers
475
+ end
476
+
477
+ # Returns the blockchain sync progress.
478
+ # @param [Hash] opts the optional parameters
479
+ # @return [Object]
480
+ def blockchain_progress(opts = {})
481
+ data, _status_code, _headers = blockchain_progress_with_http_info(opts)
482
+ data
483
+ end
484
+
485
+ # Returns the blockchain sync progress.
486
+ # @param [Hash] opts the optional parameters
487
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
488
+ def blockchain_progress_with_http_info(opts = {})
489
+ if @api_client.config.debugging
490
+ @api_client.config.logger.debug 'Calling API: DefaultApi.blockchain_progress ...'
491
+ end
492
+ # resource path
493
+ local_var_path = '/api/v1/blockchain/progress'
494
+
495
+ # query parameters
496
+ query_params = opts[:query_params] || {}
497
+
498
+ # header parameters
499
+ header_params = opts[:header_params] || {}
500
+ # HTTP header 'Accept' (if needed)
501
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
502
+
503
+ # form parameters
504
+ form_params = opts[:form_params] || {}
505
+
506
+ # http body (model)
507
+ post_body = opts[:body]
508
+
509
+ # return_type
510
+ return_type = opts[:return_type] || 'Object'
511
+
512
+ # auth_names
513
+ auth_names = opts[:auth_names] || []
514
+
515
+ new_options = opts.merge(
516
+ :header_params => header_params,
517
+ :query_params => query_params,
518
+ :form_params => form_params,
519
+ :body => post_body,
520
+ :auth_names => auth_names,
521
+ :return_type => return_type
522
+ )
523
+
524
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
525
+ if @api_client.config.debugging
526
+ @api_client.config.logger.debug "API called: DefaultApi#blockchain_progress\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
527
+ end
528
+ return data, status_code, headers
529
+ end
530
+
531
+ # Returns the balance of one or more addresses, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends.
532
+ # @param [Hash] opts the optional parameters
533
+ # @option opts [Integer] :start start seq
534
+ # @option opts [Integer] :_end end seq
535
+ # @option opts [Array<Integer>] :seq comma-separated list of block seqs
536
+ # @return [InlineResponse2001]
537
+ def blocks(opts = {})
538
+ data, _status_code, _headers = blocks_with_http_info(opts)
539
+ data
540
+ end
541
+
542
+ # Returns the balance of one or more addresses, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends.
543
+ # @param [Hash] opts the optional parameters
544
+ # @option opts [Integer] :start start seq
545
+ # @option opts [Integer] :_end end seq
546
+ # @option opts [Array<Integer>] :seq comma-separated list of block seqs
547
+ # @return [Array<(InlineResponse2001, Integer, Hash)>] InlineResponse2001 data, response status code and response headers
548
+ def blocks_with_http_info(opts = {})
549
+ if @api_client.config.debugging
550
+ @api_client.config.logger.debug 'Calling API: DefaultApi.blocks ...'
551
+ end
552
+ # resource path
553
+ local_var_path = '/api/v1/blocks'
554
+
555
+ # query parameters
556
+ query_params = opts[:query_params] || {}
557
+ query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
558
+ query_params[:'end'] = opts[:'_end'] if !opts[:'_end'].nil?
559
+ query_params[:'seq'] = @api_client.build_collection_param(opts[:'seq'], :multi) if !opts[:'seq'].nil?
560
+
561
+ # header parameters
562
+ header_params = opts[:header_params] || {}
563
+ # HTTP header 'Accept' (if needed)
564
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
565
+
566
+ # form parameters
567
+ form_params = opts[:form_params] || {}
568
+
569
+ # http body (model)
570
+ post_body = opts[:body]
571
+
572
+ # return_type
573
+ return_type = opts[:return_type] || 'InlineResponse2001'
574
+
575
+ # auth_names
576
+ auth_names = opts[:auth_names] || []
577
+
578
+ new_options = opts.merge(
579
+ :header_params => header_params,
580
+ :query_params => query_params,
581
+ :form_params => form_params,
582
+ :body => post_body,
583
+ :auth_names => auth_names,
584
+ :return_type => return_type
585
+ )
586
+
587
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
588
+ if @api_client.config.debugging
589
+ @api_client.config.logger.debug "API called: DefaultApi#blocks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
590
+ end
591
+ return data, status_code, headers
592
+ end
593
+
594
+ # coinSupplyHandler returns coin distribution supply stats
595
+ # @param [Hash] opts the optional parameters
596
+ # @return [InlineResponse2002]
597
+ def coin_supply(opts = {})
598
+ data, _status_code, _headers = coin_supply_with_http_info(opts)
599
+ data
600
+ end
601
+
602
+ # coinSupplyHandler returns coin distribution supply stats
603
+ # @param [Hash] opts the optional parameters
604
+ # @return [Array<(InlineResponse2002, Integer, Hash)>] InlineResponse2002 data, response status code and response headers
605
+ def coin_supply_with_http_info(opts = {})
606
+ if @api_client.config.debugging
607
+ @api_client.config.logger.debug 'Calling API: DefaultApi.coin_supply ...'
608
+ end
609
+ # resource path
610
+ local_var_path = '/api/v1/coinSupply'
611
+
612
+ # query parameters
613
+ query_params = opts[:query_params] || {}
614
+
615
+ # header parameters
616
+ header_params = opts[:header_params] || {}
617
+ # HTTP header 'Accept' (if needed)
618
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
619
+
620
+ # form parameters
621
+ form_params = opts[:form_params] || {}
622
+
623
+ # http body (model)
624
+ post_body = opts[:body]
625
+
626
+ # return_type
627
+ return_type = opts[:return_type] || 'InlineResponse2002'
628
+
629
+ # auth_names
630
+ auth_names = opts[:auth_names] || []
631
+
632
+ new_options = opts.merge(
633
+ :header_params => header_params,
634
+ :query_params => query_params,
635
+ :form_params => form_params,
636
+ :body => post_body,
637
+ :auth_names => auth_names,
638
+ :return_type => return_type
639
+ )
640
+
641
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
642
+ if @api_client.config.debugging
643
+ @api_client.config.logger.debug "API called: DefaultApi#coin_supply\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
644
+ end
645
+ return data, status_code, headers
646
+ end
647
+
648
+ # Creates a new CSRF token. Previous CSRF tokens are invalidated by this call.
649
+ # @param [Hash] opts the optional parameters
650
+ # @return [InlineResponse2003]
651
+ def csrf(opts = {})
652
+ data, _status_code, _headers = csrf_with_http_info(opts)
653
+ data
654
+ end
655
+
656
+ # Creates a new CSRF token. Previous CSRF tokens are invalidated by this call.
657
+ # @param [Hash] opts the optional parameters
658
+ # @return [Array<(InlineResponse2003, Integer, Hash)>] InlineResponse2003 data, response status code and response headers
659
+ def csrf_with_http_info(opts = {})
660
+ if @api_client.config.debugging
661
+ @api_client.config.logger.debug 'Calling API: DefaultApi.csrf ...'
662
+ end
663
+ # resource path
664
+ local_var_path = '/api/v1/csrf'
665
+
666
+ # query parameters
667
+ query_params = opts[:query_params] || {}
668
+
669
+ # header parameters
670
+ header_params = opts[:header_params] || {}
671
+ # HTTP header 'Accept' (if needed)
672
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
673
+
674
+ # form parameters
675
+ form_params = opts[:form_params] || {}
676
+
677
+ # http body (model)
678
+ post_body = opts[:body]
679
+
680
+ # return_type
681
+ return_type = opts[:return_type] || 'InlineResponse2003'
682
+
683
+ # auth_names
684
+ auth_names = opts[:auth_names] || []
685
+
686
+ new_options = opts.merge(
687
+ :header_params => header_params,
688
+ :query_params => query_params,
689
+ :form_params => form_params,
690
+ :body => post_body,
691
+ :auth_names => auth_names,
692
+ :return_type => return_type
693
+ )
694
+
695
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
696
+ if @api_client.config.debugging
697
+ @api_client.config.logger.debug "API called: DefaultApi#csrf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
698
+ end
699
+ return data, status_code, headers
700
+ end
701
+
702
+ # @param [Hash] opts the optional parameters
703
+ # @option opts [String] :type storage type.
704
+ # @option opts [String] :key key of the specific value to get.
705
+ # @return [nil]
706
+ def data_delete(opts = {})
707
+ data_delete_with_http_info(opts)
708
+ nil
709
+ end
710
+
711
+ # @param [Hash] opts the optional parameters
712
+ # @option opts [String] :type storage type.
713
+ # @option opts [String] :key key of the specific value to get.
714
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
715
+ def data_delete_with_http_info(opts = {})
716
+ if @api_client.config.debugging
717
+ @api_client.config.logger.debug 'Calling API: DefaultApi.data_delete ...'
718
+ end
719
+ # resource path
720
+ local_var_path = '/api/v2/data'
721
+
722
+ # query parameters
723
+ query_params = opts[:query_params] || {}
724
+
725
+ # header parameters
726
+ header_params = opts[:header_params] || {}
727
+ # HTTP header 'Accept' (if needed)
728
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
729
+ header_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
730
+ header_params[:'key'] = opts[:'key'] if !opts[:'key'].nil?
731
+
732
+ # form parameters
733
+ form_params = opts[:form_params] || {}
734
+
735
+ # http body (model)
736
+ post_body = opts[:body]
737
+
738
+ # return_type
739
+ return_type = opts[:return_type]
740
+
741
+ # auth_names
742
+ auth_names = opts[:auth_names] || []
743
+
744
+ new_options = opts.merge(
745
+ :header_params => header_params,
746
+ :query_params => query_params,
747
+ :form_params => form_params,
748
+ :body => post_body,
749
+ :auth_names => auth_names,
750
+ :return_type => return_type
751
+ )
752
+
753
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
754
+ if @api_client.config.debugging
755
+ @api_client.config.logger.debug "API called: DefaultApi#data_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
756
+ end
757
+ return data, status_code, headers
758
+ end
759
+
760
+ # @param [Hash] opts the optional parameters
761
+ # @option opts [String] :type storage type.
762
+ # @option opts [String] :key key of the specific value to get.
763
+ # @return [Object]
764
+ def data_get(opts = {})
765
+ data, _status_code, _headers = data_get_with_http_info(opts)
766
+ data
767
+ end
768
+
769
+ # @param [Hash] opts the optional parameters
770
+ # @option opts [String] :type storage type.
771
+ # @option opts [String] :key key of the specific value to get.
772
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
773
+ def data_get_with_http_info(opts = {})
774
+ if @api_client.config.debugging
775
+ @api_client.config.logger.debug 'Calling API: DefaultApi.data_get ...'
776
+ end
777
+ # resource path
778
+ local_var_path = '/api/v2/data'
779
+
780
+ # query parameters
781
+ query_params = opts[:query_params] || {}
782
+
783
+ # header parameters
784
+ header_params = opts[:header_params] || {}
785
+ # HTTP header 'Accept' (if needed)
786
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
787
+ header_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
788
+ header_params[:'key'] = opts[:'key'] if !opts[:'key'].nil?
789
+
790
+ # form parameters
791
+ form_params = opts[:form_params] || {}
792
+
793
+ # http body (model)
794
+ post_body = opts[:body]
795
+
796
+ # return_type
797
+ return_type = opts[:return_type] || 'Object'
798
+
799
+ # auth_names
800
+ auth_names = opts[:auth_names] || []
801
+
802
+ new_options = opts.merge(
803
+ :header_params => header_params,
804
+ :query_params => query_params,
805
+ :form_params => form_params,
806
+ :body => post_body,
807
+ :auth_names => auth_names,
808
+ :return_type => return_type
809
+ )
810
+
811
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
812
+ if @api_client.config.debugging
813
+ @api_client.config.logger.debug "API called: DefaultApi#data_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
814
+ end
815
+ return data, status_code, headers
816
+ end
817
+
818
+ # @param [Hash] opts the optional parameters
819
+ # @option opts [String] :type storage type.
820
+ # @option opts [String] :key key of the specific value to get.
821
+ # @option opts [String] :val additional value.
822
+ # @return [nil]
823
+ def data_post(opts = {})
824
+ data_post_with_http_info(opts)
825
+ nil
826
+ end
827
+
828
+ # @param [Hash] opts the optional parameters
829
+ # @option opts [String] :type storage type.
830
+ # @option opts [String] :key key of the specific value to get.
831
+ # @option opts [String] :val additional value.
832
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
833
+ def data_post_with_http_info(opts = {})
834
+ if @api_client.config.debugging
835
+ @api_client.config.logger.debug 'Calling API: DefaultApi.data_post ...'
836
+ end
837
+ # resource path
838
+ local_var_path = '/api/v2/data'
839
+
840
+ # query parameters
841
+ query_params = opts[:query_params] || {}
842
+
843
+ # header parameters
844
+ header_params = opts[:header_params] || {}
845
+ # HTTP header 'Accept' (if needed)
846
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
847
+ header_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
848
+ header_params[:'key'] = opts[:'key'] if !opts[:'key'].nil?
849
+ header_params[:'val'] = opts[:'val'] if !opts[:'val'].nil?
850
+
851
+ # form parameters
852
+ form_params = opts[:form_params] || {}
853
+
854
+ # http body (model)
855
+ post_body = opts[:body]
856
+
857
+ # return_type
858
+ return_type = opts[:return_type]
859
+
860
+ # auth_names
861
+ auth_names = opts[:auth_names] || []
862
+
863
+ new_options = opts.merge(
864
+ :header_params => header_params,
865
+ :query_params => query_params,
866
+ :form_params => form_params,
867
+ :body => post_body,
868
+ :auth_names => auth_names,
869
+ :return_type => return_type
870
+ )
871
+
872
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
873
+ if @api_client.config.debugging
874
+ @api_client.config.logger.debug "API called: DefaultApi#data_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
875
+ end
876
+ return data, status_code, headers
877
+ end
878
+
879
+ # defaultConnectionsHandler returns the list of default hardcoded bootstrap addresses.\\n They are not necessarily connected to.
880
+ # @param [Hash] opts the optional parameters
881
+ # @return [Array<String>]
882
+ def default_connections(opts = {})
883
+ data, _status_code, _headers = default_connections_with_http_info(opts)
884
+ data
885
+ end
886
+
887
+ # defaultConnectionsHandler returns the list of default hardcoded bootstrap addresses.\\n They are not necessarily connected to.
888
+ # @param [Hash] opts the optional parameters
889
+ # @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
890
+ def default_connections_with_http_info(opts = {})
891
+ if @api_client.config.debugging
892
+ @api_client.config.logger.debug 'Calling API: DefaultApi.default_connections ...'
893
+ end
894
+ # resource path
895
+ local_var_path = '/api/v1/network/defaultConnections'
896
+
897
+ # query parameters
898
+ query_params = opts[:query_params] || {}
899
+
900
+ # header parameters
901
+ header_params = opts[:header_params] || {}
902
+ # HTTP header 'Accept' (if needed)
903
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
904
+
905
+ # form parameters
906
+ form_params = opts[:form_params] || {}
907
+
908
+ # http body (model)
909
+ post_body = opts[:body]
910
+
911
+ # return_type
912
+ return_type = opts[:return_type] || 'Array<String>'
913
+
914
+ # auth_names
915
+ auth_names = opts[:auth_names] || []
916
+
917
+ new_options = opts.merge(
918
+ :header_params => header_params,
919
+ :query_params => query_params,
920
+ :form_params => form_params,
921
+ :body => post_body,
922
+ :auth_names => auth_names,
923
+ :return_type => return_type
924
+ )
925
+
926
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
927
+ if @api_client.config.debugging
928
+ @api_client.config.logger.debug "API called: DefaultApi#default_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
929
+ end
930
+ return data, status_code, headers
931
+ end
932
+
933
+ # Returns node health data.
934
+ # @param [Hash] opts the optional parameters
935
+ # @return [Object]
936
+ def health(opts = {})
937
+ data, _status_code, _headers = health_with_http_info(opts)
938
+ data
939
+ end
940
+
941
+ # Returns node health data.
942
+ # @param [Hash] opts the optional parameters
943
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
944
+ def health_with_http_info(opts = {})
945
+ if @api_client.config.debugging
946
+ @api_client.config.logger.debug 'Calling API: DefaultApi.health ...'
947
+ end
948
+ # resource path
949
+ local_var_path = '/api/v1/health'
950
+
951
+ # query parameters
952
+ query_params = opts[:query_params] || {}
953
+
954
+ # header parameters
955
+ header_params = opts[:header_params] || {}
956
+ # HTTP header 'Accept' (if needed)
957
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
958
+
959
+ # form parameters
960
+ form_params = opts[:form_params] || {}
961
+
962
+ # http body (model)
963
+ post_body = opts[:body]
964
+
965
+ # return_type
966
+ return_type = opts[:return_type] || 'Object'
967
+
968
+ # auth_names
969
+ auth_names = opts[:auth_names] || []
970
+
971
+ new_options = opts.merge(
972
+ :header_params => header_params,
973
+ :query_params => query_params,
974
+ :form_params => form_params,
975
+ :body => post_body,
976
+ :auth_names => auth_names,
977
+ :return_type => return_type
978
+ )
979
+
980
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
981
+ if @api_client.config.debugging
982
+ @api_client.config.logger.debug "API called: DefaultApi#health\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
983
+ end
984
+ return data, status_code, headers
985
+ end
986
+
987
+ # Returns the most recent N blocks on the blockchain
988
+ # @param num [Integer] Num of blockss
989
+ # @param [Hash] opts the optional parameters
990
+ # @return [Object]
991
+ def last_blocks(num, opts = {})
992
+ data, _status_code, _headers = last_blocks_with_http_info(num, opts)
993
+ data
994
+ end
995
+
996
+ # Returns the most recent N blocks on the blockchain
997
+ # @param num [Integer] Num of blockss
998
+ # @param [Hash] opts the optional parameters
999
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
1000
+ def last_blocks_with_http_info(num, opts = {})
1001
+ if @api_client.config.debugging
1002
+ @api_client.config.logger.debug 'Calling API: DefaultApi.last_blocks ...'
1003
+ end
1004
+ # verify the required parameter 'num' is set
1005
+ if @api_client.config.client_side_validation && num.nil?
1006
+ fail ArgumentError, "Missing the required parameter 'num' when calling DefaultApi.last_blocks"
1007
+ end
1008
+ # resource path
1009
+ local_var_path = '/api/v1/last_blocks'
1010
+
1011
+ # query parameters
1012
+ query_params = opts[:query_params] || {}
1013
+ query_params[:'num'] = num
1014
+
1015
+ # header parameters
1016
+ header_params = opts[:header_params] || {}
1017
+ # HTTP header 'Accept' (if needed)
1018
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
1019
+
1020
+ # form parameters
1021
+ form_params = opts[:form_params] || {}
1022
+
1023
+ # http body (model)
1024
+ post_body = opts[:body]
1025
+
1026
+ # return_type
1027
+ return_type = opts[:return_type] || 'Object'
1028
+
1029
+ # auth_names
1030
+ auth_names = opts[:auth_names] || []
1031
+
1032
+ new_options = opts.merge(
1033
+ :header_params => header_params,
1034
+ :query_params => query_params,
1035
+ :form_params => form_params,
1036
+ :body => post_body,
1037
+ :auth_names => auth_names,
1038
+ :return_type => return_type
1039
+ )
1040
+
1041
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1042
+ if @api_client.config.debugging
1043
+ @api_client.config.logger.debug "API called: DefaultApi#last_blocks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1044
+ end
1045
+ return data, status_code, headers
1046
+ end
1047
+
1048
+ # This endpoint returns a specific connection.
1049
+ # @param addr [String] Address port
1050
+ # @param [Hash] opts the optional parameters
1051
+ # @return [NetworkConnectionSchema]
1052
+ def network_connection(addr, opts = {})
1053
+ data, _status_code, _headers = network_connection_with_http_info(addr, opts)
1054
+ data
1055
+ end
1056
+
1057
+ # This endpoint returns a specific connection.
1058
+ # @param addr [String] Address port
1059
+ # @param [Hash] opts the optional parameters
1060
+ # @return [Array<(NetworkConnectionSchema, Integer, Hash)>] NetworkConnectionSchema data, response status code and response headers
1061
+ def network_connection_with_http_info(addr, opts = {})
1062
+ if @api_client.config.debugging
1063
+ @api_client.config.logger.debug 'Calling API: DefaultApi.network_connection ...'
1064
+ end
1065
+ # verify the required parameter 'addr' is set
1066
+ if @api_client.config.client_side_validation && addr.nil?
1067
+ fail ArgumentError, "Missing the required parameter 'addr' when calling DefaultApi.network_connection"
1068
+ end
1069
+ # resource path
1070
+ local_var_path = '/api/v1/network/connection'
1071
+
1072
+ # query parameters
1073
+ query_params = opts[:query_params] || {}
1074
+ query_params[:'addr'] = addr
1075
+
1076
+ # header parameters
1077
+ header_params = opts[:header_params] || {}
1078
+ # HTTP header 'Accept' (if needed)
1079
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
1080
+
1081
+ # form parameters
1082
+ form_params = opts[:form_params] || {}
1083
+
1084
+ # http body (model)
1085
+ post_body = opts[:body]
1086
+
1087
+ # return_type
1088
+ return_type = opts[:return_type] || 'NetworkConnectionSchema'
1089
+
1090
+ # auth_names
1091
+ auth_names = opts[:auth_names] || []
1092
+
1093
+ new_options = opts.merge(
1094
+ :header_params => header_params,
1095
+ :query_params => query_params,
1096
+ :form_params => form_params,
1097
+ :body => post_body,
1098
+ :auth_names => auth_names,
1099
+ :return_type => return_type
1100
+ )
1101
+
1102
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1103
+ if @api_client.config.debugging
1104
+ @api_client.config.logger.debug "API called: DefaultApi#network_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1105
+ end
1106
+ return data, status_code, headers
1107
+ end
1108
+
1109
+ # This endpoint returns all outgoings connections.
1110
+ # @param [Hash] opts the optional parameters
1111
+ # @option opts [String] :states Connection status.
1112
+ # @option opts [String] :direction Direction of the connection.
1113
+ # @return [InlineResponse2004]
1114
+ def network_connections(opts = {})
1115
+ data, _status_code, _headers = network_connections_with_http_info(opts)
1116
+ data
1117
+ end
1118
+
1119
+ # This endpoint returns all outgoings connections.
1120
+ # @param [Hash] opts the optional parameters
1121
+ # @option opts [String] :states Connection status.
1122
+ # @option opts [String] :direction Direction of the connection.
1123
+ # @return [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers
1124
+ def network_connections_with_http_info(opts = {})
1125
+ if @api_client.config.debugging
1126
+ @api_client.config.logger.debug 'Calling API: DefaultApi.network_connections ...'
1127
+ end
1128
+ allowable_values = ["pending", "connected", "introduced"]
1129
+ if @api_client.config.client_side_validation && opts[:'states'] && !allowable_values.include?(opts[:'states'])
1130
+ fail ArgumentError, "invalid value for \"states\", must be one of #{allowable_values}"
1131
+ end
1132
+ allowable_values = ["connected", "introduced"]
1133
+ if @api_client.config.client_side_validation && opts[:'direction'] && !allowable_values.include?(opts[:'direction'])
1134
+ fail ArgumentError, "invalid value for \"direction\", must be one of #{allowable_values}"
1135
+ end
1136
+ # resource path
1137
+ local_var_path = '/api/v1/network/connections'
1138
+
1139
+ # query parameters
1140
+ query_params = opts[:query_params] || {}
1141
+ query_params[:'states'] = opts[:'states'] if !opts[:'states'].nil?
1142
+ query_params[:'direction'] = opts[:'direction'] if !opts[:'direction'].nil?
1143
+
1144
+ # header parameters
1145
+ header_params = opts[:header_params] || {}
1146
+ # HTTP header 'Accept' (if needed)
1147
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
1148
+
1149
+ # form parameters
1150
+ form_params = opts[:form_params] || {}
1151
+
1152
+ # http body (model)
1153
+ post_body = opts[:body]
1154
+
1155
+ # return_type
1156
+ return_type = opts[:return_type] || 'InlineResponse2004'
1157
+
1158
+ # auth_names
1159
+ auth_names = opts[:auth_names] || ['csrfAuth']
1160
+
1161
+ new_options = opts.merge(
1162
+ :header_params => header_params,
1163
+ :query_params => query_params,
1164
+ :form_params => form_params,
1165
+ :body => post_body,
1166
+ :auth_names => auth_names,
1167
+ :return_type => return_type
1168
+ )
1169
+
1170
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1171
+ if @api_client.config.debugging
1172
+ @api_client.config.logger.debug "API called: DefaultApi#network_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1173
+ end
1174
+ return data, status_code, headers
1175
+ end
1176
+
1177
+ # This endpoint disconnects a connection by ID or address
1178
+ # @param id [String] Address id.
1179
+ # @param [Hash] opts the optional parameters
1180
+ # @return [nil]
1181
+ def network_connections_disconnect(id, opts = {})
1182
+ network_connections_disconnect_with_http_info(id, opts)
1183
+ nil
1184
+ end
1185
+
1186
+ # This endpoint disconnects a connection by ID or address
1187
+ # @param id [String] Address id.
1188
+ # @param [Hash] opts the optional parameters
1189
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1190
+ def network_connections_disconnect_with_http_info(id, opts = {})
1191
+ if @api_client.config.debugging
1192
+ @api_client.config.logger.debug 'Calling API: DefaultApi.network_connections_disconnect ...'
1193
+ end
1194
+ # verify the required parameter 'id' is set
1195
+ if @api_client.config.client_side_validation && id.nil?
1196
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.network_connections_disconnect"
1197
+ end
1198
+ # resource path
1199
+ local_var_path = '/api/v1/network/connection/disconnect'
1200
+
1201
+ # query parameters
1202
+ query_params = opts[:query_params] || {}
1203
+ query_params[:'id'] = id
1204
+
1205
+ # header parameters
1206
+ header_params = opts[:header_params] || {}
1207
+ # HTTP header 'Accept' (if needed)
1208
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
1209
+
1210
+ # form parameters
1211
+ form_params = opts[:form_params] || {}
1212
+
1213
+ # http body (model)
1214
+ post_body = opts[:body]
1215
+
1216
+ # return_type
1217
+ return_type = opts[:return_type]
1218
+
1219
+ # auth_names
1220
+ auth_names = opts[:auth_names] || ['csrfAuth']
1221
+
1222
+ new_options = opts.merge(
1223
+ :header_params => header_params,
1224
+ :query_params => query_params,
1225
+ :form_params => form_params,
1226
+ :body => post_body,
1227
+ :auth_names => auth_names,
1228
+ :return_type => return_type
1229
+ )
1230
+
1231
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1232
+ if @api_client.config.debugging
1233
+ @api_client.config.logger.debug "API called: DefaultApi#network_connections_disconnect\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1234
+ end
1235
+ return data, status_code, headers
1236
+ end
1237
+
1238
+ # This endpoint returns all connections found through peer exchange
1239
+ # @param [Hash] opts the optional parameters
1240
+ # @return [Array<String>]
1241
+ def network_connections_exchange(opts = {})
1242
+ data, _status_code, _headers = network_connections_exchange_with_http_info(opts)
1243
+ data
1244
+ end
1245
+
1246
+ # This endpoint returns all connections found through peer exchange
1247
+ # @param [Hash] opts the optional parameters
1248
+ # @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
1249
+ def network_connections_exchange_with_http_info(opts = {})
1250
+ if @api_client.config.debugging
1251
+ @api_client.config.logger.debug 'Calling API: DefaultApi.network_connections_exchange ...'
1252
+ end
1253
+ # resource path
1254
+ local_var_path = '/api/v1/network/connections/exchange'
1255
+
1256
+ # query parameters
1257
+ query_params = opts[:query_params] || {}
1258
+
1259
+ # header parameters
1260
+ header_params = opts[:header_params] || {}
1261
+ # HTTP header 'Accept' (if needed)
1262
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
1263
+
1264
+ # form parameters
1265
+ form_params = opts[:form_params] || {}
1266
+
1267
+ # http body (model)
1268
+ post_body = opts[:body]
1269
+
1270
+ # return_type
1271
+ return_type = opts[:return_type] || 'Array<String>'
1272
+
1273
+ # auth_names
1274
+ auth_names = opts[:auth_names] || []
1275
+
1276
+ new_options = opts.merge(
1277
+ :header_params => header_params,
1278
+ :query_params => query_params,
1279
+ :form_params => form_params,
1280
+ :body => post_body,
1281
+ :auth_names => auth_names,
1282
+ :return_type => return_type
1283
+ )
1284
+
1285
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1286
+ if @api_client.config.debugging
1287
+ @api_client.config.logger.debug "API called: DefaultApi#network_connections_exchange\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1288
+ end
1289
+ return data, status_code, headers
1290
+ end
1291
+
1292
+ # trustConnectionsHandler returns all trusted connections.\\n They are not necessarily connected to. In the default configuration, these will be a subset of the default hardcoded bootstrap addresses.
1293
+ # @param [Hash] opts the optional parameters
1294
+ # @return [Array<String>]
1295
+ def network_connections_trust(opts = {})
1296
+ data, _status_code, _headers = network_connections_trust_with_http_info(opts)
1297
+ data
1298
+ end
1299
+
1300
+ # trustConnectionsHandler returns all trusted connections.\\n They are not necessarily connected to. In the default configuration, these will be a subset of the default hardcoded bootstrap addresses.
1301
+ # @param [Hash] opts the optional parameters
1302
+ # @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
1303
+ def network_connections_trust_with_http_info(opts = {})
1304
+ if @api_client.config.debugging
1305
+ @api_client.config.logger.debug 'Calling API: DefaultApi.network_connections_trust ...'
1306
+ end
1307
+ # resource path
1308
+ local_var_path = '/api/v1/network/connections/trust'
1309
+
1310
+ # query parameters
1311
+ query_params = opts[:query_params] || {}
1312
+
1313
+ # header parameters
1314
+ header_params = opts[:header_params] || {}
1315
+ # HTTP header 'Accept' (if needed)
1316
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
1317
+
1318
+ # form parameters
1319
+ form_params = opts[:form_params] || {}
1320
+
1321
+ # http body (model)
1322
+ post_body = opts[:body]
1323
+
1324
+ # return_type
1325
+ return_type = opts[:return_type] || 'Array<String>'
1326
+
1327
+ # auth_names
1328
+ auth_names = opts[:auth_names] || []
1329
+
1330
+ new_options = opts.merge(
1331
+ :header_params => header_params,
1332
+ :query_params => query_params,
1333
+ :form_params => form_params,
1334
+ :body => post_body,
1335
+ :auth_names => auth_names,
1336
+ :return_type => return_type
1337
+ )
1338
+
1339
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1340
+ if @api_client.config.debugging
1341
+ @api_client.config.logger.debug "API called: DefaultApi#network_connections_trust\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1342
+ end
1343
+ return data, status_code, headers
1344
+ end
1345
+
1346
+ # If neither addrs nor hashes are specificed, return all unspent outputs. If only one filter is specified, then return outputs match the filter. Both filters cannot be specified.
1347
+ # @param [Hash] opts the optional parameters
1348
+ # @option opts [Array<String>] :address
1349
+ # @option opts [Array<String>] :hash
1350
+ # @return [Object]
1351
+ def outputs_get(opts = {})
1352
+ data, _status_code, _headers = outputs_get_with_http_info(opts)
1353
+ data
1354
+ end
1355
+
1356
+ # If neither addrs nor hashes are specificed, return all unspent outputs. If only one filter is specified, then return outputs match the filter. Both filters cannot be specified.
1357
+ # @param [Hash] opts the optional parameters
1358
+ # @option opts [Array<String>] :address
1359
+ # @option opts [Array<String>] :hash
1360
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
1361
+ def outputs_get_with_http_info(opts = {})
1362
+ if @api_client.config.debugging
1363
+ @api_client.config.logger.debug 'Calling API: DefaultApi.outputs_get ...'
1364
+ end
1365
+ # resource path
1366
+ local_var_path = '/api/v1/outputs'
1367
+
1368
+ # query parameters
1369
+ query_params = opts[:query_params] || {}
1370
+ query_params[:'address'] = @api_client.build_collection_param(opts[:'address'], :multi) if !opts[:'address'].nil?
1371
+ query_params[:'hash'] = @api_client.build_collection_param(opts[:'hash'], :multi) if !opts[:'hash'].nil?
1372
+
1373
+ # header parameters
1374
+ header_params = opts[:header_params] || {}
1375
+ # HTTP header 'Accept' (if needed)
1376
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
1377
+
1378
+ # form parameters
1379
+ form_params = opts[:form_params] || {}
1380
+
1381
+ # http body (model)
1382
+ post_body = opts[:body]
1383
+
1384
+ # return_type
1385
+ return_type = opts[:return_type] || 'Object'
1386
+
1387
+ # auth_names
1388
+ auth_names = opts[:auth_names] || []
1389
+
1390
+ new_options = opts.merge(
1391
+ :header_params => header_params,
1392
+ :query_params => query_params,
1393
+ :form_params => form_params,
1394
+ :body => post_body,
1395
+ :auth_names => auth_names,
1396
+ :return_type => return_type
1397
+ )
1398
+
1399
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1400
+ if @api_client.config.debugging
1401
+ @api_client.config.logger.debug "API called: DefaultApi#outputs_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1402
+ end
1403
+ return data, status_code, headers
1404
+ end
1405
+
1406
+ # If neither addrs nor hashes are specificed, return all unspent outputs. If only one filter is specified, then return outputs match the filter. Both filters cannot be specified.
1407
+ # @param [Hash] opts the optional parameters
1408
+ # @option opts [String] :address
1409
+ # @option opts [String] :hash
1410
+ # @return [Object]
1411
+ def outputs_post(opts = {})
1412
+ data, _status_code, _headers = outputs_post_with_http_info(opts)
1413
+ data
1414
+ end
1415
+
1416
+ # If neither addrs nor hashes are specificed, return all unspent outputs. If only one filter is specified, then return outputs match the filter. Both filters cannot be specified.
1417
+ # @param [Hash] opts the optional parameters
1418
+ # @option opts [String] :address
1419
+ # @option opts [String] :hash
1420
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
1421
+ def outputs_post_with_http_info(opts = {})
1422
+ if @api_client.config.debugging
1423
+ @api_client.config.logger.debug 'Calling API: DefaultApi.outputs_post ...'
1424
+ end
1425
+ # resource path
1426
+ local_var_path = '/api/v1/outputs'
1427
+
1428
+ # query parameters
1429
+ query_params = opts[:query_params] || {}
1430
+ query_params[:'address'] = opts[:'address'] if !opts[:'address'].nil?
1431
+ query_params[:'hash'] = opts[:'hash'] if !opts[:'hash'].nil?
1432
+
1433
+ # header parameters
1434
+ header_params = opts[:header_params] || {}
1435
+ # HTTP header 'Accept' (if needed)
1436
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
1437
+
1438
+ # form parameters
1439
+ form_params = opts[:form_params] || {}
1440
+
1441
+ # http body (model)
1442
+ post_body = opts[:body]
1443
+
1444
+ # return_type
1445
+ return_type = opts[:return_type] || 'Object'
1446
+
1447
+ # auth_names
1448
+ auth_names = opts[:auth_names] || ['csrfAuth']
1449
+
1450
+ new_options = opts.merge(
1451
+ :header_params => header_params,
1452
+ :query_params => query_params,
1453
+ :form_params => form_params,
1454
+ :body => post_body,
1455
+ :auth_names => auth_names,
1456
+ :return_type => return_type
1457
+ )
1458
+
1459
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1460
+ if @api_client.config.debugging
1461
+ @api_client.config.logger.debug "API called: DefaultApi#outputs_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1462
+ end
1463
+ return data, status_code, headers
1464
+ end
1465
+
1466
+ # @param [Hash] opts the optional parameters
1467
+ # @return [Array<InlineResponse20010>]
1468
+ def pending_txs(opts = {})
1469
+ data, _status_code, _headers = pending_txs_with_http_info(opts)
1470
+ data
1471
+ end
1472
+
1473
+ # @param [Hash] opts the optional parameters
1474
+ # @return [Array<(Array<InlineResponse20010>, Integer, Hash)>] Array<InlineResponse20010> data, response status code and response headers
1475
+ def pending_txs_with_http_info(opts = {})
1476
+ if @api_client.config.debugging
1477
+ @api_client.config.logger.debug 'Calling API: DefaultApi.pending_txs ...'
1478
+ end
1479
+ # resource path
1480
+ local_var_path = '/api/v1/pendingTxs'
1481
+
1482
+ # query parameters
1483
+ query_params = opts[:query_params] || {}
1484
+
1485
+ # header parameters
1486
+ header_params = opts[:header_params] || {}
1487
+ # HTTP header 'Accept' (if needed)
1488
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
1489
+
1490
+ # form parameters
1491
+ form_params = opts[:form_params] || {}
1492
+
1493
+ # http body (model)
1494
+ post_body = opts[:body]
1495
+
1496
+ # return_type
1497
+ return_type = opts[:return_type] || 'Array<InlineResponse20010>'
1498
+
1499
+ # auth_names
1500
+ auth_names = opts[:auth_names] || []
1501
+
1502
+ new_options = opts.merge(
1503
+ :header_params => header_params,
1504
+ :query_params => query_params,
1505
+ :form_params => form_params,
1506
+ :body => post_body,
1507
+ :auth_names => auth_names,
1508
+ :return_type => return_type
1509
+ )
1510
+
1511
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1512
+ if @api_client.config.debugging
1513
+ @api_client.config.logger.debug "API called: DefaultApi#pending_txs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1514
+ end
1515
+ return data, status_code, headers
1516
+ end
1517
+
1518
+ # Broadcasts all unconfirmed transactions from the unconfirmed transaction pool
1519
+ # @param [Hash] opts the optional parameters
1520
+ # @return [Object]
1521
+ def resend_unconfirmed_txns(opts = {})
1522
+ data, _status_code, _headers = resend_unconfirmed_txns_with_http_info(opts)
1523
+ data
1524
+ end
1525
+
1526
+ # Broadcasts all unconfirmed transactions from the unconfirmed transaction pool
1527
+ # @param [Hash] opts the optional parameters
1528
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
1529
+ def resend_unconfirmed_txns_with_http_info(opts = {})
1530
+ if @api_client.config.debugging
1531
+ @api_client.config.logger.debug 'Calling API: DefaultApi.resend_unconfirmed_txns ...'
1532
+ end
1533
+ # resource path
1534
+ local_var_path = '/api/v1/resendUnconfirmedTxns'
1535
+
1536
+ # query parameters
1537
+ query_params = opts[:query_params] || {}
1538
+
1539
+ # header parameters
1540
+ header_params = opts[:header_params] || {}
1541
+ # HTTP header 'Accept' (if needed)
1542
+ header_params['Accept'] = @api_client.select_header_accept(['application-json', 'application/json', 'application/xml'])
1543
+
1544
+ # form parameters
1545
+ form_params = opts[:form_params] || {}
1546
+
1547
+ # http body (model)
1548
+ post_body = opts[:body]
1549
+
1550
+ # return_type
1551
+ return_type = opts[:return_type] || 'Object'
1552
+
1553
+ # auth_names
1554
+ auth_names = opts[:auth_names] || ['csrfAuth']
1555
+
1556
+ new_options = opts.merge(
1557
+ :header_params => header_params,
1558
+ :query_params => query_params,
1559
+ :form_params => form_params,
1560
+ :body => post_body,
1561
+ :auth_names => auth_names,
1562
+ :return_type => return_type
1563
+ )
1564
+
1565
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1566
+ if @api_client.config.debugging
1567
+ @api_client.config.logger.debug "API called: DefaultApi#resend_unconfirmed_txns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1568
+ end
1569
+ return data, status_code, headers
1570
+ end
1571
+
1572
+ # Returns the top skycoin holders.
1573
+ # @param [Hash] opts the optional parameters
1574
+ # @option opts [Boolean] :include_distribution include distribution addresses or not, default value false
1575
+ # @option opts [String] :n include distribution addresses or not, default value false
1576
+ # @return [Object]
1577
+ def richlist(opts = {})
1578
+ data, _status_code, _headers = richlist_with_http_info(opts)
1579
+ data
1580
+ end
1581
+
1582
+ # Returns the top skycoin holders.
1583
+ # @param [Hash] opts the optional parameters
1584
+ # @option opts [Boolean] :include_distribution include distribution addresses or not, default value false
1585
+ # @option opts [String] :n include distribution addresses or not, default value false
1586
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
1587
+ def richlist_with_http_info(opts = {})
1588
+ if @api_client.config.debugging
1589
+ @api_client.config.logger.debug 'Calling API: DefaultApi.richlist ...'
1590
+ end
1591
+ # resource path
1592
+ local_var_path = '/api/v1/richlist'
1593
+
1594
+ # query parameters
1595
+ query_params = opts[:query_params] || {}
1596
+ query_params[:'include-distribution'] = opts[:'include_distribution'] if !opts[:'include_distribution'].nil?
1597
+ query_params[:'n'] = opts[:'n'] if !opts[:'n'].nil?
1598
+
1599
+ # header parameters
1600
+ header_params = opts[:header_params] || {}
1601
+ # HTTP header 'Accept' (if needed)
1602
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
1603
+
1604
+ # form parameters
1605
+ form_params = opts[:form_params] || {}
1606
+
1607
+ # http body (model)
1608
+ post_body = opts[:body]
1609
+
1610
+ # return_type
1611
+ return_type = opts[:return_type] || 'Object'
1612
+
1613
+ # auth_names
1614
+ auth_names = opts[:auth_names] || []
1615
+
1616
+ new_options = opts.merge(
1617
+ :header_params => header_params,
1618
+ :query_params => query_params,
1619
+ :form_params => form_params,
1620
+ :body => post_body,
1621
+ :auth_names => auth_names,
1622
+ :return_type => return_type
1623
+ )
1624
+
1625
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1626
+ if @api_client.config.debugging
1627
+ @api_client.config.logger.debug "API called: DefaultApi#richlist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1628
+ end
1629
+ return data, status_code, headers
1630
+ end
1631
+
1632
+ # Returns a transaction identified by its txid hash with just id
1633
+ # @param txid [String] transaction Id
1634
+ # @param [Hash] opts the optional parameters
1635
+ # @return [Transaction]
1636
+ def transaction(txid, opts = {})
1637
+ data, _status_code, _headers = transaction_with_http_info(txid, opts)
1638
+ data
1639
+ end
1640
+
1641
+ # Returns a transaction identified by its txid hash with just id
1642
+ # @param txid [String] transaction Id
1643
+ # @param [Hash] opts the optional parameters
1644
+ # @return [Array<(Transaction, Integer, Hash)>] Transaction data, response status code and response headers
1645
+ def transaction_with_http_info(txid, opts = {})
1646
+ if @api_client.config.debugging
1647
+ @api_client.config.logger.debug 'Calling API: DefaultApi.transaction ...'
1648
+ end
1649
+ # verify the required parameter 'txid' is set
1650
+ if @api_client.config.client_side_validation && txid.nil?
1651
+ fail ArgumentError, "Missing the required parameter 'txid' when calling DefaultApi.transaction"
1652
+ end
1653
+ # resource path
1654
+ local_var_path = '/api/v1/transaction'
1655
+
1656
+ # query parameters
1657
+ query_params = opts[:query_params] || {}
1658
+ query_params[:'txid'] = txid
1659
+
1660
+ # header parameters
1661
+ header_params = opts[:header_params] || {}
1662
+ # HTTP header 'Accept' (if needed)
1663
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
1664
+
1665
+ # form parameters
1666
+ form_params = opts[:form_params] || {}
1667
+
1668
+ # http body (model)
1669
+ post_body = opts[:body]
1670
+
1671
+ # return_type
1672
+ return_type = opts[:return_type] || 'Transaction'
1673
+
1674
+ # auth_names
1675
+ auth_names = opts[:auth_names] || []
1676
+
1677
+ new_options = opts.merge(
1678
+ :header_params => header_params,
1679
+ :query_params => query_params,
1680
+ :form_params => form_params,
1681
+ :body => post_body,
1682
+ :auth_names => auth_names,
1683
+ :return_type => return_type
1684
+ )
1685
+
1686
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1687
+ if @api_client.config.debugging
1688
+ @api_client.config.logger.debug "API called: DefaultApi#transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1689
+ end
1690
+ return data, status_code, headers
1691
+ end
1692
+
1693
+ # Broadcast a hex-encoded, serialized transaction to the network.
1694
+ # @param rawtx [String] hex-encoded serialized transaction string.
1695
+ # @param [Hash] opts the optional parameters
1696
+ # @return [String]
1697
+ def transaction_inject(rawtx, opts = {})
1698
+ data, _status_code, _headers = transaction_inject_with_http_info(rawtx, opts)
1699
+ data
1700
+ end
1701
+
1702
+ # Broadcast a hex-encoded, serialized transaction to the network.
1703
+ # @param rawtx [String] hex-encoded serialized transaction string.
1704
+ # @param [Hash] opts the optional parameters
1705
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
1706
+ def transaction_inject_with_http_info(rawtx, opts = {})
1707
+ if @api_client.config.debugging
1708
+ @api_client.config.logger.debug 'Calling API: DefaultApi.transaction_inject ...'
1709
+ end
1710
+ # verify the required parameter 'rawtx' is set
1711
+ if @api_client.config.client_side_validation && rawtx.nil?
1712
+ fail ArgumentError, "Missing the required parameter 'rawtx' when calling DefaultApi.transaction_inject"
1713
+ end
1714
+ # resource path
1715
+ local_var_path = '/api/v1/injectTransaction'
1716
+
1717
+ # query parameters
1718
+ query_params = opts[:query_params] || {}
1719
+
1720
+ # header parameters
1721
+ header_params = opts[:header_params] || {}
1722
+ # HTTP header 'Accept' (if needed)
1723
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'application/xml'])
1724
+ header_params[:'rawtx'] = rawtx
1725
+
1726
+ # form parameters
1727
+ form_params = opts[:form_params] || {}
1728
+
1729
+ # http body (model)
1730
+ post_body = opts[:body]
1731
+
1732
+ # return_type
1733
+ return_type = opts[:return_type] || 'String'
1734
+
1735
+ # auth_names
1736
+ auth_names = opts[:auth_names] || ['csrfAuth']
1737
+
1738
+ new_options = opts.merge(
1739
+ :header_params => header_params,
1740
+ :query_params => query_params,
1741
+ :form_params => form_params,
1742
+ :body => post_body,
1743
+ :auth_names => auth_names,
1744
+ :return_type => return_type
1745
+ )
1746
+
1747
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1748
+ if @api_client.config.debugging
1749
+ @api_client.config.logger.debug "API called: DefaultApi#transaction_inject\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1750
+ end
1751
+ return data, status_code, headers
1752
+ end
1753
+
1754
+ # @param [Hash] opts the optional parameters
1755
+ # @option opts [TransactionV2ParamsAddress] :transaction_v2_params_address
1756
+ # @return [InlineResponse2008]
1757
+ def transaction_post(opts = {})
1758
+ data, _status_code, _headers = transaction_post_with_http_info(opts)
1759
+ data
1760
+ end
1761
+
1762
+ # @param [Hash] opts the optional parameters
1763
+ # @option opts [TransactionV2ParamsAddress] :transaction_v2_params_address
1764
+ # @return [Array<(InlineResponse2008, Integer, Hash)>] InlineResponse2008 data, response status code and response headers
1765
+ def transaction_post_with_http_info(opts = {})
1766
+ if @api_client.config.debugging
1767
+ @api_client.config.logger.debug 'Calling API: DefaultApi.transaction_post ...'
1768
+ end
1769
+ # resource path
1770
+ local_var_path = '/api/v2/transaction'
1771
+
1772
+ # query parameters
1773
+ query_params = opts[:query_params] || {}
1774
+
1775
+ # header parameters
1776
+ header_params = opts[:header_params] || {}
1777
+ # HTTP header 'Accept' (if needed)
1778
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
1779
+ # HTTP header 'Content-Type'
1780
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1781
+
1782
+ # form parameters
1783
+ form_params = opts[:form_params] || {}
1784
+
1785
+ # http body (model)
1786
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'transaction_v2_params_address'])
1787
+
1788
+ # return_type
1789
+ return_type = opts[:return_type] || 'InlineResponse2008'
1790
+
1791
+ # auth_names
1792
+ auth_names = opts[:auth_names] || ['csrfAuth']
1793
+
1794
+ new_options = opts.merge(
1795
+ :header_params => header_params,
1796
+ :query_params => query_params,
1797
+ :form_params => form_params,
1798
+ :body => post_body,
1799
+ :auth_names => auth_names,
1800
+ :return_type => return_type
1801
+ )
1802
+
1803
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1804
+ if @api_client.config.debugging
1805
+ @api_client.config.logger.debug "API called: DefaultApi#transaction_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1806
+ end
1807
+ return data, status_code, headers
1808
+ end
1809
+
1810
+ # @param transaction_v2_params_unspent [TransactionV2ParamsUnspent] Unspent parameters
1811
+ # @param [Hash] opts the optional parameters
1812
+ # @return [InlineResponse2008]
1813
+ def transaction_post_unspent(transaction_v2_params_unspent, opts = {})
1814
+ data, _status_code, _headers = transaction_post_unspent_with_http_info(transaction_v2_params_unspent, opts)
1815
+ data
1816
+ end
1817
+
1818
+ # @param transaction_v2_params_unspent [TransactionV2ParamsUnspent] Unspent parameters
1819
+ # @param [Hash] opts the optional parameters
1820
+ # @return [Array<(InlineResponse2008, Integer, Hash)>] InlineResponse2008 data, response status code and response headers
1821
+ def transaction_post_unspent_with_http_info(transaction_v2_params_unspent, opts = {})
1822
+ if @api_client.config.debugging
1823
+ @api_client.config.logger.debug 'Calling API: DefaultApi.transaction_post_unspent ...'
1824
+ end
1825
+ # verify the required parameter 'transaction_v2_params_unspent' is set
1826
+ if @api_client.config.client_side_validation && transaction_v2_params_unspent.nil?
1827
+ fail ArgumentError, "Missing the required parameter 'transaction_v2_params_unspent' when calling DefaultApi.transaction_post_unspent"
1828
+ end
1829
+ # resource path
1830
+ local_var_path = '/api/v2/transaction/unspent'
1831
+
1832
+ # query parameters
1833
+ query_params = opts[:query_params] || {}
1834
+
1835
+ # header parameters
1836
+ header_params = opts[:header_params] || {}
1837
+ # HTTP header 'Accept' (if needed)
1838
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
1839
+ # HTTP header 'Content-Type'
1840
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1841
+
1842
+ # form parameters
1843
+ form_params = opts[:form_params] || {}
1844
+
1845
+ # http body (model)
1846
+ post_body = opts[:body] || @api_client.object_to_http_body(transaction_v2_params_unspent)
1847
+
1848
+ # return_type
1849
+ return_type = opts[:return_type] || 'InlineResponse2008'
1850
+
1851
+ # auth_names
1852
+ auth_names = opts[:auth_names] || ['csrfAuth']
1853
+
1854
+ new_options = opts.merge(
1855
+ :header_params => header_params,
1856
+ :query_params => query_params,
1857
+ :form_params => form_params,
1858
+ :body => post_body,
1859
+ :auth_names => auth_names,
1860
+ :return_type => return_type
1861
+ )
1862
+
1863
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1864
+ if @api_client.config.debugging
1865
+ @api_client.config.logger.debug "API called: DefaultApi#transaction_post_unspent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1866
+ end
1867
+ return data, status_code, headers
1868
+ end
1869
+
1870
+ # Returns the hex-encoded byte serialization of a transaction. The transaction may be confirmed or unconfirmed.
1871
+ # @param [Hash] opts the optional parameters
1872
+ # @option opts [String] :txid Transaction id hash
1873
+ # @return [Object]
1874
+ def transaction_raw(opts = {})
1875
+ data, _status_code, _headers = transaction_raw_with_http_info(opts)
1876
+ data
1877
+ end
1878
+
1879
+ # Returns the hex-encoded byte serialization of a transaction. The transaction may be confirmed or unconfirmed.
1880
+ # @param [Hash] opts the optional parameters
1881
+ # @option opts [String] :txid Transaction id hash
1882
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
1883
+ def transaction_raw_with_http_info(opts = {})
1884
+ if @api_client.config.debugging
1885
+ @api_client.config.logger.debug 'Calling API: DefaultApi.transaction_raw ...'
1886
+ end
1887
+ # resource path
1888
+ local_var_path = '/api/v2/transaction/raw'
1889
+
1890
+ # query parameters
1891
+ query_params = opts[:query_params] || {}
1892
+ query_params[:'txid'] = opts[:'txid'] if !opts[:'txid'].nil?
1893
+
1894
+ # header parameters
1895
+ header_params = opts[:header_params] || {}
1896
+ # HTTP header 'Accept' (if needed)
1897
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
1898
+
1899
+ # form parameters
1900
+ form_params = opts[:form_params] || {}
1901
+
1902
+ # http body (model)
1903
+ post_body = opts[:body]
1904
+
1905
+ # return_type
1906
+ return_type = opts[:return_type] || 'Object'
1907
+
1908
+ # auth_names
1909
+ auth_names = opts[:auth_names] || []
1910
+
1911
+ new_options = opts.merge(
1912
+ :header_params => header_params,
1913
+ :query_params => query_params,
1914
+ :form_params => form_params,
1915
+ :body => post_body,
1916
+ :auth_names => auth_names,
1917
+ :return_type => return_type
1918
+ )
1919
+
1920
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1921
+ if @api_client.config.debugging
1922
+ @api_client.config.logger.debug "API called: DefaultApi#transaction_raw\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1923
+ end
1924
+ return data, status_code, headers
1925
+ end
1926
+
1927
+ # Decode and verify an encoded transaction
1928
+ # @param transaction_verify_request [TransactionVerifyRequest]
1929
+ # @param [Hash] opts the optional parameters
1930
+ # @return [Object]
1931
+ def transaction_verify(transaction_verify_request, opts = {})
1932
+ data, _status_code, _headers = transaction_verify_with_http_info(transaction_verify_request, opts)
1933
+ data
1934
+ end
1935
+
1936
+ # Decode and verify an encoded transaction
1937
+ # @param transaction_verify_request [TransactionVerifyRequest]
1938
+ # @param [Hash] opts the optional parameters
1939
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
1940
+ def transaction_verify_with_http_info(transaction_verify_request, opts = {})
1941
+ if @api_client.config.debugging
1942
+ @api_client.config.logger.debug 'Calling API: DefaultApi.transaction_verify ...'
1943
+ end
1944
+ # verify the required parameter 'transaction_verify_request' is set
1945
+ if @api_client.config.client_side_validation && transaction_verify_request.nil?
1946
+ fail ArgumentError, "Missing the required parameter 'transaction_verify_request' when calling DefaultApi.transaction_verify"
1947
+ end
1948
+ # resource path
1949
+ local_var_path = '/api/v2/transaction/verify'
1950
+
1951
+ # query parameters
1952
+ query_params = opts[:query_params] || {}
1953
+
1954
+ # header parameters
1955
+ header_params = opts[:header_params] || {}
1956
+ # HTTP header 'Accept' (if needed)
1957
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
1958
+ # HTTP header 'Content-Type'
1959
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1960
+
1961
+ # form parameters
1962
+ form_params = opts[:form_params] || {}
1963
+
1964
+ # http body (model)
1965
+ post_body = opts[:body] || @api_client.object_to_http_body(transaction_verify_request)
1966
+
1967
+ # return_type
1968
+ return_type = opts[:return_type] || 'Object'
1969
+
1970
+ # auth_names
1971
+ auth_names = opts[:auth_names] || ['csrfAuth']
1972
+
1973
+ new_options = opts.merge(
1974
+ :header_params => header_params,
1975
+ :query_params => query_params,
1976
+ :form_params => form_params,
1977
+ :body => post_body,
1978
+ :auth_names => auth_names,
1979
+ :return_type => return_type
1980
+ )
1981
+
1982
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1983
+ if @api_client.config.debugging
1984
+ @api_client.config.logger.debug "API called: DefaultApi#transaction_verify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1985
+ end
1986
+ return data, status_code, headers
1987
+ end
1988
+
1989
+ # Returns transactions that match the filters.
1990
+ # @param [Hash] opts the optional parameters
1991
+ # @option opts [String] :addrs command separated list of addresses
1992
+ # @option opts [String] :confirmed Whether the transactions should be confirmed [optional, must be 0 or 1; if not provided, returns all]
1993
+ # @return [Object]
1994
+ def transactions_get(opts = {})
1995
+ data, _status_code, _headers = transactions_get_with_http_info(opts)
1996
+ data
1997
+ end
1998
+
1999
+ # Returns transactions that match the filters.
2000
+ # @param [Hash] opts the optional parameters
2001
+ # @option opts [String] :addrs command separated list of addresses
2002
+ # @option opts [String] :confirmed Whether the transactions should be confirmed [optional, must be 0 or 1; if not provided, returns all]
2003
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
2004
+ def transactions_get_with_http_info(opts = {})
2005
+ if @api_client.config.debugging
2006
+ @api_client.config.logger.debug 'Calling API: DefaultApi.transactions_get ...'
2007
+ end
2008
+ # resource path
2009
+ local_var_path = '/api/v1/transactions'
2010
+
2011
+ # query parameters
2012
+ query_params = opts[:query_params] || {}
2013
+ query_params[:'addrs'] = opts[:'addrs'] if !opts[:'addrs'].nil?
2014
+ query_params[:'confirmed'] = opts[:'confirmed'] if !opts[:'confirmed'].nil?
2015
+
2016
+ # header parameters
2017
+ header_params = opts[:header_params] || {}
2018
+ # HTTP header 'Accept' (if needed)
2019
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
2020
+
2021
+ # form parameters
2022
+ form_params = opts[:form_params] || {}
2023
+
2024
+ # http body (model)
2025
+ post_body = opts[:body]
2026
+
2027
+ # return_type
2028
+ return_type = opts[:return_type] || 'Object'
2029
+
2030
+ # auth_names
2031
+ auth_names = opts[:auth_names] || []
2032
+
2033
+ new_options = opts.merge(
2034
+ :header_params => header_params,
2035
+ :query_params => query_params,
2036
+ :form_params => form_params,
2037
+ :body => post_body,
2038
+ :auth_names => auth_names,
2039
+ :return_type => return_type
2040
+ )
2041
+
2042
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2043
+ if @api_client.config.debugging
2044
+ @api_client.config.logger.debug "API called: DefaultApi#transactions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2045
+ end
2046
+ return data, status_code, headers
2047
+ end
2048
+
2049
+ # Returns transactions that match the filters.
2050
+ # @param [Hash] opts the optional parameters
2051
+ # @option opts [String] :addrs command separated list of addresses
2052
+ # @option opts [String] :confirmed Whether the transactions should be confirmed [optional, must be 0 or 1; if not provided, returns all]
2053
+ # @return [Object]
2054
+ def transactions_post(opts = {})
2055
+ data, _status_code, _headers = transactions_post_with_http_info(opts)
2056
+ data
2057
+ end
2058
+
2059
+ # Returns transactions that match the filters.
2060
+ # @param [Hash] opts the optional parameters
2061
+ # @option opts [String] :addrs command separated list of addresses
2062
+ # @option opts [String] :confirmed Whether the transactions should be confirmed [optional, must be 0 or 1; if not provided, returns all]
2063
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
2064
+ def transactions_post_with_http_info(opts = {})
2065
+ if @api_client.config.debugging
2066
+ @api_client.config.logger.debug 'Calling API: DefaultApi.transactions_post ...'
2067
+ end
2068
+ # resource path
2069
+ local_var_path = '/api/v1/transactions'
2070
+
2071
+ # query parameters
2072
+ query_params = opts[:query_params] || {}
2073
+ query_params[:'addrs'] = opts[:'addrs'] if !opts[:'addrs'].nil?
2074
+ query_params[:'confirmed'] = opts[:'confirmed'] if !opts[:'confirmed'].nil?
2075
+
2076
+ # header parameters
2077
+ header_params = opts[:header_params] || {}
2078
+ # HTTP header 'Accept' (if needed)
2079
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
2080
+
2081
+ # form parameters
2082
+ form_params = opts[:form_params] || {}
2083
+
2084
+ # http body (model)
2085
+ post_body = opts[:body]
2086
+
2087
+ # return_type
2088
+ return_type = opts[:return_type] || 'Object'
2089
+
2090
+ # auth_names
2091
+ auth_names = opts[:auth_names] || ['csrfAuth']
2092
+
2093
+ new_options = opts.merge(
2094
+ :header_params => header_params,
2095
+ :query_params => query_params,
2096
+ :form_params => form_params,
2097
+ :body => post_body,
2098
+ :auth_names => auth_names,
2099
+ :return_type => return_type
2100
+ )
2101
+
2102
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2103
+ if @api_client.config.debugging
2104
+ @api_client.config.logger.debug "API called: DefaultApi#transactions_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2105
+ end
2106
+ return data, status_code, headers
2107
+ end
2108
+
2109
+ # Returns an unspent output by ID.
2110
+ # @param [Hash] opts the optional parameters
2111
+ # @option opts [String] :uxid uxid to filter by
2112
+ # @return [Object]
2113
+ def uxout(opts = {})
2114
+ data, _status_code, _headers = uxout_with_http_info(opts)
2115
+ data
2116
+ end
2117
+
2118
+ # Returns an unspent output by ID.
2119
+ # @param [Hash] opts the optional parameters
2120
+ # @option opts [String] :uxid uxid to filter by
2121
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
2122
+ def uxout_with_http_info(opts = {})
2123
+ if @api_client.config.debugging
2124
+ @api_client.config.logger.debug 'Calling API: DefaultApi.uxout ...'
2125
+ end
2126
+ # resource path
2127
+ local_var_path = '/api/v1/uxout'
2128
+
2129
+ # query parameters
2130
+ query_params = opts[:query_params] || {}
2131
+ query_params[:'uxid'] = opts[:'uxid'] if !opts[:'uxid'].nil?
2132
+
2133
+ # header parameters
2134
+ header_params = opts[:header_params] || {}
2135
+ # HTTP header 'Accept' (if needed)
2136
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
2137
+
2138
+ # form parameters
2139
+ form_params = opts[:form_params] || {}
2140
+
2141
+ # http body (model)
2142
+ post_body = opts[:body]
2143
+
2144
+ # return_type
2145
+ return_type = opts[:return_type] || 'Object'
2146
+
2147
+ # auth_names
2148
+ auth_names = opts[:auth_names] || []
2149
+
2150
+ new_options = opts.merge(
2151
+ :header_params => header_params,
2152
+ :query_params => query_params,
2153
+ :form_params => form_params,
2154
+ :body => post_body,
2155
+ :auth_names => auth_names,
2156
+ :return_type => return_type
2157
+ )
2158
+
2159
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2160
+ if @api_client.config.debugging
2161
+ @api_client.config.logger.debug "API called: DefaultApi#uxout\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2162
+ end
2163
+ return data, status_code, headers
2164
+ end
2165
+
2166
+ # Verifies a Skycoin address.
2167
+ # @param address [Object] Address id.
2168
+ # @param [Hash] opts the optional parameters
2169
+ # @return [Object]
2170
+ def verify_address(address, opts = {})
2171
+ data, _status_code, _headers = verify_address_with_http_info(address, opts)
2172
+ data
2173
+ end
2174
+
2175
+ # Verifies a Skycoin address.
2176
+ # @param address [Object] Address id.
2177
+ # @param [Hash] opts the optional parameters
2178
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
2179
+ def verify_address_with_http_info(address, opts = {})
2180
+ if @api_client.config.debugging
2181
+ @api_client.config.logger.debug 'Calling API: DefaultApi.verify_address ...'
2182
+ end
2183
+ # verify the required parameter 'address' is set
2184
+ if @api_client.config.client_side_validation && address.nil?
2185
+ fail ArgumentError, "Missing the required parameter 'address' when calling DefaultApi.verify_address"
2186
+ end
2187
+ # resource path
2188
+ local_var_path = '/api/v2/address/verify'
2189
+
2190
+ # query parameters
2191
+ query_params = opts[:query_params] || {}
2192
+ query_params[:'address'] = address
2193
+
2194
+ # header parameters
2195
+ header_params = opts[:header_params] || {}
2196
+ # HTTP header 'Accept' (if needed)
2197
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
2198
+
2199
+ # form parameters
2200
+ form_params = opts[:form_params] || {}
2201
+
2202
+ # http body (model)
2203
+ post_body = opts[:body]
2204
+
2205
+ # return_type
2206
+ return_type = opts[:return_type] || 'Object'
2207
+
2208
+ # auth_names
2209
+ auth_names = opts[:auth_names] || ['csrfAuth']
2210
+
2211
+ new_options = opts.merge(
2212
+ :header_params => header_params,
2213
+ :query_params => query_params,
2214
+ :form_params => form_params,
2215
+ :body => post_body,
2216
+ :auth_names => auth_names,
2217
+ :return_type => return_type
2218
+ )
2219
+
2220
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2221
+ if @api_client.config.debugging
2222
+ @api_client.config.logger.debug "API called: DefaultApi#verify_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2223
+ end
2224
+ return data, status_code, headers
2225
+ end
2226
+
2227
+ # versionHandler returns the application version info
2228
+ # @param [Hash] opts the optional parameters
2229
+ # @return [InlineResponse2005]
2230
+ def version(opts = {})
2231
+ data, _status_code, _headers = version_with_http_info(opts)
2232
+ data
2233
+ end
2234
+
2235
+ # versionHandler returns the application version info
2236
+ # @param [Hash] opts the optional parameters
2237
+ # @return [Array<(InlineResponse2005, Integer, Hash)>] InlineResponse2005 data, response status code and response headers
2238
+ def version_with_http_info(opts = {})
2239
+ if @api_client.config.debugging
2240
+ @api_client.config.logger.debug 'Calling API: DefaultApi.version ...'
2241
+ end
2242
+ # resource path
2243
+ local_var_path = '/api/v1/version'
2244
+
2245
+ # query parameters
2246
+ query_params = opts[:query_params] || {}
2247
+
2248
+ # header parameters
2249
+ header_params = opts[:header_params] || {}
2250
+ # HTTP header 'Accept' (if needed)
2251
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
2252
+
2253
+ # form parameters
2254
+ form_params = opts[:form_params] || {}
2255
+
2256
+ # http body (model)
2257
+ post_body = opts[:body]
2258
+
2259
+ # return_type
2260
+ return_type = opts[:return_type] || 'InlineResponse2005'
2261
+
2262
+ # auth_names
2263
+ auth_names = opts[:auth_names] || []
2264
+
2265
+ new_options = opts.merge(
2266
+ :header_params => header_params,
2267
+ :query_params => query_params,
2268
+ :form_params => form_params,
2269
+ :body => post_body,
2270
+ :auth_names => auth_names,
2271
+ :return_type => return_type
2272
+ )
2273
+
2274
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2275
+ if @api_client.config.debugging
2276
+ @api_client.config.logger.debug "API called: DefaultApi#version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2277
+ end
2278
+ return data, status_code, headers
2279
+ end
2280
+
2281
+ # Returns a wallet by id.
2282
+ # @param id [String] tags to filter by
2283
+ # @param [Hash] opts the optional parameters
2284
+ # @return [Object]
2285
+ def wallet(id, opts = {})
2286
+ data, _status_code, _headers = wallet_with_http_info(id, opts)
2287
+ data
2288
+ end
2289
+
2290
+ # Returns a wallet by id.
2291
+ # @param id [String] tags to filter by
2292
+ # @param [Hash] opts the optional parameters
2293
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
2294
+ def wallet_with_http_info(id, opts = {})
2295
+ if @api_client.config.debugging
2296
+ @api_client.config.logger.debug 'Calling API: DefaultApi.wallet ...'
2297
+ end
2298
+ # verify the required parameter 'id' is set
2299
+ if @api_client.config.client_side_validation && id.nil?
2300
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.wallet"
2301
+ end
2302
+ # resource path
2303
+ local_var_path = '/api/v1/wallet'
2304
+
2305
+ # query parameters
2306
+ query_params = opts[:query_params] || {}
2307
+ query_params[:'id'] = id
2308
+
2309
+ # header parameters
2310
+ header_params = opts[:header_params] || {}
2311
+ # HTTP header 'Accept' (if needed)
2312
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
2313
+
2314
+ # form parameters
2315
+ form_params = opts[:form_params] || {}
2316
+
2317
+ # http body (model)
2318
+ post_body = opts[:body]
2319
+
2320
+ # return_type
2321
+ return_type = opts[:return_type] || 'Object'
2322
+
2323
+ # auth_names
2324
+ auth_names = opts[:auth_names] || []
2325
+
2326
+ new_options = opts.merge(
2327
+ :header_params => header_params,
2328
+ :query_params => query_params,
2329
+ :form_params => form_params,
2330
+ :body => post_body,
2331
+ :auth_names => auth_names,
2332
+ :return_type => return_type
2333
+ )
2334
+
2335
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2336
+ if @api_client.config.debugging
2337
+ @api_client.config.logger.debug "API called: DefaultApi#wallet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2338
+ end
2339
+ return data, status_code, headers
2340
+ end
2341
+
2342
+ # Returns the wallet's balance, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends.
2343
+ # @param id [String] tags to filter by
2344
+ # @param [Hash] opts the optional parameters
2345
+ # @return [Object]
2346
+ def wallet_balance(id, opts = {})
2347
+ data, _status_code, _headers = wallet_balance_with_http_info(id, opts)
2348
+ data
2349
+ end
2350
+
2351
+ # Returns the wallet&#39;s balance, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends.
2352
+ # @param id [String] tags to filter by
2353
+ # @param [Hash] opts the optional parameters
2354
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
2355
+ def wallet_balance_with_http_info(id, opts = {})
2356
+ if @api_client.config.debugging
2357
+ @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_balance ...'
2358
+ end
2359
+ # verify the required parameter 'id' is set
2360
+ if @api_client.config.client_side_validation && id.nil?
2361
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.wallet_balance"
2362
+ end
2363
+ # resource path
2364
+ local_var_path = '/api/v1/wallet/balance'
2365
+
2366
+ # query parameters
2367
+ query_params = opts[:query_params] || {}
2368
+ query_params[:'id'] = id
2369
+
2370
+ # header parameters
2371
+ header_params = opts[:header_params] || {}
2372
+ # HTTP header 'Accept' (if needed)
2373
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
2374
+
2375
+ # form parameters
2376
+ form_params = opts[:form_params] || {}
2377
+
2378
+ # http body (model)
2379
+ post_body = opts[:body]
2380
+
2381
+ # return_type
2382
+ return_type = opts[:return_type] || 'Object'
2383
+
2384
+ # auth_names
2385
+ auth_names = opts[:auth_names] || []
2386
+
2387
+ new_options = opts.merge(
2388
+ :header_params => header_params,
2389
+ :query_params => query_params,
2390
+ :form_params => form_params,
2391
+ :body => post_body,
2392
+ :auth_names => auth_names,
2393
+ :return_type => return_type
2394
+ )
2395
+
2396
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2397
+ if @api_client.config.debugging
2398
+ @api_client.config.logger.debug "API called: DefaultApi#wallet_balance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2399
+ end
2400
+ return data, status_code, headers
2401
+ end
2402
+
2403
+ # Loads wallet from seed, will scan ahead N address and load addresses till the last one that have coins.
2404
+ # @param seed [String] Wallet seed.
2405
+ # @param label [String] Wallet label.
2406
+ # @param [Hash] opts the optional parameters
2407
+ # @option opts [Integer] :scan The number of addresses to scan ahead for balances.
2408
+ # @option opts [Boolean] :encrypt Encrypt wallet.
2409
+ # @option opts [String] :password Wallet Password
2410
+ # @return [Object]
2411
+ def wallet_create(seed, label, opts = {})
2412
+ data, _status_code, _headers = wallet_create_with_http_info(seed, label, opts)
2413
+ data
2414
+ end
2415
+
2416
+ # Loads wallet from seed, will scan ahead N address and load addresses till the last one that have coins.
2417
+ # @param seed [String] Wallet seed.
2418
+ # @param label [String] Wallet label.
2419
+ # @param [Hash] opts the optional parameters
2420
+ # @option opts [Integer] :scan The number of addresses to scan ahead for balances.
2421
+ # @option opts [Boolean] :encrypt Encrypt wallet.
2422
+ # @option opts [String] :password Wallet Password
2423
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
2424
+ def wallet_create_with_http_info(seed, label, opts = {})
2425
+ if @api_client.config.debugging
2426
+ @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_create ...'
2427
+ end
2428
+ # verify the required parameter 'seed' is set
2429
+ if @api_client.config.client_side_validation && seed.nil?
2430
+ fail ArgumentError, "Missing the required parameter 'seed' when calling DefaultApi.wallet_create"
2431
+ end
2432
+ # verify the required parameter 'label' is set
2433
+ if @api_client.config.client_side_validation && label.nil?
2434
+ fail ArgumentError, "Missing the required parameter 'label' when calling DefaultApi.wallet_create"
2435
+ end
2436
+ if @api_client.config.client_side_validation && !opts[:'scan'].nil? && opts[:'scan'] < 1
2437
+ fail ArgumentError, 'invalid value for "opts[:"scan"]" when calling DefaultApi.wallet_create, must be greater than or equal to 1.'
2438
+ end
2439
+
2440
+ # resource path
2441
+ local_var_path = '/api/v1/wallet/create'
2442
+
2443
+ # query parameters
2444
+ query_params = opts[:query_params] || {}
2445
+
2446
+ # header parameters
2447
+ header_params = opts[:header_params] || {}
2448
+ # HTTP header 'Accept' (if needed)
2449
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
2450
+ header_params[:'seed'] = seed
2451
+ header_params[:'label'] = label
2452
+ header_params[:'scan'] = opts[:'scan'] if !opts[:'scan'].nil?
2453
+ header_params[:'encrypt'] = opts[:'encrypt'] if !opts[:'encrypt'].nil?
2454
+ header_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?
2455
+
2456
+ # form parameters
2457
+ form_params = opts[:form_params] || {}
2458
+
2459
+ # http body (model)
2460
+ post_body = opts[:body]
2461
+
2462
+ # return_type
2463
+ return_type = opts[:return_type] || 'Object'
2464
+
2465
+ # auth_names
2466
+ auth_names = opts[:auth_names] || ['csrfAuth']
2467
+
2468
+ new_options = opts.merge(
2469
+ :header_params => header_params,
2470
+ :query_params => query_params,
2471
+ :form_params => form_params,
2472
+ :body => post_body,
2473
+ :auth_names => auth_names,
2474
+ :return_type => return_type
2475
+ )
2476
+
2477
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2478
+ if @api_client.config.debugging
2479
+ @api_client.config.logger.debug "API called: DefaultApi#wallet_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2480
+ end
2481
+ return data, status_code, headers
2482
+ end
2483
+
2484
+ # Decrypts wallet.
2485
+ # @param id [String] Wallet id.
2486
+ # @param password [String] Wallet password.
2487
+ # @param [Hash] opts the optional parameters
2488
+ # @return [Object]
2489
+ def wallet_decrypt(id, password, opts = {})
2490
+ data, _status_code, _headers = wallet_decrypt_with_http_info(id, password, opts)
2491
+ data
2492
+ end
2493
+
2494
+ # Decrypts wallet.
2495
+ # @param id [String] Wallet id.
2496
+ # @param password [String] Wallet password.
2497
+ # @param [Hash] opts the optional parameters
2498
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
2499
+ def wallet_decrypt_with_http_info(id, password, opts = {})
2500
+ if @api_client.config.debugging
2501
+ @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_decrypt ...'
2502
+ end
2503
+ # verify the required parameter 'id' is set
2504
+ if @api_client.config.client_side_validation && id.nil?
2505
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.wallet_decrypt"
2506
+ end
2507
+ # verify the required parameter 'password' is set
2508
+ if @api_client.config.client_side_validation && password.nil?
2509
+ fail ArgumentError, "Missing the required parameter 'password' when calling DefaultApi.wallet_decrypt"
2510
+ end
2511
+ # resource path
2512
+ local_var_path = '/api/v1/wallet/decrypt'
2513
+
2514
+ # query parameters
2515
+ query_params = opts[:query_params] || {}
2516
+
2517
+ # header parameters
2518
+ header_params = opts[:header_params] || {}
2519
+ # HTTP header 'Accept' (if needed)
2520
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
2521
+ header_params[:'id'] = id
2522
+ header_params[:'password'] = password
2523
+
2524
+ # form parameters
2525
+ form_params = opts[:form_params] || {}
2526
+
2527
+ # http body (model)
2528
+ post_body = opts[:body]
2529
+
2530
+ # return_type
2531
+ return_type = opts[:return_type] || 'Object'
2532
+
2533
+ # auth_names
2534
+ auth_names = opts[:auth_names] || ['csrfAuth']
2535
+
2536
+ new_options = opts.merge(
2537
+ :header_params => header_params,
2538
+ :query_params => query_params,
2539
+ :form_params => form_params,
2540
+ :body => post_body,
2541
+ :auth_names => auth_names,
2542
+ :return_type => return_type
2543
+ )
2544
+
2545
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2546
+ if @api_client.config.debugging
2547
+ @api_client.config.logger.debug "API called: DefaultApi#wallet_decrypt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2548
+ end
2549
+ return data, status_code, headers
2550
+ end
2551
+
2552
+ # Encrypt wallet.
2553
+ # @param id [String] Wallet id.
2554
+ # @param password [String] Wallet password.
2555
+ # @param [Hash] opts the optional parameters
2556
+ # @return [Object]
2557
+ def wallet_encrypt(id, password, opts = {})
2558
+ data, _status_code, _headers = wallet_encrypt_with_http_info(id, password, opts)
2559
+ data
2560
+ end
2561
+
2562
+ # Encrypt wallet.
2563
+ # @param id [String] Wallet id.
2564
+ # @param password [String] Wallet password.
2565
+ # @param [Hash] opts the optional parameters
2566
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
2567
+ def wallet_encrypt_with_http_info(id, password, opts = {})
2568
+ if @api_client.config.debugging
2569
+ @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_encrypt ...'
2570
+ end
2571
+ # verify the required parameter 'id' is set
2572
+ if @api_client.config.client_side_validation && id.nil?
2573
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.wallet_encrypt"
2574
+ end
2575
+ # verify the required parameter 'password' is set
2576
+ if @api_client.config.client_side_validation && password.nil?
2577
+ fail ArgumentError, "Missing the required parameter 'password' when calling DefaultApi.wallet_encrypt"
2578
+ end
2579
+ # resource path
2580
+ local_var_path = '/api/v1/wallet/encrypt'
2581
+
2582
+ # query parameters
2583
+ query_params = opts[:query_params] || {}
2584
+
2585
+ # header parameters
2586
+ header_params = opts[:header_params] || {}
2587
+ # HTTP header 'Accept' (if needed)
2588
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
2589
+ header_params[:'id'] = id
2590
+ header_params[:'password'] = password
2591
+
2592
+ # form parameters
2593
+ form_params = opts[:form_params] || {}
2594
+
2595
+ # http body (model)
2596
+ post_body = opts[:body]
2597
+
2598
+ # return_type
2599
+ return_type = opts[:return_type] || 'Object'
2600
+
2601
+ # auth_names
2602
+ auth_names = opts[:auth_names] || ['csrfAuth']
2603
+
2604
+ new_options = opts.merge(
2605
+ :header_params => header_params,
2606
+ :query_params => query_params,
2607
+ :form_params => form_params,
2608
+ :body => post_body,
2609
+ :auth_names => auth_names,
2610
+ :return_type => return_type
2611
+ )
2612
+
2613
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2614
+ if @api_client.config.debugging
2615
+ @api_client.config.logger.debug "API called: DefaultApi#wallet_encrypt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2616
+ end
2617
+ return data, status_code, headers
2618
+ end
2619
+
2620
+ # Returns the wallet directory path
2621
+ # @param addr [String] Address port
2622
+ # @param [Hash] opts the optional parameters
2623
+ # @return [InlineResponse2007]
2624
+ def wallet_folder(addr, opts = {})
2625
+ data, _status_code, _headers = wallet_folder_with_http_info(addr, opts)
2626
+ data
2627
+ end
2628
+
2629
+ # Returns the wallet directory path
2630
+ # @param addr [String] Address port
2631
+ # @param [Hash] opts the optional parameters
2632
+ # @return [Array<(InlineResponse2007, Integer, Hash)>] InlineResponse2007 data, response status code and response headers
2633
+ def wallet_folder_with_http_info(addr, opts = {})
2634
+ if @api_client.config.debugging
2635
+ @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_folder ...'
2636
+ end
2637
+ # verify the required parameter 'addr' is set
2638
+ if @api_client.config.client_side_validation && addr.nil?
2639
+ fail ArgumentError, "Missing the required parameter 'addr' when calling DefaultApi.wallet_folder"
2640
+ end
2641
+ # resource path
2642
+ local_var_path = '/api/v1/wallets/folderName'
2643
+
2644
+ # query parameters
2645
+ query_params = opts[:query_params] || {}
2646
+ query_params[:'addr'] = addr
2647
+
2648
+ # header parameters
2649
+ header_params = opts[:header_params] || {}
2650
+ # HTTP header 'Accept' (if needed)
2651
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
2652
+
2653
+ # form parameters
2654
+ form_params = opts[:form_params] || {}
2655
+
2656
+ # http body (model)
2657
+ post_body = opts[:body]
2658
+
2659
+ # return_type
2660
+ return_type = opts[:return_type] || 'InlineResponse2007'
2661
+
2662
+ # auth_names
2663
+ auth_names = opts[:auth_names] || []
2664
+
2665
+ new_options = opts.merge(
2666
+ :header_params => header_params,
2667
+ :query_params => query_params,
2668
+ :form_params => form_params,
2669
+ :body => post_body,
2670
+ :auth_names => auth_names,
2671
+ :return_type => return_type
2672
+ )
2673
+
2674
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2675
+ if @api_client.config.debugging
2676
+ @api_client.config.logger.debug "API called: DefaultApi#wallet_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2677
+ end
2678
+ return data, status_code, headers
2679
+ end
2680
+
2681
+ # Generates new addresses
2682
+ # @param id [String] Wallet Id
2683
+ # @param [Hash] opts the optional parameters
2684
+ # @option opts [String] :num The number you want to generate
2685
+ # @option opts [String] :password Wallet Password
2686
+ # @return [Object]
2687
+ def wallet_new_address(id, opts = {})
2688
+ data, _status_code, _headers = wallet_new_address_with_http_info(id, opts)
2689
+ data
2690
+ end
2691
+
2692
+ # Generates new addresses
2693
+ # @param id [String] Wallet Id
2694
+ # @param [Hash] opts the optional parameters
2695
+ # @option opts [String] :num The number you want to generate
2696
+ # @option opts [String] :password Wallet Password
2697
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
2698
+ def wallet_new_address_with_http_info(id, opts = {})
2699
+ if @api_client.config.debugging
2700
+ @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_new_address ...'
2701
+ end
2702
+ # verify the required parameter 'id' is set
2703
+ if @api_client.config.client_side_validation && id.nil?
2704
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.wallet_new_address"
2705
+ end
2706
+ # resource path
2707
+ local_var_path = '/api/v1/wallet/newAddress'
2708
+
2709
+ # query parameters
2710
+ query_params = opts[:query_params] || {}
2711
+ query_params[:'id'] = id
2712
+ query_params[:'num'] = opts[:'num'] if !opts[:'num'].nil?
2713
+ query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?
2714
+
2715
+ # header parameters
2716
+ header_params = opts[:header_params] || {}
2717
+ # HTTP header 'Accept' (if needed)
2718
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
2719
+
2720
+ # form parameters
2721
+ form_params = opts[:form_params] || {}
2722
+
2723
+ # http body (model)
2724
+ post_body = opts[:body]
2725
+
2726
+ # return_type
2727
+ return_type = opts[:return_type] || 'Object'
2728
+
2729
+ # auth_names
2730
+ auth_names = opts[:auth_names] || ['csrfAuth']
2731
+
2732
+ new_options = opts.merge(
2733
+ :header_params => header_params,
2734
+ :query_params => query_params,
2735
+ :form_params => form_params,
2736
+ :body => post_body,
2737
+ :auth_names => auth_names,
2738
+ :return_type => return_type
2739
+ )
2740
+
2741
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2742
+ if @api_client.config.debugging
2743
+ @api_client.config.logger.debug "API called: DefaultApi#wallet_new_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2744
+ end
2745
+ return data, status_code, headers
2746
+ end
2747
+
2748
+ # Returns the wallet directory path
2749
+ # @param [Hash] opts the optional parameters
2750
+ # @option opts [String] :entropy Entropy bitSize.
2751
+ # @return [Object]
2752
+ def wallet_new_seed(opts = {})
2753
+ data, _status_code, _headers = wallet_new_seed_with_http_info(opts)
2754
+ data
2755
+ end
2756
+
2757
+ # Returns the wallet directory path
2758
+ # @param [Hash] opts the optional parameters
2759
+ # @option opts [String] :entropy Entropy bitSize.
2760
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
2761
+ def wallet_new_seed_with_http_info(opts = {})
2762
+ if @api_client.config.debugging
2763
+ @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_new_seed ...'
2764
+ end
2765
+ allowable_values = ["128", "256"]
2766
+ if @api_client.config.client_side_validation && opts[:'entropy'] && !allowable_values.include?(opts[:'entropy'])
2767
+ fail ArgumentError, "invalid value for \"entropy\", must be one of #{allowable_values}"
2768
+ end
2769
+ # resource path
2770
+ local_var_path = '/api/v1/wallet/newSeed'
2771
+
2772
+ # query parameters
2773
+ query_params = opts[:query_params] || {}
2774
+ query_params[:'entropy'] = opts[:'entropy'] if !opts[:'entropy'].nil?
2775
+
2776
+ # header parameters
2777
+ header_params = opts[:header_params] || {}
2778
+ # HTTP header 'Accept' (if needed)
2779
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
2780
+
2781
+ # form parameters
2782
+ form_params = opts[:form_params] || {}
2783
+
2784
+ # http body (model)
2785
+ post_body = opts[:body]
2786
+
2787
+ # return_type
2788
+ return_type = opts[:return_type] || 'Object'
2789
+
2790
+ # auth_names
2791
+ auth_names = opts[:auth_names] || []
2792
+
2793
+ new_options = opts.merge(
2794
+ :header_params => header_params,
2795
+ :query_params => query_params,
2796
+ :form_params => form_params,
2797
+ :body => post_body,
2798
+ :auth_names => auth_names,
2799
+ :return_type => return_type
2800
+ )
2801
+
2802
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2803
+ if @api_client.config.debugging
2804
+ @api_client.config.logger.debug "API called: DefaultApi#wallet_new_seed\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2805
+ end
2806
+ return data, status_code, headers
2807
+ end
2808
+
2809
+ # Recovers an encrypted wallet by providing the seed. The first address will be generated from seed and compared to the first address of the specified wallet. If they match, the wallet will be regenerated with an optional password. If the wallet is not encrypted, an error is returned.
2810
+ # @param id [String] Wallet id.
2811
+ # @param seed [String] Wallet seed.
2812
+ # @param [Hash] opts the optional parameters
2813
+ # @option opts [String] :password Wallet password.
2814
+ # @return [Object]
2815
+ def wallet_recover(id, seed, opts = {})
2816
+ data, _status_code, _headers = wallet_recover_with_http_info(id, seed, opts)
2817
+ data
2818
+ end
2819
+
2820
+ # Recovers an encrypted wallet by providing the seed. The first address will be generated from seed and compared to the first address of the specified wallet. If they match, the wallet will be regenerated with an optional password. If the wallet is not encrypted, an error is returned.
2821
+ # @param id [String] Wallet id.
2822
+ # @param seed [String] Wallet seed.
2823
+ # @param [Hash] opts the optional parameters
2824
+ # @option opts [String] :password Wallet password.
2825
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
2826
+ def wallet_recover_with_http_info(id, seed, opts = {})
2827
+ if @api_client.config.debugging
2828
+ @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_recover ...'
2829
+ end
2830
+ # verify the required parameter 'id' is set
2831
+ if @api_client.config.client_side_validation && id.nil?
2832
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.wallet_recover"
2833
+ end
2834
+ # verify the required parameter 'seed' is set
2835
+ if @api_client.config.client_side_validation && seed.nil?
2836
+ fail ArgumentError, "Missing the required parameter 'seed' when calling DefaultApi.wallet_recover"
2837
+ end
2838
+ # resource path
2839
+ local_var_path = '/api/v2/wallet/recover'
2840
+
2841
+ # query parameters
2842
+ query_params = opts[:query_params] || {}
2843
+
2844
+ # header parameters
2845
+ header_params = opts[:header_params] || {}
2846
+ # HTTP header 'Accept' (if needed)
2847
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
2848
+ header_params[:'id'] = id
2849
+ header_params[:'seed'] = seed
2850
+ header_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?
2851
+
2852
+ # form parameters
2853
+ form_params = opts[:form_params] || {}
2854
+
2855
+ # http body (model)
2856
+ post_body = opts[:body]
2857
+
2858
+ # return_type
2859
+ return_type = opts[:return_type] || 'Object'
2860
+
2861
+ # auth_names
2862
+ auth_names = opts[:auth_names] || ['csrfAuth']
2863
+
2864
+ new_options = opts.merge(
2865
+ :header_params => header_params,
2866
+ :query_params => query_params,
2867
+ :form_params => form_params,
2868
+ :body => post_body,
2869
+ :auth_names => auth_names,
2870
+ :return_type => return_type
2871
+ )
2872
+
2873
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2874
+ if @api_client.config.debugging
2875
+ @api_client.config.logger.debug "API called: DefaultApi#wallet_recover\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2876
+ end
2877
+ return data, status_code, headers
2878
+ end
2879
+
2880
+ # This endpoint only works for encrypted wallets. If the wallet is unencrypted, The seed will be not returned.
2881
+ # @param id [String] Wallet Id.
2882
+ # @param password [String] Wallet password.
2883
+ # @param [Hash] opts the optional parameters
2884
+ # @return [Object]
2885
+ def wallet_seed(id, password, opts = {})
2886
+ data, _status_code, _headers = wallet_seed_with_http_info(id, password, opts)
2887
+ data
2888
+ end
2889
+
2890
+ # This endpoint only works for encrypted wallets. If the wallet is unencrypted, The seed will be not returned.
2891
+ # @param id [String] Wallet Id.
2892
+ # @param password [String] Wallet password.
2893
+ # @param [Hash] opts the optional parameters
2894
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
2895
+ def wallet_seed_with_http_info(id, password, opts = {})
2896
+ if @api_client.config.debugging
2897
+ @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_seed ...'
2898
+ end
2899
+ # verify the required parameter 'id' is set
2900
+ if @api_client.config.client_side_validation && id.nil?
2901
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.wallet_seed"
2902
+ end
2903
+ # verify the required parameter 'password' is set
2904
+ if @api_client.config.client_side_validation && password.nil?
2905
+ fail ArgumentError, "Missing the required parameter 'password' when calling DefaultApi.wallet_seed"
2906
+ end
2907
+ # resource path
2908
+ local_var_path = '/api/v1/wallet/seed'
2909
+
2910
+ # query parameters
2911
+ query_params = opts[:query_params] || {}
2912
+ query_params[:'id'] = id
2913
+ query_params[:'password'] = password
2914
+
2915
+ # header parameters
2916
+ header_params = opts[:header_params] || {}
2917
+ # HTTP header 'Accept' (if needed)
2918
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
2919
+
2920
+ # form parameters
2921
+ form_params = opts[:form_params] || {}
2922
+
2923
+ # http body (model)
2924
+ post_body = opts[:body]
2925
+
2926
+ # return_type
2927
+ return_type = opts[:return_type] || 'Object'
2928
+
2929
+ # auth_names
2930
+ auth_names = opts[:auth_names] || ['csrfAuth']
2931
+
2932
+ new_options = opts.merge(
2933
+ :header_params => header_params,
2934
+ :query_params => query_params,
2935
+ :form_params => form_params,
2936
+ :body => post_body,
2937
+ :auth_names => auth_names,
2938
+ :return_type => return_type
2939
+ )
2940
+
2941
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2942
+ if @api_client.config.debugging
2943
+ @api_client.config.logger.debug "API called: DefaultApi#wallet_seed\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2944
+ end
2945
+ return data, status_code, headers
2946
+ end
2947
+
2948
+ # Verifies a wallet seed.
2949
+ # @param [Hash] opts the optional parameters
2950
+ # @option opts [String] :seed Seed to be verified.
2951
+ # @return [Object]
2952
+ def wallet_seed_verify(opts = {})
2953
+ data, _status_code, _headers = wallet_seed_verify_with_http_info(opts)
2954
+ data
2955
+ end
2956
+
2957
+ # Verifies a wallet seed.
2958
+ # @param [Hash] opts the optional parameters
2959
+ # @option opts [String] :seed Seed to be verified.
2960
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
2961
+ def wallet_seed_verify_with_http_info(opts = {})
2962
+ if @api_client.config.debugging
2963
+ @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_seed_verify ...'
2964
+ end
2965
+ # resource path
2966
+ local_var_path = '/api/v2/wallet/seed/verify'
2967
+
2968
+ # query parameters
2969
+ query_params = opts[:query_params] || {}
2970
+
2971
+ # header parameters
2972
+ header_params = opts[:header_params] || {}
2973
+ # HTTP header 'Accept' (if needed)
2974
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
2975
+ header_params[:'seed'] = opts[:'seed'] if !opts[:'seed'].nil?
2976
+
2977
+ # form parameters
2978
+ form_params = opts[:form_params] || {}
2979
+
2980
+ # http body (model)
2981
+ post_body = opts[:body]
2982
+
2983
+ # return_type
2984
+ return_type = opts[:return_type] || 'Object'
2985
+
2986
+ # auth_names
2987
+ auth_names = opts[:auth_names] || ['csrfAuth']
2988
+
2989
+ new_options = opts.merge(
2990
+ :header_params => header_params,
2991
+ :query_params => query_params,
2992
+ :form_params => form_params,
2993
+ :body => post_body,
2994
+ :auth_names => auth_names,
2995
+ :return_type => return_type
2996
+ )
2997
+
2998
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2999
+ if @api_client.config.debugging
3000
+ @api_client.config.logger.debug "API called: DefaultApi#wallet_seed_verify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3001
+ end
3002
+ return data, status_code, headers
3003
+ end
3004
+
3005
+ # Creates a signed transaction
3006
+ # @param wallet_transaction_request [WalletTransactionRequest]
3007
+ # @param [Hash] opts the optional parameters
3008
+ # @return [Object]
3009
+ def wallet_transaction(wallet_transaction_request, opts = {})
3010
+ data, _status_code, _headers = wallet_transaction_with_http_info(wallet_transaction_request, opts)
3011
+ data
3012
+ end
3013
+
3014
+ # Creates a signed transaction
3015
+ # @param wallet_transaction_request [WalletTransactionRequest]
3016
+ # @param [Hash] opts the optional parameters
3017
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
3018
+ def wallet_transaction_with_http_info(wallet_transaction_request, opts = {})
3019
+ if @api_client.config.debugging
3020
+ @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_transaction ...'
3021
+ end
3022
+ # verify the required parameter 'wallet_transaction_request' is set
3023
+ if @api_client.config.client_side_validation && wallet_transaction_request.nil?
3024
+ fail ArgumentError, "Missing the required parameter 'wallet_transaction_request' when calling DefaultApi.wallet_transaction"
3025
+ end
3026
+ # resource path
3027
+ local_var_path = '/api/v1/wallet/transaction'
3028
+
3029
+ # query parameters
3030
+ query_params = opts[:query_params] || {}
3031
+
3032
+ # header parameters
3033
+ header_params = opts[:header_params] || {}
3034
+ # HTTP header 'Accept' (if needed)
3035
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
3036
+ # HTTP header 'Content-Type'
3037
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
3038
+
3039
+ # form parameters
3040
+ form_params = opts[:form_params] || {}
3041
+
3042
+ # http body (model)
3043
+ post_body = opts[:body] || @api_client.object_to_http_body(wallet_transaction_request)
3044
+
3045
+ # return_type
3046
+ return_type = opts[:return_type] || 'Object'
3047
+
3048
+ # auth_names
3049
+ auth_names = opts[:auth_names] || ['csrfAuth']
3050
+
3051
+ new_options = opts.merge(
3052
+ :header_params => header_params,
3053
+ :query_params => query_params,
3054
+ :form_params => form_params,
3055
+ :body => post_body,
3056
+ :auth_names => auth_names,
3057
+ :return_type => return_type
3058
+ )
3059
+
3060
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3061
+ if @api_client.config.debugging
3062
+ @api_client.config.logger.debug "API called: DefaultApi#wallet_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3063
+ end
3064
+ return data, status_code, headers
3065
+ end
3066
+
3067
+ # Creates a signed transaction
3068
+ # @param wallet_transaction_sign_request [WalletTransactionSignRequest]
3069
+ # @param [Hash] opts the optional parameters
3070
+ # @return [InlineResponse2009]
3071
+ def wallet_transaction_sign(wallet_transaction_sign_request, opts = {})
3072
+ data, _status_code, _headers = wallet_transaction_sign_with_http_info(wallet_transaction_sign_request, opts)
3073
+ data
3074
+ end
3075
+
3076
+ # Creates a signed transaction
3077
+ # @param wallet_transaction_sign_request [WalletTransactionSignRequest]
3078
+ # @param [Hash] opts the optional parameters
3079
+ # @return [Array<(InlineResponse2009, Integer, Hash)>] InlineResponse2009 data, response status code and response headers
3080
+ def wallet_transaction_sign_with_http_info(wallet_transaction_sign_request, opts = {})
3081
+ if @api_client.config.debugging
3082
+ @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_transaction_sign ...'
3083
+ end
3084
+ # verify the required parameter 'wallet_transaction_sign_request' is set
3085
+ if @api_client.config.client_side_validation && wallet_transaction_sign_request.nil?
3086
+ fail ArgumentError, "Missing the required parameter 'wallet_transaction_sign_request' when calling DefaultApi.wallet_transaction_sign"
3087
+ end
3088
+ # resource path
3089
+ local_var_path = '/api/v2/wallet/transaction/sign'
3090
+
3091
+ # query parameters
3092
+ query_params = opts[:query_params] || {}
3093
+
3094
+ # header parameters
3095
+ header_params = opts[:header_params] || {}
3096
+ # HTTP header 'Accept' (if needed)
3097
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
3098
+ # HTTP header 'Content-Type'
3099
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
3100
+
3101
+ # form parameters
3102
+ form_params = opts[:form_params] || {}
3103
+
3104
+ # http body (model)
3105
+ post_body = opts[:body] || @api_client.object_to_http_body(wallet_transaction_sign_request)
3106
+
3107
+ # return_type
3108
+ return_type = opts[:return_type] || 'InlineResponse2009'
3109
+
3110
+ # auth_names
3111
+ auth_names = opts[:auth_names] || ['csrfAuth']
3112
+
3113
+ new_options = opts.merge(
3114
+ :header_params => header_params,
3115
+ :query_params => query_params,
3116
+ :form_params => form_params,
3117
+ :body => post_body,
3118
+ :auth_names => auth_names,
3119
+ :return_type => return_type
3120
+ )
3121
+
3122
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3123
+ if @api_client.config.debugging
3124
+ @api_client.config.logger.debug "API called: DefaultApi#wallet_transaction_sign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3125
+ end
3126
+ return data, status_code, headers
3127
+ end
3128
+
3129
+ # @param id [String] Wallet Id.
3130
+ # @param [Hash] opts the optional parameters
3131
+ # @return [InlineResponse2006]
3132
+ def wallet_transactions(id, opts = {})
3133
+ data, _status_code, _headers = wallet_transactions_with_http_info(id, opts)
3134
+ data
3135
+ end
3136
+
3137
+ # @param id [String] Wallet Id.
3138
+ # @param [Hash] opts the optional parameters
3139
+ # @return [Array<(InlineResponse2006, Integer, Hash)>] InlineResponse2006 data, response status code and response headers
3140
+ def wallet_transactions_with_http_info(id, opts = {})
3141
+ if @api_client.config.debugging
3142
+ @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_transactions ...'
3143
+ end
3144
+ # verify the required parameter 'id' is set
3145
+ if @api_client.config.client_side_validation && id.nil?
3146
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.wallet_transactions"
3147
+ end
3148
+ # resource path
3149
+ local_var_path = '/api/v1/wallet/transactions'
3150
+
3151
+ # query parameters
3152
+ query_params = opts[:query_params] || {}
3153
+ query_params[:'id'] = id
3154
+
3155
+ # header parameters
3156
+ header_params = opts[:header_params] || {}
3157
+ # HTTP header 'Accept' (if needed)
3158
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
3159
+
3160
+ # form parameters
3161
+ form_params = opts[:form_params] || {}
3162
+
3163
+ # http body (model)
3164
+ post_body = opts[:body]
3165
+
3166
+ # return_type
3167
+ return_type = opts[:return_type] || 'InlineResponse2006'
3168
+
3169
+ # auth_names
3170
+ auth_names = opts[:auth_names] || []
3171
+
3172
+ new_options = opts.merge(
3173
+ :header_params => header_params,
3174
+ :query_params => query_params,
3175
+ :form_params => form_params,
3176
+ :body => post_body,
3177
+ :auth_names => auth_names,
3178
+ :return_type => return_type
3179
+ )
3180
+
3181
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3182
+ if @api_client.config.debugging
3183
+ @api_client.config.logger.debug "API called: DefaultApi#wallet_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3184
+ end
3185
+ return data, status_code, headers
3186
+ end
3187
+
3188
+ # Unloads wallet from the wallet service.
3189
+ # @param id [String] Wallet Id.
3190
+ # @param [Hash] opts the optional parameters
3191
+ # @return [nil]
3192
+ def wallet_unload(id, opts = {})
3193
+ wallet_unload_with_http_info(id, opts)
3194
+ nil
3195
+ end
3196
+
3197
+ # Unloads wallet from the wallet service.
3198
+ # @param id [String] Wallet Id.
3199
+ # @param [Hash] opts the optional parameters
3200
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
3201
+ def wallet_unload_with_http_info(id, opts = {})
3202
+ if @api_client.config.debugging
3203
+ @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_unload ...'
3204
+ end
3205
+ # verify the required parameter 'id' is set
3206
+ if @api_client.config.client_side_validation && id.nil?
3207
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.wallet_unload"
3208
+ end
3209
+ # resource path
3210
+ local_var_path = '/api/v1/wallet/unload'
3211
+
3212
+ # query parameters
3213
+ query_params = opts[:query_params] || {}
3214
+ query_params[:'id'] = id
3215
+
3216
+ # header parameters
3217
+ header_params = opts[:header_params] || {}
3218
+ # HTTP header 'Accept' (if needed)
3219
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
3220
+
3221
+ # form parameters
3222
+ form_params = opts[:form_params] || {}
3223
+
3224
+ # http body (model)
3225
+ post_body = opts[:body]
3226
+
3227
+ # return_type
3228
+ return_type = opts[:return_type]
3229
+
3230
+ # auth_names
3231
+ auth_names = opts[:auth_names] || ['csrfAuth']
3232
+
3233
+ new_options = opts.merge(
3234
+ :header_params => header_params,
3235
+ :query_params => query_params,
3236
+ :form_params => form_params,
3237
+ :body => post_body,
3238
+ :auth_names => auth_names,
3239
+ :return_type => return_type
3240
+ )
3241
+
3242
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3243
+ if @api_client.config.debugging
3244
+ @api_client.config.logger.debug "API called: DefaultApi#wallet_unload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3245
+ end
3246
+ return data, status_code, headers
3247
+ end
3248
+
3249
+ # Update the wallet.
3250
+ # @param id [String] Wallet Id.
3251
+ # @param label [String] The label the wallet will be updated to.
3252
+ # @param [Hash] opts the optional parameters
3253
+ # @return [String]
3254
+ def wallet_update(id, label, opts = {})
3255
+ data, _status_code, _headers = wallet_update_with_http_info(id, label, opts)
3256
+ data
3257
+ end
3258
+
3259
+ # Update the wallet.
3260
+ # @param id [String] Wallet Id.
3261
+ # @param label [String] The label the wallet will be updated to.
3262
+ # @param [Hash] opts the optional parameters
3263
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
3264
+ def wallet_update_with_http_info(id, label, opts = {})
3265
+ if @api_client.config.debugging
3266
+ @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_update ...'
3267
+ end
3268
+ # verify the required parameter 'id' is set
3269
+ if @api_client.config.client_side_validation && id.nil?
3270
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.wallet_update"
3271
+ end
3272
+ # verify the required parameter 'label' is set
3273
+ if @api_client.config.client_side_validation && label.nil?
3274
+ fail ArgumentError, "Missing the required parameter 'label' when calling DefaultApi.wallet_update"
3275
+ end
3276
+ # resource path
3277
+ local_var_path = '/api/v1/wallet/update'
3278
+
3279
+ # query parameters
3280
+ query_params = opts[:query_params] || {}
3281
+
3282
+ # header parameters
3283
+ header_params = opts[:header_params] || {}
3284
+ # HTTP header 'Accept' (if needed)
3285
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'application/xml'])
3286
+ header_params[:'id'] = id
3287
+ header_params[:'label'] = label
3288
+
3289
+ # form parameters
3290
+ form_params = opts[:form_params] || {}
3291
+
3292
+ # http body (model)
3293
+ post_body = opts[:body]
3294
+
3295
+ # return_type
3296
+ return_type = opts[:return_type] || 'String'
3297
+
3298
+ # auth_names
3299
+ auth_names = opts[:auth_names] || ['csrfAuth']
3300
+
3301
+ new_options = opts.merge(
3302
+ :header_params => header_params,
3303
+ :query_params => query_params,
3304
+ :form_params => form_params,
3305
+ :body => post_body,
3306
+ :auth_names => auth_names,
3307
+ :return_type => return_type
3308
+ )
3309
+
3310
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3311
+ if @api_client.config.debugging
3312
+ @api_client.config.logger.debug "API called: DefaultApi#wallet_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3313
+ end
3314
+ return data, status_code, headers
3315
+ end
3316
+
3317
+ # Returns all loaded wallets
3318
+ # @param [Hash] opts the optional parameters
3319
+ # @return [Array<Object>]
3320
+ def wallets(opts = {})
3321
+ data, _status_code, _headers = wallets_with_http_info(opts)
3322
+ data
3323
+ end
3324
+
3325
+ # Returns all loaded wallets
3326
+ # @param [Hash] opts the optional parameters
3327
+ # @return [Array<(Array<Object>, Integer, Hash)>] Array<Object> data, response status code and response headers
3328
+ def wallets_with_http_info(opts = {})
3329
+ if @api_client.config.debugging
3330
+ @api_client.config.logger.debug 'Calling API: DefaultApi.wallets ...'
3331
+ end
3332
+ # resource path
3333
+ local_var_path = '/api/v1/wallets'
3334
+
3335
+ # query parameters
3336
+ query_params = opts[:query_params] || {}
3337
+
3338
+ # header parameters
3339
+ header_params = opts[:header_params] || {}
3340
+ # HTTP header 'Accept' (if needed)
3341
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ])
3342
+
3343
+ # form parameters
3344
+ form_params = opts[:form_params] || {}
3345
+
3346
+ # http body (model)
3347
+ post_body = opts[:body]
3348
+
3349
+ # return_type
3350
+ return_type = opts[:return_type] || 'Array<Object>'
3351
+
3352
+ # auth_names
3353
+ auth_names = opts[:auth_names] || []
3354
+
3355
+ new_options = opts.merge(
3356
+ :header_params => header_params,
3357
+ :query_params => query_params,
3358
+ :form_params => form_params,
3359
+ :body => post_body,
3360
+ :auth_names => auth_names,
3361
+ :return_type => return_type
3362
+ )
3363
+
3364
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3365
+ if @api_client.config.debugging
3366
+ @api_client.config.logger.debug "API called: DefaultApi#wallets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3367
+ end
3368
+ return data, status_code, headers
3369
+ end
3370
+ end
3371
+ end