coinbase-sdk 0.2.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/lib/coinbase/address/wallet_address.rb +61 -0
  3. data/lib/coinbase/address.rb +25 -1
  4. data/lib/coinbase/client/api/addresses_api.rb +238 -8
  5. data/lib/coinbase/client/api/assets_api.rb +3 -3
  6. data/lib/coinbase/client/api/balance_history_api.rb +107 -0
  7. data/lib/coinbase/client/api/contract_events_api.rb +5 -5
  8. data/lib/coinbase/client/api/contract_invocations_api.rb +342 -0
  9. data/lib/coinbase/client/api/external_addresses_api.rb +24 -30
  10. data/lib/coinbase/client/api/networks_api.rb +3 -3
  11. data/lib/coinbase/client/api/server_signers_api.rb +8 -8
  12. data/lib/coinbase/client/api/stake_api.rb +7 -7
  13. data/lib/coinbase/client/api/trades_api.rb +6 -6
  14. data/lib/coinbase/client/api/transfers_api.rb +6 -6
  15. data/lib/coinbase/client/api/validators_api.rb +8 -8
  16. data/lib/coinbase/client/api/wallet_stake_api.rb +5 -5
  17. data/lib/coinbase/client/api/wallets_api.rb +11 -11
  18. data/lib/coinbase/client/api/webhooks_api.rb +6 -6
  19. data/lib/coinbase/client/api_client.rb +31 -25
  20. data/lib/coinbase/client/api_error.rb +2 -2
  21. data/lib/coinbase/client/configuration.rb +2 -2
  22. data/lib/coinbase/client/models/address.rb +2 -2
  23. data/lib/coinbase/client/models/address_balance_list.rb +2 -2
  24. data/lib/coinbase/client/models/address_historical_balance_list.rb +2 -2
  25. data/lib/coinbase/client/models/address_list.rb +2 -2
  26. data/lib/coinbase/client/models/address_transaction_list.rb +258 -0
  27. data/lib/coinbase/client/models/asset.rb +2 -2
  28. data/lib/coinbase/client/models/balance.rb +2 -2
  29. data/lib/coinbase/client/models/{user.rb → broadcast_contract_invocation_request.rb} +17 -26
  30. data/lib/coinbase/client/models/broadcast_staking_operation_request.rb +2 -2
  31. data/lib/coinbase/client/models/broadcast_trade_request.rb +2 -2
  32. data/lib/coinbase/client/models/broadcast_transfer_request.rb +2 -2
  33. data/lib/coinbase/client/models/build_staking_operation_request.rb +2 -2
  34. data/lib/coinbase/client/models/contract_event.rb +2 -2
  35. data/lib/coinbase/client/models/contract_event_list.rb +2 -2
  36. data/lib/coinbase/client/models/contract_invocation.rb +368 -0
  37. data/lib/coinbase/client/models/contract_invocation_list.rb +274 -0
  38. data/lib/coinbase/client/models/create_address_request.rb +2 -2
  39. data/lib/coinbase/client/models/create_contract_invocation_request.rb +276 -0
  40. data/lib/coinbase/client/models/create_payload_signature_request.rb +232 -0
  41. data/lib/coinbase/client/models/create_server_signer_request.rb +2 -2
  42. data/lib/coinbase/client/models/create_staking_operation_request.rb +2 -2
  43. data/lib/coinbase/client/models/create_trade_request.rb +2 -2
  44. data/lib/coinbase/client/models/create_transfer_request.rb +3 -3
  45. data/lib/coinbase/client/models/create_wallet_request.rb +2 -2
  46. data/lib/coinbase/client/models/create_wallet_request_wallet.rb +2 -2
  47. data/lib/coinbase/client/models/create_webhook_request.rb +30 -6
  48. data/lib/coinbase/client/models/erc20_transfer_event.rb +336 -0
  49. data/lib/coinbase/client/models/erc721_transfer_event.rb +336 -0
  50. data/lib/coinbase/client/models/error.rb +16 -6
  51. data/lib/coinbase/client/models/ethereum_transaction.rb +389 -0
  52. data/lib/coinbase/client/models/ethereum_transaction_access.rb +225 -0
  53. data/lib/coinbase/client/models/ethereum_transaction_access_list.rb +216 -0
  54. data/lib/coinbase/client/models/ethereum_transaction_flattened_trace.rb +378 -0
  55. data/lib/coinbase/client/models/ethereum_validator_metadata.rb +2 -2
  56. data/lib/coinbase/client/models/faucet_transaction.rb +2 -2
  57. data/lib/coinbase/client/models/feature_set.rb +2 -2
  58. data/lib/coinbase/client/models/fetch_historical_staking_balances200_response.rb +2 -2
  59. data/lib/coinbase/client/models/fetch_staking_rewards200_response.rb +2 -2
  60. data/lib/coinbase/client/models/fetch_staking_rewards_request.rb +2 -2
  61. data/lib/coinbase/client/models/get_staking_context_request.rb +2 -2
  62. data/lib/coinbase/client/models/historical_balance.rb +2 -2
  63. data/lib/coinbase/client/models/network.rb +4 -4
  64. data/lib/coinbase/client/models/network_identifier.rb +5 -3
  65. data/lib/coinbase/client/models/payload_signature.rb +335 -0
  66. data/lib/coinbase/client/models/payload_signature_list.rb +275 -0
  67. data/lib/coinbase/client/models/seed_creation_event.rb +2 -2
  68. data/lib/coinbase/client/models/seed_creation_event_result.rb +2 -2
  69. data/lib/coinbase/client/models/server_signer.rb +2 -2
  70. data/lib/coinbase/client/models/server_signer_event.rb +2 -2
  71. data/lib/coinbase/client/models/server_signer_event_event.rb +2 -2
  72. data/lib/coinbase/client/models/server_signer_event_list.rb +2 -2
  73. data/lib/coinbase/client/models/server_signer_list.rb +2 -2
  74. data/lib/coinbase/client/models/signature_creation_event.rb +2 -2
  75. data/lib/coinbase/client/models/signature_creation_event_result.rb +2 -2
  76. data/lib/coinbase/client/models/signed_voluntary_exit_message_metadata.rb +2 -2
  77. data/lib/coinbase/client/models/sponsored_send.rb +2 -2
  78. data/lib/coinbase/client/models/staking_balance.rb +2 -2
  79. data/lib/coinbase/client/models/staking_context.rb +2 -2
  80. data/lib/coinbase/client/models/staking_context_context.rb +2 -2
  81. data/lib/coinbase/client/models/staking_operation.rb +2 -2
  82. data/lib/coinbase/client/models/staking_operation_metadata.rb +2 -2
  83. data/lib/coinbase/client/models/staking_reward.rb +2 -2
  84. data/lib/coinbase/client/models/staking_reward_format.rb +2 -2
  85. data/lib/coinbase/client/models/staking_reward_usd_value.rb +2 -2
  86. data/lib/coinbase/client/models/trade.rb +2 -2
  87. data/lib/coinbase/client/models/trade_list.rb +2 -2
  88. data/lib/coinbase/client/models/transaction.rb +37 -8
  89. data/lib/coinbase/client/models/transaction_content.rb +104 -0
  90. data/lib/coinbase/client/models/transaction_type.rb +2 -2
  91. data/lib/coinbase/client/models/transfer.rb +2 -2
  92. data/lib/coinbase/client/models/transfer_list.rb +2 -2
  93. data/lib/coinbase/client/models/update_webhook_request.rb +3 -51
  94. data/lib/coinbase/client/models/validator.rb +2 -2
  95. data/lib/coinbase/client/models/validator_details.rb +2 -2
  96. data/lib/coinbase/client/models/validator_list.rb +2 -2
  97. data/lib/coinbase/client/models/validator_status.rb +2 -2
  98. data/lib/coinbase/client/models/wallet.rb +2 -2
  99. data/lib/coinbase/client/models/wallet_list.rb +2 -2
  100. data/lib/coinbase/client/models/webhook.rb +16 -6
  101. data/lib/coinbase/client/models/webhook_event_filter.rb +5 -5
  102. data/lib/coinbase/client/models/webhook_event_type.rb +2 -2
  103. data/lib/coinbase/client/models/webhook_list.rb +2 -2
  104. data/lib/coinbase/client/version.rb +2 -2
  105. data/lib/coinbase/client.rb +19 -4
  106. data/lib/coinbase/constants.rb +3 -0
  107. data/lib/coinbase/contract_invocation.rb +259 -0
  108. data/lib/coinbase/payload_signature.rb +181 -0
  109. data/lib/coinbase/transaction.rb +21 -0
  110. data/lib/coinbase/version.rb +1 -1
  111. data/lib/coinbase/wallet.rb +11 -1
  112. data/lib/coinbase/webhook.rb +17 -6
  113. data/lib/coinbase.rb +2 -0
  114. metadata +21 -5
  115. data/lib/coinbase/client/api/users_api.rb +0 -79
  116. data/lib/coinbase/client/models/feature.rb +0 -43
