coinbase-sdk 0.0.1 → 0.0.3

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.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/lib/coinbase/address.rb +152 -51
  3. data/lib/coinbase/asset.rb +2 -1
  4. data/lib/coinbase/authenticator.rb +52 -0
  5. data/lib/coinbase/balance_map.rb +2 -2
  6. data/lib/coinbase/client/api/addresses_api.rb +454 -0
  7. data/lib/coinbase/client/api/transfers_api.rb +342 -0
  8. data/lib/coinbase/client/api/users_api.rb +79 -0
  9. data/lib/coinbase/client/api/wallets_api.rb +348 -0
  10. data/lib/coinbase/client/api_client.rb +431 -0
  11. data/lib/coinbase/client/api_error.rb +58 -0
  12. data/lib/coinbase/client/configuration.rb +375 -0
  13. data/lib/coinbase/client/models/address.rb +273 -0
  14. data/lib/coinbase/client/models/address_balance_list.rb +275 -0
  15. data/lib/coinbase/client/models/address_list.rb +275 -0
  16. data/lib/coinbase/client/models/asset.rb +260 -0
  17. data/lib/coinbase/client/models/balance.rb +239 -0
  18. data/lib/coinbase/client/models/broadcast_transfer_request.rb +222 -0
  19. data/lib/coinbase/client/models/create_address_request.rb +239 -0
  20. data/lib/coinbase/client/models/create_transfer_request.rb +273 -0
  21. data/lib/coinbase/client/models/create_wallet_request.rb +221 -0
  22. data/lib/coinbase/client/models/error.rb +278 -0
  23. data/lib/coinbase/client/models/faucet_transaction.rb +222 -0
  24. data/lib/coinbase/client/models/transfer.rb +413 -0
  25. data/lib/coinbase/client/models/transfer_list.rb +275 -0
  26. data/lib/coinbase/client/models/user.rb +231 -0
  27. data/lib/coinbase/client/models/wallet.rb +241 -0
  28. data/lib/coinbase/client/models/wallet_list.rb +275 -0
  29. data/lib/coinbase/client/version.rb +15 -0
  30. data/lib/coinbase/client.rb +59 -0
  31. data/lib/coinbase/constants.rb +8 -2
  32. data/lib/coinbase/errors.rb +120 -0
  33. data/lib/coinbase/faucet_transaction.rb +42 -0
  34. data/lib/coinbase/middleware.rb +21 -0
  35. data/lib/coinbase/network.rb +2 -2
  36. data/lib/coinbase/transfer.rb +106 -65
  37. data/lib/coinbase/user.rb +180 -0
  38. data/lib/coinbase/wallet.rb +168 -52
  39. data/lib/coinbase.rb +127 -9
  40. metadata +92 -6
@@ -1,29 +1,31 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'digest'
3
4
  require 'jimson'
5
+ require 'json'
4
6
  require 'money-tree'
5
7
  require 'securerandom'
6
8
 
7
9
  module Coinbase
8
10
  # A representation of a Wallet. Wallets come with a single default Address, but can expand to have a set of Addresses,
9
11
  # each of which can hold a balance of one or more Assets. Wallets can create new Addresses, list their addresses,
10
- # list their balances, and transfer Assets to other Addresses.
12
+ # list their balances, and transfer Assets to other Addresses. Wallets should be created through User#create_wallet or
13
+ # User#import_wallet.
11
14
  class Wallet
12
- attr_reader :wallet_id, :network_id
13
-
14
- # Returns a new Wallet object.
15
- # @param seed [Integer] (Optional) The seed to use for the Wallet. Expects a 32-byte hexadecimal. If not provided,
16
- # a new seed will be generated.
17
- # @param address_count [Integer] (Optional) The number of addresses to generate for the Wallet. If not provided,
18
- # a single address will be generated.
15
+ # Returns a new Wallet object. Do not use this method directly. Instead, use User#create_wallet or
16
+ # User#import_wallet.
17
+ # @param model [Coinbase::Client::Wallet] The underlying Wallet object
18
+ # @param seed [String] (Optional) The seed to use for the Wallet. Expects a 32-byte hexadecimal with no 0x prefix.
19
+ # If not provided, a new seed will be generated.
20
+ # @param address_count [Integer] (Optional) The number of addresses already registered for the Wallet.
19
21
  # @param client [Jimson::Client] (Optional) The JSON RPC client to use for interacting with the Network
