coinbase-sdk 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/coinbase/address/wallet_address.rb +53 -0
- data/lib/coinbase/address.rb +20 -0
- data/lib/coinbase/client/api/addresses_api.rb +231 -1
- data/lib/coinbase/client/api/assets_api.rb +1 -1
- data/lib/coinbase/client/api/contract_events_api.rb +1 -1
- data/lib/coinbase/client/api/contract_invocations_api.rb +342 -0
- data/lib/coinbase/client/api/external_addresses_api.rb +81 -2
- data/lib/coinbase/client/api/networks_api.rb +1 -1
- data/lib/coinbase/client/api/server_signers_api.rb +1 -1
- data/lib/coinbase/client/api/stake_api.rb +1 -1
- data/lib/coinbase/client/api/trades_api.rb +1 -1
- data/lib/coinbase/client/api/transfers_api.rb +1 -1
- data/lib/coinbase/client/api/users_api.rb +1 -1
- data/lib/coinbase/client/api/validators_api.rb +1 -1
- data/lib/coinbase/client/api/wallet_stake_api.rb +1 -1
- data/lib/coinbase/client/api/wallets_api.rb +1 -1
- data/lib/coinbase/client/api/webhooks_api.rb +1 -1
- data/lib/coinbase/client/api_client.rb +1 -1
- data/lib/coinbase/client/api_error.rb +1 -1
- data/lib/coinbase/client/configuration.rb +1 -1
- data/lib/coinbase/client/models/address.rb +1 -1
- data/lib/coinbase/client/models/address_balance_list.rb +1 -1
- data/lib/coinbase/client/models/address_historical_balance_list.rb +1 -1
- data/lib/coinbase/client/models/address_list.rb +1 -1
- data/lib/coinbase/client/models/address_transaction_list.rb +258 -0
- data/lib/coinbase/client/models/asset.rb +1 -1
- data/lib/coinbase/client/models/balance.rb +1 -1
- data/lib/coinbase/client/models/broadcast_contract_invocation_request.rb +222 -0
- data/lib/coinbase/client/models/broadcast_staking_operation_request.rb +1 -1
- data/lib/coinbase/client/models/broadcast_trade_request.rb +1 -1
- data/lib/coinbase/client/models/broadcast_transfer_request.rb +1 -1
- data/lib/coinbase/client/models/build_staking_operation_request.rb +1 -1
- data/lib/coinbase/client/models/contract_event.rb +1 -1
- data/lib/coinbase/client/models/contract_event_list.rb +1 -1
- data/lib/coinbase/client/models/contract_invocation.rb +351 -0
- data/lib/coinbase/client/models/contract_invocation_list.rb +274 -0
- data/lib/coinbase/client/models/create_address_request.rb +1 -1
- data/lib/coinbase/client/models/create_contract_invocation_request.rb +266 -0
- data/lib/coinbase/client/models/create_payload_signature_request.rb +232 -0
- data/lib/coinbase/client/models/create_server_signer_request.rb +1 -1
- data/lib/coinbase/client/models/create_staking_operation_request.rb +1 -1
- data/lib/coinbase/client/models/create_trade_request.rb +1 -1
- data/lib/coinbase/client/models/create_transfer_request.rb +1 -1
- data/lib/coinbase/client/models/create_wallet_request.rb +1 -1
- data/lib/coinbase/client/models/create_wallet_request_wallet.rb +1 -1
- data/lib/coinbase/client/models/create_webhook_request.rb +29 -5
- data/lib/coinbase/client/models/error.rb +1 -1
- data/lib/coinbase/client/models/ethereum_transaction.rb +389 -0
- data/lib/coinbase/client/models/ethereum_transaction_access.rb +225 -0
- data/lib/coinbase/client/models/ethereum_transaction_access_list.rb +216 -0
- data/lib/coinbase/client/models/ethereum_transaction_flattened_trace.rb +378 -0
- data/lib/coinbase/client/models/ethereum_validator_metadata.rb +1 -1
- data/lib/coinbase/client/models/faucet_transaction.rb +1 -1
- data/lib/coinbase/client/models/feature_set.rb +1 -1
- data/lib/coinbase/client/models/fetch_historical_staking_balances200_response.rb +1 -1
- data/lib/coinbase/client/models/fetch_staking_rewards200_response.rb +1 -1
- data/lib/coinbase/client/models/fetch_staking_rewards_request.rb +1 -1
- data/lib/coinbase/client/models/get_staking_context_request.rb +1 -1
- data/lib/coinbase/client/models/historical_balance.rb +1 -1
- data/lib/coinbase/client/models/network.rb +3 -3
- data/lib/coinbase/client/models/network_identifier.rb +3 -2
- data/lib/coinbase/client/models/payload_signature.rb +335 -0
- data/lib/coinbase/client/models/payload_signature_list.rb +275 -0
- data/lib/coinbase/client/models/seed_creation_event.rb +1 -1
- data/lib/coinbase/client/models/seed_creation_event_result.rb +1 -1
- data/lib/coinbase/client/models/server_signer.rb +1 -1
- data/lib/coinbase/client/models/server_signer_event.rb +1 -1
- data/lib/coinbase/client/models/server_signer_event_event.rb +1 -1
- data/lib/coinbase/client/models/server_signer_event_list.rb +1 -1
- data/lib/coinbase/client/models/server_signer_list.rb +1 -1
- data/lib/coinbase/client/models/signature_creation_event.rb +1 -1
- data/lib/coinbase/client/models/signature_creation_event_result.rb +1 -1
- data/lib/coinbase/client/models/signed_voluntary_exit_message_metadata.rb +1 -1
- data/lib/coinbase/client/models/sponsored_send.rb +1 -1
- data/lib/coinbase/client/models/staking_balance.rb +1 -1
- data/lib/coinbase/client/models/staking_context.rb +1 -1
- data/lib/coinbase/client/models/staking_context_context.rb +1 -1
- data/lib/coinbase/client/models/staking_operation.rb +1 -1
- data/lib/coinbase/client/models/staking_operation_metadata.rb +1 -1
- data/lib/coinbase/client/models/staking_reward.rb +1 -1
- data/lib/coinbase/client/models/staking_reward_format.rb +1 -1
- data/lib/coinbase/client/models/staking_reward_usd_value.rb +1 -1
- data/lib/coinbase/client/models/trade.rb +1 -1
- data/lib/coinbase/client/models/trade_list.rb +1 -1
- data/lib/coinbase/client/models/transaction.rb +36 -7
- data/lib/coinbase/client/models/transaction_content.rb +104 -0
- data/lib/coinbase/client/models/transaction_type.rb +1 -1
- data/lib/coinbase/client/models/transfer.rb +1 -1
- data/lib/coinbase/client/models/transfer_list.rb +1 -1
- data/lib/coinbase/client/models/update_webhook_request.rb +2 -50
- data/lib/coinbase/client/models/user.rb +1 -1
- data/lib/coinbase/client/models/validator.rb +1 -1
- data/lib/coinbase/client/models/validator_details.rb +1 -1
- data/lib/coinbase/client/models/validator_list.rb +1 -1
- data/lib/coinbase/client/models/validator_status.rb +1 -1
- data/lib/coinbase/client/models/wallet.rb +1 -1
- data/lib/coinbase/client/models/wallet_list.rb +1 -1
- data/lib/coinbase/client/models/webhook.rb +15 -5
- data/lib/coinbase/client/models/webhook_event_filter.rb +1 -1
- data/lib/coinbase/client/models/webhook_event_type.rb +1 -1
- data/lib/coinbase/client/models/webhook_list.rb +1 -1
- data/lib/coinbase/client/version.rb +1 -1
- data/lib/coinbase/client.rb +15 -1
- data/lib/coinbase/constants.rb +3 -0
- data/lib/coinbase/contract_invocation.rb +234 -0
- data/lib/coinbase/payload_signature.rb +181 -0
- data/lib/coinbase/transaction.rb +21 -0
- data/lib/coinbase/version.rb +1 -1
- data/lib/coinbase/wallet.rb +11 -1
- data/lib/coinbase/webhook.rb +17 -6
- data/lib/coinbase.rb +2 -0
- metadata +18 -2
|
@@ -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.7.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'])
|
|
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'])
|
|
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'])
|
|
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'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'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'])
|
|
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,7 +4,7 @@
|
|
|
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
|
-
|
|
7
|
+
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.7.0
|
|
10
10
|
|
|
@@ -179,6 +179,85 @@ module Coinbase::Client
|
|
|
179
179
|
return data, status_code, headers
|
|
180
180
|
end
|
|
181
181
|
|
|
182
|
+
# List transactions for an address.
|
|
183
|
+
# List all transactions that interact with the address.
|
|
184
|
+
# @param network_id [String] The ID of the blockchain network
|
|
185
|
+
# @param address_id [String] The ID of the address to fetch the transactions for.
|
|
186
|
+
# @param [Hash] opts the optional parameters
|
|
187
|
+
# @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.
|
|
188
|
+
# @option opts [String] :page A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
|
|
189
|
+
# @return [AddressTransactionList]
|
|
190
|
+
def list_address_transactions(network_id, address_id, opts = {})
|
|
191
|
+
data, _status_code, _headers = list_address_transactions_with_http_info(network_id, address_id, opts)
|
|
192
|
+
data
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# List transactions for an address.
|
|
196
|
+
# List all transactions that interact with the address.
|
|
197
|
+
# @param network_id [String] The ID of the blockchain network
|
|
198
|
+
# @param address_id [String] The ID of the address to fetch the transactions for.
|
|
199
|
+
# @param [Hash] opts the optional parameters
|
|
200
|
+
# @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.
|
|
201
|
+
# @option opts [String] :page A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
|
|
202
|
+
# @return [Array<(AddressTransactionList, Integer, Hash)>] AddressTransactionList data, response status code and response headers
|
|
203
|
+
def list_address_transactions_with_http_info(network_id, address_id, opts = {})
|
|
204
|
+
if @api_client.config.debugging
|
|
205
|
+
@api_client.config.logger.debug 'Calling API: ExternalAddressesApi.list_address_transactions ...'
|
|
206
|
+
end
|
|
207
|
+
# verify the required parameter 'network_id' is set
|
|
208
|
+
if @api_client.config.client_side_validation && network_id.nil?
|
|
209
|
+
fail ArgumentError, "Missing the required parameter 'network_id' when calling ExternalAddressesApi.list_address_transactions"
|
|
210
|
+
end
|
|
211
|
+
# verify the required parameter 'address_id' is set
|
|
212
|
+
if @api_client.config.client_side_validation && address_id.nil?
|
|
213
|
+
fail ArgumentError, "Missing the required parameter 'address_id' when calling ExternalAddressesApi.list_address_transactions"
|
|
214
|
+
end
|
|
215
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'].to_s.length > 5000
|
|
216
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ExternalAddressesApi.list_address_transactions, the character length must be smaller than or equal to 5000.'
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# resource path
|
|
220
|
+
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))
|
|
221
|
+
|
|
222
|
+
# query parameters
|
|
223
|
+
query_params = opts[:query_params] || {}
|
|
224
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
225
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
226
|
+
|
|
227
|
+
# header parameters
|
|
228
|
+
header_params = opts[:header_params] || {}
|
|
229
|
+
# HTTP header 'Accept' (if needed)
|
|
230
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
231
|
+
|
|
232
|
+
# form parameters
|
|
233
|
+
form_params = opts[:form_params] || {}
|
|
234
|
+
|
|
235
|
+
# http body (model)
|
|
236
|
+
post_body = opts[:debug_body]
|
|
237
|
+
|
|
238
|
+
# return_type
|
|
239
|
+
return_type = opts[:debug_return_type] || 'AddressTransactionList'
|
|
240
|
+
|
|
241
|
+
# auth_names
|
|
242
|
+
auth_names = opts[:debug_auth_names] || []
|
|
243
|
+
|
|
244
|
+
new_options = opts.merge(
|
|
245
|
+
:operation => :"ExternalAddressesApi.list_address_transactions",
|
|
246
|
+
:header_params => header_params,
|
|
247
|
+
:query_params => query_params,
|
|
248
|
+
:form_params => form_params,
|
|
249
|
+
:body => post_body,
|
|
250
|
+
:auth_names => auth_names,
|
|
251
|
+
:return_type => return_type
|
|
252
|
+
)
|
|
253
|
+
|
|
254
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
255
|
+
if @api_client.config.debugging
|
|
256
|
+
@api_client.config.logger.debug "API called: ExternalAddressesApi#list_address_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
257
|
+
end
|
|
258
|
+
return data, status_code, headers
|
|
259
|
+
end
|
|
260
|
+
|
|
182
261
|
# Get the balances of an external address
|
|
183
262
|
# List all of the balances of an external address
|
|
184
263
|
# @param network_id [String] The ID of the blockchain network
|
|
@@ -224,7 +303,7 @@ module Coinbase::Client
|
|
|
224
303
|
# header parameters
|
|
225
304
|
header_params = opts[:header_params] || {}
|
|
226
305
|
# HTTP header 'Accept' (if needed)
|
|
227
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
306
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
228
307
|
|
|
229
308
|
# form parameters
|
|
230
309
|
form_params = opts[:form_params] || {}
|
|
@@ -4,7 +4,7 @@
|
|
|
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
|
-
|
|
7
|
+
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.7.0
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
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
|
-
|
|
7
|
+
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.7.0
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
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
|
-
|
|
7
|
+
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.7.0
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
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
|
-
|
|
7
|
+
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.7.0
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
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
|
-
|
|
7
|
+
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.7.0
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
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
|
-
|
|
7
|
+
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.7.0
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
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
|
-
|
|
7
|
+
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.7.0
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
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
|
-
|
|
7
|
+
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.7.0
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
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
|
-
|
|
7
|
+
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.7.0
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
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
|
-
|
|
7
|
+
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.7.0
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
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
|
-
|
|
7
|
+
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.7.0
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
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
|
-
|
|
7
|
+
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.7.0
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
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
|
-
|
|
7
|
+
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.7.0
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
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
|
-
|
|
7
|
+
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.7.0
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
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
|
-
|
|
7
|
+
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.7.0
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
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
|
-
|
|
7
|
+
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.7.0
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
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
|
-
|
|
7
|
+
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.7.0
|
|
10
10
|
|