@@ -0,0 +1,342 @@
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.8.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Coinbase::Client
16
+ class ContractInvocationsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Broadcast a contract invocation.
23
+ # Broadcast a contract invocation.
24
+ # @param wallet_id [String] The ID of the wallet the address belongs to.
25
+ # @param address_id [String] The ID of the address the contract invocation belongs to.
26
+ # @param contract_invocation_id [String] The ID of the contract invocation to broadcast.
27
+ # @param broadcast_contract_invocation_request [BroadcastContractInvocationRequest]
28
+ # @param [Hash] opts the optional parameters
29
+ # @return [ContractInvocation]
30
+ def broadcast_contract_invocation(wallet_id, address_id, contract_invocation_id, broadcast_contract_invocation_request, opts = {})
31
+ data, _status_code, _headers = broadcast_contract_invocation_with_http_info(wallet_id, address_id, contract_invocation_id, broadcast_contract_invocation_request, opts)
32
+ data
33
+ end
34
+
35
+ # Broadcast a contract invocation.
36
+ # Broadcast a contract invocation.
37
+ # @param wallet_id [String] The ID of the wallet the address belongs to.
38
+ # @param address_id [String] The ID of the address the contract invocation belongs to.
39
+ # @param contract_invocation_id [String] The ID of the contract invocation to broadcast.
40
+ # @param broadcast_contract_invocation_request [BroadcastContractInvocationRequest]
41
+ # @param [Hash] opts the optional parameters
42
+ # @return [Array<(ContractInvocation, Integer, Hash)>] ContractInvocation data, response status code and response headers
43
+ def broadcast_contract_invocation_with_http_info(wallet_id, address_id, contract_invocation_id, broadcast_contract_invocation_request, opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: ContractInvocationsApi.broadcast_contract_invocation ...'
46
+ end
47
+ # verify the required parameter 'wallet_id' is set
48
+ if @api_client.config.client_side_validation && wallet_id.nil?
49
+ fail ArgumentError, "Missing the required parameter 'wallet_id' when calling ContractInvocationsApi.broadcast_contract_invocation"
50
+ end
51
+ # verify the required parameter 'address_id' is set
52
+ if @api_client.config.client_side_validation && address_id.nil?
53
+ fail ArgumentError, "Missing the required parameter 'address_id' when calling ContractInvocationsApi.broadcast_contract_invocation"
54
+ end
55
+ # verify the required parameter 'contract_invocation_id' is set
56
+ if @api_client.config.client_side_validation && contract_invocation_id.nil?
57
+ fail ArgumentError, "Missing the required parameter 'contract_invocation_id' when calling ContractInvocationsApi.broadcast_contract_invocation"
58
+ end
59
+ # verify the required parameter 'broadcast_contract_invocation_request' is set
60
+ if @api_client.config.client_side_validation && broadcast_contract_invocation_request.nil?
61
+ fail ArgumentError, "Missing the required parameter 'broadcast_contract_invocation_request' when calling ContractInvocationsApi.broadcast_contract_invocation"
62
+ end
63
+ # resource path
64
+ local_var_path = '/v1/wallets/{wallet_id}/addresses/{address_id}/contract_invocations/{contract_invocation_id}/broadcast'.sub('{' + 'wallet_id' + '}', CGI.escape(wallet_id.to_s)).sub('{' + 'address_id' + '}', CGI.escape(address_id.to_s)).sub('{' + 'contract_invocation_id' + '}', CGI.escape(contract_invocation_id.to_s))
65
+
66
+ # query parameters
67
+ query_params = opts[:query_params] || {}
68
+
69
+ # header parameters
70
+ header_params = opts[:header_params] || {}
71
+ # HTTP header 'Accept' (if needed)
72
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
73
+ # HTTP header 'Content-Type'
74
+ content_type = @api_client.select_header_content_type(['application/json'])
75
+ if !content_type.nil?
76
+ header_params['Content-Type'] = content_type
77
+ end
78
+
79
+ # form parameters
80
+ form_params = opts[:form_params] || {}
81
+
82
+ # http body (model)
83
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(broadcast_contract_invocation_request)
84
+
85
+ # return_type
86
+ return_type = opts[:debug_return_type] || 'ContractInvocation'
87
+
88
+ # auth_names
89
+ auth_names = opts[:debug_auth_names] || []
90
+
91
+ new_options = opts.merge(
92
+ :operation => :"ContractInvocationsApi.broadcast_contract_invocation",
93
+ :header_params => header_params,
94
+ :query_params => query_params,
95
+ :form_params => form_params,
96
+ :body => post_body,
97
+ :auth_names => auth_names,
98
+ :return_type => return_type
99
+ )
100
+
101
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug "API called: ContractInvocationsApi#broadcast_contract_invocation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
104
+ end
105
+ return data, status_code, headers
106
+ end
107
+
108
+ # Create a new contract invocation for an address.
109
+ # Create a new contract invocation.
110
+ # @param wallet_id [String] The ID of the wallet the source address belongs to.
111
+ # @param address_id [String] The ID of the address to invoke the contract from.
112
+ # @param create_contract_invocation_request [CreateContractInvocationRequest]
113
+ # @param [Hash] opts the optional parameters
114
+ # @return [ContractInvocation]
115
+ def create_contract_invocation(wallet_id, address_id, create_contract_invocation_request, opts = {})
116
+ data, _status_code, _headers = create_contract_invocation_with_http_info(wallet_id, address_id, create_contract_invocation_request, opts)
117
+ data
118
+ end
119
+
120
+ # Create a new contract invocation for an address.
121
+ # Create a new contract invocation.
122
+ # @param wallet_id [String] The ID of the wallet the source address belongs to.
123
+ # @param address_id [String] The ID of the address to invoke the contract from.
124
+ # @param create_contract_invocation_request [CreateContractInvocationRequest]
125
+ # @param [Hash] opts the optional parameters
126
+ # @return [Array<(ContractInvocation, Integer, Hash)>] ContractInvocation data, response status code and response headers
127
+ def create_contract_invocation_with_http_info(wallet_id, address_id, create_contract_invocation_request, opts = {})
128
+ if @api_client.config.debugging
129
+ @api_client.config.logger.debug 'Calling API: ContractInvocationsApi.create_contract_invocation ...'
130
+ end
131
+ # verify the required parameter 'wallet_id' is set
132
+ if @api_client.config.client_side_validation && wallet_id.nil?
133
+ fail ArgumentError, "Missing the required parameter 'wallet_id' when calling ContractInvocationsApi.create_contract_invocation"
134
+ end
135
+ # verify the required parameter 'address_id' is set
136
+ if @api_client.config.client_side_validation && address_id.nil?
137
+ fail ArgumentError, "Missing the required parameter 'address_id' when calling ContractInvocationsApi.create_contract_invocation"
138
+ end
139
+ # verify the required parameter 'create_contract_invocation_request' is set
140
+ if @api_client.config.client_side_validation && create_contract_invocation_request.nil?
141
+ fail ArgumentError, "Missing the required parameter 'create_contract_invocation_request' when calling ContractInvocationsApi.create_contract_invocation"
142
+ end
143
+ # resource path
144
+ local_var_path = '/v1/wallets/{wallet_id}/addresses/{address_id}/contract_invocations'.sub('{' + 'wallet_id' + '}', CGI.escape(wallet_id.to_s)).sub('{' + 'address_id' + '}', CGI.escape(address_id.to_s))
145
+
146
+ # query parameters
147
+ query_params = opts[:query_params] || {}
148
+
149
+ # header parameters
150
+ header_params = opts[:header_params] || {}
151
+ # HTTP header 'Accept' (if needed)
152
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
153
+ # HTTP header 'Content-Type'
154
+ content_type = @api_client.select_header_content_type(['application/json'])
155
+ if !content_type.nil?
156
+ header_params['Content-Type'] = content_type
157
+ end
158
+
159
+ # form parameters
160
+ form_params = opts[:form_params] || {}
161
+
162
+ # http body (model)
163
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_contract_invocation_request)
164
+
165
+ # return_type
166
+ return_type = opts[:debug_return_type] || 'ContractInvocation'
167
+
168
+ # auth_names
169
+ auth_names = opts[:debug_auth_names] || []
170
+
171
+ new_options = opts.merge(
172
+ :operation => :"ContractInvocationsApi.create_contract_invocation",
173
+ :header_params => header_params,
174
+ :query_params => query_params,
175
+ :form_params => form_params,
176
+ :body => post_body,
177
+ :auth_names => auth_names,
178
+ :return_type => return_type
179
+ )
180
+
181
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
182
+ if @api_client.config.debugging
183
+ @api_client.config.logger.debug "API called: ContractInvocationsApi#create_contract_invocation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
184
+ end
185
+ return data, status_code, headers
186
+ end
187
+
188
+ # Get a contract invocation by ID.
189
+ # Get a contract invocation by ID.
190
+ # @param wallet_id [String] The ID of the wallet the address belongs to.
191
+ # @param address_id [String] The ID of the address the contract invocation belongs to.
192
+ # @param contract_invocation_id [String] The ID of the contract invocation to fetch.
193
+ # @param [Hash] opts the optional parameters
194
+ # @return [ContractInvocation]
195
+ def get_contract_invocation(wallet_id, address_id, contract_invocation_id, opts = {})
196
+ data, _status_code, _headers = get_contract_invocation_with_http_info(wallet_id, address_id, contract_invocation_id, opts)
197
+ data
198
+ end
199
+
200
+ # Get a contract invocation by ID.
201
+ # Get a contract invocation by ID.
202
+ # @param wallet_id [String] The ID of the wallet the address belongs to.
203
+ # @param address_id [String] The ID of the address the contract invocation belongs to.
204
+ # @param contract_invocation_id [String] The ID of the contract invocation to fetch.
205
+ # @param [Hash] opts the optional parameters
206
+ # @return [Array<(ContractInvocation, Integer, Hash)>] ContractInvocation data, response status code and response headers
207
+ def get_contract_invocation_with_http_info(wallet_id, address_id, contract_invocation_id, opts = {})
208
+ if @api_client.config.debugging
209
+ @api_client.config.logger.debug 'Calling API: ContractInvocationsApi.get_contract_invocation ...'
210
+ end
211
+ # verify the required parameter 'wallet_id' is set
212
+ if @api_client.config.client_side_validation && wallet_id.nil?
213
+ fail ArgumentError, "Missing the required parameter 'wallet_id' when calling ContractInvocationsApi.get_contract_invocation"
214
+ end
215
+ # verify the required parameter 'address_id' is set
216
+ if @api_client.config.client_side_validation && address_id.nil?
217
+ fail ArgumentError, "Missing the required parameter 'address_id' when calling ContractInvocationsApi.get_contract_invocation"
218
+ end
219
+ # verify the required parameter 'contract_invocation_id' is set
220
+ if @api_client.config.client_side_validation && contract_invocation_id.nil?
221
+ fail ArgumentError, "Missing the required parameter 'contract_invocation_id' when calling ContractInvocationsApi.get_contract_invocation"
222
+ end
223
+ # resource path
224
+ local_var_path = '/v1/wallets/{wallet_id}/addresses/{address_id}/contract_invocations/{contract_invocation_id}'.sub('{' + 'wallet_id' + '}', CGI.escape(wallet_id.to_s)).sub('{' + 'address_id' + '}', CGI.escape(address_id.to_s)).sub('{' + 'contract_invocation_id' + '}', CGI.escape(contract_invocation_id.to_s))
225
+
226
+ # query parameters
227
+ query_params = opts[:query_params] || {}
228
+
229
+ # header parameters
230
+ header_params = opts[:header_params] || {}
231
+ # HTTP header 'Accept' (if needed)
232
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
233
+
234
+ # form parameters
235
+ form_params = opts[:form_params] || {}
236
+
237
+ # http body (model)
238
+ post_body = opts[:debug_body]
239
+
240
+ # return_type
241
+ return_type = opts[:debug_return_type] || 'ContractInvocation'
242
+
243
+ # auth_names
244
+ auth_names = opts[:debug_auth_names] || []
245
+
246
+ new_options = opts.merge(
247
+ :operation => :"ContractInvocationsApi.get_contract_invocation",
248
+ :header_params => header_params,
249
+ :query_params => query_params,
250
+ :form_params => form_params,
251
+ :body => post_body,
252
+ :auth_names => auth_names,
253
+ :return_type => return_type
254
+ )
255
+
256
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
257
+ if @api_client.config.debugging
258
+ @api_client.config.logger.debug "API called: ContractInvocationsApi#get_contract_invocation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
259
+ end
260
+ return data, status_code, headers
261
+ end
262
+
263
+ # List contract invocations for an address.
264
+ # List contract invocations for an 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 list contract invocations for.
267
+ # @param [Hash] opts the optional parameters
268
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
269
+ # @option opts [String] :page A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
270
+ # @return [ContractInvocationList]
271
+ def list_contract_invocations(wallet_id, address_id, opts = {})
272
+ data, _status_code, _headers = list_contract_invocations_with_http_info(wallet_id, address_id, opts)
273
+ data
274
+ end
275
+
276
+ # List contract invocations for an address.
277
+ # List contract invocations for an address.
278
+ # @param wallet_id [String] The ID of the wallet the address belongs to.
279
+ # @param address_id [String] The ID of the address to list contract invocations for.
280
+ # @param [Hash] opts the optional parameters
281
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
282
+ # @option opts [String] :page A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
283
+ # @return [Array<(ContractInvocationList, Integer, Hash)>] ContractInvocationList data, response status code and response headers
284
+ def list_contract_invocations_with_http_info(wallet_id, address_id, opts = {})
285
+ if @api_client.config.debugging
286
+ @api_client.config.logger.debug 'Calling API: ContractInvocationsApi.list_contract_invocations ...'
287
+ end
288
+ # verify the required parameter 'wallet_id' is set
289
+ if @api_client.config.client_side_validation && wallet_id.nil?
290
+ fail ArgumentError, "Missing the required parameter 'wallet_id' when calling ContractInvocationsApi.list_contract_invocations"
291
+ end
292
+ # verify the required parameter 'address_id' is set
293
+ if @api_client.config.client_side_validation && address_id.nil?
294
+ fail ArgumentError, "Missing the required parameter 'address_id' when calling ContractInvocationsApi.list_contract_invocations"
295
+ end
296
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'].to_s.length > 5000
297
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ContractInvocationsApi.list_contract_invocations, the character length must be smaller than or equal to 5000.'
298
+ end
299
+
300
+ # resource path
301
+ local_var_path = '/v1/wallets/{wallet_id}/addresses/{address_id}/contract_invocations'.sub('{' + 'wallet_id' + '}', CGI.escape(wallet_id.to_s)).sub('{' + 'address_id' + '}', CGI.escape(address_id.to_s))
302
+
303
+ # query parameters
304
+ query_params = opts[:query_params] || {}
305
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
306
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
307
+
308
+ # header parameters
309
+ header_params = opts[:header_params] || {}
310
+ # HTTP header 'Accept' (if needed)
311
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
312
+
313
+ # form parameters
314
+ form_params = opts[:form_params] || {}
315
+
316
+ # http body (model)
317
+ post_body = opts[:debug_body]
318
+
319
+ # return_type
320
+ return_type = opts[:debug_return_type] || 'ContractInvocationList'
321
+
322
+ # auth_names
323
+ auth_names = opts[:debug_auth_names] || []
324
+
325
+ new_options = opts.merge(
326
+ :operation => :"ContractInvocationsApi.list_contract_invocations",
327
+ :header_params => header_params,
328
+ :query_params => query_params,
329
+ :form_params => form_params,
330
+ :body => post_body,
331
+ :auth_names => auth_names,
332
+ :return_type => return_type
333
+ )
334
+
335
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
336
+ if @api_client.config.debugging
337
+ @api_client.config.logger.debug "API called: ContractInvocationsApi#list_contract_invocations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
338
+ end
339
+ return data, status_code, headers
340
+ end
341
+ end
342
+ end
@@ -4,9 +4,9 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -63,7 +63,7 @@ module Coinbase::Client
63
63
  # header parameters
