coinbase-sdk 0.11.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/lib/coinbase/address.rb +22 -3
  3. data/lib/coinbase/address_reputation.rb +67 -0
  4. data/lib/coinbase/client/api/addresses_api.rb +10 -10
  5. data/lib/coinbase/client/api/assets_api.rb +2 -2
  6. data/lib/coinbase/client/api/balance_history_api.rb +2 -2
  7. data/lib/coinbase/client/api/contract_events_api.rb +2 -2
  8. data/lib/coinbase/client/api/contract_invocations_api.rb +5 -5
  9. data/lib/coinbase/client/api/external_addresses_api.rb +246 -5
  10. data/lib/coinbase/client/api/fund_api.rb +5 -5
  11. data/lib/coinbase/client/api/mpc_wallet_stake_api.rb +4 -4
  12. data/lib/coinbase/client/api/networks_api.rb +2 -2
  13. data/lib/coinbase/client/api/onchain_identity_api.rb +2 -2
  14. data/lib/coinbase/client/api/reputation_api.rb +2 -71
  15. data/lib/coinbase/client/api/server_signers_api.rb +7 -7
  16. data/lib/coinbase/client/api/smart_contracts_api.rb +169 -26
  17. data/lib/coinbase/client/api/stake_api.rb +8 -8
  18. data/lib/coinbase/client/api/trades_api.rb +5 -5
  19. data/lib/coinbase/client/api/transaction_history_api.rb +2 -2
  20. data/lib/coinbase/client/api/transfers_api.rb +14 -14
  21. data/lib/coinbase/client/api/users_api.rb +1 -1
  22. data/lib/coinbase/client/api/wallets_api.rb +6 -6
  23. data/lib/coinbase/client/api/webhooks_api.rb +6 -6
  24. data/lib/coinbase/client/api_client.rb +1 -1
  25. data/lib/coinbase/client/api_error.rb +1 -1
  26. data/lib/coinbase/client/configuration.rb +15 -1
  27. data/lib/coinbase/client/models/address.rb +1 -1
  28. data/lib/coinbase/client/models/address_balance_list.rb +1 -1
  29. data/lib/coinbase/client/models/address_historical_balance_list.rb +1 -1
  30. data/lib/coinbase/client/models/address_list.rb +1 -1
  31. data/lib/coinbase/client/models/address_reputation.rb +16 -9
  32. data/lib/coinbase/client/models/address_reputation_metadata.rb +1 -1
  33. data/lib/coinbase/client/models/address_transaction_list.rb +1 -1
  34. data/lib/coinbase/client/models/asset.rb +1 -1
  35. data/lib/coinbase/client/models/balance.rb +1 -1
  36. data/lib/coinbase/client/models/broadcast_contract_invocation_request.rb +1 -1
  37. data/lib/coinbase/client/models/{broadcast_transfer_request.rb → broadcast_external_transfer_request.rb} +4 -4
  38. data/lib/coinbase/client/models/broadcast_staking_operation_request.rb +1 -1
  39. data/lib/coinbase/client/models/broadcast_trade_request.rb +1 -1
  40. data/lib/coinbase/client/models/build_staking_operation_request.rb +1 -1
  41. data/lib/coinbase/client/models/contract_event.rb +1 -1
  42. data/lib/coinbase/client/models/contract_event_list.rb +1 -1
  43. data/lib/coinbase/client/models/contract_invocation.rb +1 -1
  44. data/lib/coinbase/client/models/contract_invocation_list.rb +1 -1
  45. data/lib/coinbase/client/models/create_address_request.rb +1 -1
  46. data/lib/coinbase/client/models/create_contract_invocation_request.rb +1 -1
  47. data/lib/coinbase/client/models/create_external_transfer_request.rb +273 -0
  48. data/lib/coinbase/client/models/create_fund_operation_request.rb +2 -2
  49. data/lib/coinbase/client/models/create_fund_quote_request.rb +2 -2
  50. data/lib/coinbase/client/models/create_payload_signature_request.rb +1 -1
  51. data/lib/coinbase/client/models/create_server_signer_request.rb +1 -1
  52. data/lib/coinbase/client/models/create_smart_contract_request.rb +1 -1
  53. data/lib/coinbase/client/models/create_staking_operation_request.rb +1 -1
  54. data/lib/coinbase/client/models/create_trade_request.rb +1 -1
  55. data/lib/coinbase/client/models/create_transfer_request.rb +2 -2
  56. data/lib/coinbase/client/models/create_wallet_request.rb +1 -1
  57. data/lib/coinbase/client/models/create_wallet_request_wallet.rb +1 -1
  58. data/lib/coinbase/client/models/create_wallet_webhook_request.rb +1 -1
  59. data/lib/coinbase/client/models/create_webhook_request.rb +1 -1
  60. data/lib/coinbase/client/models/crypto_amount.rb +1 -1
  61. data/lib/coinbase/client/models/deploy_smart_contract_request.rb +1 -1
  62. data/lib/coinbase/client/models/erc20_transfer_event.rb +1 -1
  63. data/lib/coinbase/client/models/erc721_transfer_event.rb +1 -1
  64. data/lib/coinbase/client/models/error.rb +1 -1
  65. data/lib/coinbase/client/models/ethereum_token_transfer.rb +1 -1
  66. data/lib/coinbase/client/models/ethereum_transaction.rb +15 -5
  67. data/lib/coinbase/client/models/ethereum_transaction_access.rb +1 -1
  68. data/lib/coinbase/client/models/ethereum_transaction_access_list.rb +1 -1
  69. data/lib/coinbase/client/models/ethereum_transaction_flattened_trace.rb +1 -1
  70. data/lib/coinbase/client/models/ethereum_validator_metadata.rb +1 -1
  71. data/lib/coinbase/client/models/faucet_transaction.rb +1 -1
  72. data/lib/coinbase/client/models/feature_set.rb +1 -1
  73. data/lib/coinbase/client/models/fetch_historical_staking_balances200_response.rb +1 -1
  74. data/lib/coinbase/client/models/fetch_staking_rewards200_response.rb +1 -1
  75. data/lib/coinbase/client/models/fetch_staking_rewards_request.rb +1 -1
  76. data/lib/coinbase/client/models/fiat_amount.rb +1 -1
  77. data/lib/coinbase/client/models/fund_operation.rb +1 -1
  78. data/lib/coinbase/client/models/fund_operation_fees.rb +1 -1
  79. data/lib/coinbase/client/models/fund_operation_list.rb +1 -1
  80. data/lib/coinbase/client/models/fund_quote.rb +1 -1
  81. data/lib/coinbase/client/models/get_staking_context_request.rb +1 -1
  82. data/lib/coinbase/client/models/historical_balance.rb +1 -1
  83. data/lib/coinbase/client/models/multi_token_contract_options.rb +1 -1
  84. data/lib/coinbase/client/models/network.rb +1 -1
  85. data/lib/coinbase/client/models/network_identifier.rb +1 -1
  86. data/lib/coinbase/client/models/nft_contract_options.rb +1 -1
  87. data/lib/coinbase/client/models/onchain_name.rb +1 -1
  88. data/lib/coinbase/client/models/onchain_name_list.rb +1 -1
  89. data/lib/coinbase/client/models/payload_signature.rb +1 -1
  90. data/lib/coinbase/client/models/payload_signature_list.rb +1 -1
  91. data/lib/coinbase/client/models/read_contract_request.rb +1 -1
  92. data/lib/coinbase/client/models/register_smart_contract_request.rb +252 -0
  93. data/lib/coinbase/client/models/seed_creation_event.rb +1 -1
  94. data/lib/coinbase/client/models/seed_creation_event_result.rb +1 -1
  95. data/lib/coinbase/client/models/server_signer.rb +1 -1
  96. data/lib/coinbase/client/models/server_signer_event.rb +1 -1
  97. data/lib/coinbase/client/models/server_signer_event_event.rb +1 -1
  98. data/lib/coinbase/client/models/server_signer_event_list.rb +1 -1
  99. data/lib/coinbase/client/models/server_signer_list.rb +1 -1
  100. data/lib/coinbase/client/models/signature_creation_event.rb +1 -1
  101. data/lib/coinbase/client/models/signature_creation_event_result.rb +1 -1
  102. data/lib/coinbase/client/models/signed_voluntary_exit_message_metadata.rb +1 -1
  103. data/lib/coinbase/client/models/smart_contract.rb +37 -31
  104. data/lib/coinbase/client/models/smart_contract_activity_event.rb +386 -0
  105. data/lib/coinbase/client/models/smart_contract_list.rb +1 -1
  106. data/lib/coinbase/client/models/smart_contract_options.rb +1 -1
  107. data/lib/coinbase/client/models/smart_contract_type.rb +3 -2
  108. data/lib/coinbase/client/models/solidity_value.rb +1 -1
  109. data/lib/coinbase/client/models/sponsored_send.rb +1 -1
  110. data/lib/coinbase/client/models/staking_balance.rb +1 -1
  111. data/lib/coinbase/client/models/staking_context.rb +1 -1
  112. data/lib/coinbase/client/models/staking_context_context.rb +1 -1
  113. data/lib/coinbase/client/models/staking_operation.rb +1 -1
  114. data/lib/coinbase/client/models/staking_operation_metadata.rb +1 -1
  115. data/lib/coinbase/client/models/staking_reward.rb +1 -1
  116. data/lib/coinbase/client/models/staking_reward_format.rb +1 -1
  117. data/lib/coinbase/client/models/staking_reward_usd_value.rb +1 -1
  118. data/lib/coinbase/client/models/token_contract_options.rb +1 -1
  119. data/lib/coinbase/client/models/token_transfer_type.rb +1 -1
  120. data/lib/coinbase/client/models/trade.rb +1 -1
  121. data/lib/coinbase/client/models/trade_list.rb +1 -1
  122. data/lib/coinbase/client/models/transaction.rb +1 -1
  123. data/lib/coinbase/client/models/transaction_content.rb +1 -1
  124. data/lib/coinbase/client/models/transaction_type.rb +1 -1
  125. data/lib/coinbase/client/models/transfer.rb +2 -37
  126. data/lib/coinbase/client/models/transfer_list.rb +1 -1
  127. data/lib/coinbase/client/models/update_smart_contract_request.rb +245 -0
  128. data/lib/coinbase/client/models/update_webhook_request.rb +1 -1
  129. data/lib/coinbase/client/models/user.rb +1 -1
  130. data/lib/coinbase/client/models/validator.rb +1 -1
  131. data/lib/coinbase/client/models/validator_details.rb +1 -1
  132. data/lib/coinbase/client/models/validator_list.rb +1 -1
  133. data/lib/coinbase/client/models/validator_status.rb +1 -1
  134. data/lib/coinbase/client/models/wallet.rb +1 -1
  135. data/lib/coinbase/client/models/wallet_list.rb +1 -1
  136. data/lib/coinbase/client/models/webhook.rb +1 -1
  137. data/lib/coinbase/client/models/webhook_event_filter.rb +1 -1
  138. data/lib/coinbase/client/models/webhook_event_type.rb +3 -2
  139. data/lib/coinbase/client/models/webhook_event_type_filter.rb +2 -1
  140. data/lib/coinbase/client/models/webhook_list.rb +1 -1
  141. data/lib/coinbase/client/models/{address_risk.rb → webhook_smart_contract_event_filter.rb} +19 -17
  142. data/lib/coinbase/client/models/webhook_wallet_activity_filter.rb +8 -1
  143. data/lib/coinbase/client/version.rb +1 -1
  144. data/lib/coinbase/client.rb +7 -3
  145. data/lib/coinbase/errors.rb +8 -0
  146. data/lib/coinbase/smart_contract.rb +338 -245
  147. data/lib/coinbase/version.rb +1 -1
  148. data/lib/coinbase/wallet/data.rb +6 -4
  149. data/lib/coinbase/wallet.rb +3 -2
  150. data/lib/coinbase.rb +2 -1
  151. metadata +12 -7
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -86,7 +86,7 @@ module Coinbase::Client
86
86
  return_type = opts[:debug_return_type] || 'StakingOperation'
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 => :"MPCWalletStakeApi.broadcast_staking_operation",
@@ -166,7 +166,7 @@ module Coinbase::Client
166
166
  return_type = opts[:debug_return_type] || 'StakingOperation'
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 => :"MPCWalletStakeApi.create_staking_operation",
@@ -241,7 +241,7 @@ module Coinbase::Client
241
241
  return_type = opts[:debug_return_type] || 'StakingOperation'
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 => :"MPCWalletStakeApi.get_staking_operation",
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -63,7 +63,7 @@ module Coinbase::Client
63
63
  return_type = opts[:debug_return_type] || 'Network'
64
64
 
65
65
  # auth_names
66
- auth_names = opts[:debug_auth_names] || []
66
+ auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
67
67
 
68
68
  new_options = opts.merge(
69
69
  :operation => :"NetworksApi.get_network",
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -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",
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -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
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -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",
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -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 deployed by address
264
- # List all smart contracts deployed by address.
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(wallet_id, address_id, opts = {})
270
- data, _status_code, _headers = list_smart_contracts_with_http_info(wallet_id, address_id, opts)
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 deployed by address
275
- # List all smart contracts deployed by address.
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(wallet_id, address_id, opts = {})
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/wallets/{wallet_id}/addresses/{address_id}/smart_contracts'.sub('{' + 'wallet_id' + '}', CGI.escape(wallet_id.to_s)).sub('{' + 'address_id' + '}', CGI.escape(address_id.to_s))
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 &#39;0x&#39;, 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 &#39;0x&#39;, 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 &#39;0x&#39;, 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 &#39;0x&#39;, 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
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -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",
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -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",
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -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",