coinbase-sdk 0.2.0 → 0.3.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 +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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d296ec1c6b60e1074b171eb5d32135a3942be0266348e42e101290b283039b9d
|
4
|
+
data.tar.gz: 1d0115be59726c67bb29e0b6415e1e20c211a82a2d8330490c56e8e0255e3f74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53d7ed283905e7336527d319b1a5ec025a912fc6f90beadd4de75aefaf8774d93d17a4767e40b04a4a45b306c99d11ec3f08cb64c1a78d503dd2a2b8fc1e1e1d
|
7
|
+
data.tar.gz: 46ae9c2699993a68c51cb5a1941733810429372c5cb41e08ccb1e4f0628f3366b8862604235d376970120057252a35ea77c9ef64ad9581b7925ead4bc5d8d979
|
@@ -95,6 +95,51 @@ module Coinbase
|
|
95
95
|
trade
|
96
96
|
end
|
97
97
|
|
98
|
+
# Invokes a contract method on the specified contract address, with the given ABI and arguments.
|
99
|
+
# @param contract_address [String] The address of the contract to invoke.
|
100
|
+
# @param abi [Array<Hash>] The ABI of the contract to invoke.
|
101
|
+
# @param method [String] The method to invoke on the contract.
|
102
|
+
# @param args [Hash] The arguments to pass to the contract method.
|
103
|
+
# The keys should be the argument names, and the values should be the argument values.
|
104
|
+
# @return [Coinbase::ContractInvocation] The contract invocation object.
|
105
|
+
def invoke_contract(contract_address:, abi:, method:, args:)
|
106
|
+
ensure_can_sign!
|
107
|
+
|
108
|
+
invocation = ContractInvocation.create(
|
109
|
+
address_id: id,
|
110
|
+
wallet_id: wallet_id,
|
111
|
+
contract_address: contract_address,
|
112
|
+
abi: abi,
|
113
|
+
method: method,
|
114
|
+
args: args
|
115
|
+
)
|
116
|
+
|
117
|
+
# If a server signer is managing keys, it will sign and broadcast the underlying transaction out of band.
|
118
|
+
return invocation if Coinbase.use_server_signer?
|
119
|
+
|
120
|
+
invocation.sign(@key)
|
121
|
+
invocation.broadcast!
|
122
|
+
invocation
|
123
|
+
end
|
124
|
+
|
125
|
+
# Signs the given unsigned payload.
|
126
|
+
# @param unsigned_payload [String] The hex-encoded hashed unsigned payload for the Address to sign.
|
127
|
+
# @return [Coinbase::PayloadSignature] The payload signature
|
128
|
+
def sign_payload(unsigned_payload:)
|
129
|
+
ensure_can_sign!
|
130
|
+
|
131
|
+
unless Coinbase.use_server_signer?
|
132
|
+
signature = Eth::Util.prefix_hex(@key.sign(Eth::Util.hex_to_bin(unsigned_payload)))
|
133
|
+
end
|
134
|
+
|
135
|
+
PayloadSignature.create(
|
136
|
+
wallet_id: wallet_id,
|
137
|
+
address_id: id,
|
138
|
+
unsigned_payload: unsigned_payload,
|
139
|
+
signature: signature
|
140
|
+
)
|
141
|
+
end
|
142
|
+
|
98
143
|
# Stakes the given amount of the given Asset. The stake operation
|
99
144
|
# may take a few minutes to complete in the case when infrastructure is spun up.
|
100
145
|
# @param amount [Integer, Float, BigDecimal] The amount of the Asset to stake.
|
@@ -179,6 +224,14 @@ module Coinbase
|
|
179
224
|
Trade.list(wallet_id: wallet_id, address_id: id)
|
180
225
|
end
|
181
226
|
|
227
|
+
# Enumerates the payload signatures associated with the address.
|
228
|
+
# The result is an enumerator that lazily fetches from the server, and can be iterated over,
|
229
|
+
# converted to an array, etc...
|
230
|
+
# @return [Enumerable<Coinbase::PayloadSignature>] Enumerator that returns the address's payload signatures
|
231
|
+
def payload_signatures
|
232
|
+
PayloadSignature.list(wallet_id: wallet_id, address_id: id)
|
233
|
+
end
|
234
|
+
|
182
235
|
# Returns a String representation of the WalletAddress.
|
183
236
|
# @return [String] a String representation of the WalletAddress
|
184
237
|
def to_s
|
data/lib/coinbase/address.rb
CHANGED
@@ -72,6 +72,18 @@ module Coinbase
|
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
75
|
+
# Enumerates the transactions of address.
|
76
|
+
# The result is an enumerator that lazily fetches from the server, and can be iterated over,
|
77
|
+
# converted to an array, etc...
|
78
|
+
# @return [Enumerable<Coinbase::HistoricalBalance>] Enumerator that returns historical_balance
|
79
|
+
def transactions
|
80
|
+
Coinbase::Pagination.enumerate(
|
81
|
+
->(page) { list_transaction_page(page) }
|
82
|
+
) do |transaction|
|
83
|
+
Coinbase::Transaction.new(transaction)
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
75
87
|
# Requests funds for the address from the faucet and returns the faucet transaction.
|
76
88
|
# This is only supported on testnet networks.
|
77
89
|
# @param asset_id [Symbol] The ID of the Asset to transfer to the wallet.
|
@@ -248,5 +260,13 @@ module Coinbase
|
|
248
260
|
{ limit: DEFAULT_PAGE_LIMIT, page: page }
|
249
261
|
)
|
250
262
|
end
|
263
|
+
|
264
|
+
def list_transaction_page(page)
|
265
|
+
addresses_api.list_address_transactions(
|
266
|
+
network.normalized_id,
|
267
|
+
id,
|
268
|
+
{ limit: DEFAULT_TRANSACTION_PAGE_LIMIT, page: page }
|
269
|
+
)
|
270
|
+
end
|
251
271
|
end
|
252
272
|
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
|
|
@@ -89,6 +89,82 @@ module Coinbase::Client
|
|
89
89
|
return data, status_code, headers
|
90
90
|
end
|
91
91
|
|
92
|
+
# Create a new payload signature.
|
93
|
+
# Create a new payload signature with an address.
|
94
|
+
# @param wallet_id [String] The ID of the wallet the address belongs to.
|
95
|
+
# @param address_id [String] The onchain address of the address to sign the payload with.
|
96
|
+
# @param [Hash] opts the optional parameters
|
97
|
+
# @option opts [CreatePayloadSignatureRequest] :create_payload_signature_request
|
98
|
+
# @return [PayloadSignature]
|
99
|
+
def create_payload_signature(wallet_id, address_id, opts = {})
|
100
|
+
data, _status_code, _headers = create_payload_signature_with_http_info(wallet_id, address_id, opts)
|
101
|
+
data
|
102
|
+
end
|
103
|
+
|
104
|
+
# Create a new payload signature.
|
105
|
+
# Create a new payload signature with an address.
|
106
|
+
# @param wallet_id [String] The ID of the wallet the address belongs to.
|
107
|
+
# @param address_id [String] The onchain address of the address to sign the payload with.
|
108
|
+
# @param [Hash] opts the optional parameters
|
109
|
+
# @option opts [CreatePayloadSignatureRequest] :create_payload_signature_request
|
110
|
+
# @return [Array<(PayloadSignature, Integer, Hash)>] PayloadSignature data, response status code and response headers
|
111
|
+
def create_payload_signature_with_http_info(wallet_id, address_id, opts = {})
|
112
|
+
if @api_client.config.debugging
|
113
|
+
@api_client.config.logger.debug 'Calling API: AddressesApi.create_payload_signature ...'
|
114
|
+
end
|
115
|
+
# verify the required parameter 'wallet_id' is set
|
116
|
+
if @api_client.config.client_side_validation && wallet_id.nil?
|
117
|
+
fail ArgumentError, "Missing the required parameter 'wallet_id' when calling AddressesApi.create_payload_signature"
|
118
|
+
end
|
119
|
+
# verify the required parameter 'address_id' is set
|
120
|
+
if @api_client.config.client_side_validation && address_id.nil?
|
121
|
+
fail ArgumentError, "Missing the required parameter 'address_id' when calling AddressesApi.create_payload_signature"
|
122
|
+
end
|
123
|
+
# resource path
|
124
|
+
local_var_path = '/v1/wallets/{wallet_id}/addresses/{address_id}/payload_signatures'.sub('{' + 'wallet_id' + '}', CGI.escape(wallet_id.to_s)).sub('{' + 'address_id' + '}', CGI.escape(address_id.to_s))
|
125
|
+
|
126
|
+
# query parameters
|
127
|
+
query_params = opts[:query_params] || {}
|
128
|
+
|
129
|
+
# header parameters
|
130
|
+
header_params = opts[:header_params] || {}
|
131
|
+
# HTTP header 'Accept' (if needed)
|
132
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
133
|
+
# HTTP header 'Content-Type'
|
134
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
135
|
+
if !content_type.nil?
|
136
|
+
header_params['Content-Type'] = content_type
|
137
|
+
end
|
138
|
+
|
139
|
+
# form parameters
|
140
|
+
form_params = opts[:form_params] || {}
|
141
|
+
|
142
|
+
# http body (model)
|
143
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_payload_signature_request'])
|
144
|
+
|
145
|
+
# return_type
|
146
|
+
return_type = opts[:debug_return_type] || 'PayloadSignature'
|
147
|
+
|
148
|
+
# auth_names
|
149
|
+
auth_names = opts[:debug_auth_names] || []
|
150
|
+
|
151
|
+
new_options = opts.merge(
|
152
|
+
:operation => :"AddressesApi.create_payload_signature",
|
153
|
+
:header_params => header_params,
|
154
|
+
:query_params => query_params,
|
155
|
+
:form_params => form_params,
|
156
|
+
:body => post_body,
|
157
|
+
:auth_names => auth_names,
|
158
|
+
:return_type => return_type
|
159
|
+
)
|
160
|
+
|
161
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
162
|
+
if @api_client.config.debugging
|
163
|
+
@api_client.config.logger.debug "API called: AddressesApi#create_payload_signature\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
164
|
+
end
|
165
|
+
return data, status_code, headers
|
166
|
+
end
|
167
|
+
|
92
168
|
# Get address by onchain address
|
93
169
|
# Get address
|
94
170
|
# @param wallet_id [String] The ID of the wallet the address belongs to.
|
@@ -233,6 +309,81 @@ module Coinbase::Client
|
|
233
309
|
return data, status_code, headers
|
234
310
|
end
|
235
311
|
|
312
|
+
# Get payload signature.
|
313
|
+
# Get payload signature.
|
314
|
+
# @param wallet_id [String] The ID of the wallet the address belongs to.
|
315
|
+
# @param address_id [String] The onchain address of the address that signed the payload.
|
316
|
+
# @param payload_signature_id [String] The ID of the payload signature to fetch.
|
317
|
+
# @param [Hash] opts the optional parameters
|
318
|
+
# @return [PayloadSignature]
|
319
|
+
def get_payload_signature(wallet_id, address_id, payload_signature_id, opts = {})
|
320
|
+
data, _status_code, _headers = get_payload_signature_with_http_info(wallet_id, address_id, payload_signature_id, opts)
|
321
|
+
data
|
322
|
+
end
|
323
|
+
|
324
|
+
# Get payload signature.
|
325
|
+
# Get payload signature.
|
326
|
+
# @param wallet_id [String] The ID of the wallet the address belongs to.
|
327
|
+
# @param address_id [String] The onchain address of the address that signed the payload.
|
328
|
+
# @param payload_signature_id [String] The ID of the payload signature to fetch.
|
329
|
+
# @param [Hash] opts the optional parameters
|
330
|
+
# @return [Array<(PayloadSignature, Integer, Hash)>] PayloadSignature data, response status code and response headers
|
331
|
+
def get_payload_signature_with_http_info(wallet_id, address_id, payload_signature_id, opts = {})
|
332
|
+
if @api_client.config.debugging
|
333
|
+
@api_client.config.logger.debug 'Calling API: AddressesApi.get_payload_signature ...'
|
334
|
+
end
|
335
|
+
# verify the required parameter 'wallet_id' is set
|
336
|
+
if @api_client.config.client_side_validation && wallet_id.nil?
|
337
|
+
fail ArgumentError, "Missing the required parameter 'wallet_id' when calling AddressesApi.get_payload_signature"
|
338
|
+
end
|
339
|
+
# verify the required parameter 'address_id' is set
|
340
|
+
if @api_client.config.client_side_validation && address_id.nil?
|
341
|
+
fail ArgumentError, "Missing the required parameter 'address_id' when calling AddressesApi.get_payload_signature"
|
342
|
+
end
|
343
|
+
# verify the required parameter 'payload_signature_id' is set
|
344
|
+
if @api_client.config.client_side_validation && payload_signature_id.nil?
|
345
|
+
fail ArgumentError, "Missing the required parameter 'payload_signature_id' when calling AddressesApi.get_payload_signature"
|
346
|
+
end
|
347
|
+
# resource path
|
348
|
+
local_var_path = '/v1/wallets/{wallet_id}/addresses/{address_id}/payload_signatures/{payload_signature_id}'.sub('{' + 'wallet_id' + '}', CGI.escape(wallet_id.to_s)).sub('{' + 'address_id' + '}', CGI.escape(address_id.to_s)).sub('{' + 'payload_signature_id' + '}', CGI.escape(payload_signature_id.to_s))
|
349
|
+
|
350
|
+
# query parameters
|
351
|
+
query_params = opts[:query_params] || {}
|
352
|
+
|
353
|
+
# header parameters
|
354
|
+
header_params = opts[:header_params] || {}
|
355
|
+
# HTTP header 'Accept' (if needed)
|
356
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
357
|
+
|
358
|
+
# form parameters
|
359
|
+
form_params = opts[:form_params] || {}
|
360
|
+
|
361
|
+
# http body (model)
|
362
|
+
post_body = opts[:debug_body]
|
363
|
+
|
364
|
+
# return_type
|
365
|
+
return_type = opts[:debug_return_type] || 'PayloadSignature'
|
366
|
+
|
367
|
+
# auth_names
|
368
|
+
auth_names = opts[:debug_auth_names] || []
|
369
|
+
|
370
|
+
new_options = opts.merge(
|
371
|
+
:operation => :"AddressesApi.get_payload_signature",
|
372
|
+
:header_params => header_params,
|
373
|
+
:query_params => query_params,
|
374
|
+
:form_params => form_params,
|
375
|
+
:body => post_body,
|
376
|
+
:auth_names => auth_names,
|
377
|
+
:return_type => return_type
|
378
|
+
)
|
379
|
+
|
380
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
381
|
+
if @api_client.config.debugging
|
382
|
+
@api_client.config.logger.debug "API called: AddressesApi#get_payload_signature\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
383
|
+
end
|
384
|
+
return data, status_code, headers
|
385
|
+
end
|
386
|
+
|
236
387
|
# Get all balances for address
|
237
388
|
# Get address balances
|
238
389
|
# @param wallet_id [String] The ID of the wallet to fetch the balances for
|
@@ -382,6 +533,85 @@ module Coinbase::Client
|
|
382
533
|
return data, status_code, headers
|
383
534
|
end
|
384
535
|
|
536
|
+
# List payload signatures for an address.
|
537
|
+
# List payload signatures for an address.
|
538
|
+
# @param wallet_id [String] The ID of the wallet the address belongs to.
|
539
|
+
# @param address_id [String] The onchain address of the address whose payload signatures to fetch.
|
540
|
+
# @param [Hash] opts the optional parameters
|
541
|
+
# @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.
|
542
|
+
# @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.
|
543
|
+
# @return [PayloadSignatureList]
|
544
|
+
def list_payload_signatures(wallet_id, address_id, opts = {})
|
545
|
+
data, _status_code, _headers = list_payload_signatures_with_http_info(wallet_id, address_id, opts)
|
546
|
+
data
|
547
|
+
end
|
548
|
+
|
549
|
+
# List payload signatures for an address.
|
550
|
+
# List payload signatures for an address.
|
551
|
+
# @param wallet_id [String] The ID of the wallet the address belongs to.
|
552
|
+
# @param address_id [String] The onchain address of the address whose payload signatures to fetch.
|
553
|
+
# @param [Hash] opts the optional parameters
|
554
|
+
# @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.
|
555
|
+
# @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.
|
556
|
+
# @return [Array<(PayloadSignatureList, Integer, Hash)>] PayloadSignatureList data, response status code and response headers
|
557
|
+
def list_payload_signatures_with_http_info(wallet_id, address_id, opts = {})
|
558
|
+
if @api_client.config.debugging
|
559
|
+
@api_client.config.logger.debug 'Calling API: AddressesApi.list_payload_signatures ...'
|
560
|
+
end
|
561
|
+
# verify the required parameter 'wallet_id' is set
|
562
|
+
if @api_client.config.client_side_validation && wallet_id.nil?
|
563
|
+
fail ArgumentError, "Missing the required parameter 'wallet_id' when calling AddressesApi.list_payload_signatures"
|
564
|
+
end
|
565
|
+
# verify the required parameter 'address_id' is set
|
566
|
+
if @api_client.config.client_side_validation && address_id.nil?
|
567
|
+
fail ArgumentError, "Missing the required parameter 'address_id' when calling AddressesApi.list_payload_signatures"
|
568
|
+
end
|
569
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'].to_s.length > 5000
|
570
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AddressesApi.list_payload_signatures, the character length must be smaller than or equal to 5000.'
|
571
|
+
end
|
572
|
+
|
573
|
+
# resource path
|
574
|
+
local_var_path = '/v1/wallets/{wallet_id}/addresses/{address_id}/payload_signatures'.sub('{' + 'wallet_id' + '}', CGI.escape(wallet_id.to_s)).sub('{' + 'address_id' + '}', CGI.escape(address_id.to_s))
|
575
|
+
|
576
|
+
# query parameters
|
577
|
+
query_params = opts[:query_params] || {}
|
578
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
579
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
580
|
+
|
581
|
+
# header parameters
|
582
|
+
header_params = opts[:header_params] || {}
|
583
|
+
# HTTP header 'Accept' (if needed)
|
584
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
585
|
+
|
586
|
+
# form parameters
|
587
|
+
form_params = opts[:form_params] || {}
|
588
|
+
|
589
|
+
# http body (model)
|
590
|
+
post_body = opts[:debug_body]
|
591
|
+
|
592
|
+
# return_type
|
593
|
+
return_type = opts[:debug_return_type] || 'PayloadSignatureList'
|
594
|
+
|
595
|
+
# auth_names
|
596
|
+
auth_names = opts[:debug_auth_names] || []
|
597
|
+
|
598
|
+
new_options = opts.merge(
|
599
|
+
:operation => :"AddressesApi.list_payload_signatures",
|
600
|
+
:header_params => header_params,
|
601
|
+
:query_params => query_params,
|
602
|
+
:form_params => form_params,
|
603
|
+
:body => post_body,
|
604
|
+
:auth_names => auth_names,
|
605
|
+
:return_type => return_type
|
606
|
+
)
|
607
|
+
|
608
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
609
|
+
if @api_client.config.debugging
|
610
|
+
@api_client.config.logger.debug "API called: AddressesApi#list_payload_signatures\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
611
|
+
end
|
612
|
+
return data, status_code, headers
|
613
|
+
end
|
614
|
+
|
385
615
|
# Request faucet funds for onchain address.
|
386
616
|
# Request faucet funds to be sent to onchain address.
|
387
617
|
# @param wallet_id [String] The ID of the wallet the address belongs to.
|
@@ -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
|
|