64
64
  header_params = opts[:header_params] || {}
65
65
  # HTTP header 'Accept' (if needed)
66
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
66
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
67
67
 
68
68
  # form parameters
69
69
  form_params = opts[:form_params] || {}
@@ -94,51 +94,45 @@ module Coinbase::Client
94
94
  return data, status_code, headers
95
95
  end
96
96
 
97
- # Get address balance history for asset
98
- # List the historical balance of an asset in a specific address.
97
+ # List transactions for an address.
98
+ # List all transactions that interact with the address.
99
99
  # @param network_id [String] The ID of the blockchain network
100
- # @param address_id [String] The ID of the address to fetch the historical balance for.
101
- # @param asset_id [String] The symbol of the asset to fetch the historical balance for.
100
+ # @param address_id [String] The ID of the address to fetch the transactions for.
102
101
  # @param [Hash] opts the optional parameters
103
102
  # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
104
103
  # @option opts [String] :page A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
105
- # @return [AddressHistoricalBalanceList]
106
- def list_address_historical_balance(network_id, address_id, asset_id, opts = {})
107
- data, _status_code, _headers = list_address_historical_balance_with_http_info(network_id, address_id, asset_id, opts)
104
+ # @return [AddressTransactionList]
105
+ def list_address_transactions(network_id, address_id, opts = {})
106
+ data, _status_code, _headers = list_address_transactions_with_http_info(network_id, address_id, opts)
108
107
  data