20
- def initialize(seed: nil, address_count: 1, client: Jimson::Client.new(Coinbase.base_sepolia_rpc_url))
22
+ def initialize(model, seed: nil, address_count: 0)
21
23
  raise ArgumentError, 'Seed must be 32 bytes' if !seed.nil? && seed.length != 64
22
- raise ArgumentError, 'Address count must be positive' if address_count < 1
24
+
25
+ @model = model
23
26
 
24
27
  @master = seed.nil? ? MoneyTree::Master.new : MoneyTree::Master.new(seed_hex: seed)
25
28
 
26
- @wallet_id = SecureRandom.uuid
27
29
  # TODO: Make Network an argument to the constructor.
28
30
  @network_id = :base_sepolia
29
31
  @addresses = []
@@ -32,28 +34,51 @@ module Coinbase
32
34
  @address_path_prefix = "m/44'/60'/0'/0"
33
35
  @address_index = 0
34
36
 
35
- @client = client
37
+ if address_count.positive?
38
+ address_count.times { derive_address }
39
+ else
40
+ create_address
41
+ # Update the model to reflect the new default address.
42
+ update_model
43
+ end
44
+ end
45
+
46
+ # Returns the Wallet ID.
47
+ # @return [String] The Wallet ID
48
+ def wallet_id
49
+ @model.id
50
+ end
36
51
 
37
- address_count.times { create_address }
52
+ # Returns the Network ID of the Wallet.
53
+ # @return [Symbol] The Network ID
54
+ def network_id
55
+ Coinbase.to_sym(@model.network_id)
38
56
  end
39
57
 
40
58
  # Creates a new Address in the Wallet.
41
59
  # @return [Address] The new Address
42
60
  def create_address
43
- # TODO: Register with server.
44
- path = "#{@address_path_prefix}/#{@address_index}"
45
- private_key = @master.node_for_path(path).private_key.to_hex
46
- key = Eth::Key.new(priv: private_key)
47
- address = Address.new(@network_id, key.address.address, @wallet_id, key, client: @client)
48
- @addresses << address
49
- @address_index += 1
50
- address
61
+ key = derive_key
62
+ attestation = create_attestation(key)
63
+ public_key = key.public_key.compressed.unpack1('H*')
64
+
65
+ opts = {
66
+ create_address_request: {
67
+ public_key: public_key,
68
+ attestation: attestation
69
+ }
70
+ }
71
+ address_model = Coinbase.call_api do
72
+ addresses_api.create_address(wallet_id, opts)
73
+ end
74
+
75
+ cache_address(address_model, key)
51
76
  end
52
77
 
53
78
  # Returns the default address of the Wallet.
54
79
  # @return [Address] The default address
55
80
  def default_address
56
- @addresses.first
81
+ @addresses.find { |address| address.address_id == @model.default_address.address_id }
57
82
  end
58
83
 
59
84
  # Returns the Address with the given ID.
@@ -66,25 +91,17 @@ module Coinbase
66
91
  # Returns the list of Addresses in the Wallet.
67
92
  # @return [Array<Address>] The list of Addresses
68
93
  def list_addresses
69
- # TODO: Register with server.
70
94
  @addresses
71
95
  end
72
96
 
73
97
  # Returns the list of balances of this Wallet. Balances are aggregated across all Addresses in the Wallet.
74
98
  # @return [BalanceMap] The list of balances. The key is the Asset ID, and the value is the balance.
75
99
  def list_balances
76
- balance_map = BalanceMap.new
77
-
78
- @addresses.each do |address|
79
- address.list_balances.each do |asset_id, balance|
80
- balance_map[asset_id] ||= BigDecimal(0)
81
- current_balance = balance_map[asset_id]
82
- new_balance = balance + current_balance
83
- balance_map[asset_id] = new_balance
84
- end
100
+ response = Coinbase.call_api do
101
+ wallets_api.list_wallet_balances(wallet_id)
85
102
  end
86
103
 
87
- balance_map
104
+ Coinbase.to_balance_map(response)
88
105
  end
89
106
 
90
107
  # Returns the balance of the provided Asset. Balances are aggregated across all Addresses in the Wallet.
@@ -97,17 +114,23 @@ module Coinbase
97
114
  asset_id
98
115
  end
99
116
 
