coinbase-sdk 0.10.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (160) hide show
  1. checksums.yaml +4 -4
  2. data/lib/coinbase/address/wallet_address.rb +28 -0
  3. data/lib/coinbase/address.rb +22 -3
  4. data/lib/coinbase/address_reputation.rb +67 -0
  5. data/lib/coinbase/balance.rb +1 -1
  6. data/lib/coinbase/client/api/addresses_api.rb +10 -10
  7. data/lib/coinbase/client/api/assets_api.rb +2 -2
  8. data/lib/coinbase/client/api/balance_history_api.rb +2 -2
  9. data/lib/coinbase/client/api/contract_events_api.rb +2 -2
  10. data/lib/coinbase/client/api/contract_invocations_api.rb +5 -5
  11. data/lib/coinbase/client/api/external_addresses_api.rb +246 -5
  12. data/lib/coinbase/client/api/fund_api.rb +5 -5
  13. data/lib/coinbase/client/api/{wallet_stake_api.rb → mpc_wallet_stake_api.rb} +24 -24
  14. data/lib/coinbase/client/api/networks_api.rb +2 -2
  15. data/lib/coinbase/client/api/onchain_identity_api.rb +2 -2
  16. data/lib/coinbase/client/api/reputation_api.rb +91 -0
  17. data/lib/coinbase/client/api/server_signers_api.rb +7 -7
  18. data/lib/coinbase/client/api/smart_contracts_api.rb +169 -26
  19. data/lib/coinbase/client/api/stake_api.rb +163 -6
  20. data/lib/coinbase/client/api/trades_api.rb +5 -5
  21. data/lib/coinbase/client/api/transaction_history_api.rb +2 -2
  22. data/lib/coinbase/client/api/transfers_api.rb +14 -14
  23. data/lib/coinbase/client/api/users_api.rb +1 -1
  24. data/lib/coinbase/client/api/wallets_api.rb +6 -6
  25. data/lib/coinbase/client/api/webhooks_api.rb +6 -6
  26. data/lib/coinbase/client/api_client.rb +1 -1
  27. data/lib/coinbase/client/api_error.rb +1 -1
  28. data/lib/coinbase/client/configuration.rb +15 -1
  29. data/lib/coinbase/client/models/address.rb +1 -1
  30. data/lib/coinbase/client/models/address_balance_list.rb +1 -1
  31. data/lib/coinbase/client/models/address_historical_balance_list.rb +1 -1
  32. data/lib/coinbase/client/models/address_list.rb +1 -1
  33. data/lib/coinbase/client/models/address_reputation.rb +239 -0
  34. data/lib/coinbase/client/models/address_reputation_metadata.rb +376 -0
  35. data/lib/coinbase/client/models/address_transaction_list.rb +1 -1
  36. data/lib/coinbase/client/models/asset.rb +1 -1
  37. data/lib/coinbase/client/models/balance.rb +1 -1
  38. data/lib/coinbase/client/models/broadcast_contract_invocation_request.rb +1 -1
  39. data/lib/coinbase/client/models/{broadcast_transfer_request.rb → broadcast_external_transfer_request.rb} +4 -4
  40. data/lib/coinbase/client/models/broadcast_staking_operation_request.rb +1 -1
  41. data/lib/coinbase/client/models/broadcast_trade_request.rb +1 -1
  42. data/lib/coinbase/client/models/build_staking_operation_request.rb +2 -1
  43. data/lib/coinbase/client/models/contract_event.rb +1 -1
  44. data/lib/coinbase/client/models/contract_event_list.rb +1 -1
  45. data/lib/coinbase/client/models/contract_invocation.rb +1 -1
  46. data/lib/coinbase/client/models/contract_invocation_list.rb +1 -1
  47. data/lib/coinbase/client/models/create_address_request.rb +1 -1
  48. data/lib/coinbase/client/models/create_contract_invocation_request.rb +1 -1
  49. data/lib/coinbase/client/models/create_external_transfer_request.rb +273 -0
  50. data/lib/coinbase/client/models/create_fund_operation_request.rb +2 -2
  51. data/lib/coinbase/client/models/create_fund_quote_request.rb +2 -2
  52. data/lib/coinbase/client/models/create_payload_signature_request.rb +1 -1
  53. data/lib/coinbase/client/models/create_server_signer_request.rb +1 -1
  54. data/lib/coinbase/client/models/create_smart_contract_request.rb +1 -1
  55. data/lib/coinbase/client/models/create_staking_operation_request.rb +2 -1
  56. data/lib/coinbase/client/models/create_trade_request.rb +1 -1
  57. data/lib/coinbase/client/models/create_transfer_request.rb +2 -2
  58. data/lib/coinbase/client/models/create_wallet_request.rb +1 -1
  59. data/lib/coinbase/client/models/create_wallet_request_wallet.rb +1 -1
  60. data/lib/coinbase/client/models/create_wallet_webhook_request.rb +1 -1
  61. data/lib/coinbase/client/models/create_webhook_request.rb +1 -1
  62. data/lib/coinbase/client/models/crypto_amount.rb +1 -1
  63. data/lib/coinbase/client/models/deploy_smart_contract_request.rb +1 -1
  64. data/lib/coinbase/client/models/erc20_transfer_event.rb +1 -1
  65. data/lib/coinbase/client/models/erc721_transfer_event.rb +1 -1
  66. data/lib/coinbase/client/models/error.rb +1 -1
  67. data/lib/coinbase/client/models/ethereum_token_transfer.rb +1 -1
  68. data/lib/coinbase/client/models/ethereum_transaction.rb +15 -5
  69. data/lib/coinbase/client/models/ethereum_transaction_access.rb +1 -1
  70. data/lib/coinbase/client/models/ethereum_transaction_access_list.rb +1 -1
  71. data/lib/coinbase/client/models/ethereum_transaction_flattened_trace.rb +1 -1
  72. data/lib/coinbase/client/models/ethereum_validator_metadata.rb +1 -1
  73. data/lib/coinbase/client/models/faucet_transaction.rb +1 -1
  74. data/lib/coinbase/client/models/feature_set.rb +1 -1
  75. data/lib/coinbase/client/models/fetch_historical_staking_balances200_response.rb +1 -1
  76. data/lib/coinbase/client/models/fetch_staking_rewards200_response.rb +1 -1
  77. data/lib/coinbase/client/models/fetch_staking_rewards_request.rb +1 -1
  78. data/lib/coinbase/client/models/fiat_amount.rb +1 -1
  79. data/lib/coinbase/client/models/fund_operation.rb +1 -1
  80. data/lib/coinbase/client/models/fund_operation_fees.rb +1 -1
  81. data/lib/coinbase/client/models/fund_operation_list.rb +1 -1
  82. data/lib/coinbase/client/models/fund_quote.rb +1 -1
  83. data/lib/coinbase/client/models/get_staking_context_request.rb +2 -1
  84. data/lib/coinbase/client/models/historical_balance.rb +1 -1
  85. data/lib/coinbase/client/models/multi_token_contract_options.rb +1 -1
  86. data/lib/coinbase/client/models/network.rb +1 -1
  87. data/lib/coinbase/client/models/network_identifier.rb +1 -1
  88. data/lib/coinbase/client/models/nft_contract_options.rb +1 -1
  89. data/lib/coinbase/client/models/onchain_name.rb +1 -1
  90. data/lib/coinbase/client/models/onchain_name_list.rb +1 -1
  91. data/lib/coinbase/client/models/payload_signature.rb +1 -1
  92. data/lib/coinbase/client/models/payload_signature_list.rb +1 -1
  93. data/lib/coinbase/client/models/read_contract_request.rb +1 -1
  94. data/lib/coinbase/client/models/register_smart_contract_request.rb +252 -0
  95. data/lib/coinbase/client/models/seed_creation_event.rb +1 -1
  96. data/lib/coinbase/client/models/seed_creation_event_result.rb +1 -1
  97. data/lib/coinbase/client/models/server_signer.rb +1 -1
  98. data/lib/coinbase/client/models/server_signer_event.rb +1 -1
  99. data/lib/coinbase/client/models/server_signer_event_event.rb +1 -1
  100. data/lib/coinbase/client/models/server_signer_event_list.rb +1 -1
  101. data/lib/coinbase/client/models/server_signer_list.rb +1 -1
  102. data/lib/coinbase/client/models/signature_creation_event.rb +1 -1
  103. data/lib/coinbase/client/models/signature_creation_event_result.rb +1 -1
  104. data/lib/coinbase/client/models/signed_voluntary_exit_message_metadata.rb +1 -1
  105. data/lib/coinbase/client/models/smart_contract.rb +37 -31
  106. data/lib/coinbase/client/models/smart_contract_activity_event.rb +386 -0
  107. data/lib/coinbase/client/models/smart_contract_list.rb +1 -1
  108. data/lib/coinbase/client/models/smart_contract_options.rb +1 -1
  109. data/lib/coinbase/client/models/smart_contract_type.rb +3 -2
  110. data/lib/coinbase/client/models/solidity_value.rb +3 -3
  111. data/lib/coinbase/client/models/sponsored_send.rb +1 -1
  112. data/lib/coinbase/client/models/staking_balance.rb +1 -1
  113. data/lib/coinbase/client/models/staking_context.rb +1 -1
  114. data/lib/coinbase/client/models/staking_context_context.rb +1 -1
  115. data/lib/coinbase/client/models/staking_operation.rb +1 -1
  116. data/lib/coinbase/client/models/staking_operation_metadata.rb +1 -1
  117. data/lib/coinbase/client/models/staking_reward.rb +1 -1
  118. data/lib/coinbase/client/models/staking_reward_format.rb +1 -1
  119. data/lib/coinbase/client/models/staking_reward_usd_value.rb +1 -1
  120. data/lib/coinbase/client/models/token_contract_options.rb +1 -1
  121. data/lib/coinbase/client/models/token_transfer_type.rb +1 -1
  122. data/lib/coinbase/client/models/trade.rb +1 -1
  123. data/lib/coinbase/client/models/trade_list.rb +1 -1
  124. data/lib/coinbase/client/models/transaction.rb +1 -1
  125. data/lib/coinbase/client/models/transaction_content.rb +1 -1
  126. data/lib/coinbase/client/models/transaction_type.rb +1 -1
  127. data/lib/coinbase/client/models/transfer.rb +2 -37
  128. data/lib/coinbase/client/models/transfer_list.rb +1 -1
  129. data/lib/coinbase/client/models/update_smart_contract_request.rb +245 -0
  130. data/lib/coinbase/client/models/update_webhook_request.rb +1 -1
  131. data/lib/coinbase/client/models/user.rb +1 -1
  132. data/lib/coinbase/client/models/validator.rb +1 -1
  133. data/lib/coinbase/client/models/validator_details.rb +1 -1
  134. data/lib/coinbase/client/models/validator_list.rb +1 -1
  135. data/lib/coinbase/client/models/validator_status.rb +1 -1
  136. data/lib/coinbase/client/models/wallet.rb +1 -1
  137. data/lib/coinbase/client/models/wallet_list.rb +1 -1
  138. data/lib/coinbase/client/models/webhook.rb +1 -1
  139. data/lib/coinbase/client/models/webhook_event_filter.rb +1 -1
  140. data/lib/coinbase/client/models/webhook_event_type.rb +3 -2
  141. data/lib/coinbase/client/models/webhook_event_type_filter.rb +2 -1
  142. data/lib/coinbase/client/models/webhook_list.rb +1 -1
  143. data/lib/coinbase/client/models/webhook_smart_contract_event_filter.rb +225 -0
  144. data/lib/coinbase/client/models/webhook_wallet_activity_filter.rb +8 -1
  145. data/lib/coinbase/client/version.rb +1 -1
  146. data/lib/coinbase/client.rb +11 -4
  147. data/lib/coinbase/crypto_amount.rb +62 -0
  148. data/lib/coinbase/errors.rb +8 -0
  149. data/lib/coinbase/fiat_amount.rb +40 -0
  150. data/lib/coinbase/fund_operation.rb +228 -0
  151. data/lib/coinbase/fund_quote.rb +149 -0
  152. data/lib/coinbase/smart_contract.rb +337 -244
  153. data/lib/coinbase/staking_operation.rb +2 -2
  154. data/lib/coinbase/validator.rb +7 -10
  155. data/lib/coinbase/version.rb +1 -1
  156. data/lib/coinbase/wallet/data.rb +6 -4
  157. data/lib/coinbase/wallet.rb +16 -3
  158. data/lib/coinbase.rb +6 -1
  159. metadata +20 -8
  160. data/lib/coinbase/client/api/validators_api.rb +0 -179