109
108
  end
110
109
 
111
- # Get address balance history for asset
112
- # List the historical balance of an asset in a specific address.
110
+ # List transactions for an address.
111
+ # List all transactions that interact with the address.
113
112
  # @param network_id [String] The ID of the blockchain network
114
- # @param address_id [String] The ID of the address to fetch the historical balance for.
115
- # @param asset_id [String] The symbol of the asset to fetch the historical balance for.
113
+ # @param address_id [String] The ID of the address to fetch the transactions for.
116
114
  # @param [Hash] opts the optional parameters
117
115
  # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
118
116
  # @option opts [String] :page A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
119
- # @return [Array<(AddressHistoricalBalanceList, Integer, Hash)>] AddressHistoricalBalanceList data, response status code and response headers
120
- def list_address_historical_balance_with_http_info(network_id, address_id, asset_id, opts = {})
117
+ # @return [Array<(AddressTransactionList, Integer, Hash)>] AddressTransactionList data, response status code and response headers
118
+ def list_address_transactions_with_http_info(network_id, address_id, opts = {})
121
119
  if @api_client.config.debugging
122
- @api_client.config.logger.debug 'Calling API: ExternalAddressesApi.list_address_historical_balance ...'
120
+ @api_client.config.logger.debug 'Calling API: ExternalAddressesApi.list_address_transactions ...'
123
121
  end