100
- eth_balance = list_balances[normalized_asset_id] || BigDecimal(0)
117
+ response = Coinbase.call_api do
118
+ wallets_api.get_wallet_balance(wallet_id, normalized_asset_id.to_s)
119
+ end
120
+
121
+ return BigDecimal('0') if response.nil?
122
+
123
+ amount = BigDecimal(response.amount)
101
124
 
102
125
  case asset_id
103
126
  when :eth
104
- eth_balance
127
+ amount / BigDecimal(Coinbase::WEI_PER_ETHER.to_s)
105
128
  when :gwei
106
- eth_balance * Coinbase::GWEI_PER_ETHER
107
- when :wei
108
- eth_balance * Coinbase::WEI_PER_ETHER
129
+ amount / BigDecimal(Coinbase::GWEI_PER_ETHER.to_s)
130
+ when :usdc
131
+ amount / BigDecimal(Coinbase::ATOMIC_UNITS_PER_USDC.to_s)
109
132
  else
110
- BigDecimal(0)
133
+ amount
111
134
  end
112
135
  end
113
136
 
@@ -132,29 +155,122 @@ module Coinbase
132
155
  default_address.transfer(amount, asset_id, destination)
133
156
  end
134
157
 
135
- # Exports the Wallet's data to a WalletData object.
136
- # @return [WalletData] The Wallet data
158
+ # Exports the Wallet's data to a Data object.
159
+ # @return [Data] The Wallet data
137
160
  def export
138
- WalletData.new(@master.seed_hex, @addresses.length)
161
+ Data.new(wallet_id: wallet_id, seed: @master.seed_hex)
162
+ end
163
+
164
+ # Returns a String representation of the Wallet.
165
+ # @return [String] a String representation of the Wallet
166
+ def to_s
167
+ "Coinbase::Wallet{wallet_id: '#{wallet_id}', network_id: '#{network_id}', " \
168
+ "default_address: '#{default_address.address_id}'}"
169
+ end
170
+
171
+ # Same as to_s.
172
+ # @return [String] a String representation of the Wallet
173
+ def inspect
174
+ to_s
139
175
  end
140
176
 
141
177
  # The data required to recreate a Wallet.
142
- class WalletData
143
- attr_reader :seed, :address_count
178
+ class Data
179
+ attr_reader :wallet_id, :seed
144
180
 
145
- # Returns a new WalletData object.
181
+ # Returns a new Data object.
182
+ # @param wallet_id [String] The ID of the Wallet
146
183
  # @param seed [String] The seed of the Wallet
147
- # @param address_count [Integer] The number of addresses in the Wallet
148
- def initialize(seed, address_count)
184
+ def initialize(wallet_id:, seed:)
185
+ @wallet_id = wallet_id
149
186
  @seed = seed
150
- @address_count = address_count
151
187
  end