@@ -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.8.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] || 'FundOperation'
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 => :"FundApi.create_fund_operation",
@@ -160,7 +160,7 @@ module Coinbase::Client
160
160
  return_type = opts[:debug_return_type] || 'FundQuote'
161
161
 
162
162
  # auth_names
163
- auth_names = opts[:debug_auth_names] || []
163
+ auth_names = opts[:debug_auth_names] || ['apiKey']
164
164
 
165
165
  new_options = opts.merge(
166
166
  :operation => :"FundApi.create_fund_quote",
@@ -235,7 +235,7 @@ module Coinbase::Client
235
235
  return_type = opts[:debug_return_type] || 'FundOperation'
236
236
 
237
237
  # auth_names
238
- auth_names = opts[:debug_auth_names] || []
238
+ auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
239
239
 
240
240
  new_options = opts.merge(
241
241
  :operation => :"FundApi.get_fund_operation",
@@ -314,7 +314,7 @@ module Coinbase::Client
314
314
  return_type = opts[:debug_return_type] || 'FundOperationList'
315
315
 
316
316
  # auth_names
317
- auth_names = opts[:debug_auth_names] || []
317
+ auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
318
318
 
319
319
  new_options = opts.merge(
320
320
  :operation => :"FundApi.list_fund_operations",
@@ -6,14 +6,14 @@
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.8.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'cgi'
14
14
 
15
15
  module Coinbase::Client
16
- class WalletStakeApi
16
+ class MPCWalletStakeApi
17
17
  attr_accessor :api_client
18
18
 
19
19
  def initialize(api_client = ApiClient.default)
@@ -42,23 +42,23 @@ module Coinbase::Client
42
42
  # @return [Array<(StakingOperation, Integer, Hash)>] StakingOperation data, response status code and response headers
43
43
  def broadcast_staking_operation_with_http_info(wallet_id, address_id, staking_operation_id, broadcast_staking_operation_request, opts = {})
44
44
  if @api_client.config.debugging
45
- @api_client.config.logger.debug 'Calling API: WalletStakeApi.broadcast_staking_operation ...'
45
+ @api_client.config.logger.debug 'Calling API: MPCWalletStakeApi.broadcast_staking_operation ...'
46
46
  end
47
47
  # verify the required parameter 'wallet_id' is set
48
48
  if @api_client.config.client_side_validation && wallet_id.nil?
49
- fail ArgumentError, "Missing the required parameter 'wallet_id' when calling WalletStakeApi.broadcast_staking_operation"
49
+ fail ArgumentError, "Missing the required parameter 'wallet_id' when calling MPCWalletStakeApi.broadcast_staking_operation"
50
50
  end
51
51
  # verify the required parameter 'address_id' is set
52
52
  if @api_client.config.client_side_validation && address_id.nil?
53
- fail ArgumentError, "Missing the required parameter 'address_id' when calling WalletStakeApi.broadcast_staking_operation"
53
+ fail ArgumentError, "Missing the required parameter 'address_id' when calling MPCWalletStakeApi.broadcast_staking_operation"
54
54
  end
55
55
  # verify the required parameter 'staking_operation_id' is set
56
56
  if @api_client.config.client_side_validation && staking_operation_id.nil?
57
- fail ArgumentError, "Missing the required parameter 'staking_operation_id' when calling WalletStakeApi.broadcast_staking_operation"
57
+ fail ArgumentError, "Missing the required parameter 'staking_operation_id' when calling MPCWalletStakeApi.broadcast_staking_operation"
58
58
  end
59
59
  # verify the required parameter 'broadcast_staking_operation_request' is set
60
60
  if @api_client.config.client_side_validation && broadcast_staking_operation_request.nil?
61
- fail ArgumentError, "Missing the required parameter 'broadcast_staking_operation_request' when calling WalletStakeApi.broadcast_staking_operation"
61
+ fail ArgumentError, "Missing the required parameter 'broadcast_staking_operation_request' when calling MPCWalletStakeApi.broadcast_staking_operation"
62
62
  end
63
63
  # resource path
64
64
  local_var_path = '/v1/wallets/{wallet_id}/addresses/{address_id}/staking_operations/{staking_operation_id}/broadcast'.sub('{' + 'wallet_id' + '}', CGI.escape(wallet_id.to_s)).sub('{' + 'address_id' + '}', CGI.escape(address_id.to_s)).sub('{' + 'staking_operation_id' + '}', CGI.escape(staking_operation_id.to_s))
@@ -86,10 +86,10 @@ 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
- :operation => :"WalletStakeApi.broadcast_staking_operation",
92
+ :operation => :"MPCWalletStakeApi.broadcast_staking_operation",
93
93
  :header_params => header_params,
94
94
  :query_params => query_params,
95
95
  :form_params => form_params,
@@ -100,7 +100,7 @@ module Coinbase::Client
100
100
 
101
101
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
102
102
  if @api_client.config.debugging
103
- @api_client.config.logger.debug "API called: WalletStakeApi#broadcast_staking_operation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
103
+ @api_client.config.logger.debug "API called: MPCWalletStakeApi#broadcast_staking_operation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
104
104
  end
105
105
  return data, status_code, headers
106
106
  end
@@ -126,19 +126,19 @@ module Coinbase::Client
126
126
  # @return [Array<(StakingOperation, Integer, Hash)>] StakingOperation data, response status code and response headers
127
127
  def create_staking_operation_with_http_info(wallet_id, address_id, create_staking_operation_request, opts = {})
128
128
  if @api_client.config.debugging
129
- @api_client.config.logger.debug 'Calling API: WalletStakeApi.create_staking_operation ...'
129
+ @api_client.config.logger.debug 'Calling API: MPCWalletStakeApi.create_staking_operation ...'
130
130
  end
131
131
  # verify the required parameter 'wallet_id' is set
132
132
  if @api_client.config.client_side_validation && wallet_id.nil?
133
- fail ArgumentError, "Missing the required parameter 'wallet_id' when calling WalletStakeApi.create_staking_operation"
133
+ fail ArgumentError, "Missing the required parameter 'wallet_id' when calling MPCWalletStakeApi.create_staking_operation"
134
134
  end
135
135
  # verify the required parameter 'address_id' is set
136
136
  if @api_client.config.client_side_validation && address_id.nil?
137
- fail ArgumentError, "Missing the required parameter 'address_id' when calling WalletStakeApi.create_staking_operation"
137
+ fail ArgumentError, "Missing the required parameter 'address_id' when calling MPCWalletStakeApi.create_staking_operation"
138
138
  end
139
139
  # verify the required parameter 'create_staking_operation_request' is set
140
140
  if @api_client.config.client_side_validation && create_staking_operation_request.nil?
141
- fail ArgumentError, "Missing the required parameter 'create_staking_operation_request' when calling WalletStakeApi.create_staking_operation"
141
+ fail ArgumentError, "Missing the required parameter 'create_staking_operation_request' when calling MPCWalletStakeApi.create_staking_operation"
142
142
  end
143
143
  # resource path
144
144
  local_var_path = '/v1/wallets/{wallet_id}/addresses/{address_id}/staking_operations'.sub('{' + 'wallet_id' + '}', CGI.escape(wallet_id.to_s)).sub('{' + 'address_id' + '}', CGI.escape(address_id.to_s))
@@ -166,10 +166,10 @@ 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
- :operation => :"WalletStakeApi.create_staking_operation",
172
+ :operation => :"MPCWalletStakeApi.create_staking_operation",
173
173
  :header_params => header_params,
174
174
  :query_params => query_params,
175
175
  :form_params => form_params,
@@ -180,7 +180,7 @@ module Coinbase::Client
180
180
 
181
181
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
182
182
  if @api_client.config.debugging
183
- @api_client.config.logger.debug "API called: WalletStakeApi#create_staking_operation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
183
+ @api_client.config.logger.debug "API called: MPCWalletStakeApi#create_staking_operation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
184
184
  end
185
185
  return data, status_code, headers
186
186
  end
@@ -206,19 +206,19 @@ module Coinbase::Client
206
206
  # @return [Array<(StakingOperation, Integer, Hash)>] StakingOperation data, response status code and response headers
207
207
  def get_staking_operation_with_http_info(wallet_id, address_id, staking_operation_id, opts = {})
208
208
  if @api_client.config.debugging
209
- @api_client.config.logger.debug 'Calling API: WalletStakeApi.get_staking_operation ...'
209
+ @api_client.config.logger.debug 'Calling API: MPCWalletStakeApi.get_staking_operation ...'
210
210
  end
211
211
  # verify the required parameter 'wallet_id' is set
212
212
  if @api_client.config.client_side_validation && wallet_id.nil?
213
- fail ArgumentError, "Missing the required parameter 'wallet_id' when calling WalletStakeApi.get_staking_operation"
213
+ fail ArgumentError, "Missing the required parameter 'wallet_id' when calling MPCWalletStakeApi.get_staking_operation"
214
214
  end
215
215
  # verify the required parameter 'address_id' is set
216
216
  if @api_client.config.client_side_validation && address_id.nil?
217
- fail ArgumentError, "Missing the required parameter 'address_id' when calling WalletStakeApi.get_staking_operation"
217
+ fail ArgumentError, "Missing the required parameter 'address_id' when calling MPCWalletStakeApi.get_staking_operation"
218
218
  end
219
219
  # verify the required parameter 'staking_operation_id' is set
220
220
  if @api_client.config.client_side_validation && staking_operation_id.nil?
221
- fail ArgumentError, "Missing the required parameter 'staking_operation_id' when calling WalletStakeApi.get_staking_operation"
221
+ fail ArgumentError, "Missing the required parameter 'staking_operation_id' when calling MPCWalletStakeApi.get_staking_operation"
222
222
  end
223
223
  # resource path
224
224
  local_var_path = '/v1/wallets/{wallet_id}/addresses/{address_id}/staking_operations/{staking_operation_id}'.sub('{' + 'wallet_id' + '}', CGI.escape(wallet_id.to_s)).sub('{' + 'address_id' + '}', CGI.escape(address_id.to_s)).sub('{' + 'staking_operation_id' + '}', CGI.escape(staking_operation_id.to_s))
@@ -241,10 +241,10 @@ 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
- :operation => :"WalletStakeApi.get_staking_operation",
247
+ :operation => :"MPCWalletStakeApi.get_staking_operation",
248
248
  :header_params => header_params,
249
249
  :query_params => query_params,
250
250
  :form_params => form_params,
@@ -255,7 +255,7 @@ module Coinbase::Client
255
255
 
256
256
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
257
257
  if @api_client.config.debugging
258
- @api_client.config.logger.debug "API called: WalletStakeApi#get_staking_operation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
258
+ @api_client.config.logger.debug "API called: MPCWalletStakeApi#get_staking_operation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
259
259
  end
260
260
  return data, status_code, headers
261
261
  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.8.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.8.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",
@@ -0,0 +1,91 @@
1
+ =begin
2
+ #Coinbase Platform API
3
+
4
+ #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
+
6
+ The version of the OpenAPI document: 0.0.1-alpha
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Coinbase::Client
16
+ class ReputationApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get the onchain reputation of an external address
23
+ # Get the onchain reputation of an external address
24
+ # @param network_id [String] The ID of the blockchain network.
25
+ # @param address_id [String] The ID of the address to fetch the reputation for.
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [AddressReputation]
28
+ def get_address_reputation(network_id, address_id, opts = {})
29
+ data, _status_code, _headers = get_address_reputation_with_http_info(network_id, address_id, opts)
30
+ data
31
+ end
32
+
33
+ # Get the onchain reputation of an external address
34
+ # Get the onchain reputation of an external address
35
+ # @param network_id [String] The ID of the blockchain network.
36
+ # @param address_id [String] The ID of the address to fetch the reputation for.
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(AddressReputation, Integer, Hash)>] AddressReputation data, response status code and response headers
39
+ def get_address_reputation_with_http_info(network_id, address_id, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: ReputationApi.get_address_reputation ...'
42
+ end
43
+ # verify the required parameter 'network_id' is set
44
+ if @api_client.config.client_side_validation && network_id.nil?
45
+ fail ArgumentError, "Missing the required parameter 'network_id' when calling ReputationApi.get_address_reputation"
46
+ end
47
+ # verify the required parameter 'address_id' is set
48
+ if @api_client.config.client_side_validation && address_id.nil?
49
+ fail ArgumentError, "Missing the required parameter 'address_id' when calling ReputationApi.get_address_reputation"
50
+ end
51
+ # resource path
52
+ local_var_path = '/v1/networks/{network_id}/addresses/{address_id}/reputation'.sub('{' + 'network_id' + '}', CGI.escape(network_id.to_s)).sub('{' + 'address_id' + '}', CGI.escape(address_id.to_s))
53
+
54
+ # query parameters
55
+ query_params = opts[:query_params] || {}
56
+
57
+ # header parameters
58
+ header_params = opts[:header_params] || {}
59
+ # HTTP header 'Accept' (if needed)
60
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
61
+
62
+ # form parameters
63
+ form_params = opts[:form_params] || {}
64
+
65
+ # http body (model)
66
+ post_body = opts[:debug_body]
67
+
68
+ # return_type
69
+ return_type = opts[:debug_return_type] || 'AddressReputation'
70
+
71
+ # auth_names
72
+ auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
73
+
74
+ new_options = opts.merge(
75
+ :operation => :"ReputationApi.get_address_reputation",
76
+ :header_params => header_params,
77
+ :query_params => query_params,
78
+ :form_params => form_params,
79
+ :body => post_body,
80
+ :auth_names => auth_names,
81
+ :return_type => return_type
82
+ )
83
+
84
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
85
+ if @api_client.config.debugging
86
+ @api_client.config.logger.debug "API called: ReputationApi#get_address_reputation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
87
+ end
88
+ return data, status_code, headers
89
+ end
90
+ end
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.8.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.8.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