124
122
  # verify the required parameter 'network_id' is set
125
123
  if @api_client.config.client_side_validation && network_id.nil?
126
- fail ArgumentError, "Missing the required parameter 'network_id' when calling ExternalAddressesApi.list_address_historical_balance"
124
+ fail ArgumentError, "Missing the required parameter 'network_id' when calling ExternalAddressesApi.list_address_transactions"
127
125
  end
128
126
  # verify the required parameter 'address_id' is set
129
127
  if @api_client.config.client_side_validation && address_id.nil?
130
- fail ArgumentError, "Missing the required parameter 'address_id' when calling ExternalAddressesApi.list_address_historical_balance"
131
- end
132
- # verify the required parameter 'asset_id' is set
133
- if @api_client.config.client_side_validation && asset_id.nil?
134
- fail ArgumentError, "Missing the required parameter 'asset_id' when calling ExternalAddressesApi.list_address_historical_balance"
128
+ fail ArgumentError, "Missing the required parameter 'address_id' when calling ExternalAddressesApi.list_address_transactions"
135
129
  end
136
130
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'].to_s.length > 5000
137
- fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ExternalAddressesApi.list_address_historical_balance, the character length must be smaller than or equal to 5000.'
131
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ExternalAddressesApi.list_address_transactions, the character length must be smaller than or equal to 5000.'
138
132
  end
139
133
 
140
134
  # resource path
141
- local_var_path = '/v1/networks/{network_id}/addresses/{address_id}/balance_history/{asset_id}'.sub('{' + 'network_id' + '}', CGI.escape(network_id.to_s)).sub('{' + 'address_id' + '}', CGI.escape(address_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))
135
+ local_var_path = '/v1/networks/{network_id}/addresses/{address_id}/transactions'.sub('{' + 'network_id' + '}', CGI.escape(network_id.to_s)).sub('{' + 'address_id' + '}', CGI.escape(address_id.to_s))
142
136
 
143
137
  # query parameters
144
138
  query_params = opts[:query_params] || {}
@@ -148,7 +142,7 @@ module Coinbase::Client
148
142
  # header parameters
149
143
  header_params = opts[:header_params] || {}
150
144
  # HTTP header 'Accept' (if needed)
151
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
145
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
152
146
 
153
147
  # form parameters
154
148
  form_params = opts[:form_params] || {}
@@ -157,13 +151,13 @@ module Coinbase::Client
157
151
  post_body = opts[:debug_body]
158
152
 
159
153
  # return_type
160
- return_type = opts[:debug_return_type] || 'AddressHistoricalBalanceList'
154
+ return_type = opts[:debug_return_type] || 'AddressTransactionList'
161
155
 