188
+
189
+ # Converts the Data object to a Hash.
190
+ # @return [Hash] The Hash representation of the Data object
191
+ def to_hash
192
+ { wallet_id: wallet_id, seed: seed }
193
+ end
194
+
195
+ # Creates a Data object from the given Hash.
196
+ # @param data [Hash] The Hash to create the Data object from
197
+ # @return [Data] The new Data object
198
+ def self.from_hash(data)
199
+ Data.new(wallet_id: data['wallet_id'], seed: data['seed'])
200
+ end
201
+ end
202
+
203
+ private
204
+
205
+ # Derives an already registered Address in the Wallet.
206
+ # @return [Address] The new Address
207
+ def derive_address
208
+ key = derive_key
209
+
210
+ address_id = key.address.to_s
211
+ address_model = Coinbase.call_api do
212
+ addresses_api.get_address(wallet_id, address_id)
213
+ end
214
+
215
+ cache_address(address_model, key)
216
+ end
217
+
218
+ # Derives a key for an already registered Address in the Wallet.
219
+ # @return [Eth::Key] The new key
220
+ def derive_key
221
+ path = "#{@address_path_prefix}/#{@address_index}"
222
+ private_key = @master.node_for_path(path).private_key.to_hex
223
+ Eth::Key.new(priv: private_key)
224
+ end
225
+
226
+ # Caches an Address on the client-side and increments the address index.
227
+ # @param address_model [Coinbase::Client::Address] The Address model
228
+ # @param key [Eth::Key] The private key of the Address
229
+ # @return [Address] The new Address
230
+ def cache_address(address_model, key)
231
+ address = Address.new(address_model, key)
232
+ @addresses << address
233
+ @address_index += 1
234
+ address
235
+ end
236
+
237
+ # Creates an attestation for the Address currently being created.
238
+ # @param key [Eth::Key] The private key of the Address
239
+ # @return [String] The attestation
240
+ def create_attestation(key)
241
+ public_key = key.public_key.compressed.unpack1('H*')
242
+ payload = {
243
+ wallet_id: wallet_id,
244
+ public_key: public_key
245
+ }.to_json
246
+ hashed_payload = Digest::SHA256.digest(payload)
247
+ signature = key.sign(hashed_payload)
248
+
249
+ # The secp256k1 library serializes the signature as R, S, V.
250
+ # The server expects the signature as V, R, S in the format:
251
+ # <(byte of 27+public key solution)+4 if compressed >< padded bytes for signature R><padded bytes for signature S>
252
+ # Ruby gem does not add 4 to the recovery byte, so we need to add it here.
253
+ # Take the last byte (V) and add 4 to it to show signature is compressed.
254
+ signature_bytes = [signature].pack('H*').unpack('C*')
255
+ last_byte = signature_bytes.last
256
+ compressed_last_byte = last_byte + 4
257
+ new_signature_bytes = [compressed_last_byte] + signature_bytes[0..-2]
258
+ new_signature_bytes.pack('C*').unpack1('H*')
259
+ end
260
+
261
+ # Updates the Wallet model with the latest data.
262
+ def update_model
263
+ @model = Coinbase.call_api do
264
+ wallets_api.get_wallet(wallet_id)
265
+ end
266
+ end
267
+
268
+ def addresses_api
269
+ @addresses_api ||= Coinbase::Client::AddressesApi.new(Coinbase.configuration.api_client)
152
270
  end
153
271
 
154
- # Returns the data required to recreate the Wallet.
155
- # @return [WalletData] The Wallet data
156
- def to_data
157
- WalletData.new(@master.seed_hex, @addresses.length)
272
+ def wallets_api
273
+ @wallets_api ||= Coinbase::Client::WalletsApi.new(Coinbase.configuration.api_client)
158
274
  end
159
275
  end
160
276
  end
data/lib/coinbase.rb CHANGED
@@ -2,25 +2,143 @@
2
2
 
3
3
  require_relative 'coinbase/address'
4
4
  require_relative 'coinbase/asset'
5
+ require_relative 'coinbase/authenticator'
5
6
  require_relative 'coinbase/balance_map'
7
+ require_relative 'coinbase/client'
6
8
  require_relative 'coinbase/constants'
9
+ require_relative 'coinbase/errors'
10
+ require_relative 'coinbase/faucet_transaction'
11
+ require_relative 'coinbase/middleware'
7
12
  require_relative 'coinbase/network'
8
13
  require_relative 'coinbase/transfer'
14
+ require_relative 'coinbase/user'
9
15
  require_relative 'coinbase/wallet'
16
+ require 'json'
10
17
 
11
18
  # The Coinbase SDK.
12
19
  module Coinbase
13
- @base_sepolia_rpc_url = 'https://sepolia.base.org'
20
+ class InvalidConfiguration < StandardError; end
21
+ class FaucetLimitReached < StandardError; end
14
22
 
15
- # Returns the Base Sepolia RPC URL.
16
- # @return [String] the Base Sepolia RPC URL
17
- def self.base_sepolia_rpc_url
18
- @base_sepolia_rpc_url
23
+ # Returns the configuration object.
24
+ # @return [Configuration] the configuration object
25
+ def self.configuration
26
+ @configuration ||= Configuration.new
19
27
  end
20
28
 
