coinbase-sdk 0.3.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/coinbase/address/wallet_address.rb +35 -2
- data/lib/coinbase/address.rb +5 -1
- data/lib/coinbase/client/api/addresses_api.rb +10 -10
- data/lib/coinbase/client/api/assets_api.rb +2 -2
- data/lib/coinbase/client/api/balance_history_api.rb +107 -0
- data/lib/coinbase/client/api/contract_events_api.rb +4 -4
- data/lib/coinbase/client/api/contract_invocations_api.rb +5 -5
- data/lib/coinbase/client/api/external_addresses_api.rb +5 -90
- data/lib/coinbase/client/api/networks_api.rb +2 -2
- data/lib/coinbase/client/api/server_signers_api.rb +7 -7
- data/lib/coinbase/client/api/smart_contracts_api.rb +332 -0
- data/lib/coinbase/client/api/stake_api.rb +6 -14
- data/lib/coinbase/client/api/trades_api.rb +5 -5
- data/lib/coinbase/client/api/transfers_api.rb +5 -5
- data/lib/coinbase/client/api/users_api.rb +2 -2
- data/lib/coinbase/client/api/validators_api.rb +3 -3
- data/lib/coinbase/client/api/wallet_stake_api.rb +4 -4
- data/lib/coinbase/client/api/wallets_api.rb +6 -6
- data/lib/coinbase/client/api/webhooks_api.rb +5 -5
- data/lib/coinbase/client/api_client.rb +30 -24
- 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 +1 -1
- 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 +1 -1
- 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 +19 -2
- data/lib/coinbase/client/models/contract_invocation_list.rb +1 -1
- data/lib/coinbase/client/models/create_address_request.rb +1 -1
- data/lib/coinbase/client/models/create_contract_invocation_request.rb +15 -5
- data/lib/coinbase/client/models/create_payload_signature_request.rb +1 -1
- data/lib/coinbase/client/models/create_server_signer_request.rb +1 -1
- data/lib/coinbase/client/models/create_smart_contract_request.rb +259 -0
- 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 +2 -2
- 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 +11 -9
- data/lib/coinbase/client/models/deploy_smart_contract_request.rb +222 -0
- data/lib/coinbase/client/models/erc20_transfer_event.rb +336 -0
- data/lib/coinbase/client/models/erc721_transfer_event.rb +336 -0
- data/lib/coinbase/client/models/error.rb +15 -5
- data/lib/coinbase/client/models/ethereum_transaction.rb +1 -1
- data/lib/coinbase/client/models/ethereum_transaction_access.rb +1 -1
- data/lib/coinbase/client/models/ethereum_transaction_access_list.rb +1 -1
- data/lib/coinbase/client/models/ethereum_transaction_flattened_trace.rb +1 -1
- 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 +1 -1
- data/lib/coinbase/client/models/network_identifier.rb +3 -2
- data/lib/coinbase/client/models/nft_contract_options.rb +240 -0
- data/lib/coinbase/client/models/payload_signature.rb +1 -1
- data/lib/coinbase/client/models/payload_signature_list.rb +1 -1
- 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/smart_contract.rb +378 -0
- data/lib/coinbase/client/models/smart_contract_list.rb +257 -0
- data/lib/coinbase/client/models/smart_contract_options.rb +106 -0
- data/lib/coinbase/client/models/smart_contract_type.rb +41 -0
- data/lib/coinbase/client/models/sponsored_send.rb +1 -1
- data/lib/coinbase/client/models/staking_balance.rb +3 -3
- 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 +3 -3
- 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/token_contract_options.rb +257 -0
- 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 +1 -1
- data/lib/coinbase/client/models/transaction_content.rb +1 -1
- 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 +11 -9
- 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 +11 -2
- data/lib/coinbase/client/models/webhook_event_filter.rb +4 -4
- data/lib/coinbase/client/models/webhook_event_type.rb +3 -2
- data/lib/coinbase/client/models/webhook_event_type_filter.rb +105 -0
- data/lib/coinbase/client/models/webhook_list.rb +1 -1
- data/lib/coinbase/client/models/webhook_wallet_activity_filter.rb +228 -0
- data/lib/coinbase/client/version.rb +1 -1
- data/lib/coinbase/client.rb +15 -1
- data/lib/coinbase/contract_invocation.rb +34 -10
- data/lib/coinbase/smart_contract.rb +216 -45
- data/lib/coinbase/transaction.rb +3 -0
- data/lib/coinbase/transfer.rb +1 -1
- data/lib/coinbase/version.rb +1 -1
- data/lib/coinbase/wallet.rb +11 -2
- metadata +16 -2
@@ -0,0 +1,332 @@
|
|
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 SmartContractsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create a new smart contract
|
23
|
+
# Create a new smart contract
|
24
|
+
# @param wallet_id [String] The ID of the wallet the address belongs to.
|
25
|
+
# @param address_id [String] The ID of the address to deploy the smart contract from.
|
26
|
+
# @param create_smart_contract_request [CreateSmartContractRequest]
|
27
|
+
# @param [Hash] opts the optional parameters
|
28
|
+
# @return [SmartContract]
|
29
|
+
def create_smart_contract(wallet_id, address_id, create_smart_contract_request, opts = {})
|
30
|
+
data, _status_code, _headers = create_smart_contract_with_http_info(wallet_id, address_id, create_smart_contract_request, opts)
|
31
|
+
data
|
32
|
+
end
|
33
|
+
|
34
|
+
# Create a new smart contract
|
35
|
+
# Create a new smart contract
|
36
|
+
# @param wallet_id [String] The ID of the wallet the address belongs to.
|
37
|
+
# @param address_id [String] The ID of the address to deploy the smart contract from.
|
38
|
+
# @param create_smart_contract_request [CreateSmartContractRequest]
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @return [Array<(SmartContract, Integer, Hash)>] SmartContract data, response status code and response headers
|
41
|
+
def create_smart_contract_with_http_info(wallet_id, address_id, create_smart_contract_request, opts = {})
|
42
|
+
if @api_client.config.debugging
|
43
|
+
@api_client.config.logger.debug 'Calling API: SmartContractsApi.create_smart_contract ...'
|
44
|
+
end
|
45
|
+
# verify the required parameter 'wallet_id' is set
|
46
|
+
if @api_client.config.client_side_validation && wallet_id.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'wallet_id' when calling SmartContractsApi.create_smart_contract"
|
48
|
+
end
|
49
|
+
# verify the required parameter 'address_id' is set
|
50
|
+
if @api_client.config.client_side_validation && address_id.nil?
|
51
|
+
fail ArgumentError, "Missing the required parameter 'address_id' when calling SmartContractsApi.create_smart_contract"
|
52
|
+
end
|
53
|
+
# verify the required parameter 'create_smart_contract_request' is set
|
54
|
+
if @api_client.config.client_side_validation && create_smart_contract_request.nil?
|
55
|
+
fail ArgumentError, "Missing the required parameter 'create_smart_contract_request' when calling SmartContractsApi.create_smart_contract"
|
56
|
+
end
|
57
|
+
# resource path
|
58
|
+
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))
|
59
|
+
|
60
|
+
# query parameters
|
61
|
+
query_params = opts[:query_params] || {}
|
62
|
+
|
63
|
+
# header parameters
|
64
|
+
header_params = opts[:header_params] || {}
|
65
|
+
# HTTP header 'Accept' (if needed)
|
66
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
67
|
+
# HTTP header 'Content-Type'
|
68
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
69
|
+
if !content_type.nil?
|
70
|
+
header_params['Content-Type'] = content_type
|
71
|
+
end
|
72
|
+
|
73
|
+
# form parameters
|
74
|
+
form_params = opts[:form_params] || {}
|
75
|
+
|
76
|
+
# http body (model)
|
77
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_smart_contract_request)
|
78
|
+
|
79
|
+
# return_type
|
80
|
+
return_type = opts[:debug_return_type] || 'SmartContract'
|
81
|
+
|
82
|
+
# auth_names
|
83
|
+
auth_names = opts[:debug_auth_names] || []
|
84
|
+
|
85
|
+
new_options = opts.merge(
|
86
|
+
:operation => :"SmartContractsApi.create_smart_contract",
|
87
|
+
:header_params => header_params,
|
88
|
+
:query_params => query_params,
|
89
|
+
:form_params => form_params,
|
90
|
+
:body => post_body,
|
91
|
+
:auth_names => auth_names,
|
92
|
+
:return_type => return_type
|
93
|
+
)
|
94
|
+
|
95
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
96
|
+
if @api_client.config.debugging
|
97
|
+
@api_client.config.logger.debug "API called: SmartContractsApi#create_smart_contract\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
98
|
+
end
|
99
|
+
return data, status_code, headers
|
100
|
+
end
|
101
|
+
|
102
|
+
# Deploy a smart contract
|
103
|
+
# Deploys a smart contract, by broadcasting the transaction to the network.
|
104
|
+
# @param wallet_id [String] The ID of the wallet the address belongs to.
|
105
|
+
# @param address_id [String] The ID of the address to broadcast the transaction from.
|
106
|
+
# @param smart_contract_id [String] The UUID of the smart contract to broadcast the transaction to.
|
107
|
+
# @param deploy_smart_contract_request [DeploySmartContractRequest]
|
108
|
+
# @param [Hash] opts the optional parameters
|
109
|
+
# @return [SmartContract]
|
110
|
+
def deploy_smart_contract(wallet_id, address_id, smart_contract_id, deploy_smart_contract_request, opts = {})
|
111
|
+
data, _status_code, _headers = deploy_smart_contract_with_http_info(wallet_id, address_id, smart_contract_id, deploy_smart_contract_request, opts)
|
112
|
+
data
|
113
|
+
end
|
114
|
+
|
115
|
+
# Deploy a smart contract
|
116
|
+
# Deploys a smart contract, by broadcasting the transaction to the network.
|
117
|
+
# @param wallet_id [String] The ID of the wallet the address belongs to.
|
118
|
+
# @param address_id [String] The ID of the address to broadcast the transaction from.
|
119
|
+
# @param smart_contract_id [String] The UUID of the smart contract to broadcast the transaction to.
|
120
|
+
# @param deploy_smart_contract_request [DeploySmartContractRequest]
|
121
|
+
# @param [Hash] opts the optional parameters
|
122
|
+
# @return [Array<(SmartContract, Integer, Hash)>] SmartContract data, response status code and response headers
|
123
|
+
def deploy_smart_contract_with_http_info(wallet_id, address_id, smart_contract_id, deploy_smart_contract_request, opts = {})
|
124
|
+
if @api_client.config.debugging
|
125
|
+
@api_client.config.logger.debug 'Calling API: SmartContractsApi.deploy_smart_contract ...'
|
126
|
+
end
|
127
|
+
# verify the required parameter 'wallet_id' is set
|
128
|
+
if @api_client.config.client_side_validation && wallet_id.nil?
|
129
|
+
fail ArgumentError, "Missing the required parameter 'wallet_id' when calling SmartContractsApi.deploy_smart_contract"
|
130
|
+
end
|
131
|
+
# verify the required parameter 'address_id' is set
|
132
|
+
if @api_client.config.client_side_validation && address_id.nil?
|
133
|
+
fail ArgumentError, "Missing the required parameter 'address_id' when calling SmartContractsApi.deploy_smart_contract"
|
134
|
+
end
|
135
|
+
# verify the required parameter 'smart_contract_id' is set
|
136
|
+
if @api_client.config.client_side_validation && smart_contract_id.nil?
|
137
|
+
fail ArgumentError, "Missing the required parameter 'smart_contract_id' when calling SmartContractsApi.deploy_smart_contract"
|
138
|
+
end
|
139
|
+
# verify the required parameter 'deploy_smart_contract_request' is set
|
140
|
+
if @api_client.config.client_side_validation && deploy_smart_contract_request.nil?
|
141
|
+
fail ArgumentError, "Missing the required parameter 'deploy_smart_contract_request' when calling SmartContractsApi.deploy_smart_contract"
|
142
|
+
end
|
143
|
+
# resource path
|
144
|
+
local_var_path = '/v1/wallets/{wallet_id}/addresses/{address_id}/smart_contracts/{smart_contract_id}/deploy'.sub('{' + 'wallet_id' + '}', CGI.escape(wallet_id.to_s)).sub('{' + 'address_id' + '}', CGI.escape(address_id.to_s)).sub('{' + 'smart_contract_id' + '}', CGI.escape(smart_contract_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(deploy_smart_contract_request)
|
164
|
+
|
165
|
+
# return_type
|
166
|
+
return_type = opts[:debug_return_type] || 'SmartContract'
|
167
|
+
|
168
|
+
# auth_names
|
169
|
+
auth_names = opts[:debug_auth_names] || []
|
170
|
+
|
171
|
+
new_options = opts.merge(
|
172
|
+
:operation => :"SmartContractsApi.deploy_smart_contract",
|
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: SmartContractsApi#deploy_smart_contract\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
184
|
+
end
|
185
|
+
return data, status_code, headers
|
186
|
+
end
|
187
|
+
|
188
|
+
# Get a specific smart contract deployed by address
|
189
|
+
# Get a specific smart contract deployed by address.
|
190
|
+
# @param wallet_id [String] The ID of the wallet the address belongs to.
|
191
|
+
# @param address_id [String] The ID of the address to fetch the smart contract for.
|
192
|
+
# @param smart_contract_id [String] The UUID of the smart contract to fetch.
|
193
|
+
# @param [Hash] opts the optional parameters
|
194
|
+
# @return [SmartContract]
|
195
|
+
def get_smart_contract(wallet_id, address_id, smart_contract_id, opts = {})
|
196
|
+
data, _status_code, _headers = get_smart_contract_with_http_info(wallet_id, address_id, smart_contract_id, opts)
|
197
|
+
data
|
198
|
+
end
|
199
|
+
|
200
|
+
# Get a specific smart contract deployed by address
|
201
|
+
# Get a specific smart contract deployed by address.
|
202
|
+
# @param wallet_id [String] The ID of the wallet the address belongs to.
|
203
|
+
# @param address_id [String] The ID of the address to fetch the smart contract for.
|
204
|
+
# @param smart_contract_id [String] The UUID of the smart contract to fetch.
|
205
|
+
# @param [Hash] opts the optional parameters
|
206
|
+
# @return [Array<(SmartContract, Integer, Hash)>] SmartContract data, response status code and response headers
|
207
|
+
def get_smart_contract_with_http_info(wallet_id, address_id, smart_contract_id, opts = {})
|
208
|
+
if @api_client.config.debugging
|
209
|
+
@api_client.config.logger.debug 'Calling API: SmartContractsApi.get_smart_contract ...'
|
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 SmartContractsApi.get_smart_contract"
|
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 SmartContractsApi.get_smart_contract"
|
218
|
+
end
|
219
|
+
# verify the required parameter 'smart_contract_id' is set
|
220
|
+
if @api_client.config.client_side_validation && smart_contract_id.nil?
|
221
|
+
fail ArgumentError, "Missing the required parameter 'smart_contract_id' when calling SmartContractsApi.get_smart_contract"
|
222
|
+
end
|
223
|
+
# resource path
|
224
|
+
local_var_path = '/v1/wallets/{wallet_id}/addresses/{address_id}/smart_contracts/{smart_contract_id}'.sub('{' + 'wallet_id' + '}', CGI.escape(wallet_id.to_s)).sub('{' + 'address_id' + '}', CGI.escape(address_id.to_s)).sub('{' + 'smart_contract_id' + '}', CGI.escape(smart_contract_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] || 'SmartContract'
|
242
|
+
|
243
|
+
# auth_names
|
244
|
+
auth_names = opts[:debug_auth_names] || []
|
245
|
+
|
246
|
+
new_options = opts.merge(
|
247
|
+
:operation => :"SmartContractsApi.get_smart_contract",
|
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: SmartContractsApi#get_smart_contract\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
259
|
+
end
|
260
|
+
return data, status_code, headers
|
261
|
+
end
|
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.
|
267
|
+
# @param [Hash] opts the optional parameters
|
268
|
+
# @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)
|
271
|
+
data
|
272
|
+
end
|
273
|
+
|
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.
|
278
|
+
# @param [Hash] opts the optional parameters
|
279
|
+
# @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 = {})
|
281
|
+
if @api_client.config.debugging
|
282
|
+
@api_client.config.logger.debug 'Calling API: SmartContractsApi.list_smart_contracts ...'
|
283
|
+
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
|
+
# 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))
|
294
|
+
|
295
|
+
# query parameters
|
296
|
+
query_params = opts[:query_params] || {}
|
297
|
+
|
298
|
+
# header parameters
|
299
|
+
header_params = opts[:header_params] || {}
|
300
|
+
# HTTP header 'Accept' (if needed)
|
301
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
302
|
+
|
303
|
+
# form parameters
|
304
|
+
form_params = opts[:form_params] || {}
|
305
|
+
|
306
|
+
# http body (model)
|
307
|
+
post_body = opts[:debug_body]
|
308
|
+
|
309
|
+
# return_type
|
310
|
+
return_type = opts[:debug_return_type] || 'SmartContractList'
|
311
|
+
|
312
|
+
# auth_names
|
313
|
+
auth_names = opts[:debug_auth_names] || []
|
314
|
+
|
315
|
+
new_options = opts.merge(
|
316
|
+
:operation => :"SmartContractsApi.list_smart_contracts",
|
317
|
+
:header_params => header_params,
|
318
|
+
:query_params => query_params,
|
319
|
+
:form_params => form_params,
|
320
|
+
:body => post_body,
|
321
|
+
:auth_names => auth_names,
|
322
|
+
:return_type => return_type
|
323
|
+
)
|
324
|
+
|
325
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
326
|
+
if @api_client.config.debugging
|
327
|
+
@api_client.config.logger.debug "API called: SmartContractsApi#list_smart_contracts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
328
|
+
end
|
329
|
+
return data, status_code, headers
|
330
|
+
end
|
331
|
+
end
|
332
|
+
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 0.0.1-alpha
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.
|
9
|
+
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?
|
@@ -146,18 +146,10 @@ module Coinbase::Client
|
|
146
146
|
if @api_client.config.client_side_validation && start_time.nil?
|
147
147
|
fail ArgumentError, "Missing the required parameter 'start_time' when calling StakeApi.fetch_historical_staking_balances"
|
148
148
|
end
|
149
|
-
if @api_client.config.client_side_validation && start_time.to_s.length > 5000
|
150
|
-
fail ArgumentError, 'invalid value for "start_time" when calling StakeApi.fetch_historical_staking_balances, the character length must be smaller than or equal to 5000.'
|
151
|
-
end
|
152
|
-
|
153
149
|
# verify the required parameter 'end_time' is set
|
154
150
|
if @api_client.config.client_side_validation && end_time.nil?
|
155
151
|
fail ArgumentError, "Missing the required parameter 'end_time' when calling StakeApi.fetch_historical_staking_balances"
|
156
152
|
end
|
157
|
-
if @api_client.config.client_side_validation && end_time.to_s.length > 5000
|
158
|
-
fail ArgumentError, 'invalid value for "end_time" when calling StakeApi.fetch_historical_staking_balances, the character length must be smaller than or equal to 5000.'
|
159
|
-
end
|
160
|
-
|
161
153
|
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'].to_s.length > 5000
|
162
154
|
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling StakeApi.fetch_historical_staking_balances, the character length must be smaller than or equal to 5000.'
|
163
155
|
end
|
@@ -176,7 +168,7 @@ module Coinbase::Client
|
|
176
168
|
# header parameters
|
177
169
|
header_params = opts[:header_params] || {}
|
178
170
|
# HTTP header 'Accept' (if needed)
|
179
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
171
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
180
172
|
|
181
173
|
# form parameters
|
182
174
|
form_params = opts[:form_params] || {}
|
@@ -249,7 +241,7 @@ module Coinbase::Client
|
|
249
241
|
# header parameters
|
250
242
|
header_params = opts[:header_params] || {}
|
251
243
|
# HTTP header 'Accept' (if needed)
|
252
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
244
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
253
245
|
# HTTP header 'Content-Type'
|
254
246
|
content_type = @api_client.select_header_content_type(['application/json'])
|
255
247
|
if !content_type.nil?
|
@@ -329,7 +321,7 @@ module Coinbase::Client
|
|
329
321
|
# header parameters
|
330
322
|
header_params = opts[:header_params] || {}
|
331
323
|
# HTTP header 'Accept' (if needed)
|
332
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
324
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
333
325
|
|
334
326
|
# form parameters
|
335
327
|
form_params = opts[:form_params] || {}
|
@@ -392,7 +384,7 @@ module Coinbase::Client
|
|
392
384
|
# header parameters
|
393
385
|
header_params = opts[:header_params] || {}
|
394
386
|
# HTTP header 'Accept' (if needed)
|
395
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
387
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
396
388
|
# HTTP header 'Content-Type'
|
397
389
|
content_type = @api_client.select_header_content_type(['application/json'])
|
398
390
|
if !content_type.nil?
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 0.0.1-alpha
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.
|
9
|
+
Generator version: 7.8.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -69,7 +69,7 @@ module Coinbase::Client
|
|
69
69
|
# header parameters
|
70
70
|
header_params = opts[:header_params] || {}
|
71
71
|
# HTTP header 'Accept' (if needed)
|
72
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
72
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
73
73
|
# HTTP header 'Content-Type'
|
74
74
|
content_type = @api_client.select_header_content_type(['application/json'])
|
75
75
|
if !content_type.nil?
|
@@ -149,7 +149,7 @@ module Coinbase::Client
|
|
149
149
|
# header parameters
|
150
150
|
header_params = opts[:header_params] || {}
|
151
151
|
# HTTP header 'Accept' (if needed)
|
152
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
152
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
153
153
|
# HTTP header 'Content-Type'
|
154
154
|
content_type = @api_client.select_header_content_type(['application/json'])
|
155
155
|
if !content_type.nil?
|
@@ -229,7 +229,7 @@ module Coinbase::Client
|
|
229
229
|
# header parameters
|
230
230
|
header_params = opts[:header_params] || {}
|
231
231
|
# HTTP header 'Accept' (if needed)
|
232
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
232
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
233
233
|
|
234
234
|
# form parameters
|
235
235
|
form_params = opts[:form_params] || {}
|
@@ -308,7 +308,7 @@ module Coinbase::Client
|
|
308
308
|
# header parameters
|
309
309
|
header_params = opts[:header_params] || {}
|
310
310
|
# HTTP header 'Accept' (if needed)
|
311
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
311
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
312
312
|
|
313
313
|
# form parameters
|
314
314
|
form_params = opts[:form_params] || {}
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 0.0.1-alpha
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.
|
9
|
+
Generator version: 7.8.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -69,7 +69,7 @@ module Coinbase::Client
|
|
69
69
|
# header parameters
|
70
70
|
header_params = opts[:header_params] || {}
|
71
71
|
# HTTP header 'Accept' (if needed)
|
72
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
72
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
73
73
|
# HTTP header 'Content-Type'
|
74
74
|
content_type = @api_client.select_header_content_type(['application/json'])
|
75
75
|
if !content_type.nil?
|
@@ -149,7 +149,7 @@ module Coinbase::Client
|
|
149
149
|
# header parameters
|
150
150
|
header_params = opts[:header_params] || {}
|
151
151
|
# HTTP header 'Accept' (if needed)
|
152
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
152
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
153
153
|
# HTTP header 'Content-Type'
|
154
154
|
content_type = @api_client.select_header_content_type(['application/json'])
|
155
155
|
if !content_type.nil?
|
@@ -229,7 +229,7 @@ module Coinbase::Client
|
|
229
229
|
# header parameters
|
230
230
|
header_params = opts[:header_params] || {}
|
231
231
|
# HTTP header 'Accept' (if needed)
|
232
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
232
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
233
233
|
|
234
234
|
# form parameters
|
235
235
|
form_params = opts[:form_params] || {}
|
@@ -308,7 +308,7 @@ module Coinbase::Client
|
|
308
308
|
# header parameters
|
309
309
|
header_params = opts[:header_params] || {}
|
310
310
|
# HTTP header 'Accept' (if needed)
|
311
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
311
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
312
312
|
|
313
313
|
# form parameters
|
314
314
|
form_params = opts[:form_params] || {}
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 0.0.1-alpha
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.
|
9
|
+
Generator version: 7.8.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -45,7 +45,7 @@ module Coinbase::Client
|
|
45
45
|
# header parameters
|
46
46
|
header_params = opts[:header_params] || {}
|
47
47
|
# HTTP header 'Accept' (if needed)
|
48
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
49
49
|
|
50
50
|
# form parameters
|
51
51
|
form_params = opts[:form_params] || {}
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 0.0.1-alpha
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.
|
9
|
+
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] || {}
|
@@ -145,7 +145,7 @@ module Coinbase::Client
|
|
145
145
|
# header parameters
|
146
146
|
header_params = opts[:header_params] || {}
|
147
147
|
# HTTP header 'Accept' (if needed)
|
148
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
148
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
149
149
|
|
150
150
|
# form parameters
|
151
151
|
form_params = opts[:form_params] || {}
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 0.0.1-alpha
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.
|
9
|
+
Generator version: 7.8.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -69,7 +69,7 @@ module Coinbase::Client
|
|
69
69
|
# header parameters
|
70
70
|
header_params = opts[:header_params] || {}
|
71
71
|
# HTTP header 'Accept' (if needed)
|
72
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
72
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
73
73
|
# HTTP header 'Content-Type'
|
74
74
|
content_type = @api_client.select_header_content_type(['application/json'])
|
75
75
|
if !content_type.nil?
|
@@ -149,7 +149,7 @@ module Coinbase::Client
|
|
149
149
|
# header parameters
|
150
150
|
header_params = opts[:header_params] || {}
|
151
151
|
# HTTP header 'Accept' (if needed)
|
152
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
152
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
153
153
|
# HTTP header 'Content-Type'
|
154
154
|
content_type = @api_client.select_header_content_type(['application/json'])
|
155
155
|
if !content_type.nil?
|
@@ -229,7 +229,7 @@ module Coinbase::Client
|
|
229
229
|
# header parameters
|
230
230
|
header_params = opts[:header_params] || {}
|
231
231
|
# HTTP header 'Accept' (if needed)
|
232
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
232
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
233
233
|
|
234
234
|
# form parameters
|
235
235
|
form_params = opts[:form_params] || {}
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 0.0.1-alpha
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.
|
9
|
+
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] || {}
|
@@ -184,7 +184,7 @@ module Coinbase::Client
|
|
184
184
|
# header parameters
|
185
185
|
header_params = opts[:header_params] || {}
|
186
186
|
# HTTP header 'Accept' (if needed)
|
187
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
187
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
188
188
|
|
189
189
|
# form parameters
|
190
190
|
form_params = opts[:form_params] || {}
|
@@ -247,7 +247,7 @@ module Coinbase::Client
|
|
247
247
|
# header parameters
|
248
248
|
header_params = opts[:header_params] || {}
|
249
249
|
# HTTP header 'Accept' (if needed)
|
250
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
250
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
251
251
|
|
252
252
|
# form parameters
|
253
253
|
form_params = opts[:form_params] || {}
|
@@ -314,7 +314,7 @@ module Coinbase::Client
|
|
314
314
|
# header parameters
|
315
315
|
header_params = opts[:header_params] || {}
|
316
316
|
# HTTP header 'Accept' (if needed)
|
317
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
317
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
318
318
|
|
319
319
|
# form parameters
|
320
320
|
form_params = opts[:form_params] || {}
|