162
156
  # auth_names
163
157
  auth_names = opts[:debug_auth_names] || []
164
158
 
165
159
  new_options = opts.merge(
166
- :operation => :"ExternalAddressesApi.list_address_historical_balance",
160
+ :operation => :"ExternalAddressesApi.list_address_transactions",
167
161
  :header_params => header_params,
168
162
  :query_params => query_params,
169
163
  :form_params => form_params,
@@ -174,7 +168,7 @@ module Coinbase::Client
174
168
 
175
169
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
176
170
  if @api_client.config.debugging
177
- @api_client.config.logger.debug "API called: ExternalAddressesApi#list_address_historical_balance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
171
+ @api_client.config.logger.debug "API called: ExternalAddressesApi#list_address_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
178
172
  end
179
173
  return data, status_code, headers
180
174
  end
@@ -296,7 +290,7 @@ module Coinbase::Client
296
290
  # header parameters
297
291
  header_params = opts[:header_params] || {}
298
292
  # HTTP header 'Accept' (if needed)
299
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
293
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
300
294
 
301
295
  # form parameters
302
296
  form_params = opts[:form_params] || {}
@@ -4,9 +4,9 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -51,7 +51,7 @@ module Coinbase::Client
51
51
  # header parameters
52
52
  header_params = opts[:header_params] || {}
53
53
  # HTTP header 'Accept' (if needed)
54
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
55
55
 
56
56
  # form parameters
57
57
  form_params = opts[:form_params] || {}
@@ -4,9 +4,9 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -47,7 +47,7 @@ module Coinbase::Client
47
47
  # header parameters
48
48
  header_params = opts[:header_params] || {}
49
49
  # HTTP header 'Accept' (if needed)
50
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
50
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
51
51
  # HTTP header 'Content-Type'
52
52
  content_type = @api_client.select_header_content_type(['application/json'])
53
53
  if !content_type.nil?
@@ -115,7 +115,7 @@ module Coinbase::Client
115
115
  # header parameters
116
116
  header_params = opts[:header_params] || {}
117
117
  # HTTP header 'Accept' (if needed)
118
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
118
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
119
119
 
120
120
  # form parameters
121
121
  form_params = opts[:form_params] || {}
@@ -188,7 +188,7 @@ module Coinbase::Client
188
188
  # header parameters
189
189
  header_params = opts[:header_params] || {}
190
190
  # HTTP header 'Accept' (if needed)
191
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
191
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
192
192
 
193
193
  # form parameters
194
194
  form_params = opts[:form_params] || {}
@@ -255,7 +255,7 @@ module Coinbase::Client
255
255
  # header parameters
256
256
  header_params = opts[:header_params] || {}
257
257
  # HTTP header 'Accept' (if needed)
258
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
258
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
259
259
 
260
260
  # form parameters
261
261
  form_params = opts[:form_params] || {}
@@ -320,7 +320,7 @@ module Coinbase::Client
320
320
  # header parameters
321
321
  header_params = opts[:header_params] || {}
322
322
  # HTTP header 'Accept' (if needed)
323
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
323
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
324
324
  # HTTP header 'Content-Type'
325
325
  content_type = @api_client.select_header_content_type(['application/json'])
326
326
  if !content_type.nil?
@@ -390,7 +390,7 @@ module Coinbase::Client
390
390
  # header parameters
391
391
  header_params = opts[:header_params] || {}
392
392
  # HTTP header 'Accept' (if needed)
393
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
393
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
394
394
  # HTTP header 'Content-Type'
395
395
  content_type = @api_client.select_header_content_type(['application/json'])
396
396
  if !content_type.nil?
@@ -4,9 +4,9 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -51,7 +51,7 @@ module Coinbase::Client
51
51
  # header parameters
52
52
  header_params = opts[:header_params] || {}
53
53
  # HTTP header 'Accept' (if needed)
54
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
55
55
  # HTTP header 'Content-Type'
56
56
  content_type = @api_client.select_header_content_type(['application/json'])
57
57
  if !content_type.nil?
@@ -176,7 +176,7 @@ module Coinbase::Client
176
176
  # header parameters
177
177
  header_params = opts[:header_params] || {}
178
178
  # HTTP header 'Accept' (if needed)
179
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
179
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
180
180
 
181
181
  # form parameters
182
182
  form_params = opts[:form_params] || {}
@@ -249,7 +249,7 @@ module Coinbase::Client
249
249
  # header parameters
250
250
  header_params = opts[:header_params] || {}
251
251
  # HTTP header 'Accept' (if needed)
252
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
252
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
253
253
  # HTTP header 'Content-Type'
254
254
  content_type = @api_client.select_header_content_type(['application/json'])
255
255
  if !content_type.nil?
@@ -329,7 +329,7 @@ module Coinbase::Client
329
329
  # header parameters
330
330
  header_params = opts[:header_params] || {}
331
331
  # HTTP header 'Accept' (if needed)
332
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
332
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
333
333
 
334
334
  # form parameters
335
335
  form_params = opts[:form_params] || {}
@@ -392,7 +392,7 @@ module Coinbase::Client
392
392
  # header parameters
393
393
  header_params = opts[:header_params] || {}
394
394
  # HTTP header 'Accept' (if needed)
395
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
395
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
396
396
  # HTTP header 'Content-Type'
397
397
  content_type = @api_client.select_header_content_type(['application/json'])
398
398
  if !content_type.nil?