21
- # Sets the Base Sepolia RPC URL.
22
- # @param value [String] the Base Sepolia RPC URL
23
- def self.base_sepolia_rpc_url=(value)
24
- @base_sepolia_rpc_url = value
29
+ # Configures the Coinbase SDK.
30
+ def self.configure
31
+ yield(configuration)
32
+
33
+ raise InvalidConfiguration, 'API key private key is not set' unless configuration.api_key_private_key
34
+ raise InvalidConfiguration, 'API key name is not set' unless configuration.api_key_name
35
+ end
36
+
37
+ # Configures the Coinbase SDK from the given CDP API Key JSON file.
38
+ # @param file_path [String] (Optional) the path to the CDP API Key JSON file
39
+ # file in the root directory by default.
40
+ def self.configure_from_json(file_path = 'coinbase_cloud_api_key.json')
41
+ configuration.from_json(file_path)
42
+
43
+ raise InvalidConfiguration, 'API key private key is not set' unless configuration.api_key_private_key
44
+ raise InvalidConfiguration, 'API key name is not set' unless configuration.api_key_name
45
+ end
46
+
47
+ # Configuration object for the Coinbase SDK.
48
+ class Configuration
49
+ attr_reader :base_sepolia_rpc_url, :base_sepolia_client
50
+ attr_accessor :api_url, :api_key_name, :api_key_private_key, :debug_api, :backup_file_path
51
+
52
+ # Initializes the configuration object.
53
+ def initialize
54
+ @base_sepolia_rpc_url = 'https://sepolia.base.org'
55
+ @base_sepolia_client = Jimson::Client.new(@base_sepolia_rpc_url)
56
+ @api_url = 'https://api.cdp.coinbase.com'
57
+ @debug_api = false
58
+ @backup_file_path = 'seeds.json'
59
+ end
60
+
61
+ # Sets configuration values based on the provided CDP API Key JSON file.
62
+ # @param file_path [String] (Optional) the path to the CDP API Key JSON file
63
+ # file in the root directory by default.
64
+ def from_json(file_path = 'coinbase_cloud_api_key.json')
65
+ # Expand paths to respect shortcuts like ~.
66
+ file_path = File.expand_path(file_path)
67
+
68
+ raise InvalidConfiguration, 'Invalid configuration file type' unless file_path.end_with?('.json')
69
+
70
+ file = File.read(file_path)
71
+ data = JSON.parse(file)
72
+ @api_key_name = data['name']
73
+ @api_key_private_key = data['privateKey']
74
+ end
75
+
76
+ # Sets the Base Sepolia RPC URL.
77
+ # @param new_base_sepolia_rpc_url [String] the new Base Sepolia RPC URL
78
+ def base_sepolia_rpc_url=(new_base_sepolia_rpc_url)
79
+ @base_sepolia_rpc_url = new_base_sepolia_rpc_url
80
+ @base_sepolia_client = Jimson::Client.new(@base_sepolia_rpc_url)
81
+ end
82
+
83
+ # Returns the API client.
84
+ # @return [Coinbase::Client::ApiClient] the API client
85
+ def api_client
86
+ @api_client ||= Coinbase::Client::ApiClient.new(Middleware.config)
87
+ end
88
+ end
89
+
90
+ # Returns the default user.
91
+ # @return [Coinbase::User] the default user
92
+ def self.default_user
93
+ @default_user ||= load_default_user
94
+ end
95
+
96
+ # Converts a string to a symbol, replacing hyphens with underscores.
97
+ # @param string [String] the string to convert
98
+ # @return [Symbol] the converted symbol
99
+ def self.to_sym(value)
100
+ value.to_s.gsub('-', '_').to_sym
101
+ end
102
+
103
+ # Converts a Coinbase::Client::AddressBalanceList to a BalanceMap.
104
+ # @param address_balance_list [Coinbase::Client::AddressBalanceList] The AddressBalanceList to convert
105
+ # @return [BalanceMap] The converted BalanceMap
106
+ def self.to_balance_map(address_balance_list)
107
+ balances = {}
108
+
109
+ address_balance_list.data.each do |balance|
110
+ asset_id = Coinbase.to_sym(balance.asset.asset_id.downcase)
111
+ amount = case asset_id
112
+ when :eth
113
+ BigDecimal(balance.amount) / BigDecimal(Coinbase::WEI_PER_ETHER)
114
+ when :usdc
115
+ BigDecimal(balance.amount) / BigDecimal(Coinbase::ATOMIC_UNITS_PER_USDC)
116
+ when :weth
117
+ BigDecimal(balance.amount) / BigDecimal(Coinbase::WEI_PER_ETHER)
118
+ else
119
+ BigDecimal(balance.amount)
120
+ end
121
+ balances[asset_id] = amount
122
+ end
123
+
124
+ BalanceMap.new(balances)
125
+ end
126
+
127
+ # Loads the default user.
128
+ # @return [Coinbase::User] the default user
129
+ def self.load_default_user
130
+ users_api = Coinbase::Client::UsersApi.new(configuration.api_client)
131
+ user_model = users_api.get_current_user
132
+ Coinbase::User.new(user_model)
133
+ end
134
+
135
+ # Wraps a call to the Platform API to ensure that the error is caught and
136
+ # wrapped as an APIError.
137
+ def self.call_api
138
+ yield
139
+ rescue Coinbase::Client::ApiError => e
140
+ raise Coinbase::APIError.from_error(e)
141
+ rescue StandardError => e
142
+ raise e
25
143
  end
