coinbase-sdk 0.11.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/coinbase/address/wallet_address.rb +6 -3
- data/lib/coinbase/address.rb +22 -3
- data/lib/coinbase/address_reputation.rb +67 -0
- data/lib/coinbase/client/api/addresses_api.rb +9 -9
- data/lib/coinbase/client/api/assets_api.rb +1 -1
- data/lib/coinbase/client/api/balance_history_api.rb +1 -1
- data/lib/coinbase/client/api/contract_events_api.rb +1 -1
- data/lib/coinbase/client/api/contract_invocations_api.rb +4 -4
- data/lib/coinbase/client/api/external_addresses_api.rb +245 -4
- data/lib/coinbase/client/api/fund_api.rb +4 -4
- data/lib/coinbase/client/api/mpc_wallet_stake_api.rb +3 -3
- data/lib/coinbase/client/api/networks_api.rb +1 -1
- data/lib/coinbase/client/api/onchain_identity_api.rb +1 -1
- data/lib/coinbase/client/api/reputation_api.rb +1 -70
- data/lib/coinbase/client/api/server_signers_api.rb +6 -6
- data/lib/coinbase/client/api/smart_contracts_api.rb +168 -25
- data/lib/coinbase/client/api/stake_api.rb +7 -7
- data/lib/coinbase/client/api/trades_api.rb +4 -4
- data/lib/coinbase/client/api/transaction_history_api.rb +1 -1
- data/lib/coinbase/client/api/transfers_api.rb +4 -4
- data/lib/coinbase/client/api/wallets_api.rb +5 -5
- data/lib/coinbase/client/api/webhooks_api.rb +5 -5
- data/lib/coinbase/client/configuration.rb +14 -0
- data/lib/coinbase/client/models/address_reputation.rb +15 -8
- data/lib/coinbase/client/models/{address_risk.rb → broadcast_external_transfer_request.rb} +15 -16
- data/lib/coinbase/client/models/create_external_transfer_request.rb +283 -0
- data/lib/coinbase/client/models/create_fund_operation_request.rb +1 -1
- data/lib/coinbase/client/models/create_fund_quote_request.rb +1 -1
- data/lib/coinbase/client/models/create_transfer_request.rb +15 -5
- data/lib/coinbase/client/models/ethereum_transaction.rb +14 -4
- data/lib/coinbase/client/models/register_smart_contract_request.rb +252 -0
- data/lib/coinbase/client/models/smart_contract.rb +36 -30
- data/lib/coinbase/client/models/smart_contract_activity_event.rb +386 -0
- data/lib/coinbase/client/models/smart_contract_type.rb +2 -1
- data/lib/coinbase/client/models/transfer.rb +1 -36
- data/lib/coinbase/client/models/update_smart_contract_request.rb +245 -0
- data/lib/coinbase/client/models/webhook_event_type.rb +2 -1
- data/lib/coinbase/client/models/webhook_event_type_filter.rb +1 -0
- data/lib/coinbase/client/models/webhook_smart_contract_event_filter.rb +225 -0
- data/lib/coinbase/client/models/webhook_wallet_activity_filter.rb +7 -0
- data/lib/coinbase/client.rb +6 -1
- data/lib/coinbase/errors.rb +8 -0
- data/lib/coinbase/smart_contract.rb +338 -245
- data/lib/coinbase/transfer.rb +24 -2
- data/lib/coinbase/version.rb +1 -1
- data/lib/coinbase/wallet/data.rb +6 -4
- data/lib/coinbase/wallet.rb +3 -2
- data/lib/coinbase.rb +2 -1
- metadata +13 -7
@@ -86,7 +86,7 @@ module Coinbase::Client
|
|
86
86
|
return_type = opts[:debug_return_type] || 'OnchainNameList'
|
87
87
|
|
88
88
|
# auth_names
|
89
|
-
auth_names = opts[:debug_auth_names] || []
|
89
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
90
90
|
|
91
91
|
new_options = opts.merge(
|
92
92
|
:operation => :"OnchainIdentityApi.resolve_identity_by_address",
|
@@ -69,7 +69,7 @@ module Coinbase::Client
|
|
69
69
|
return_type = opts[:debug_return_type] || 'AddressReputation'
|
70
70
|
|
71
71
|
# auth_names
|
72
|
-
auth_names = opts[:debug_auth_names] || []
|
72
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
73
73
|
|
74
74
|
new_options = opts.merge(
|
75
75
|
:operation => :"ReputationApi.get_address_reputation",
|
@@ -87,74 +87,5 @@ module Coinbase::Client
|
|
87
87
|
end
|
88
88
|
return data, status_code, headers
|
89
89
|
end
|
90
|
-
|
91
|
-
# Get the risk of an address
|
92
|
-
# Get the risk of an address
|
93
|
-
# @param network_id [String] The ID of the blockchain network.
|
94
|
-
# @param address_id [String] The ID of the address to fetch the risk for.
|
95
|
-
# @param [Hash] opts the optional parameters
|
96
|
-
# @return [AddressRisk]
|
97
|
-
def get_address_risk(network_id, address_id, opts = {})
|
98
|
-
data, _status_code, _headers = get_address_risk_with_http_info(network_id, address_id, opts)
|
99
|
-
data
|
100
|
-
end
|
101
|
-
|
102
|
-
# Get the risk of an address
|
103
|
-
# Get the risk of an address
|
104
|
-
# @param network_id [String] The ID of the blockchain network.
|
105
|
-
# @param address_id [String] The ID of the address to fetch the risk for.
|
106
|
-
# @param [Hash] opts the optional parameters
|
107
|
-
# @return [Array<(AddressRisk, Integer, Hash)>] AddressRisk data, response status code and response headers
|
108
|
-
def get_address_risk_with_http_info(network_id, address_id, opts = {})
|
109
|
-
if @api_client.config.debugging
|
110
|
-
@api_client.config.logger.debug 'Calling API: ReputationApi.get_address_risk ...'
|
111
|
-
end
|
112
|
-
# verify the required parameter 'network_id' is set
|
113
|
-
if @api_client.config.client_side_validation && network_id.nil?
|
114
|
-
fail ArgumentError, "Missing the required parameter 'network_id' when calling ReputationApi.get_address_risk"
|
115
|
-
end
|
116
|
-
# verify the required parameter 'address_id' is set
|
117
|
-
if @api_client.config.client_side_validation && address_id.nil?
|
118
|
-
fail ArgumentError, "Missing the required parameter 'address_id' when calling ReputationApi.get_address_risk"
|
119
|
-
end
|
120
|
-
# resource path
|
121
|
-
local_var_path = '/v1/networks/{network_id}/addresses/{address_id}/risk'.sub('{' + 'network_id' + '}', CGI.escape(network_id.to_s)).sub('{' + 'address_id' + '}', CGI.escape(address_id.to_s))
|
122
|
-
|
123
|
-
# query parameters
|
124
|
-
query_params = opts[:query_params] || {}
|
125
|
-
|
126
|
-
# header parameters
|
127
|
-
header_params = opts[:header_params] || {}
|
128
|
-
# HTTP header 'Accept' (if needed)
|
129
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
130
|
-
|
131
|
-
# form parameters
|
132
|
-
form_params = opts[:form_params] || {}
|
133
|
-
|
134
|
-
# http body (model)
|
135
|
-
post_body = opts[:debug_body]
|
136
|
-
|
137
|
-
# return_type
|
138
|
-
return_type = opts[:debug_return_type] || 'AddressRisk'
|
139
|
-
|
140
|
-
# auth_names
|
141
|
-
auth_names = opts[:debug_auth_names] || []
|
142
|
-
|
143
|
-
new_options = opts.merge(
|
144
|
-
:operation => :"ReputationApi.get_address_risk",
|
145
|
-
:header_params => header_params,
|
146
|
-
:query_params => query_params,
|
147
|
-
:form_params => form_params,
|
148
|
-
:body => post_body,
|
149
|
-
:auth_names => auth_names,
|
150
|
-
:return_type => return_type
|
151
|
-
)
|
152
|
-
|
153
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
154
|
-
if @api_client.config.debugging
|
155
|
-
@api_client.config.logger.debug "API called: ReputationApi#get_address_risk\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
156
|
-
end
|
157
|
-
return data, status_code, headers
|
158
|
-
end
|
159
90
|
end
|
160
91
|
end
|
@@ -64,7 +64,7 @@ module Coinbase::Client
|
|
64
64
|
return_type = opts[:debug_return_type] || 'ServerSigner'
|
65
65
|
|
66
66
|
# auth_names
|
67
|
-
auth_names = opts[:debug_auth_names] || []
|
67
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
68
68
|
|
69
69
|
new_options = opts.merge(
|
70
70
|
:operation => :"ServerSignersApi.create_server_signer",
|
@@ -127,7 +127,7 @@ module Coinbase::Client
|
|
127
127
|
return_type = opts[:debug_return_type] || 'ServerSigner'
|
128
128
|
|
129
129
|
# auth_names
|
130
|
-
auth_names = opts[:debug_auth_names] || []
|
130
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
131
131
|
|
132
132
|
new_options = opts.merge(
|
133
133
|
:operation => :"ServerSignersApi.get_server_signer",
|
@@ -200,7 +200,7 @@ module Coinbase::Client
|
|
200
200
|
return_type = opts[:debug_return_type] || 'ServerSignerEventList'
|
201
201
|
|
202
202
|
# auth_names
|
203
|
-
auth_names = opts[:debug_auth_names] || []
|
203
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
204
204
|
|
205
205
|
new_options = opts.merge(
|
206
206
|
:operation => :"ServerSignersApi.list_server_signer_events",
|
@@ -267,7 +267,7 @@ module Coinbase::Client
|
|
267
267
|
return_type = opts[:debug_return_type] || 'ServerSignerList'
|
268
268
|
|
269
269
|
# auth_names
|
270
|
-
auth_names = opts[:debug_auth_names] || []
|
270
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
271
271
|
|
272
272
|
new_options = opts.merge(
|
273
273
|
:operation => :"ServerSignersApi.list_server_signers",
|
@@ -337,7 +337,7 @@ module Coinbase::Client
|
|
337
337
|
return_type = opts[:debug_return_type] || 'SeedCreationEventResult'
|
338
338
|
|
339
339
|
# auth_names
|
340
|
-
auth_names = opts[:debug_auth_names] || []
|
340
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
341
341
|
|
342
342
|
new_options = opts.merge(
|
343
343
|
:operation => :"ServerSignersApi.submit_server_signer_seed_event_result",
|
@@ -407,7 +407,7 @@ module Coinbase::Client
|
|
407
407
|
return_type = opts[:debug_return_type] || 'SignatureCreationEventResult'
|
408
408
|
|
409
409
|
# auth_names
|
410
|
-
auth_names = opts[:debug_auth_names] || []
|
410
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
411
411
|
|
412
412
|
new_options = opts.merge(
|
413
413
|
:operation => :"ServerSignersApi.submit_server_signer_signature_event_result",
|
@@ -80,7 +80,7 @@ module Coinbase::Client
|
|
80
80
|
return_type = opts[:debug_return_type] || 'SmartContract'
|
81
81
|
|
82
82
|
# auth_names
|
83
|
-
auth_names = opts[:debug_auth_names] || []
|
83
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
84
84
|
|
85
85
|
new_options = opts.merge(
|
86
86
|
:operation => :"SmartContractsApi.create_smart_contract",
|
@@ -166,7 +166,7 @@ module Coinbase::Client
|
|
166
166
|
return_type = opts[:debug_return_type] || 'SmartContract'
|
167
167
|
|
168
168
|
# auth_names
|
169
|
-
auth_names = opts[:debug_auth_names] || []
|
169
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
170
170
|
|
171
171
|
new_options = opts.merge(
|
172
172
|
:operation => :"SmartContractsApi.deploy_smart_contract",
|
@@ -241,7 +241,7 @@ module Coinbase::Client
|
|
241
241
|
return_type = opts[:debug_return_type] || 'SmartContract'
|
242
242
|
|
243
243
|
# auth_names
|
244
|
-
auth_names = opts[:debug_auth_names] || []
|
244
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
245
245
|
|
246
246
|
new_options = opts.merge(
|
247
247
|
:operation => :"SmartContractsApi.get_smart_contract",
|
@@ -260,40 +260,31 @@ module Coinbase::Client
|
|
260
260
|
return data, status_code, headers
|
261
261
|
end
|
262
262
|
|
263
|
-
# List smart contracts
|
264
|
-
# List
|
265
|
-
# @param wallet_id [String] The ID of the wallet the address belongs to.
|
266
|
-
# @param address_id [String] The ID of the address to fetch the smart contracts for.
|
263
|
+
# List smart contracts
|
264
|
+
# List smart contracts
|
267
265
|
# @param [Hash] opts the optional parameters
|
266
|
+
# @option opts [String] :page Pagination token for retrieving the next set of results
|
268
267
|
# @return [SmartContractList]
|
269
|
-
def list_smart_contracts(
|
270
|
-
data, _status_code, _headers = list_smart_contracts_with_http_info(
|
268
|
+
def list_smart_contracts(opts = {})
|
269
|
+
data, _status_code, _headers = list_smart_contracts_with_http_info(opts)
|
271
270
|
data
|
272
271
|
end
|
273
272
|
|
274
|
-
# List smart contracts
|
275
|
-
# List
|
276
|
-
# @param wallet_id [String] The ID of the wallet the address belongs to.
|
277
|
-
# @param address_id [String] The ID of the address to fetch the smart contracts for.
|
273
|
+
# List smart contracts
|
274
|
+
# List smart contracts
|
278
275
|
# @param [Hash] opts the optional parameters
|
276
|
+
# @option opts [String] :page Pagination token for retrieving the next set of results
|
279
277
|
# @return [Array<(SmartContractList, Integer, Hash)>] SmartContractList data, response status code and response headers
|
280
|
-
def list_smart_contracts_with_http_info(
|
278
|
+
def list_smart_contracts_with_http_info(opts = {})
|
281
279
|
if @api_client.config.debugging
|
282
280
|
@api_client.config.logger.debug 'Calling API: SmartContractsApi.list_smart_contracts ...'
|
283
281
|
end
|
284
|
-
# verify the required parameter 'wallet_id' is set
|
285
|
-
if @api_client.config.client_side_validation && wallet_id.nil?
|
286
|
-
fail ArgumentError, "Missing the required parameter 'wallet_id' when calling SmartContractsApi.list_smart_contracts"
|
287
|
-
end
|
288
|
-
# verify the required parameter 'address_id' is set
|
289
|
-
if @api_client.config.client_side_validation && address_id.nil?
|
290
|
-
fail ArgumentError, "Missing the required parameter 'address_id' when calling SmartContractsApi.list_smart_contracts"
|
291
|
-
end
|
292
282
|
# resource path
|
293
|
-
local_var_path = '/v1/
|
283
|
+
local_var_path = '/v1/smart_contracts'
|
294
284
|
|
295
285
|
# query parameters
|
296
286
|
query_params = opts[:query_params] || {}
|
287
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
297
288
|
|
298
289
|
# header parameters
|
299
290
|
header_params = opts[:header_params] || {}
|
@@ -310,7 +301,7 @@ module Coinbase::Client
|
|
310
301
|
return_type = opts[:debug_return_type] || 'SmartContractList'
|
311
302
|
|
312
303
|
# auth_names
|
313
|
-
auth_names = opts[:debug_auth_names] || []
|
304
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
314
305
|
|
315
306
|
new_options = opts.merge(
|
316
307
|
:operation => :"SmartContractsApi.list_smart_contracts",
|
@@ -390,7 +381,7 @@ module Coinbase::Client
|
|
390
381
|
return_type = opts[:debug_return_type] || 'SolidityValue'
|
391
382
|
|
392
383
|
# auth_names
|
393
|
-
auth_names = opts[:debug_auth_names] || []
|
384
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
394
385
|
|
395
386
|
new_options = opts.merge(
|
396
387
|
:operation => :"SmartContractsApi.read_contract",
|
@@ -408,5 +399,157 @@ module Coinbase::Client
|
|
408
399
|
end
|
409
400
|
return data, status_code, headers
|
410
401
|
end
|
402
|
+
|
403
|
+
# Register a smart contract
|
404
|
+
# Register a smart contract
|
405
|
+
# @param network_id [String] The ID of the network to fetch.
|
406
|
+
# @param contract_address [String] EVM address of the smart contract (42 characters, including '0x', in lowercase)
|
407
|
+
# @param [Hash] opts the optional parameters
|
408
|
+
# @option opts [RegisterSmartContractRequest] :register_smart_contract_request
|
409
|
+
# @return [SmartContract]
|
410
|
+
def register_smart_contract(network_id, contract_address, opts = {})
|
411
|
+
data, _status_code, _headers = register_smart_contract_with_http_info(network_id, contract_address, opts)
|
412
|
+
data
|
413
|
+
end
|
414
|
+
|
415
|
+
# Register a smart contract
|
416
|
+
# Register a smart contract
|
417
|
+
# @param network_id [String] The ID of the network to fetch.
|
418
|
+
# @param contract_address [String] EVM address of the smart contract (42 characters, including '0x', in lowercase)
|
419
|
+
# @param [Hash] opts the optional parameters
|
420
|
+
# @option opts [RegisterSmartContractRequest] :register_smart_contract_request
|
421
|
+
# @return [Array<(SmartContract, Integer, Hash)>] SmartContract data, response status code and response headers
|
422
|
+
def register_smart_contract_with_http_info(network_id, contract_address, opts = {})
|
423
|
+
if @api_client.config.debugging
|
424
|
+
@api_client.config.logger.debug 'Calling API: SmartContractsApi.register_smart_contract ...'
|
425
|
+
end
|
426
|
+
# verify the required parameter 'network_id' is set
|
427
|
+
if @api_client.config.client_side_validation && network_id.nil?
|
428
|
+
fail ArgumentError, "Missing the required parameter 'network_id' when calling SmartContractsApi.register_smart_contract"
|
429
|
+
end
|
430
|
+
# verify the required parameter 'contract_address' is set
|
431
|
+
if @api_client.config.client_side_validation && contract_address.nil?
|
432
|
+
fail ArgumentError, "Missing the required parameter 'contract_address' when calling SmartContractsApi.register_smart_contract"
|
433
|
+
end
|
434
|
+
# resource path
|
435
|
+
local_var_path = '/v1/networks/{network_id}/smart_contracts/{contract_address}/register'.sub('{' + 'network_id' + '}', CGI.escape(network_id.to_s)).sub('{' + 'contract_address' + '}', CGI.escape(contract_address.to_s))
|
436
|
+
|
437
|
+
# query parameters
|
438
|
+
query_params = opts[:query_params] || {}
|
439
|
+
|
440
|
+
# header parameters
|
441
|
+
header_params = opts[:header_params] || {}
|
442
|
+
# HTTP header 'Accept' (if needed)
|
443
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
444
|
+
# HTTP header 'Content-Type'
|
445
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
446
|
+
if !content_type.nil?
|
447
|
+
header_params['Content-Type'] = content_type
|
448
|
+
end
|
449
|
+
|
450
|
+
# form parameters
|
451
|
+
form_params = opts[:form_params] || {}
|
452
|
+
|
453
|
+
# http body (model)
|
454
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'register_smart_contract_request'])
|
455
|
+
|
456
|
+
# return_type
|
457
|
+
return_type = opts[:debug_return_type] || 'SmartContract'
|
458
|
+
|
459
|
+
# auth_names
|
460
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
461
|
+
|
462
|
+
new_options = opts.merge(
|
463
|
+
:operation => :"SmartContractsApi.register_smart_contract",
|
464
|
+
:header_params => header_params,
|
465
|
+
:query_params => query_params,
|
466
|
+
:form_params => form_params,
|
467
|
+
:body => post_body,
|
468
|
+
:auth_names => auth_names,
|
469
|
+
:return_type => return_type
|
470
|
+
)
|
471
|
+
|
472
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
473
|
+
if @api_client.config.debugging
|
474
|
+
@api_client.config.logger.debug "API called: SmartContractsApi#register_smart_contract\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
475
|
+
end
|
476
|
+
return data, status_code, headers
|
477
|
+
end
|
478
|
+
|
479
|
+
# Update a smart contract
|
480
|
+
# Update a smart contract
|
481
|
+
# @param network_id [String] The ID of the network to fetch.
|
482
|
+
# @param contract_address [String] EVM address of the smart contract (42 characters, including '0x', in lowercase)
|
483
|
+
# @param [Hash] opts the optional parameters
|
484
|
+
# @option opts [UpdateSmartContractRequest] :update_smart_contract_request
|
485
|
+
# @return [SmartContract]
|
486
|
+
def update_smart_contract(network_id, contract_address, opts = {})
|
487
|
+
data, _status_code, _headers = update_smart_contract_with_http_info(network_id, contract_address, opts)
|
488
|
+
data
|
489
|
+
end
|
490
|
+
|
491
|
+
# Update a smart contract
|
492
|
+
# Update a smart contract
|
493
|
+
# @param network_id [String] The ID of the network to fetch.
|
494
|
+
# @param contract_address [String] EVM address of the smart contract (42 characters, including '0x', in lowercase)
|
495
|
+
# @param [Hash] opts the optional parameters
|
496
|
+
# @option opts [UpdateSmartContractRequest] :update_smart_contract_request
|
497
|
+
# @return [Array<(SmartContract, Integer, Hash)>] SmartContract data, response status code and response headers
|
498
|
+
def update_smart_contract_with_http_info(network_id, contract_address, opts = {})
|
499
|
+
if @api_client.config.debugging
|
500
|
+
@api_client.config.logger.debug 'Calling API: SmartContractsApi.update_smart_contract ...'
|
501
|
+
end
|
502
|
+
# verify the required parameter 'network_id' is set
|
503
|
+
if @api_client.config.client_side_validation && network_id.nil?
|
504
|
+
fail ArgumentError, "Missing the required parameter 'network_id' when calling SmartContractsApi.update_smart_contract"
|
505
|
+
end
|
506
|
+
# verify the required parameter 'contract_address' is set
|
507
|
+
if @api_client.config.client_side_validation && contract_address.nil?
|
508
|
+
fail ArgumentError, "Missing the required parameter 'contract_address' when calling SmartContractsApi.update_smart_contract"
|
509
|
+
end
|
510
|
+
# resource path
|
511
|
+
local_var_path = '/v1/networks/{network_id}/smart_contracts/{contract_address}'.sub('{' + 'network_id' + '}', CGI.escape(network_id.to_s)).sub('{' + 'contract_address' + '}', CGI.escape(contract_address.to_s))
|
512
|
+
|
513
|
+
# query parameters
|
514
|
+
query_params = opts[:query_params] || {}
|
515
|
+
|
516
|
+
# header parameters
|
517
|
+
header_params = opts[:header_params] || {}
|
518
|
+
# HTTP header 'Accept' (if needed)
|
519
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
520
|
+
# HTTP header 'Content-Type'
|
521
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
522
|
+
if !content_type.nil?
|
523
|
+
header_params['Content-Type'] = content_type
|
524
|
+
end
|
525
|
+
|
526
|
+
# form parameters
|
527
|
+
form_params = opts[:form_params] || {}
|
528
|
+
|
529
|
+
# http body (model)
|
530
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_smart_contract_request'])
|
531
|
+
|
532
|
+
# return_type
|
533
|
+
return_type = opts[:debug_return_type] || 'SmartContract'
|
534
|
+
|
535
|
+
# auth_names
|
536
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
537
|
+
|
538
|
+
new_options = opts.merge(
|
539
|
+
:operation => :"SmartContractsApi.update_smart_contract",
|
540
|
+
:header_params => header_params,
|
541
|
+
:query_params => query_params,
|
542
|
+
:form_params => form_params,
|
543
|
+
:body => post_body,
|
544
|
+
:auth_names => auth_names,
|
545
|
+
:return_type => return_type
|
546
|
+
)
|
547
|
+
|
548
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
549
|
+
if @api_client.config.debugging
|
550
|
+
@api_client.config.logger.debug "API called: SmartContractsApi#update_smart_contract\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
551
|
+
end
|
552
|
+
return data, status_code, headers
|
553
|
+
end
|
411
554
|
end
|
412
555
|
end
|
@@ -68,7 +68,7 @@ module Coinbase::Client
|
|
68
68
|
return_type = opts[:debug_return_type] || 'StakingOperation'
|
69
69
|
|
70
70
|
# auth_names
|
71
|
-
auth_names = opts[:debug_auth_names] || []
|
71
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
72
72
|
|
73
73
|
new_options = opts.merge(
|
74
74
|
:operation => :"StakeApi.build_staking_operation",
|
@@ -180,7 +180,7 @@ module Coinbase::Client
|
|
180
180
|
return_type = opts[:debug_return_type] || 'FetchHistoricalStakingBalances200Response'
|
181
181
|
|
182
182
|
# auth_names
|
183
|
-
auth_names = opts[:debug_auth_names] || []
|
183
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
184
184
|
|
185
185
|
new_options = opts.merge(
|
186
186
|
:operation => :"StakeApi.fetch_historical_staking_balances",
|
@@ -258,7 +258,7 @@ module Coinbase::Client
|
|
258
258
|
return_type = opts[:debug_return_type] || 'FetchStakingRewards200Response'
|
259
259
|
|
260
260
|
# auth_names
|
261
|
-
auth_names = opts[:debug_auth_names] || []
|
261
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
262
262
|
|
263
263
|
new_options = opts.merge(
|
264
264
|
:operation => :"StakeApi.fetch_staking_rewards",
|
@@ -333,7 +333,7 @@ module Coinbase::Client
|
|
333
333
|
return_type = opts[:debug_return_type] || 'StakingOperation'
|
334
334
|
|
335
335
|
# auth_names
|
336
|
-
auth_names = opts[:debug_auth_names] || []
|
336
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
337
337
|
|
338
338
|
new_options = opts.merge(
|
339
339
|
:operation => :"StakeApi.get_external_staking_operation",
|
@@ -401,7 +401,7 @@ module Coinbase::Client
|
|
401
401
|
return_type = opts[:debug_return_type] || 'StakingContext'
|
402
402
|
|
403
403
|
# auth_names
|
404
|
-
auth_names = opts[:debug_auth_names] || []
|
404
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
405
405
|
|
406
406
|
new_options = opts.merge(
|
407
407
|
:operation => :"StakeApi.get_staking_context",
|
@@ -476,7 +476,7 @@ module Coinbase::Client
|
|
476
476
|
return_type = opts[:debug_return_type] || 'Validator'
|
477
477
|
|
478
478
|
# auth_names
|
479
|
-
auth_names = opts[:debug_auth_names] || []
|
479
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
480
480
|
|
481
481
|
new_options = opts.merge(
|
482
482
|
:operation => :"StakeApi.get_validator",
|
@@ -558,7 +558,7 @@ module Coinbase::Client
|
|
558
558
|
return_type = opts[:debug_return_type] || 'ValidatorList'
|
559
559
|
|
560
560
|
# auth_names
|
561
|
-
auth_names = opts[:debug_auth_names] || []
|
561
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
562
562
|
|
563
563
|
new_options = opts.merge(
|
564
564
|
:operation => :"StakeApi.list_validators",
|
@@ -86,7 +86,7 @@ module Coinbase::Client
|
|
86
86
|
return_type = opts[:debug_return_type] || 'Trade'
|
87
87
|
|
88
88
|
# auth_names
|
89
|
-
auth_names = opts[:debug_auth_names] || []
|
89
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
90
90
|
|
91
91
|
new_options = opts.merge(
|
92
92
|
:operation => :"TradesApi.broadcast_trade",
|
@@ -166,7 +166,7 @@ module Coinbase::Client
|
|
166
166
|
return_type = opts[:debug_return_type] || 'Trade'
|
167
167
|
|
168
168
|
# auth_names
|
169
|
-
auth_names = opts[:debug_auth_names] || []
|
169
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
170
170
|
|
171
171
|
new_options = opts.merge(
|
172
172
|
:operation => :"TradesApi.create_trade",
|
@@ -241,7 +241,7 @@ module Coinbase::Client
|
|
241
241
|
return_type = opts[:debug_return_type] || 'Trade'
|
242
242
|
|
243
243
|
# auth_names
|
244
|
-
auth_names = opts[:debug_auth_names] || []
|
244
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
245
245
|
|
246
246
|
new_options = opts.merge(
|
247
247
|
:operation => :"TradesApi.get_trade",
|
@@ -320,7 +320,7 @@ module Coinbase::Client
|
|
320
320
|
return_type = opts[:debug_return_type] || 'TradeList'
|
321
321
|
|
322
322
|
# auth_names
|
323
|
-
auth_names = opts[:debug_auth_names] || []
|
323
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
324
324
|
|
325
325
|
new_options = opts.merge(
|
326
326
|
:operation => :"TradesApi.list_trades",
|
@@ -79,7 +79,7 @@ module Coinbase::Client
|
|
79
79
|
return_type = opts[:debug_return_type] || 'AddressTransactionList'
|
80
80
|
|
81
81
|
# auth_names
|
82
|
-
auth_names = opts[:debug_auth_names] || []
|
82
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
83
83
|
|
84
84
|
new_options = opts.merge(
|
85
85
|
:operation => :"TransactionHistoryApi.list_address_transactions",
|
@@ -86,7 +86,7 @@ module Coinbase::Client
|
|
86
86
|
return_type = opts[:debug_return_type] || 'Transfer'
|
87
87
|
|
88
88
|
# auth_names
|
89
|
-
auth_names = opts[:debug_auth_names] || []
|
89
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
90
90
|
|
91
91
|
new_options = opts.merge(
|
92
92
|
:operation => :"TransfersApi.broadcast_transfer",
|
@@ -166,7 +166,7 @@ module Coinbase::Client
|
|
166
166
|
return_type = opts[:debug_return_type] || 'Transfer'
|
167
167
|
|
168
168
|
# auth_names
|
169
|
-
auth_names = opts[:debug_auth_names] || []
|
169
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
170
170
|
|
171
171
|
new_options = opts.merge(
|
172
172
|
:operation => :"TransfersApi.create_transfer",
|
@@ -241,7 +241,7 @@ module Coinbase::Client
|
|
241
241
|
return_type = opts[:debug_return_type] || 'Transfer'
|
242
242
|
|
243
243
|
# auth_names
|
244
|
-
auth_names = opts[:debug_auth_names] || []
|
244
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
245
245
|
|
246
246
|
new_options = opts.merge(
|
247
247
|
:operation => :"TransfersApi.get_transfer",
|
@@ -320,7 +320,7 @@ module Coinbase::Client
|
|
320
320
|
return_type = opts[:debug_return_type] || 'TransferList'
|
321
321
|
|
322
322
|
# auth_names
|
323
|
-
auth_names = opts[:debug_auth_names] || []
|
323
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
324
324
|
|
325
325
|
new_options = opts.merge(
|
326
326
|
:operation => :"TransfersApi.list_transfers",
|
@@ -64,7 +64,7 @@ module Coinbase::Client
|
|
64
64
|
return_type = opts[:debug_return_type] || 'Wallet'
|
65
65
|
|
66
66
|
# auth_names
|
67
|
-
auth_names = opts[:debug_auth_names] || []
|
67
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
68
68
|
|
69
69
|
new_options = opts.merge(
|
70
70
|
:operation => :"WalletsApi.create_wallet",
|
@@ -127,7 +127,7 @@ module Coinbase::Client
|
|
127
127
|
return_type = opts[:debug_return_type] || 'Wallet'
|
128
128
|
|
129
129
|
# auth_names
|
130
|
-
auth_names = opts[:debug_auth_names] || []
|
130
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
131
131
|
|
132
132
|
new_options = opts.merge(
|
133
133
|
:operation => :"WalletsApi.get_wallet",
|
@@ -196,7 +196,7 @@ module Coinbase::Client
|
|
196
196
|
return_type = opts[:debug_return_type] || 'Balance'
|
197
197
|
|
198
198
|
# auth_names
|
199
|
-
auth_names = opts[:debug_auth_names] || []
|
199
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
200
200
|
|
201
201
|
new_options = opts.merge(
|
202
202
|
:operation => :"WalletsApi.get_wallet_balance",
|
@@ -259,7 +259,7 @@ module Coinbase::Client
|
|
259
259
|
return_type = opts[:debug_return_type] || 'AddressBalanceList'
|
260
260
|
|
261
261
|
# auth_names
|
262
|
-
auth_names = opts[:debug_auth_names] || []
|
262
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
263
263
|
|
264
264
|
new_options = opts.merge(
|
265
265
|
:operation => :"WalletsApi.list_wallet_balances",
|
@@ -326,7 +326,7 @@ module Coinbase::Client
|
|
326
326
|
return_type = opts[:debug_return_type] || 'WalletList'
|
327
327
|
|
328
328
|
# auth_names
|
329
|
-
auth_names = opts[:debug_auth_names] || []
|
329
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
330
330
|
|
331
331
|
new_options = opts.merge(
|
332
332
|
:operation => :"WalletsApi.list_wallets",
|
@@ -70,7 +70,7 @@ module Coinbase::Client
|
|
70
70
|
return_type = opts[:debug_return_type] || 'Webhook'
|
71
71
|
|
72
72
|
# auth_names
|
73
|
-
auth_names = opts[:debug_auth_names] || []
|
73
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
74
74
|
|
75
75
|
new_options = opts.merge(
|
76
76
|
:operation => :"WebhooksApi.create_wallet_webhook",
|
@@ -134,7 +134,7 @@ module Coinbase::Client
|
|
134
134
|
return_type = opts[:debug_return_type] || 'Webhook'
|
135
135
|
|
136
136
|
# auth_names
|
137
|
-
auth_names = opts[:debug_auth_names] || []
|
137
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
138
138
|
|
139
139
|
new_options = opts.merge(
|
140
140
|
:operation => :"WebhooksApi.create_webhook",
|
@@ -197,7 +197,7 @@ module Coinbase::Client
|
|
197
197
|
return_type = opts[:debug_return_type]
|
198
198
|
|
199
199
|
# auth_names
|
200
|
-
auth_names = opts[:debug_auth_names] || []
|
200
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
201
201
|
|
202
202
|
new_options = opts.merge(
|
203
203
|
:operation => :"WebhooksApi.delete_webhook",
|
@@ -264,7 +264,7 @@ module Coinbase::Client
|
|
264
264
|
return_type = opts[:debug_return_type] || 'WebhookList'
|
265
265
|
|
266
266
|
# auth_names
|
267
|
-
auth_names = opts[:debug_auth_names] || []
|
267
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
268
268
|
|
269
269
|
new_options = opts.merge(
|
270
270
|
:operation => :"WebhooksApi.list_webhooks",
|
@@ -334,7 +334,7 @@ module Coinbase::Client
|
|
334
334
|
return_type = opts[:debug_return_type] || 'Webhook'
|
335
335
|
|
336
336
|
# auth_names
|
337
|
-
auth_names = opts[:debug_auth_names] || []
|
337
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
338
338
|
|
339
339
|
new_options = opts.merge(
|
340
340
|
:operation => :"WebhooksApi.update_webhook",
|
@@ -248,6 +248,20 @@ module Coinbase::Client
|
|
248
248
|
# Returns Auth Settings hash for api client.
|
249
249
|
def auth_settings
|
250
250
|
{
|
251
|
+
'apiKey' =>
|
252
|
+
{
|
253
|
+
type: 'api_key',
|
254
|
+
in: 'header',
|
255
|
+
key: 'Jwt',
|
256
|
+
value: api_key_with_prefix('Jwt')
|
257
|
+
},
|
258
|
+
'session' =>
|
259
|
+
{
|
260
|
+
type: 'api_key',
|
261
|
+
in: 'header',
|
262
|
+
key: 'Jwt',
|
263
|
+
value: api_key_with_prefix('Jwt')
|
264
|
+
},
|
251
265
|
}
|
252
266
|
end
|
253
267
|
|