coinbase-sdk 0.3.0 → 0.5.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 +10 -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/stake_api.rb +6 -6
- 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/validators_api.rb +7 -7
- data/lib/coinbase/client/api/wallet_stake_api.rb +4 -4
- data/lib/coinbase/client/api/wallets_api.rb +10 -10
- 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_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 +1 -1
- data/lib/coinbase/client/models/erc20_transfer_event.rb +336 -0
- data/lib/coinbase/client/models/{user.rb → erc721_transfer_event.rb} +130 -25
- 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/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/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 +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 +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 +1 -1
- data/lib/coinbase/client/models/webhook_event_filter.rb +4 -4
- 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 +4 -3
- data/lib/coinbase/contract_invocation.rb +26 -1
- data/lib/coinbase/version.rb +1 -1
- metadata +5 -5
- data/lib/coinbase/client/api/users_api.rb +0 -79
- data/lib/coinbase/client/models/feature.rb +0 -43
|
@@ -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
|
|
|
@@ -14,17 +14,63 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Coinbase::Client
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
# Represents an event triggered by an ERC-721 token transfer on the blockchain. Contains information about the transaction, block, and involved addresses.
|
|
18
|
+
class ERC721TransferEvent
|
|
19
|
+
# Unique identifier for the webhook that triggered this event.
|
|
20
|
+
attr_accessor :webhook_id
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
# Type of event, in this case, an ERC-721 token transfer.
|
|
23
|
+
attr_accessor :event_type
|
|
24
|
+
|
|
25
|
+
# Blockchain network where the event occurred.
|
|
26
|
+
attr_accessor :network
|
|
27
|
+
|
|
28
|
+
# Hash of the block containing the transaction.
|
|
29
|
+
attr_accessor :block_hash
|
|
30
|
+
|
|
31
|
+
# Number of the block containing the transaction.
|
|
32
|
+
attr_accessor :block_number
|
|
33
|
+
|
|
34
|
+
# Timestamp when the block was mined.
|
|
35
|
+
attr_accessor :block_time
|
|
36
|
+
|
|
37
|
+
# Hash of the transaction that triggered the event.
|
|
38
|
+
attr_accessor :transaction_hash
|
|
39
|
+
|
|
40
|
+
# Position of the transaction within the block.
|
|
41
|
+
attr_accessor :transaction_index
|
|
42
|
+
|
|
43
|
+
# Position of the event log within the transaction.
|
|
44
|
+
attr_accessor :log_index
|
|
45
|
+
|
|
46
|
+
# Address of the ERC-721 token contract.
|
|
47
|
+
attr_accessor :contract_address
|
|
48
|
+
|
|
49
|
+
# Address of the sender in the token transfer.
|
|
50
|
+
attr_accessor :from
|
|
51
|
+
|
|
52
|
+
# Address of the recipient in the token transfer.
|
|
53
|
+
attr_accessor :to
|
|
54
|
+
|
|
55
|
+
# Unique identifier of the NFT being transferred.
|
|
56
|
+
attr_accessor :token_id
|
|
22
57
|
|
|
23
58
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
59
|
def self.attribute_map
|
|
25
60
|
{
|
|
26
|
-
:'
|
|
27
|
-
:'
|
|
61
|
+
:'webhook_id' => :'webhookId',
|
|
62
|
+
:'event_type' => :'eventType',
|
|
63
|
+
:'network' => :'network',
|
|
64
|
+
:'block_hash' => :'blockHash',
|
|
65
|
+
:'block_number' => :'blockNumber',
|
|
66
|
+
:'block_time' => :'blockTime',
|
|
67
|
+
:'transaction_hash' => :'transactionHash',
|
|
68
|
+
:'transaction_index' => :'transactionIndex',
|
|
69
|
+
:'log_index' => :'logIndex',
|
|
70
|
+
:'contract_address' => :'contractAddress',
|
|
71
|
+
:'from' => :'from',
|
|
72
|
+
:'to' => :'to',
|
|
73
|
+
:'token_id' => :'tokenId'
|
|
28
74
|
}
|
|
29
75
|
end
|
|
30
76
|
|
|
@@ -36,8 +82,19 @@ module Coinbase::Client
|
|
|
36
82
|
# Attribute type mapping.
|
|
37
83
|
def self.openapi_types
|
|
38
84
|
{
|
|
39
|
-
:'
|
|
40
|
-
:'
|
|
85
|
+
:'webhook_id' => :'String',
|
|
86
|
+
:'event_type' => :'String',
|
|
87
|
+
:'network' => :'String',
|
|
88
|
+
:'block_hash' => :'String',
|
|
89
|
+
:'block_number' => :'Integer',
|
|
90
|
+
:'block_time' => :'Time',
|
|
91
|
+
:'transaction_hash' => :'String',
|
|
92
|
+
:'transaction_index' => :'Integer',
|
|
93
|
+
:'log_index' => :'Integer',
|
|
94
|
+
:'contract_address' => :'String',
|
|
95
|
+
:'from' => :'String',
|
|
96
|
+
:'to' => :'String',
|
|
97
|
+
:'token_id' => :'String'
|
|
41
98
|
}
|
|
42
99
|
end
|
|
43
100
|
|
|
@@ -51,25 +108,67 @@ module Coinbase::Client
|
|
|
51
108
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
109
|
def initialize(attributes = {})
|
|
53
110
|
if (!attributes.is_a?(Hash))
|
|
54
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Coinbase::Client::
|
|
111
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Coinbase::Client::ERC721TransferEvent` initialize method"
|
|
55
112
|
end
|
|
56
113
|
|
|
57
114
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
115
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
59
116
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
60
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Coinbase::Client::
|
|
117
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Coinbase::Client::ERC721TransferEvent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
61
118
|
end
|
|
62
119
|
h[k.to_sym] = v
|
|
63
120
|
}
|
|
64
121
|
|
|
65
|
-
if attributes.key?(:'
|
|
66
|
-
self.
|
|
67
|
-
|
|
68
|
-
|
|
122
|
+
if attributes.key?(:'webhook_id')
|
|
123
|
+
self.webhook_id = attributes[:'webhook_id']
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if attributes.key?(:'event_type')
|
|
127
|
+
self.event_type = attributes[:'event_type']
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if attributes.key?(:'network')
|
|
131
|
+
self.network = attributes[:'network']
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if attributes.key?(:'block_hash')
|
|
135
|
+
self.block_hash = attributes[:'block_hash']
|
|
69
136
|
end
|
|
70
137
|
|
|
71
|
-
if attributes.key?(:'
|
|
72
|
-
self.
|
|
138
|
+
if attributes.key?(:'block_number')
|
|
139
|
+
self.block_number = attributes[:'block_number']
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if attributes.key?(:'block_time')
|
|
143
|
+
self.block_time = attributes[:'block_time']
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
if attributes.key?(:'transaction_hash')
|
|
147
|
+
self.transaction_hash = attributes[:'transaction_hash']
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
if attributes.key?(:'transaction_index')
|
|
151
|
+
self.transaction_index = attributes[:'transaction_index']
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
if attributes.key?(:'log_index')
|
|
155
|
+
self.log_index = attributes[:'log_index']
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
if attributes.key?(:'contract_address')
|
|
159
|
+
self.contract_address = attributes[:'contract_address']
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
if attributes.key?(:'from')
|
|
163
|
+
self.from = attributes[:'from']
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
if attributes.key?(:'to')
|
|
167
|
+
self.to = attributes[:'to']
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
if attributes.key?(:'token_id')
|
|
171
|
+
self.token_id = attributes[:'token_id']
|
|
73
172
|
end
|
|
74
173
|
end
|
|
75
174
|
|
|
@@ -78,10 +177,6 @@ module Coinbase::Client
|
|
|
78
177
|
def list_invalid_properties
|
|
79
178
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
80
179
|
invalid_properties = Array.new
|
|
81
|
-
if @id.nil?
|
|
82
|
-
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
83
|
-
end
|
|
84
|
-
|
|
85
180
|
invalid_properties
|
|
86
181
|
end
|
|
87
182
|
|
|
@@ -89,7 +184,6 @@ module Coinbase::Client
|
|
|
89
184
|
# @return true if the model is valid
|
|
90
185
|
def valid?
|
|
91
186
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
92
|
-
return false if @id.nil?
|
|
93
187
|
true
|
|
94
188
|
end
|
|
95
189
|
|
|
@@ -98,8 +192,19 @@ module Coinbase::Client
|
|
|
98
192
|
def ==(o)
|
|
99
193
|
return true if self.equal?(o)
|
|
100
194
|
self.class == o.class &&
|
|
101
|
-
|
|
102
|
-
|
|
195
|
+
webhook_id == o.webhook_id &&
|
|
196
|
+
event_type == o.event_type &&
|
|
197
|
+
network == o.network &&
|
|
198
|
+
block_hash == o.block_hash &&
|
|
199
|
+
block_number == o.block_number &&
|
|
200
|
+
block_time == o.block_time &&
|
|
201
|
+
transaction_hash == o.transaction_hash &&
|
|
202
|
+
transaction_index == o.transaction_index &&
|
|
203
|
+
log_index == o.log_index &&
|
|
204
|
+
contract_address == o.contract_address &&
|
|
205
|
+
from == o.from &&
|
|
206
|
+
to == o.to &&
|
|
207
|
+
token_id == o.token_id
|
|
103
208
|
end
|
|
104
209
|
|
|
105
210
|
# @see the `==` method
|
|
@@ -111,7 +216,7 @@ module Coinbase::Client
|
|
|
111
216
|
# Calculates hash code according to all attributes.
|
|
112
217
|
# @return [Integer] Hash code
|
|
113
218
|
def hash
|
|
114
|
-
[
|
|
219
|
+
[webhook_id, event_type, network, block_hash, block_number, block_time, transaction_hash, transaction_index, log_index, contract_address, from, to, token_id].hash
|
|
115
220
|
end
|
|
116
221
|
|
|
117
222
|
# Builds the object from hash
|
|
@@ -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
|
|
|
@@ -22,11 +22,15 @@ module Coinbase::Client
|
|
|
22
22
|
# A human-readable message providing more details about the error.
|
|
23
23
|
attr_accessor :message
|
|
24
24
|
|
|
25
|
+
# A unique identifier for the request that generated the error. This can be used to help debug issues with the API.
|
|
26
|
+
attr_accessor :correlation_id
|
|
27
|
+
|
|
25
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
29
|
def self.attribute_map
|
|
27
30
|
{
|
|
28
31
|
:'code' => :'code',
|
|
29
|
-
:'message' => :'message'
|
|
32
|
+
:'message' => :'message',
|
|
33
|
+
:'correlation_id' => :'correlation_id'
|
|
30
34
|
}
|
|
31
35
|
end
|
|
32
36
|
|
|
@@ -39,7 +43,8 @@ module Coinbase::Client
|
|
|
39
43
|
def self.openapi_types
|
|
40
44
|
{
|
|
41
45
|
:'code' => :'String',
|
|
42
|
-
:'message' => :'String'
|
|
46
|
+
:'message' => :'String',
|
|
47
|
+
:'correlation_id' => :'String'
|
|
43
48
|
}
|
|
44
49
|
end
|
|
45
50
|
|
|
@@ -75,6 +80,10 @@ module Coinbase::Client
|
|
|
75
80
|
else
|
|
76
81
|
self.message = nil
|
|
77
82
|
end
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'correlation_id')
|
|
85
|
+
self.correlation_id = attributes[:'correlation_id']
|
|
86
|
+
end
|
|
78
87
|
end
|
|
79
88
|
|
|
80
89
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -146,7 +155,8 @@ module Coinbase::Client
|
|
|
146
155
|
return true if self.equal?(o)
|
|
147
156
|
self.class == o.class &&
|
|
148
157
|
code == o.code &&
|
|
149
|
-
message == o.message
|
|
158
|
+
message == o.message &&
|
|
159
|
+
correlation_id == o.correlation_id
|
|
150
160
|
end
|
|
151
161
|
|
|
152
162
|
# @see the `==` method
|
|
@@ -158,7 +168,7 @@ module Coinbase::Client
|
|
|
158
168
|
# Calculates hash code according to all attributes.
|
|
159
169
|
# @return [Integer] Hash code
|
|
160
170
|
def hash
|
|
161
|
-
[code, message].hash
|
|
171
|
+
[code, message, correlation_id].hash
|
|
162
172
|
end
|
|
163
173
|
|
|
164
174
|
# Builds the object from hash
|
|
@@ -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
|
|
|
@@ -21,10 +21,11 @@ module Coinbase::Client
|
|
|
21
21
|
ETHEREUM_MAINNET = "ethereum-mainnet".freeze
|
|
22
22
|
POLYGON_MAINNET = "polygon-mainnet".freeze
|
|
23
23
|
SOLANA_DEVNET = "solana-devnet".freeze
|
|
24
|
+
ARBITRUM_MAINNET = "arbitrum-mainnet".freeze
|
|
24
25
|
UNKNOWN_DEFAULT_OPEN_API = "unknown_default_open_api".freeze
|
|
25
26
|
|
|
26
27
|
def self.all_vars
|
|
27
|
-
@all_vars ||= [BASE_SEPOLIA, BASE_MAINNET, ETHEREUM_HOLESKY, ETHEREUM_MAINNET, POLYGON_MAINNET, SOLANA_DEVNET, UNKNOWN_DEFAULT_OPEN_API].freeze
|
|
28
|
+
@all_vars ||= [BASE_SEPOLIA, BASE_MAINNET, ETHEREUM_HOLESKY, ETHEREUM_MAINNET, POLYGON_MAINNET, SOLANA_DEVNET, ARBITRUM_MAINNET, UNKNOWN_DEFAULT_OPEN_API].freeze
|
|
28
29
|
end
|
|
29
30
|
|
|
30
31
|
# Builds the enum from string
|