26
144
  end
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coinbase-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuga Cohler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-19 00:00:00.000000000 Z
11
+ date: 2024-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bigdecimal
14
+ name: eth
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
@@ -25,7 +25,21 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: eth
28
+ name: faraday
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: faraday-multipart
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
45
  - - ">="
@@ -53,7 +67,21 @@ dependencies:
53
67
  - !ruby/object:Gem::Version
54
68
  version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
- name: money-tree
70
+ name: jwt
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: marcel
57
85
  requirement: !ruby/object:Gem::Requirement
58
86
  requirements:
59
87
  - - ">="
@@ -67,7 +95,7 @@ dependencies:
67
95
  - !ruby/object:Gem::Version
68
96
  version: '0'
69
97
  - !ruby/object:Gem::Dependency
70
- name: securerandom
98
+ name: money-tree
71
99
  requirement: !ruby/object:Gem::Requirement
72
100
  requirements:
73
101
  - - ">="
@@ -80,6 +108,20 @@ dependencies:
80
108
  - - ">="
81
109
  - !ruby/object:Gem::Version
82
110
  version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: dotenv
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
83
125
  - !ruby/object:Gem::Dependency
84
126
  name: pry
85
127
  requirement: !ruby/object:Gem::Requirement
@@ -150,6 +192,20 @@ dependencies:
150
192
  - - '='
151
193
  - !ruby/object:Gem::Version
152
194
  version: 0.9.36
195
+ - !ruby/object:Gem::Dependency
196
+ name: yard-markdown
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
153
209
  description: Coinbase Ruby SDK for accessing Coinbase Platform APIs
154
210
  email: yuga.cohler@coinbase.com
155
211
  executables: []
@@ -159,10 +215,40 @@ files:
159
215
  - lib/coinbase.rb
160
216
  - lib/coinbase/address.rb
161
217
  - lib/coinbase/asset.rb
218
+ - lib/coinbase/authenticator.rb
162
219
  - lib/coinbase/balance_map.rb
220
+ - lib/coinbase/client.rb
221
+ - lib/coinbase/client/api/addresses_api.rb
222
+ - lib/coinbase/client/api/transfers_api.rb
223
+ - lib/coinbase/client/api/users_api.rb
224
+ - lib/coinbase/client/api/wallets_api.rb
225
+ - lib/coinbase/client/api_client.rb
226
+ - lib/coinbase/client/api_error.rb
227
+ - lib/coinbase/client/configuration.rb
228
+ - lib/coinbase/client/models/address.rb
229
+ - lib/coinbase/client/models/address_balance_list.rb
230
+ - lib/coinbase/client/models/address_list.rb
231
+ - lib/coinbase/client/models/asset.rb
232
+ - lib/coinbase/client/models/balance.rb
233
+ - lib/coinbase/client/models/broadcast_transfer_request.rb
234
+ - lib/coinbase/client/models/create_address_request.rb
235
+ - lib/coinbase/client/models/create_transfer_request.rb
236
+ - lib/coinbase/client/models/create_wallet_request.rb
237
+ - lib/coinbase/client/models/error.rb
238
+ - lib/coinbase/client/models/faucet_transaction.rb
239
+ - lib/coinbase/client/models/transfer.rb
240
+ - lib/coinbase/client/models/transfer_list.rb
241
+ - lib/coinbase/client/models/user.rb
242
+ - lib/coinbase/client/models/wallet.rb
243
+ - lib/coinbase/client/models/wallet_list.rb
244
+ - lib/coinbase/client/version.rb
163
245
  - lib/coinbase/constants.rb
246
+ - lib/coinbase/errors.rb
247
+ - lib/coinbase/faucet_transaction.rb
248
+ - lib/coinbase/middleware.rb
164
249
  - lib/coinbase/network.rb
165
250
  - lib/coinbase/transfer.rb
251
+ - lib/coinbase/user.rb
166
252
  - lib/coinbase/wallet.rb
167
253
  homepage: https://github.com/coinbase/coinbase-sdk-ruby
168
254
  licenses: