diff --git a/Makefile b/Makefile index a763a102..c44a976d 100644 --- a/Makefile +++ b/Makefile @@ -16,4 +16,4 @@ repl: .PHONY: docs docs: - bundle exec yardoc --output-dir ./docs --template-path ./docs/templates + bundle exec yardoc --output-dir ./docs --quiet --template-path ./docs/templates diff --git a/README.md b/README.md index 7c08ed8b..408ef09b 100644 --- a/README.md +++ b/README.md @@ -155,7 +155,7 @@ for the data persisted locally. To re-instantiate wallets with encrypted data, e the same API key when invoking `save_wallet` and `load_wallets`. ```ruby -u.save_wallet(w3, true) +u.save_wallet(w3, encrypt: true) ``` The below code demonstrates how to re-instantiate a Wallet from the data export. diff --git a/coinbase.gemspec b/coinbase.gemspec index 5df26baa..fa11e55e 100644 --- a/coinbase.gemspec +++ b/coinbase.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = 'coinbase-sdk' - spec.version = '0.0.2' + spec.version = '0.0.3' spec.authors = ['Yuga Cohler'] spec.files = Dir['lib/**/*.rb'] spec.summary = 'Coinbase Ruby SDK' @@ -31,4 +31,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rubocop', '1.63.1' # Pin to a specific version of YARD to ensure consistent documentation generation. spec.add_development_dependency 'yard', '0.9.36' + spec.add_development_dependency 'yard-markdown' end diff --git a/docs/Coinbase/APIError.html b/docs/Coinbase/APIError.html index e0c38f39..dc1e2052 100644 --- a/docs/Coinbase/APIError.html +++ b/docs/Coinbase/APIError.html @@ -285,7 +285,7 @@

  • - #to_s ⇒ Object + #inspect ⇒ String @@ -300,7 +300,31 @@

    -

    The string representation of the error.

    +

    Same as to_s.

    +
    + +

  • + + +
  • + + + #to_s ⇒ String + + + + + + + + + + + + + +
    +

    Returns a String representation of the APIError.

  • @@ -732,9 +756,68 @@

    Instance Method Details

    -

    +

    + + #inspectString + + + + + +

    +
    + +

    Same as to_s.

    + + +
    +
    +
    + +

    Returns:

    + + +
    + + + + +
    +
    +
    +
    +91
    +92
    +93
    +
    +
    # File 'lib/coinbase/errors.rb', line 91
    +
    +def inspect
    +  to_s
    +end
    +
    +
    + +
    +

    + + #to_sString @@ -743,13 +826,31 @@

    -

    The string representation of the error.

    +

    Returns a String representation of the APIError.

    +

    Returns:

    +
    @@ -757,23 +858,15 @@

     
     
    -84
     85
     86
    -87
    -88
    -89
    -90
    +87

    diff --git a/docs/Coinbase/Address.html b/docs/Coinbase/Address.html index a0c61125..6d6339bf 100644 --- a/docs/Coinbase/Address.html +++ b/docs/Coinbase/Address.html @@ -220,6 +220,30 @@

    Returns a new Address object.

    + + + +
  • + + + #inspect ⇒ String + + + + + + + + + + + + + +
    +

    Same as to_s.

    +
    +
  • @@ -289,7 +313,7 @@

    -

    Returns the address as a string.

    +

    Returns a String representation of the Address.

    @@ -361,7 +385,7 @@

    -

    Returns a new Address object. Do not use this method directly. Instead, use Wallet#create_address, or use the Wallet’s default_address.

    +

    Returns a new Address object. Do not use this method directly. Instead, use Wallet#create_address, or use the Wallet's default_address.

    @@ -570,14 +594,14 @@

     
     
    -147
    -148
    -149
    -150
    -151
    +153 +154 +155 +156 +157

    -
    # File 'lib/coinbase/errors.rb', line 84
    +      
    # File 'lib/coinbase/errors.rb', line 85
     
     def to_s
    -  message = "API Error \n"
    -  message += "HTTP status code: #{http_code}\n" if http_code
    -  message += "API error code: #{api_code}\n" if api_code
    -  message += "API error message: #{api_message}\n" if api_message
    -  message
    +  "APIError{http_code: #{@http_code}, api_code: #{@api_code}, api_message: #{@api_message}}"
     end
    -
    # File 'lib/coinbase/address.rb', line 147
    +      
    # File 'lib/coinbase/address.rb', line 153
     
     def faucet
       Coinbase.call_api do
    @@ -704,6 +728,65 @@ 

    +
    + +
    +

    + + #inspectString + + + + + +

    +
    + +

    Same as to_s.

    + + +
    +
    +
    + +

    Returns:

    + + +
    + + + + +
    +
    +
    +
    +144
    +145
    +146
    +
    +
    # File 'lib/coinbase/address.rb', line 144
    +
    +def inspect
    +  to_s
    +end
    +
    @@ -844,7 +927,7 @@

    -

    Returns the address as a string.

    +

    Returns a String representation of the Address.

    @@ -863,7 +946,7 @@

    -

    The address

    +

    a String representation of the Address

    @@ -884,7 +967,7 @@

    # File 'lib/coinbase/address.rb', line 138
     
     def to_s
    -  address_id
    +  "Coinbase::Address{address_id: '#{address_id}', network_id: '#{network_id}', wallet_id: '#{wallet_id}'"
     end
    @@ -955,7 +1038,7 @@

    -

    The destination of the transfer. If a Wallet, sends to the Wallet’s default address. If a String, interprets it as the address ID.

    +

    The destination of the transfer. If a Wallet, sends to the Wallet's default address. If a String, interprets it as the address ID.

    diff --git a/docs/Coinbase/AlreadyExistsError.html b/docs/Coinbase/AlreadyExistsError.html index caaf5488..07d73e88 100644 --- a/docs/Coinbase/AlreadyExistsError.html +++ b/docs/Coinbase/AlreadyExistsError.html @@ -125,7 +125,7 @@

    Attributes inherited from Method Summary

    Methods inherited from APIError

    -

    from_error, #initialize, #to_s

    +

    from_error, #initialize, #inspect, #to_s

    Constructor Details

    diff --git a/docs/Coinbase/Asset.html b/docs/Coinbase/Asset.html index 9d943d83..07901add 100644 --- a/docs/Coinbase/Asset.html +++ b/docs/Coinbase/Asset.html @@ -342,7 +342,7 @@

    -

    The Asset’s display name

    +

    The Asset's display name

    @@ -360,7 +360,7 @@

    -

    (Optional) The Asset’s address ID, if one exists

    +

    (Optional) The Asset's address ID, if one exists

    diff --git a/docs/Coinbase/Authenticator.html b/docs/Coinbase/Authenticator.html index d7cb27ba..0dc43f6b 100644 --- a/docs/Coinbase/Authenticator.html +++ b/docs/Coinbase/Authenticator.html @@ -290,7 +290,7 @@

    -

    Builds the JWT for the given API endpoint URI. The JWT is signed with the API key’s private key.

    +

    Builds the JWT for the given API endpoint URI. The JWT is signed with the API key's private key.

    diff --git a/docs/Coinbase/BalanceMap.html b/docs/Coinbase/BalanceMap.html index 789a8e38..51ec9a62 100644 --- a/docs/Coinbase/BalanceMap.html +++ b/docs/Coinbase/BalanceMap.html @@ -69,13 +69,11 @@
    Inherits:
    - Hash + Object
    • Object
    • - -
    @@ -130,6 +128,50 @@

  • + #[](asset_id) ⇒ Object + + + + + + + + + + + + + +
    + +
  • + + +
  • + + + #[]=(asset_id, balance) ⇒ Object + + + + + + + + + + + + + +
    + +
  • + + +
  • + + #initialize(hash = {}) ⇒ BalanceMap @@ -171,7 +213,7 @@

    -

    Returns a string representation of the balance map.

    +

    Same as to_s.

  • @@ -204,8 +246,7 @@

    - -
    +

    Constructor Details

    @@ -258,19 +299,13 @@

    10 11 -12 -13 -14 -15 +12
    # File 'lib/coinbase/balance_map.rb', line 10
     
     def initialize(hash = {})
    -  super()
    -  hash.each do |key, value|
    -    self[key] = value
    -  end
    +  @balances = hash.clone
     end
    @@ -285,7 +320,67 @@

    Instance Method Details

    -

    +

    + + #[](asset_id) ⇒ Object + + + + + +

    + + + + +
    +
    +
    +
    +14
    +15
    +16
    +
    +
    # File 'lib/coinbase/balance_map.rb', line 14
    +
    +def [](asset_id)
    +  @balances[asset_id]
    +end
    +
    +
    + +
    +

    + + #[]=(asset_id, balance) ⇒ Object + + + + + +

    + + + + +
    +
    +
    +
    +18
    +19
    +20
    +
    +
    # File 'lib/coinbase/balance_map.rb', line 18
    +
    +def []=(asset_id, balance)
    +  @balances[asset_id] = balance
    +end
    +
    +
    + +
    +

    #inspectString @@ -296,7 +391,7 @@

    -

    Returns a string representation of the balance map.

    +

    Same as to_s.

    @@ -328,12 +423,12 @@

     
     
    -25
    -26
    -27
    +30 +31 +32 -
    # File 'lib/coinbase/balance_map.rb', line 25
    +      
    # File 'lib/coinbase/balance_map.rb', line 30
     
     def inspect
       to_string
    @@ -387,12 +482,12 @@ 

     
     
    -19
    -20
    -21
    +24 +25 +26

    -
    # File 'lib/coinbase/balance_map.rb', line 19
    +      
    # File 'lib/coinbase/balance_map.rb', line 24
     
     def to_s
       to_string
    diff --git a/docs/Coinbase/Client/Configuration.html b/docs/Coinbase/Client/Configuration.html
    index a003aad6..b326ede1 100644
    --- a/docs/Coinbase/Client/Configuration.html
    +++ b/docs/Coinbase/Client/Configuration.html
    @@ -775,7 +775,7 @@ 

    Instance Attribute Summary collaps @@ -1807,7 +1807,7 @@

    -

    Set this to enable/disable debugging. When enabled (set to true), HTTP request/response details will be logged with ‘logger.debug` (see the `logger` attribute). Default to false.

    +

    Set this to enable/disable debugging. When enabled (set to true), HTTP request/response details will be logged with `logger.debug` (see the `logger` attribute). Default to false.

    @@ -1992,7 +1992,7 @@

    -

    Defines the logger used for debugging. Default to ‘Rails.logger` (when in Rails) or logging to STDOUT.

    +

    Defines the logger used for debugging. Default to `Rails.logger` (when in Rails) or logging to STDOUT.

    @@ -2199,7 +2199,7 @@

    -

    Set this to return data as binary instead of downloading a temp file. When enabled (set to true) HTTP responses with return type ‘File` will be returned as a stream of binary data. Default to false.

    +

    Set this to return data as binary instead of downloading a temp file. When enabled (set to true) HTTP responses with return type `File` will be returned as a stream of binary data. Default to false.

    @@ -2676,7 +2676,7 @@

    -

    TLS/SSL setting Any ‘OpenSSL::SSL::` constant (see ruby-doc.org/stdlib-2.5.1/libdoc/openssl/rdoc/OpenSSL/SSL.html)

    +

    TLS/SSL setting Any `OpenSSL::SSL::` constant (see ruby-doc.org/stdlib-2.5.1/libdoc/openssl/rdoc/OpenSSL/SSL.html)

    @@ -2719,7 +2719,7 @@

    -

    Defines the temporary folder to store downloaded files (for API endpoints that have file response). Default to use ‘Tempfile`.

    +

    Defines the temporary folder to store downloaded files (for API endpoints that have file response). Default to use `Tempfile`.

    @@ -3285,7 +3285,7 @@

    Configure Faraday connection directly.

    -

    “‘ c.configure_faraday_connection do |conn|

    +

    “` c.configure_faraday_connection do |conn|

    conn.use Faraday::HttpCache, shared_cache: false, logger: logger
     conn.response :logger, nil, headers: true, bodies: true, log_level: :debug do |logger|
    @@ -3300,7 +3300,7 @@ 

    conn.adapter :typhoeus
     
    -

    end “‘

    +

    end “`

    @@ -3320,7 +3320,7 @@

    -

    ‘#call`able object that takes one arg, the connection

    +

    `#call`able object that takes one arg, the connection

    @@ -3738,7 +3738,7 @@

    -

    Use the ‘set_faraday_middleware` method to set middleware information

    +

    Use the `set_faraday_middleware` method to set middleware information

    config.set_faraday_middleware(:request, :retry, max: 3, methods: [:get, :post], retry_statuses: [503])
    diff --git a/docs/Coinbase/Client/CreateAddressRequest.html b/docs/Coinbase/Client/CreateAddressRequest.html
    index ba157975..2a3342ab 100644
    --- a/docs/Coinbase/Client/CreateAddressRequest.html
    +++ b/docs/Coinbase/Client/CreateAddressRequest.html
    @@ -698,7 +698,7 @@ 

    -

    An attestation signed by the private key that is associated with the wallet. The attestation will be a hex-encoded signature of a json payload with fields ‘wallet_id` and `public_key`, signed by the private key associated with the public_key set in the request.

    +

    An attestation signed by the private key that is associated with the wallet. The attestation will be a hex-encoded signature of a json payload with fields `wallet_id` and `public_key`, signed by the private key associated with the public_key set in the request.

    diff --git a/docs/Coinbase/FaucetLimitReachedError.html b/docs/Coinbase/FaucetLimitReachedError.html index fc4123f7..8ac25fa1 100644 --- a/docs/Coinbase/FaucetLimitReachedError.html +++ b/docs/Coinbase/FaucetLimitReachedError.html @@ -125,7 +125,7 @@

    Attributes inherited from Method Summary

    Methods inherited from APIError

    -

    from_error, #initialize, #to_s

    +

    from_error, #initialize, #inspect, #to_s

    Constructor Details

    diff --git a/docs/Coinbase/FaucetTransaction.html b/docs/Coinbase/FaucetTransaction.html index a453baa3..aba2eac3 100644 --- a/docs/Coinbase/FaucetTransaction.html +++ b/docs/Coinbase/FaucetTransaction.html @@ -179,7 +179,55 @@

    -

    A new instance of FaucetTransaction.

    +

    Returns a new FaucetTransaction object.

    +
    + + + + +
  • + + + #inspect ⇒ String + + + + + + + + + + + + + +
    +

    Same as to_s.

    +
    + +
  • + + +
  • + + + #to_s ⇒ String + + + + + + + + + + + + + +
    +

    Returns a String representation of the FaucetTransaction.

  • @@ -227,13 +275,33 @@

    -

    Returns a new instance of FaucetTransaction.

    +

    Returns a new FaucetTransaction object. Do not use this method directly - instead, use Address#faucet.

    +

    Parameters:

    + +
    @@ -241,12 +309,12 @@

     
     
    -9
    -10
    -11
    +11 +12 +13

    -
    # File 'lib/coinbase/faucet_transaction.rb', line 9
    +      
    # File 'lib/coinbase/faucet_transaction.rb', line 11
     
     def initialize(model)
       @model = model
    @@ -289,12 +357,12 @@ 

     
     
    -13
    -14
    -15
    +15 +16 +17

    -
    # File 'lib/coinbase/faucet_transaction.rb', line 13
    +      
    # File 'lib/coinbase/faucet_transaction.rb', line 15
     
     def model
       @model
    @@ -312,7 +380,125 @@ 

    Instance Method Details

    -

    +

    + + #inspectString + + + + + +

    +
    + +

    Same as to_s.

    + + +
    +
    +
    + +

    Returns:

    +
      + +
    • + + + (String) + + + + — +
      +

      a String representation of the FaucetTransaction

      +
      + +
    • + +
    + +
    + + + + +
    +
    +
    +
    +31
    +32
    +33
    +
    +
    # File 'lib/coinbase/faucet_transaction.rb', line 31
    +
    +def inspect
    +  to_s
    +end
    +
    +
    + +
    +

    + + #to_sString + + + + + +

    +
    + +

    Returns a String representation of the FaucetTransaction.

    + + +
    +
    +
    + +

    Returns:

    +
      + +
    • + + + (String) + + + + — +
      +

      a String representation of the FaucetTransaction

      +
      + +
    • + +
    + +
    + + + + +
    +
    +
    +
    +25
    +26
    +27
    +
    +
    # File 'lib/coinbase/faucet_transaction.rb', line 25
    +
    +def to_s
    +  "Coinbase::FaucetTransaction{transaction_hash: '#{transaction_hash}'}"
    +end
    +
    +
    + +
    +

    #transaction_hashString @@ -355,12 +541,12 @@

     
     
    -17
    -18
    -19
    +19 +20 +21

    -
    # File 'lib/coinbase/faucet_transaction.rb', line 17
    +      
    # File 'lib/coinbase/faucet_transaction.rb', line 19
     
     def transaction_hash
       model.transaction_hash
    diff --git a/docs/Coinbase/InternalError.html b/docs/Coinbase/InternalError.html
    index 98176830..a22ba074 100644
    --- a/docs/Coinbase/InternalError.html
    +++ b/docs/Coinbase/InternalError.html
    @@ -125,7 +125,7 @@ 

    Attributes inherited from Method Summary

    Methods inherited from APIError

    -

    from_error, #initialize, #to_s

    +

    from_error, #initialize, #inspect, #to_s

    Constructor Details

    diff --git a/docs/Coinbase/InvalidAddressError.html b/docs/Coinbase/InvalidAddressError.html index d88b5449..78346c7d 100644 --- a/docs/Coinbase/InvalidAddressError.html +++ b/docs/Coinbase/InvalidAddressError.html @@ -125,7 +125,7 @@

    Attributes inherited from Method Summary

    Methods inherited from APIError

    -

    from_error, #initialize, #to_s

    +

    from_error, #initialize, #inspect, #to_s

    Constructor Details

    diff --git a/docs/Coinbase/InvalidAddressIDError.html b/docs/Coinbase/InvalidAddressIDError.html index 94825268..7907447e 100644 --- a/docs/Coinbase/InvalidAddressIDError.html +++ b/docs/Coinbase/InvalidAddressIDError.html @@ -125,7 +125,7 @@

    Attributes inherited from Method Summary

    Methods inherited from APIError

    -

    from_error, #initialize, #to_s

    +

    from_error, #initialize, #inspect, #to_s

    Constructor Details

    diff --git a/docs/Coinbase/InvalidAmountError.html b/docs/Coinbase/InvalidAmountError.html index 0ad01fac..fd7e2525 100644 --- a/docs/Coinbase/InvalidAmountError.html +++ b/docs/Coinbase/InvalidAmountError.html @@ -125,7 +125,7 @@

    Attributes inherited from Method Summary

    Methods inherited from APIError

    -

    from_error, #initialize, #to_s

    +

    from_error, #initialize, #inspect, #to_s

    Constructor Details

    diff --git a/docs/Coinbase/InvalidAssetIDError.html b/docs/Coinbase/InvalidAssetIDError.html index 1a716b6d..3fb760b4 100644 --- a/docs/Coinbase/InvalidAssetIDError.html +++ b/docs/Coinbase/InvalidAssetIDError.html @@ -125,7 +125,7 @@

    Attributes inherited from Method Summary

    Methods inherited from APIError

    -

    from_error, #initialize, #to_s

    +

    from_error, #initialize, #inspect, #to_s

    Constructor Details

    diff --git a/docs/Coinbase/InvalidDestinationError.html b/docs/Coinbase/InvalidDestinationError.html index 7c004fde..3ecde4b5 100644 --- a/docs/Coinbase/InvalidDestinationError.html +++ b/docs/Coinbase/InvalidDestinationError.html @@ -125,7 +125,7 @@

    Attributes inherited from Method Summary

    Methods inherited from APIError

    -

    from_error, #initialize, #to_s

    +

    from_error, #initialize, #inspect, #to_s

    Constructor Details

    diff --git a/docs/Coinbase/InvalidLimitError.html b/docs/Coinbase/InvalidLimitError.html index 8a90c032..2aea108b 100644 --- a/docs/Coinbase/InvalidLimitError.html +++ b/docs/Coinbase/InvalidLimitError.html @@ -125,7 +125,7 @@

    Attributes inherited from Method Summary

    Methods inherited from APIError

    -

    from_error, #initialize, #to_s

    +

    from_error, #initialize, #inspect, #to_s

    Constructor Details

    diff --git a/docs/Coinbase/InvalidNetworkIDError.html b/docs/Coinbase/InvalidNetworkIDError.html index 4488d8d7..fbccc0c4 100644 --- a/docs/Coinbase/InvalidNetworkIDError.html +++ b/docs/Coinbase/InvalidNetworkIDError.html @@ -125,7 +125,7 @@

    Attributes inherited from Method Summary

    Methods inherited from APIError

    -

    from_error, #initialize, #to_s

    +

    from_error, #initialize, #inspect, #to_s

    Constructor Details

    diff --git a/docs/Coinbase/InvalidPageError.html b/docs/Coinbase/InvalidPageError.html index b9d8551b..85046772 100644 --- a/docs/Coinbase/InvalidPageError.html +++ b/docs/Coinbase/InvalidPageError.html @@ -125,7 +125,7 @@

    Attributes inherited from Method Summary

    Methods inherited from APIError

    -

    from_error, #initialize, #to_s

    +

    from_error, #initialize, #inspect, #to_s

    Constructor Details

    diff --git a/docs/Coinbase/InvalidSignedPayloadError.html b/docs/Coinbase/InvalidSignedPayloadError.html index 5ad35f62..80b0f085 100644 --- a/docs/Coinbase/InvalidSignedPayloadError.html +++ b/docs/Coinbase/InvalidSignedPayloadError.html @@ -125,7 +125,7 @@

    Attributes inherited from Method Summary

    Methods inherited from APIError

    -

    from_error, #initialize, #to_s

    +

    from_error, #initialize, #inspect, #to_s

    Constructor Details

    diff --git a/docs/Coinbase/InvalidTransferIDError.html b/docs/Coinbase/InvalidTransferIDError.html index f3dfaee9..ab421836 100644 --- a/docs/Coinbase/InvalidTransferIDError.html +++ b/docs/Coinbase/InvalidTransferIDError.html @@ -125,7 +125,7 @@

    Attributes inherited from Method Summary

    Methods inherited from APIError

    -

    from_error, #initialize, #to_s

    +

    from_error, #initialize, #inspect, #to_s

    Constructor Details

    diff --git a/docs/Coinbase/InvalidTransferStatusError.html b/docs/Coinbase/InvalidTransferStatusError.html index 65123f29..b44ba46f 100644 --- a/docs/Coinbase/InvalidTransferStatusError.html +++ b/docs/Coinbase/InvalidTransferStatusError.html @@ -125,7 +125,7 @@

    Attributes inherited from Method Summary

    Methods inherited from APIError

    -

    from_error, #initialize, #to_s

    +

    from_error, #initialize, #inspect, #to_s

    Constructor Details

    diff --git a/docs/Coinbase/InvalidWalletError.html b/docs/Coinbase/InvalidWalletError.html index 7297966c..f52370dc 100644 --- a/docs/Coinbase/InvalidWalletError.html +++ b/docs/Coinbase/InvalidWalletError.html @@ -125,7 +125,7 @@

    Attributes inherited from Method Summary

    Methods inherited from APIError

    -

    from_error, #initialize, #to_s

    +

    from_error, #initialize, #inspect, #to_s

    Constructor Details

    diff --git a/docs/Coinbase/InvalidWalletIDError.html b/docs/Coinbase/InvalidWalletIDError.html index e498b669..ab0e6107 100644 --- a/docs/Coinbase/InvalidWalletIDError.html +++ b/docs/Coinbase/InvalidWalletIDError.html @@ -125,7 +125,7 @@

    Attributes inherited from Method Summary

    Methods inherited from APIError

    -

    from_error, #initialize, #to_s

    +

    from_error, #initialize, #inspect, #to_s

    Constructor Details

    diff --git a/docs/Coinbase/MalformedRequestError.html b/docs/Coinbase/MalformedRequestError.html index 3661238c..f1aaba5d 100644 --- a/docs/Coinbase/MalformedRequestError.html +++ b/docs/Coinbase/MalformedRequestError.html @@ -125,7 +125,7 @@

    Attributes inherited from Method Summary

    Methods inherited from APIError

    -

    from_error, #initialize, #to_s

    +

    from_error, #initialize, #inspect, #to_s

    Constructor Details

    diff --git a/docs/Coinbase/Network.html b/docs/Coinbase/Network.html index e614b861..a1d69181 100644 --- a/docs/Coinbase/Network.html +++ b/docs/Coinbase/Network.html @@ -316,7 +316,7 @@

    -

    The Network’s display name

    +

    The Network's display name

    @@ -380,7 +380,7 @@

    -

    The ID of the Network’s native Asset

    +

    The ID of the Network's native Asset

    diff --git a/docs/Coinbase/NotFoundError.html b/docs/Coinbase/NotFoundError.html index 8eebcf65..4f682e27 100644 --- a/docs/Coinbase/NotFoundError.html +++ b/docs/Coinbase/NotFoundError.html @@ -125,7 +125,7 @@

    Attributes inherited from Method Summary

    Methods inherited from APIError

    -

    from_error, #initialize, #to_s

    +

    from_error, #initialize, #inspect, #to_s

    Constructor Details

    diff --git a/docs/Coinbase/ResourceExhaustedError.html b/docs/Coinbase/ResourceExhaustedError.html index 5f1c2111..ea0edec1 100644 --- a/docs/Coinbase/ResourceExhaustedError.html +++ b/docs/Coinbase/ResourceExhaustedError.html @@ -125,7 +125,7 @@

    Attributes inherited from Method Summary

    Methods inherited from APIError

    -

    from_error, #initialize, #to_s

    +

    from_error, #initialize, #inspect, #to_s

    Constructor Details

    diff --git a/docs/Coinbase/Transfer.html b/docs/Coinbase/Transfer.html index ca06a71f..8dbca4d9 100644 --- a/docs/Coinbase/Transfer.html +++ b/docs/Coinbase/Transfer.html @@ -254,6 +254,30 @@

    Returns a new Transfer object.

    + + + +
  • + + + #inspect ⇒ String + + + + + + + + + + + + + +
    +

    Same as to_s.

    +
    +
  • @@ -326,6 +350,30 @@

    Returns the status of the Transfer.

    + + + +
  • + + + #to_s ⇒ String + + + + + + + + + + + + + +
    +

    Returns a String representation of the Transfer.

    +
    +
  • @@ -781,6 +829,65 @@

    +
    + +
    +

    + + #inspectString + + + + + +

    +
    + +

    Same as to_s.

    + + +
    +
    +
    + +

    Returns:

    +
      + +
    • + + + (String) + + + + — +
      +

      a String representation of the Transfer

      +
      + +
    • + +
    + +
    + + + + +
    +
    +
    +
    +178
    +179
    +180
    +
    +
    # File 'lib/coinbase/transfer.rb', line 178
    +
    +def inspect
    +  to_s
    +end
    +
    @@ -998,6 +1105,71 @@

    +

    + +
    +

    + + #to_sString + + + + + +

    +
    + +

    Returns a String representation of the Transfer.

    + + +
    +
    +
    + +

    Returns:

    +
      + +
    • + + + (String) + + + + — +
      +

      a String representation of the Transfer

      +
      + +
    • + +
    + +
    + + + + +
    +
    +
    +
    +169
    +170
    +171
    +172
    +173
    +174
    +
    +
    # File 'lib/coinbase/transfer.rb', line 169
    +
    +def to_s
    +  "Coinbase::Transfer{transfer_id: '#{transfer_id}', network_id: '#{network_id}', " +
    +    "from_address_id: '#{from_address_id}', destination_address_id: '#{destination_address_id}', " +
    +    "asset_id: '#{asset_id}', amount: '#{amount}', transaction_hash: '#{transaction_hash}', " +
    +    "status: '#{status}'}"
    +end
    +
    diff --git a/docs/Coinbase/UnauthorizedError.html b/docs/Coinbase/UnauthorizedError.html index 368a6fc3..87abe2b8 100644 --- a/docs/Coinbase/UnauthorizedError.html +++ b/docs/Coinbase/UnauthorizedError.html @@ -125,7 +125,7 @@

    Attributes inherited from Method Summary

    Methods inherited from APIError

    -

    from_error, #initialize, #to_s

    +

    from_error, #initialize, #inspect, #to_s

    Constructor Details

    diff --git a/docs/Coinbase/UnimplementedError.html b/docs/Coinbase/UnimplementedError.html index f60c50c4..f0752a14 100644 --- a/docs/Coinbase/UnimplementedError.html +++ b/docs/Coinbase/UnimplementedError.html @@ -125,7 +125,7 @@

    Attributes inherited from Method Summary

    Methods inherited from APIError

    -

    from_error, #initialize, #to_s

    +

    from_error, #initialize, #inspect, #to_s

    Constructor Details

    diff --git a/docs/Coinbase/UnsupportedAssetError.html b/docs/Coinbase/UnsupportedAssetError.html index 18ffba69..2556fd23 100644 --- a/docs/Coinbase/UnsupportedAssetError.html +++ b/docs/Coinbase/UnsupportedAssetError.html @@ -125,7 +125,7 @@

    Attributes inherited from Method Summary

    Methods inherited from APIError

    -

    from_error, #initialize, #to_s

    +

    from_error, #initialize, #inspect, #to_s

    Constructor Details

    diff --git a/docs/Coinbase/User.html b/docs/Coinbase/User.html index 4e3111bb..e23dd99a 100644 --- a/docs/Coinbase/User.html +++ b/docs/Coinbase/User.html @@ -196,6 +196,30 @@

    Returns a new User object.

    + + + +
  • + + + #inspect ⇒ String + + + + + + + + + + + + + +
    +

    Same as to_s.

    +
    +
  • @@ -250,7 +274,7 @@

  • - #save_wallet(wallet, encrypt = false) ⇒ Coinbase::Wallet + #save_wallet(wallet, encrypt: false) ⇒ Coinbase::Wallet @@ -268,6 +292,30 @@

    Saves a wallet to local file system.

  • + + + +
  • + + + #to_s ⇒ String + + + + + + + + + + + + + +
    +

    Returns a string representation of the User.

    +
    +
  • @@ -545,6 +593,65 @@

    +

    + +
    +

    + + #inspectString + + + + + +

    +
    + +

    Same as to_s.

    + + +
    +
    +
    + +

    Returns:

    +
      + +
    • + + + (String) + + + + — +
      +

      a string representation of the User

      +
      + +
    • + +
    + +
    + + + + +
    +
    +
    +
    +149
    +150
    +151
    +
    +
    # File 'lib/coinbase/user.rb', line 149
    +
    +def inspect
    +  to_s
    +end
    +
    @@ -743,7 +850,7 @@

    - #save_wallet(wallet, encrypt = false) ⇒ Coinbase::Wallet + #save_wallet(wallet, encrypt: false) ⇒ Coinbase::Wallet @@ -752,9 +859,9 @@

    -

    Saves a wallet to local file system. Wallet saved this way can be re-instantiated with ‘load_wallets` function, provided the backup_file is available. This is an insecure method of storing wallet seeds and should only be used for development purposes. If you call save_wallet twice with wallets containing the same wallet_id, the backup will be overwritten during the second attempt. The default backup_file is `seeds.json` in the root folder. It can be configured by changing Coinbase.configuration.backup_file_path.

    +

    Saves a wallet to local file system. Wallet saved this way can be re-instantiated with `load_wallets` function, provided the backup_file is available. This is an insecure method of storing wallet seeds and should only be used for development purposes. If you call save_wallet twice with wallets containing the same wallet_id, the backup will be overwritten during the second attempt. The default backup_file is `seeds.json` in the root folder. It can be configured by changing Coinbase.configuration.backup_file_path.

    -

    or not. Data is unencrypted by default.

    +

    encrypted or not. Data is unencrypted by default.

    @@ -792,7 +899,7 @@

    -

    Boolean representing whether the backup persisted to local file system should be encrypted

    +

    (Optional) Boolean representing whether the backup persisted to local file system should be

    @@ -859,7 +966,7 @@

    # File 'lib/coinbase/user.rb', line 76
     
    -def save_wallet(wallet, encrypt = false)
    +def save_wallet(wallet, encrypt: false)
       existing_seeds_in_store = existing_seeds
       data = wallet.export
       seed_to_store = data.seed
    @@ -893,6 +1000,65 @@ 

    +

    + +
    +

    + + #to_sString + + + + + +

    +
    + +

    Returns a string representation of the User.

    + + +
    +
    +
    + +

    Returns:

    +
      + +
    • + + + (String) + + + + — +
      +

      a string representation of the User

      +
      + +
    • + +
    + +
    + + + + +
    +
    +
    +
    +143
    +144
    +145
    +
    +
    # File 'lib/coinbase/user.rb', line 143
    +
    +def to_s
    +  "Coinbase::User{user_id: '#{user_id}'}"
    +end
    +
    diff --git a/docs/Coinbase/Wallet.html b/docs/Coinbase/Wallet.html index a1f6c253..b5152083 100644 --- a/docs/Coinbase/Wallet.html +++ b/docs/Coinbase/Wallet.html @@ -201,7 +201,7 @@

    -

    Exports the Wallet’s data to a Data object.

    +

    Exports the Wallet's data to a Data object.

    @@ -278,6 +278,30 @@

    Returns a new Wallet object.

    + + + +
  • + + + #inspect ⇒ String + + + + + + + + + + + + + +
    +

    Same as to_s.

    +
    +
  • @@ -350,6 +374,30 @@

    Returns the Network ID of the Wallet.

    + + + +
  • + + + #to_s ⇒ String + + + + + + + + + + + + + +
    +

    Returns a String representation of the Wallet.

    +
    +
  • @@ -738,7 +786,7 @@

    -

    Exports the Wallet’s data to a Data object.

    +

    Exports the Wallet's data to a Data object.

    @@ -987,6 +1035,65 @@

    +

    + +
    +

    + + #inspectString + + + + + +

    +
    + +

    Same as to_s.

    + + +
    +
    +
    + +

    Returns:

    +
      + +
    • + + + (String) + + + + — +
      +

      a String representation of the Wallet

      +
      + +
    • + +
    + +
    + + + + +
    +
    +
    +
    +173
    +174
    +175
    +
    +
    # File 'lib/coinbase/wallet.rb', line 173
    +
    +def inspect
    +  to_s
    +end
    +
    @@ -1172,6 +1279,67 @@

    +

    + +
    +

    + + #to_sString + + + + + +

    +
    + +

    Returns a String representation of the Wallet.

    + + +
    +
    +
    + +

    Returns:

    +
      + +
    • + + + (String) + + + + — +
      +

      a String representation of the Wallet

      +
      + +
    • + +
    + +
    + + + + +
    +
    +
    +
    +166
    +167
    +168
    +169
    +
    +
    # File 'lib/coinbase/wallet.rb', line 166
    +
    +def to_s
    +  "Coinbase::Wallet{wallet_id: '#{wallet_id}', network_id: '#{network_id}', " +
    +  "default_address: '#{default_address.address_id}'}"
    +end
    +
    @@ -1238,7 +1406,7 @@

    -

    The destination of the transfer. If a Wallet, sends to the Wallet’s default address. If a String, interprets it as the address ID.

    +

    The destination of the transfer. If a Wallet, sends to the Wallet's default address. If a String, interprets it as the address ID.

    diff --git a/docs/Coinbase/Wallet/Data.html b/docs/Coinbase/Wallet/Data.html index 52ae4b6e..76fa1c12 100644 --- a/docs/Coinbase/Wallet/Data.html +++ b/docs/Coinbase/Wallet/Data.html @@ -339,13 +339,13 @@

     
     
    -171
    -172
    -173
    -174
    +184 +185 +186 +187

    -
    # File 'lib/coinbase/wallet.rb', line 171
    +      
    # File 'lib/coinbase/wallet.rb', line 184
     
     def initialize(wallet_id:, seed:)
       @wallet_id = wallet_id
    @@ -389,12 +389,12 @@ 

     
     
    -166
    -167
    -168
    +179 +180 +181

    -
    # File 'lib/coinbase/wallet.rb', line 166
    +      
    # File 'lib/coinbase/wallet.rb', line 179
     
     def seed
       @seed
    @@ -432,12 +432,12 @@ 

     
     
    -166
    -167
    -168
    +179 +180 +181

    -
    # File 'lib/coinbase/wallet.rb', line 166
    +      
    # File 'lib/coinbase/wallet.rb', line 179
     
     def wallet_id
       @wallet_id
    @@ -518,12 +518,12 @@ 

     
     
    -185
    -186
    -187
    +198 +199 +200

    -
    # File 'lib/coinbase/wallet.rb', line 185
    +      
    # File 'lib/coinbase/wallet.rb', line 198
     
     def self.from_hash(data)
       Data.new(wallet_id: data['wallet_id'], seed: data['seed'])
    @@ -583,12 +583,12 @@ 

     
     
    -178
    -179
    -180
    +191 +192 +193

    -
    # File 'lib/coinbase/wallet.rb', line 178
    +      
    # File 'lib/coinbase/wallet.rb', line 191
     
     def to_hash
       { wallet_id: wallet_id, seed: seed }
    diff --git a/docs/class_list.html b/docs/class_list.html
    index 32f27f47..4075ce63 100644
    --- a/docs/class_list.html
    +++ b/docs/class_list.html
    @@ -43,7 +43,7 @@ 

    Class List

    diff --git a/docs/file.README.html b/docs/file.README.html index 7c307d7d..757359fe 100644 --- a/docs/file.README.html +++ b/docs/file.README.html @@ -60,7 +60,7 @@

    Coinbase Ruby SDK

    -

    The Coinbase Ruby SDK enables the simple integration of crypto into your app. By calling Coinbase’s Platform APIs, the SDK allows you to provision crypto wallets, send crypto into/out of those wallets, track wallet balances, and trade crypto from one asset into another.

    +

    The Coinbase Ruby SDK enables the simple integration of crypto into your app. By calling Coinbase's Platform APIs, the SDK allows you to provision crypto wallets, send crypto into/out of those wallets, track wallet balances, and trade crypto from one asset into another.

    The SDK currently supports Customer-custodied Wallets on the Base Sepolia test network.

    @@ -122,7 +122,7 @@

    Usage

    Initialization

    -

    To start, create a CDP API Key. Then, initialize the Platform SDK by passing your API Key name and API Key’s private key via the configure method:

    +

    To start, create a CDP API Key. Then, initialize the Platform SDK by passing your API Key name and API Key's private key via the configure method:

    api_key_name = 'Copy your API Key name here.'
     api_key_private_key = 'Copy your API Key\'s private key here.'
    @@ -133,6 +133,11 @@ 

    Initialization

    end
    +

    Another way to initialize the SDK is by sourcing the API key from the json file that contains your API key, downloaded from CDP portal.

    + +
    Coinbase.configure_from_json('~/Downloads/coinbase_cloud_api_key.json')
    +
    +

    This will allow you to authenticate with the Platform APIs and get access to the default_user.

    u = Coinbase.default_user
    @@ -153,7 +158,14 @@ 

    Wallets, Addresses, and Tra a.to_s

    -

    Wallets do not have funds on them to start. In order to fund the Address, you will need to send funds to the Wallet you generated above. If you don’t have testnet funds, get funds from a faucet.

    +

    Wallets do not have funds on them to start. In order to fund the Address, you will need to send funds to the Wallet you generated above. If you don't have testnet funds, get funds from a faucet.

    + +

    For development purposes, we provide a faucet method to fund your address with ETH on Base Sepolia testnet. We allow one faucet claim per address in a 24 hour window.

    + +
    # Create a faucet request that returns you a Faucet transaction that can be used to track the tx hash.
    +faucet_tx = a.faucet
    +faucet_tx.transaction_hash
    +
    # Create a new Wallet to transfer funds to.
     # Then, we can transfer 0.00001 ETH out of the Wallet to another Wallet.
    @@ -178,14 +190,11 @@ 

    Re-Instantiating Wallets

    store(data)
    -

    For convenience during testing, we provide a save_wallet method that stores the Wallet data in your local file system. This is an insecure method of storing wallet seeds and should only be used for development purposes.

    +

    For convenience during testing, we provide a save_wallet method that stores the Wallet data in your local file system. This is an insecure method of storing wallet seeds and should only be used for development purposes. ruby u.save_wallet(w3)

    -
    u.save_wallet(w3)
    -
    - -

    To encrypt the saved data, set encrypt to true.

    +

    To encrypt the saved data, set encrypt to true. Note that your CDP API key also serves as the encryption key for the data persisted locally. To re-instantiate wallets with encrypted data, ensure that your SDK is configured with the same API key when invoking save_wallet and load_wallets.

    -
    u.save_wallet(w3, true)
    +
    u.save_wallet(w3, encrypt: true)
     

    The below code demonstrates how to re-instantiate a Wallet from the data export.

    @@ -195,13 +204,7 @@

    Re-Instantiating Wallets

    w4 = u.import_wallet(data)
    -

    To import wallets that were persisted to your local file system using save_wallet, use the below code.

    - -
    # The Wallet can be re-instantiated using the exported data.
    -# w5 will be equivalent to w3.
    -wallets = u.load_wallets
    -w5 = wallets[w3.wallet_id]
    -
    +

    To import wallets that were persisted to your local file system using save_wallet, use the below code. ruby # The Wallet can be re-instantiated using the exported data. # w5 will be equivalent to w3. wallets = u.load_wallets w5 = wallets[w3.wallet_id]

    Development

    diff --git a/docs/index.html b/docs/index.html index 33c13439..21e1615f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -60,7 +60,7 @@

    Coinbase Ruby SDK

    -

    The Coinbase Ruby SDK enables the simple integration of crypto into your app. By calling Coinbase’s Platform APIs, the SDK allows you to provision crypto wallets, send crypto into/out of those wallets, track wallet balances, and trade crypto from one asset into another.

    +

    The Coinbase Ruby SDK enables the simple integration of crypto into your app. By calling Coinbase's Platform APIs, the SDK allows you to provision crypto wallets, send crypto into/out of those wallets, track wallet balances, and trade crypto from one asset into another.

    The SDK currently supports Customer-custodied Wallets on the Base Sepolia test network.

    @@ -122,7 +122,7 @@

    Usage

    Initialization

    -

    To start, create a CDP API Key. Then, initialize the Platform SDK by passing your API Key name and API Key’s private key via the configure method:

    +

    To start, create a CDP API Key. Then, initialize the Platform SDK by passing your API Key name and API Key's private key via the configure method:

    api_key_name = 'Copy your API Key name here.'
     api_key_private_key = 'Copy your API Key\'s private key here.'
    @@ -133,6 +133,11 @@ 

    Initialization

    end
    +

    Another way to initialize the SDK is by sourcing the API key from the json file that contains your API key, downloaded from CDP portal.

    + +
    Coinbase.configure_from_json('~/Downloads/coinbase_cloud_api_key.json')
    +
    +

    This will allow you to authenticate with the Platform APIs and get access to the default_user.

    u = Coinbase.default_user
    @@ -153,7 +158,14 @@ 

    Wallets, Addresses, and Tra a.to_s

    -

    Wallets do not have funds on them to start. In order to fund the Address, you will need to send funds to the Wallet you generated above. If you don’t have testnet funds, get funds from a faucet.

    +

    Wallets do not have funds on them to start. In order to fund the Address, you will need to send funds to the Wallet you generated above. If you don't have testnet funds, get funds from a faucet.

    + +

    For development purposes, we provide a faucet method to fund your address with ETH on Base Sepolia testnet. We allow one faucet claim per address in a 24 hour window.

    + +
    # Create a faucet request that returns you a Faucet transaction that can be used to track the tx hash.
    +faucet_tx = a.faucet
    +faucet_tx.transaction_hash
    +
    # Create a new Wallet to transfer funds to.
     # Then, we can transfer 0.00001 ETH out of the Wallet to another Wallet.
    @@ -178,14 +190,11 @@ 

    Re-Instantiating Wallets

    store(data)
    -

    For convenience during testing, we provide a save_wallet method that stores the Wallet data in your local file system. This is an insecure method of storing wallet seeds and should only be used for development purposes.

    +

    For convenience during testing, we provide a save_wallet method that stores the Wallet data in your local file system. This is an insecure method of storing wallet seeds and should only be used for development purposes. ruby u.save_wallet(w3)

    -
    u.save_wallet(w3)
    -
    - -

    To encrypt the saved data, set encrypt to true.

    +

    To encrypt the saved data, set encrypt to true. Note that your CDP API key also serves as the encryption key for the data persisted locally. To re-instantiate wallets with encrypted data, ensure that your SDK is configured with the same API key when invoking save_wallet and load_wallets.

    -
    u.save_wallet(w3, true)
    +
    u.save_wallet(w3, encrypt: true)
     

    The below code demonstrates how to re-instantiate a Wallet from the data export.

    @@ -195,13 +204,7 @@

    Re-Instantiating Wallets

    w4 = u.import_wallet(data)
    -

    To import wallets that were persisted to your local file system using save_wallet, use the below code.

    - -
    # The Wallet can be re-instantiated using the exported data.
    -# w5 will be equivalent to w3.
    -wallets = u.load_wallets
    -w5 = wallets[w3.wallet_id]
    -
    +

    To import wallets that were persisted to your local file system using save_wallet, use the below code. ruby # The Wallet can be re-instantiated using the exported data. # w5 will be equivalent to w3. wallets = u.load_wallets w5 = wallets[w3.wallet_id]

    Development

    diff --git a/docs/method_list.html b/docs/method_list.html index 016d111c..3dbc1527 100644 --- a/docs/method_list.html +++ b/docs/method_list.html @@ -46,192 +46,192 @@

    Method List

  • - #== - Coinbase::Client::BroadcastTransferRequest + #== + Coinbase::Client::Transfer
  • - #== - Coinbase::Client::Balance + #== + Coinbase::Client::CreateTransferRequest
  • - #== - Coinbase::Client::FaucetTransaction + #== + Coinbase::Client::User
  • - #== - Coinbase::Client::Transfer + #== + Coinbase::Client::TransferList
  • - #== - Coinbase::Client::User + #== + Coinbase::Client::Asset
  • - #== - Coinbase::Client::Address + #== + Coinbase::Client::BroadcastTransferRequest
  • - #== - Coinbase::Client::Wallet + #== + Coinbase::Client::CreateWalletRequest
  • - #== - Coinbase::Client::CreateTransferRequest + #== + Coinbase::Client::WalletList
  • - #== - Coinbase::Client::TransferList + #== + Coinbase::Client::AddressList
  • - #== - Coinbase::Client::AddressBalanceList + #== + Coinbase::Client::Balance
  • - #== - Coinbase::Client::CreateAddressRequest + #== + Coinbase::Client::FaucetTransaction
  • - #== - Coinbase::Client::CreateWalletRequest + #== + Coinbase::Client::Address
  • - #== - Coinbase::Client::AddressList + #== + Coinbase::Client::Wallet
  • - #== - Coinbase::Client::Error + #== + Coinbase::Client::CreateAddressRequest
  • - #== - Coinbase::Client::Asset + #== + Coinbase::Client::AddressBalanceList
  • - #== - Coinbase::Client::WalletList + #== + Coinbase::Client::Error
  • - _deserialize - Coinbase::Client::TransferList + #[] + Coinbase::BalanceMap
  • - _deserialize - Coinbase::Client::AddressBalanceList + #[]= + Coinbase::BalanceMap
  • - _deserialize - Coinbase::Client::Wallet + _deserialize + Coinbase::Client::AddressBalanceList
  • - _deserialize - Coinbase::Client::Address + _deserialize + Coinbase::Client::AddressList
  • - _deserialize - Coinbase::Client::BroadcastTransferRequest + _deserialize + Coinbase::Client::Balance
  • - _deserialize - Coinbase::Client::Asset + _deserialize + Coinbase::Client::Wallet
  • - _deserialize - Coinbase::Client::Balance + _deserialize + Coinbase::Client::BroadcastTransferRequest
  • - _deserialize - Coinbase::Client::CreateTransferRequest + _deserialize + Coinbase::Client::Address
  • @@ -246,136 +246,136 @@

    Method List

  • - _deserialize - Coinbase::Client::Transfer + _deserialize + Coinbase::Client::CreateTransferRequest
  • - _deserialize - Coinbase::Client::WalletList + _deserialize + Coinbase::Client::Asset
  • - _deserialize - Coinbase::Client::AddressList + _deserialize + Coinbase::Client::TransferList
  • - _deserialize - Coinbase::Client::CreateAddressRequest + _deserialize + Coinbase::Client::FaucetTransaction
  • - _deserialize - Coinbase::Client::Error + _deserialize + Coinbase::Client::CreateAddressRequest
  • - _deserialize - Coinbase::Client::CreateWalletRequest + _deserialize + Coinbase::Client::WalletList
  • - _deserialize - Coinbase::Client::FaucetTransaction + _deserialize + Coinbase::Client::Error
  • - #_to_hash - Coinbase::Client::TransferList + _deserialize + Coinbase::Client::Transfer
  • - #_to_hash - Coinbase::Client::Address + _deserialize + Coinbase::Client::CreateWalletRequest
  • - #_to_hash - Coinbase::Client::Wallet + #_to_hash + Coinbase::Client::TransferList
  • - #_to_hash - Coinbase::Client::CreateAddressRequest + #_to_hash + Coinbase::Client::FaucetTransaction
  • - #_to_hash - Coinbase::Client::CreateWalletRequest + #_to_hash + Coinbase::Client::Error
  • - #_to_hash - Coinbase::Client::AddressList + #_to_hash + Coinbase::Client::CreateAddressRequest
  • - #_to_hash - Coinbase::Client::BroadcastTransferRequest + #_to_hash + Coinbase::Client::Wallet
  • - #_to_hash - Coinbase::Client::AddressBalanceList + #_to_hash + Coinbase::Client::User
  • - #_to_hash - Coinbase::Client::User + #_to_hash + Coinbase::Client::Transfer
  • - #_to_hash - Coinbase::Client::Asset + #_to_hash + Coinbase::Client::AddressList
  • @@ -390,32 +390,32 @@

    Method List

  • - #_to_hash - Coinbase::Client::CreateTransferRequest + #_to_hash + Coinbase::Client::Address
  • - #_to_hash - Coinbase::Client::FaucetTransaction + #_to_hash + Coinbase::Client::CreateTransferRequest
  • - #_to_hash - Coinbase::Client::Transfer + #_to_hash + Coinbase::Client::BroadcastTransferRequest
  • - #_to_hash - Coinbase::Client::Error + #_to_hash + Coinbase::Client::Asset
  • @@ -430,40 +430,40 @@

    Method List

  • - acceptable_attributes - Coinbase::Client::CreateWalletRequest + #_to_hash + Coinbase::Client::AddressBalanceList
  • - acceptable_attributes - Coinbase::Client::BroadcastTransferRequest + #_to_hash + Coinbase::Client::CreateWalletRequest
  • - acceptable_attributes - Coinbase::Client::CreateTransferRequest + acceptable_attributes + Coinbase::Client::Asset
  • - acceptable_attributes - Coinbase::Client::CreateAddressRequest + acceptable_attributes + Coinbase::Client::User
  • - acceptable_attributes - Coinbase::Client::AddressBalanceList + acceptable_attributes + Coinbase::Client::Transfer
  • @@ -478,64 +478,64 @@

    Method List

  • - acceptable_attributes - Coinbase::Client::TransferList + acceptable_attributes + Coinbase::Client::Balance
  • - acceptable_attributes - Coinbase::Client::AddressList + acceptable_attributes + Coinbase::Client::CreateTransferRequest
  • - acceptable_attributes - Coinbase::Client::WalletList + acceptable_attributes + Coinbase::Client::Error
  • - acceptable_attributes - Coinbase::Client::User + acceptable_attributes + Coinbase::Client::CreateWalletRequest
  • - acceptable_attributes - Coinbase::Client::Transfer + acceptable_attributes + Coinbase::Client::CreateAddressRequest
  • - acceptable_attributes - Coinbase::Client::Asset + acceptable_attributes + Coinbase::Client::WalletList
  • - acceptable_attributes - Coinbase::Client::Balance + acceptable_attributes + Coinbase::Client::AddressBalanceList
  • - acceptable_attributes - Coinbase::Client::Error + acceptable_attributes + Coinbase::Client::BroadcastTransferRequest
  • @@ -549,6 +549,14 @@

    Method List

  • +
    + acceptable_attributes + Coinbase::Client::AddressList +
    +
  • + + +
  • acceptable_attributes Coinbase::Client::Wallet @@ -556,6 +564,14 @@

    Method List

  • +
  • +
    + acceptable_attributes + Coinbase::Client::TransferList +
    +
  • + +
  • #access_token @@ -590,16 +606,16 @@

    Method List

  • - #address_id - Coinbase::Address + #address_id + Coinbase::Client::Transfer
  • - #address_id - Coinbase::Client::Transfer + #address_id + Coinbase::Address
  • @@ -630,56 +646,56 @@

    Method List

  • - #amount - Coinbase::Client::Balance + #amount + Coinbase::Transfer
  • - #amount - Coinbase::Transfer + #amount + Coinbase::Client::Transfer
  • - #amount - Coinbase::Client::Transfer + #amount + Coinbase::Client::Balance
  • - #api_client - Coinbase::Client::WalletsApi + #api_client + Coinbase::Client::UsersApi
  • - #api_client - Coinbase::Client::UsersApi + #api_client + Coinbase::Configuration
  • - #api_client - Coinbase::Configuration + #api_client + Coinbase::Client::AddressesApi
  • - #api_client - Coinbase::Client::AddressesApi + #api_client + Coinbase::Client::WalletsApi
  • @@ -766,40 +782,40 @@

    Method List

  • - #asset_id - Coinbase::Client::Asset + #asset_id + Coinbase::Client::CreateTransferRequest
  • - #asset_id - Coinbase::Client::CreateTransferRequest + #asset_id + Coinbase::Client::Asset
  • - #asset_id - Coinbase::Asset + #asset_id + Coinbase::Transfer
  • - #asset_id - Coinbase::Client::Transfer + #asset_id + Coinbase::Asset
  • - #asset_id - Coinbase::Transfer + #asset_id + Coinbase::Client::Transfer
  • @@ -814,128 +830,128 @@

    Method List

  • - attribute_map - Coinbase::Client::FaucetTransaction + attribute_map + Coinbase::Client::TransferList
  • - attribute_map - Coinbase::Client::CreateAddressRequest + attribute_map + Coinbase::Client::CreateWalletRequest
  • - attribute_map - Coinbase::Client::TransferList + attribute_map + Coinbase::Client::AddressBalanceList
  • - attribute_map - Coinbase::Client::AddressList + attribute_map + Coinbase::Client::WalletList
  • - attribute_map - Coinbase::Client::WalletList + attribute_map + Coinbase::Client::CreateAddressRequest
  • - attribute_map - Coinbase::Client::User + attribute_map + Coinbase::Client::Error
  • - attribute_map - Coinbase::Client::Transfer + attribute_map + Coinbase::Client::CreateTransferRequest
  • - attribute_map - Coinbase::Client::CreateTransferRequest + attribute_map + Coinbase::Client::FaucetTransaction
  • - attribute_map - Coinbase::Client::BroadcastTransferRequest + attribute_map + Coinbase::Client::Transfer
  • - attribute_map - Coinbase::Client::Asset + attribute_map + Coinbase::Client::AddressList
  • - attribute_map - Coinbase::Client::Balance + attribute_map + Coinbase::Client::User
  • - attribute_map - Coinbase::Client::Error + attribute_map + Coinbase::Client::Wallet
  • - attribute_map - Coinbase::Client::Address + attribute_map + Coinbase::Client::BroadcastTransferRequest
  • - attribute_map - Coinbase::Client::Wallet + attribute_map + Coinbase::Client::Balance
  • - attribute_map - Coinbase::Client::CreateWalletRequest + attribute_map + Coinbase::Client::Address
  • - attribute_map - Coinbase::Client::AddressBalanceList + attribute_map + Coinbase::Client::Asset
  • @@ -1046,80 +1062,80 @@

    Method List

  • - build_from_hash - Coinbase::Client::Transfer + build_from_hash + Coinbase::Client::CreateAddressRequest
  • - build_from_hash - Coinbase::Client::AddressBalanceList + build_from_hash + Coinbase::Client::FaucetTransaction
  • - build_from_hash - Coinbase::Client::User + build_from_hash + Coinbase::Client::AddressBalanceList
  • - build_from_hash - Coinbase::Client::Wallet + build_from_hash + Coinbase::Client::Address
  • - build_from_hash - Coinbase::Client::CreateTransferRequest + build_from_hash + Coinbase::Client::Wallet
  • - build_from_hash - Coinbase::Client::Error + build_from_hash + Coinbase::Client::Balance
  • - build_from_hash - Coinbase::Client::CreateAddressRequest + build_from_hash + Coinbase::Client::CreateTransferRequest
  • - build_from_hash - Coinbase::Client::AddressList + build_from_hash + Coinbase::Client::TransferList
  • - build_from_hash - Coinbase::Client::Balance + build_from_hash + Coinbase::Client::CreateWalletRequest
  • - build_from_hash - Coinbase::Client::TransferList + build_from_hash + Coinbase::Client::Asset
  • @@ -1134,32 +1150,32 @@

    Method List

  • - build_from_hash - Coinbase::Client::FaucetTransaction + build_from_hash + Coinbase::Client::User
  • - build_from_hash - Coinbase::Client::Asset + build_from_hash + Coinbase::Client::AddressList
  • - build_from_hash - Coinbase::Client::Address + build_from_hash + Coinbase::Client::Error
  • - build_from_hash - Coinbase::Client::CreateWalletRequest + build_from_hash + Coinbase::Client::Transfer
  • @@ -1254,16 +1270,16 @@

    Method List

  • - #config - Coinbase::Client::ApiClient + config + Coinbase::Middleware
  • - config - Coinbase::Middleware + #config + Coinbase::Client::ApiClient
  • @@ -1286,16 +1302,16 @@

    Method List

  • - #configure - Coinbase::Client::Configuration + configure + Coinbase
  • - configure - Coinbase + #configure + Coinbase::Client::Configuration
  • @@ -1438,8 +1454,8 @@

    Method List

  • - #data - Coinbase::Client::TransferList + #data + Coinbase::Client::AddressBalanceList
  • @@ -1454,8 +1470,8 @@

    Method List

  • - #data - Coinbase::Client::AddressBalanceList + #data + Coinbase::Client::TransferList
  • @@ -1518,16 +1534,16 @@

    Method List

  • - #default_address - Coinbase::Wallet + #default_address + Coinbase::Client::Wallet
  • - #default_address - Coinbase::Client::Wallet + #default_address + Coinbase::Wallet
  • @@ -1566,16 +1582,16 @@

    Method List

  • - #destination - Coinbase::Client::Transfer + #destination + Coinbase::Client::CreateTransferRequest
  • - #destination - Coinbase::Client::CreateTransferRequest + #destination + Coinbase::Client::Transfer
  • @@ -1614,112 +1630,112 @@

    Method List

  • - #eql? - Coinbase::Client::Address + #eql? + Coinbase::Client::Transfer
  • - #eql? - Coinbase::Client::User + #eql? + Coinbase::Client::Address
  • - #eql? - Coinbase::Client::Asset + #eql? + Coinbase::Client::Wallet
  • - #eql? - Coinbase::Client::Error + #eql? + Coinbase::Client::Balance
  • - #eql? - Coinbase::Client::Wallet + #eql? + Coinbase::Client::AddressBalanceList
  • - #eql? - Coinbase::Client::Balance + #eql? + Coinbase::Client::AddressList
  • - #eql? - Coinbase::Client::Transfer + #eql? + Coinbase::Client::Error
  • - #eql? - Coinbase::Client::WalletList + #eql? + Coinbase::Client::CreateWalletRequest
  • - #eql? - Coinbase::Client::AddressList + #eql? + Coinbase::Client::BroadcastTransferRequest
  • - #eql? - Coinbase::Client::TransferList + #eql? + Coinbase::Client::WalletList
  • - #eql? - Coinbase::Client::FaucetTransaction + #eql? + Coinbase::Client::User
  • - #eql? - Coinbase::Client::AddressBalanceList + #eql? + Coinbase::Client::FaucetTransaction
  • - #eql? - Coinbase::Client::CreateWalletRequest + #eql? + Coinbase::Client::CreateAddressRequest
  • - #eql? - Coinbase::Client::CreateAddressRequest + #eql? + Coinbase::Client::Asset
  • @@ -1734,8 +1750,8 @@

    Method List

  • - #eql? - Coinbase::Client::BroadcastTransferRequest + #eql? + Coinbase::Client::TransferList
  • @@ -1798,16 +1814,16 @@

    Method List

  • - #get_address - Coinbase::Wallet + #get_address + Coinbase::Client::AddressesApi
  • - #get_address - Coinbase::Client::AddressesApi + #get_address + Coinbase::Wallet
  • @@ -1846,16 +1862,16 @@

    Method List

  • - #get_balance - Coinbase::Wallet + #get_balance + Coinbase::Address
  • - #get_balance - Coinbase::Address + #get_balance + Coinbase::Wallet
  • @@ -1932,6 +1948,22 @@

    Method List

    +
  • +
    + #has_more + Coinbase::Client::TransferList +
    +
  • + + +
  • +
    + #has_more + Coinbase::Client::WalletList +
    +
  • + +
  • #has_more @@ -1942,48 +1974,48 @@

    Method List

  • - #has_more - Coinbase::Client::TransferList + #hash + Coinbase::Client::WalletList
  • - #has_more - Coinbase::Client::WalletList + #hash + Coinbase::Client::CreateWalletRequest
  • - #hash - Coinbase::Client::Address + #hash + Coinbase::Client::AddressBalanceList
  • - #hash - Coinbase::Client::TransferList + #hash + Coinbase::Client::Error
  • - #hash - Coinbase::Client::WalletList + #hash + Coinbase::Client::Address
  • - #hash - Coinbase::Client::Balance + #hash + Coinbase::Client::Wallet
  • @@ -1998,24 +2030,40 @@

    Method List

  • - #hash - Coinbase::Client::Error + #hash + Coinbase::Client::TransferList
  • - #hash - Coinbase::Client::CreateWalletRequest + #hash + Coinbase::Client::Asset
  • - #hash - Coinbase::Client::Wallet + #hash + Coinbase::Client::CreateTransferRequest +
    +
  • + + +
  • +
    + #hash + Coinbase::Client::BroadcastTransferRequest +
    +
  • + + +
  • +
    + #hash + Coinbase::Client::CreateAddressRequest
  • @@ -2030,400 +2078,416 @@

    Method List

  • - #hash - Coinbase::Client::BroadcastTransferRequest + #hash + Coinbase::Client::User +
    +
  • + + +
  • +
    + #hash + Coinbase::Client::Balance +
    +
  • + + +
  • +
    + #hash + Coinbase::Client::Transfer
  • - #hash - Coinbase::Client::Asset + #host + Coinbase::Client::Configuration
  • - #hash - Coinbase::Client::CreateAddressRequest + #http_code + Coinbase::APIError
  • - #hash - Coinbase::Client::AddressBalanceList + #id + Coinbase::Client::Wallet
  • - #hash - Coinbase::Client::Transfer + #id + Coinbase::Client::User
  • - #hash - Coinbase::Client::User + #import_wallet + Coinbase::User
  • - #hash - Coinbase::Client::CreateTransferRequest + #initialize + Coinbase::Client::CreateWalletRequest
  • - #host - Coinbase::Client::Configuration + #initialize + Coinbase::Configuration
  • - #http_code - Coinbase::APIError + #initialize + Coinbase::User
  • - #id - Coinbase::Client::User + #initialize + Coinbase::Asset
  • - #id - Coinbase::Client::Wallet + #initialize + Coinbase::APIError
  • - #import_wallet - Coinbase::User + #initialize + Coinbase::Wallet
  • - #initialize - Coinbase::Client::AddressList + #initialize + Coinbase::Wallet::Data
  • - #initialize - Coinbase::Transfer + #initialize + Coinbase::Address
  • - #initialize - Coinbase::Client::CreateAddressRequest + #initialize + Coinbase::Network
  • - #initialize - Coinbase::Client::ApiError + #initialize + Coinbase::Transfer
  • - #initialize - Coinbase::Client::BroadcastTransferRequest + #initialize + Coinbase::BalanceMap
  • - #initialize - Coinbase::BalanceMap + #initialize + Coinbase::Authenticator
  • - #initialize - Coinbase::Client::CreateTransferRequest + #initialize + Coinbase::Client::ApiError
  • - #initialize - Coinbase::Authenticator + #initialize + Coinbase::Client::ApiClient
  • - #initialize - Coinbase::Client::UsersApi + #initialize + Coinbase::Client::User
  • - #initialize - Coinbase::Client::Error + #initialize + Coinbase::FaucetTransaction
  • - #initialize - Coinbase::Client::WalletList + #initialize + Coinbase::Client::Asset
  • - #initialize - Coinbase::Client::CreateWalletRequest + #initialize + Coinbase::Client::Error
  • - #initialize - Coinbase::Client::Address + #initialize + Coinbase::Client::UsersApi
  • - #initialize - Coinbase::Client::TransferList + #initialize + Coinbase::Client::Configuration
  • - #initialize - Coinbase::User + #initialize + Coinbase::Client::Wallet
  • - #initialize - Coinbase::Client::ApiClient + #initialize + Coinbase::Client::Address
  • - #initialize - Coinbase::Asset + #initialize + Coinbase::Client::Balance
  • - #initialize - Coinbase::Client::AddressBalanceList + #initialize + Coinbase::Client::WalletsApi
  • - #initialize - Coinbase::APIError + #initialize + Coinbase::Client::Transfer::EnumAttributeValidator
  • - #initialize - Coinbase::Client::FaucetTransaction + #initialize + Coinbase::Client::Transfer
  • - #initialize - Coinbase::Wallet + #initialize + Coinbase::Client::AddressesApi
  • - #initialize - Coinbase::Client::Asset + #initialize + Coinbase::Client::TransfersApi
  • - #initialize - Coinbase::Client::TransfersApi + #initialize + Coinbase::Client::WalletList
  • - #initialize - Coinbase::Client::Balance + #initialize + Coinbase::Client::AddressList
  • - #initialize - Coinbase::Client::WalletsApi + #initialize + Coinbase::Client::TransferList
  • - #initialize - Coinbase::FaucetTransaction + #initialize + Coinbase::Client::FaucetTransaction
  • - #initialize - Coinbase::Network + #initialize + Coinbase::Client::AddressBalanceList
  • - #initialize - Coinbase::Client::Transfer + #initialize + Coinbase::Client::CreateAddressRequest
  • - #initialize - Coinbase::Wallet::Data + #initialize + Coinbase::Client::CreateTransferRequest
  • - #initialize - Coinbase::Client::Transfer::EnumAttributeValidator + #initialize + Coinbase::Client::BroadcastTransferRequest
  • - #initialize - Coinbase::Address + #inject_format + Coinbase::Client::Configuration
  • - #initialize - Coinbase::Client::AddressesApi + #inspect + Coinbase::Transfer
  • - #initialize - Coinbase::Client::Configuration + #inspect + Coinbase::User
  • - #initialize - Coinbase::Client::User + #inspect + Coinbase::Wallet
  • - #initialize - Coinbase::Client::Wallet + #inspect + Coinbase::BalanceMap
  • - #initialize - Coinbase::Configuration + #inspect + Coinbase::APIError
  • - #inject_format - Coinbase::Client::Configuration + #inspect + Coinbase::FaucetTransaction
  • - #inspect - Coinbase::BalanceMap + #inspect + Coinbase::Address
  • @@ -2510,16 +2574,16 @@

    Method List

  • - #list_invalid_properties - Coinbase::Client::Wallet + #list_invalid_properties + Coinbase::Client::CreateAddressRequest
  • - #list_invalid_properties - Coinbase::Client::CreateTransferRequest + #list_invalid_properties + Coinbase::Client::WalletList
  • @@ -2534,96 +2598,96 @@

    Method List

  • - #list_invalid_properties - Coinbase::Client::Asset + #list_invalid_properties + Coinbase::Client::Balance
  • - #list_invalid_properties - Coinbase::Client::Balance + #list_invalid_properties + Coinbase::Client::Wallet
  • - #list_invalid_properties - Coinbase::Client::CreateAddressRequest + #list_invalid_properties + Coinbase::Client::AddressList
  • - #list_invalid_properties - Coinbase::Client::BroadcastTransferRequest + #list_invalid_properties + Coinbase::Client::User
  • - #list_invalid_properties - Coinbase::Client::CreateWalletRequest + #list_invalid_properties + Coinbase::Client::AddressBalanceList
  • - #list_invalid_properties - Coinbase::Client::User + #list_invalid_properties + Coinbase::Client::Asset
  • - #list_invalid_properties - Coinbase::Client::Transfer + #list_invalid_properties + Coinbase::Client::BroadcastTransferRequest
  • - #list_invalid_properties - Coinbase::Client::AddressBalanceList + #list_invalid_properties + Coinbase::Client::Transfer
  • - #list_invalid_properties - Coinbase::Client::WalletList + #list_invalid_properties + Coinbase::Client::TransferList
  • - #list_invalid_properties - Coinbase::Client::FaucetTransaction + #list_invalid_properties + Coinbase::Client::CreateTransferRequest
  • - #list_invalid_properties - Coinbase::Client::AddressList + #list_invalid_properties + Coinbase::Client::FaucetTransaction
  • - #list_invalid_properties - Coinbase::Client::TransferList + #list_invalid_properties + Coinbase::Client::CreateWalletRequest
  • @@ -2742,40 +2806,40 @@

    Method List

  • - #network_id - Coinbase::Asset + #network_id + Coinbase::Address
  • - #network_id - Coinbase::Address + #network_id + Coinbase::Transfer
  • - #network_id - Coinbase::Wallet + #network_id + Coinbase::Client::Asset
  • - #network_id - Coinbase::Client::Asset + #network_id + Coinbase::Wallet
  • - #network_id - Coinbase::Transfer + #network_id + Coinbase::Asset
  • @@ -2830,16 +2894,16 @@

    Method List

  • - #next_page - Coinbase::Client::WalletList + #next_page + Coinbase::Client::TransferList
  • - #next_page - Coinbase::Client::TransferList + #next_page + Coinbase::Client::WalletList
  • @@ -2862,16 +2926,16 @@

    Method List

  • - openapi_nullable - Coinbase::Client::User + openapi_nullable + Coinbase::Client::Wallet
  • - openapi_nullable - Coinbase::Client::CreateWalletRequest + openapi_nullable + Coinbase::Client::Balance
  • @@ -2886,136 +2950,136 @@

    Method List

  • - openapi_nullable - Coinbase::Client::Asset + openapi_nullable + Coinbase::Client::WalletList
  • - openapi_nullable - Coinbase::Client::Balance + openapi_nullable + Coinbase::Client::CreateWalletRequest
  • - openapi_nullable - Coinbase::Client::AddressBalanceList + openapi_nullable + Coinbase::Client::FaucetTransaction
  • - openapi_nullable - Coinbase::Client::Address + openapi_nullable + Coinbase::Client::CreateTransferRequest
  • - openapi_nullable - Coinbase::Client::WalletList + openapi_nullable + Coinbase::Client::BroadcastTransferRequest
  • - openapi_nullable - Coinbase::Client::Error + openapi_nullable + Coinbase::Client::TransferList
  • - openapi_nullable - Coinbase::Client::TransferList + openapi_nullable + Coinbase::Client::Asset
  • - openapi_nullable - Coinbase::Client::CreateTransferRequest + openapi_nullable + Coinbase::Client::Error
  • - openapi_nullable - Coinbase::Client::Wallet + openapi_nullable + Coinbase::Client::Transfer
  • - openapi_nullable - Coinbase::Client::AddressList + openapi_nullable + Coinbase::Client::User
  • - openapi_nullable - Coinbase::Client::FaucetTransaction + openapi_nullable + Coinbase::Client::AddressBalanceList
  • - openapi_nullable - Coinbase::Client::BroadcastTransferRequest + openapi_nullable + Coinbase::Client::Address
  • - openapi_nullable - Coinbase::Client::Transfer + openapi_nullable + Coinbase::Client::AddressList
  • - openapi_types - Coinbase::Client::Error + openapi_types + Coinbase::Client::Asset
  • - openapi_types - Coinbase::Client::Balance + openapi_types + Coinbase::Client::BroadcastTransferRequest
  • - openapi_types - Coinbase::Client::CreateTransferRequest + openapi_types + Coinbase::Client::Wallet
  • - openapi_types - Coinbase::Client::CreateWalletRequest + openapi_types + Coinbase::Client::Balance
  • @@ -3030,88 +3094,88 @@

    Method List

  • - openapi_types - Coinbase::Client::Wallet + openapi_types + Coinbase::Client::CreateTransferRequest
  • - openapi_types - Coinbase::Client::Asset + openapi_types + Coinbase::Client::WalletList
  • - openapi_types - Coinbase::Client::AddressList + openapi_types + Coinbase::Client::Error
  • - openapi_types - Coinbase::Client::TransferList + openapi_types + Coinbase::Client::Address
  • - openapi_types - Coinbase::Client::FaucetTransaction + openapi_types + Coinbase::Client::CreateAddressRequest
  • - openapi_types - Coinbase::Client::CreateAddressRequest + openapi_types + Coinbase::Client::AddressList
  • - openapi_types - Coinbase::Client::BroadcastTransferRequest + openapi_types + Coinbase::Client::CreateWalletRequest
  • - openapi_types - Coinbase::Client::User + openapi_types + Coinbase::Client::TransferList
  • - openapi_types - Coinbase::Client::WalletList + openapi_types + Coinbase::Client::User
  • - openapi_types - Coinbase::Client::Address + openapi_types + Coinbase::Client::AddressBalanceList
  • - openapi_types - Coinbase::Client::AddressBalanceList + openapi_types + Coinbase::Client::FaucetTransaction
  • @@ -3150,16 +3214,16 @@

    Method List

  • - #public_key - Coinbase::Client::CreateAddressRequest + #public_key + Coinbase::Client::Address
  • - #public_key - Coinbase::Client::Address + #public_key + Coinbase::Client::CreateAddressRequest
  • @@ -3326,24 +3390,24 @@

    Method List

  • - #signed_payload - Coinbase::Client::BroadcastTransferRequest + #signed_payload + Coinbase::Client::Transfer
  • - #signed_payload - Coinbase::Client::Transfer + #signed_payload + Coinbase::Transfer
  • - #signed_payload - Coinbase::Transfer + #signed_payload + Coinbase::Client::BroadcastTransferRequest
  • @@ -3398,16 +3462,16 @@

    Method List

  • - #status - Coinbase::Transfer + #status + Coinbase::Client::Transfer
  • - #status - Coinbase::Client::Transfer + #status + Coinbase::Transfer
  • @@ -3438,64 +3502,64 @@

    Method List

  • - #to_body - Coinbase::Client::CreateWalletRequest + #to_body + Coinbase::Client::Asset
  • - #to_body - Coinbase::Client::AddressList + #to_body + Coinbase::Client::Wallet
  • - #to_body - Coinbase::Client::AddressBalanceList + #to_body + Coinbase::Client::Transfer
  • - #to_body - Coinbase::Client::BroadcastTransferRequest + #to_body + Coinbase::Client::Error
  • - #to_body - Coinbase::Client::Error + #to_body + Coinbase::Client::WalletList
  • - #to_body - Coinbase::Client::Asset + #to_body + Coinbase::Client::AddressList
  • - #to_body - Coinbase::Client::WalletList + #to_body + Coinbase::Client::User
  • - #to_body - Coinbase::Client::Transfer + #to_body + Coinbase::Client::TransferList
  • @@ -3510,8 +3574,24 @@

    Method List

  • - #to_body - Coinbase::Client::CreateTransferRequest + #to_body + Coinbase::Client::AddressBalanceList +
    +
  • + + +
  • +
    + #to_body + Coinbase::Client::CreateWalletRequest +
    +
  • + + +
  • +
    + #to_body + Coinbase::Client::BroadcastTransferRequest
  • @@ -3526,16 +3606,16 @@

    Method List

  • - #to_body - Coinbase::Client::Wallet + #to_body + Coinbase::Client::CreateTransferRequest
  • - #to_body - Coinbase::Client::TransferList + #to_body + Coinbase::Client::Address
  • @@ -3550,160 +3630,176 @@

    Method List

  • - #to_body - Coinbase::Client::Address + #to_hash + Coinbase::Client::TransferList
  • - #to_body - Coinbase::Client::User + #to_hash + Coinbase::Client::CreateAddressRequest
  • - #to_hash - Coinbase::Client::BroadcastTransferRequest + #to_hash + Coinbase::Client::AddressList +
    +
  • + + +
  • +
    + #to_hash + Coinbase::Client::FaucetTransaction +
    +
  • + + +
  • +
    + #to_hash + Coinbase::Client::Address
  • - #to_hash - Coinbase::Client::AddressList + #to_hash + Coinbase::Client::AddressBalanceList
  • - #to_hash - Coinbase::Client::TransferList + #to_hash + Coinbase::Client::User
  • - #to_hash - Coinbase::Client::FaucetTransaction + #to_hash + Coinbase::Client::Wallet
  • - #to_hash - Coinbase::Client::WalletList + #to_hash + Coinbase::Client::Asset
  • - #to_hash - Coinbase::Client::Transfer + #to_hash + Coinbase::Client::Balance
  • - #to_hash - Coinbase::Wallet::Data + #to_hash + Coinbase::Client::CreateTransferRequest
  • - #to_hash - Coinbase::Client::AddressBalanceList + #to_hash + Coinbase::Client::CreateWalletRequest
  • - #to_hash - Coinbase::Client::CreateWalletRequest + #to_hash + Coinbase::Client::Error
  • - #to_hash - Coinbase::Client::User + #to_hash + Coinbase::Client::Transfer
  • - #to_hash - Coinbase::Client::Balance + #to_hash + Coinbase::Wallet::Data
  • - #to_hash - Coinbase::Client::CreateTransferRequest + #to_hash + Coinbase::Client::BroadcastTransferRequest
  • - #to_hash - Coinbase::Client::CreateAddressRequest + #to_hash + Coinbase::Client::WalletList
  • - #to_hash - Coinbase::Client::Address + #to_s + Coinbase::Client::Asset
  • - #to_hash - Coinbase::Client::Asset + #to_s + Coinbase::Address
  • - #to_hash - Coinbase::Client::Error + #to_s + Coinbase::Client::Balance
  • - #to_hash - Coinbase::Client::Wallet + #to_s + Coinbase::Wallet
  • - #to_s - Coinbase::Client::FaucetTransaction + #to_s + Coinbase::Client::TransferList
  • @@ -3718,80 +3814,80 @@

    Method List

  • - #to_s - Coinbase::Client::CreateWalletRequest + #to_s + Coinbase::Client::ApiError
  • - #to_s - Coinbase::Address + #to_s + Coinbase::Client::User
  • - #to_s - Coinbase::Client::User + #to_s + Coinbase::BalanceMap
  • - #to_s - Coinbase::BalanceMap + #to_s + Coinbase::Client::FaucetTransaction
  • - #to_s - Coinbase::Client::CreateTransferRequest + #to_s + Coinbase::Transfer
  • - #to_s - Coinbase::Client::Balance + #to_s + Coinbase::Client::AddressBalanceList
  • - #to_s - Coinbase::Client::Wallet + #to_s + Coinbase::Client::Address
  • - #to_s - Coinbase::Client::Asset + #to_s + Coinbase::FaucetTransaction
  • - #to_s - Coinbase::APIError + #to_s + Coinbase::Client::Wallet
  • - #to_s - Coinbase::Client::CreateAddressRequest + #to_s + Coinbase::User
  • @@ -3806,56 +3902,56 @@

    Method List

  • - #to_s - Coinbase::Client::Error + #to_s + Coinbase::Client::CreateWalletRequest
  • - #to_s - Coinbase::Client::TransferList + #to_s + Coinbase::Client::CreateTransferRequest
  • - #to_s - Coinbase::Client::AddressBalanceList + #to_s + Coinbase::APIError
  • - #to_s - Coinbase::Client::Transfer + #to_s + Coinbase::Client::WalletList
  • - #to_s - Coinbase::Client::Address + #to_s + Coinbase::Client::Transfer
  • - #to_s - Coinbase::Client::ApiError + #to_s + Coinbase::Client::Error
  • - #to_s - Coinbase::Client::WalletList + #to_s + Coinbase::Client::CreateAddressRequest
  • @@ -3870,32 +3966,32 @@

    Method List

  • - #total_count - Coinbase::Client::WalletList + #total_count + Coinbase::Client::AddressList
  • - #total_count - Coinbase::Client::TransferList + #total_count + Coinbase::Client::AddressBalanceList
  • - #total_count - Coinbase::Client::AddressList + #total_count + Coinbase::Client::TransferList
  • - #total_count - Coinbase::Client::AddressBalanceList + #total_count + Coinbase::Client::WalletList
  • @@ -3910,24 +4006,24 @@

    Method List

  • - #transaction_hash - Coinbase::FaucetTransaction + #transaction_hash + Coinbase::Transfer
  • - #transaction_hash - Coinbase::Transfer + #transaction_hash + Coinbase::Client::Transfer
  • - #transaction_hash - Coinbase::Client::Transfer + #transaction_hash + Coinbase::FaucetTransaction
  • @@ -3942,16 +4038,16 @@

    Method List

  • - #transfer - Coinbase::Address + #transfer + Coinbase::Wallet
  • - #transfer - Coinbase::Wallet + #transfer + Coinbase::Address
  • @@ -4030,120 +4126,120 @@

    Method List

  • - #valid? - Coinbase::Client::CreateTransferRequest + #valid? + Coinbase::Client::AddressList
  • - #valid? - Coinbase::Client::Error + #valid? + Coinbase::Client::FaucetTransaction
  • - #valid? - Coinbase::Client::Wallet + #valid? + Coinbase::Client::BroadcastTransferRequest
  • - #valid? - Coinbase::Client::Transfer::EnumAttributeValidator + #valid? + Coinbase::Client::Error
  • - #valid? - Coinbase::Client::Transfer + #valid? + Coinbase::Client::CreateTransferRequest
  • - #valid? - Coinbase::Client::BroadcastTransferRequest + #valid? + Coinbase::Client::Transfer
  • - #valid? - Coinbase::Client::AddressBalanceList + #valid? + Coinbase::Client::CreateAddressRequest
  • - #valid? - Coinbase::Client::WalletList + #valid? + Coinbase::Client::Transfer::EnumAttributeValidator
  • - #valid? - Coinbase::Client::FaucetTransaction + #valid? + Coinbase::Client::Asset
  • - #valid? - Coinbase::Client::AddressList + #valid? + Coinbase::Client::Address
  • - #valid? - Coinbase::Client::TransferList + #valid? + Coinbase::Client::Wallet
  • - #valid? - Coinbase::Client::Address + #valid? + Coinbase::Client::CreateWalletRequest
  • - #valid? - Coinbase::Client::Asset + #valid? + Coinbase::Client::Balance
  • - #valid? - Coinbase::Client::CreateAddressRequest + #valid? + Coinbase::Client::TransferList
  • - #valid? - Coinbase::Client::Balance + #valid? + Coinbase::Client::AddressBalanceList
  • @@ -4158,8 +4254,8 @@

    Method List

  • - #valid? - Coinbase::Client::CreateWalletRequest + #valid? + Coinbase::Client::WalletList
  • @@ -4182,48 +4278,48 @@

    Method List

  • - #wallet_id - Coinbase::Transfer + #wallet_id + Coinbase::Wallet
  • - #wallet_id - Coinbase::Wallet + #wallet_id + Coinbase::Address
  • - #wallet_id - Coinbase::Client::Address + #wallet_id + Coinbase::Client::Transfer
  • - #wallet_id - Coinbase::Client::Transfer + #wallet_id + Coinbase::Wallet::Data
  • - #wallet_id - Coinbase::Wallet::Data + #wallet_id + Coinbase::Client::Address
  • - #wallet_id - Coinbase::Address + #wallet_id + Coinbase::Transfer
  • diff --git a/lib/coinbase/address.rb b/lib/coinbase/address.rb index d2028097..891dc351 100644 --- a/lib/coinbase/address.rb +++ b/lib/coinbase/address.rb @@ -133,10 +133,16 @@ def transfer(amount, asset_id, destination) Coinbase::Transfer.new(transfer_model) end - # Returns the address as a string. - # @return [String] The address + # Returns a String representation of the Address. + # @return [String] a String representation of the Address def to_s - address_id + "Coinbase::Address{address_id: '#{address_id}', network_id: '#{network_id}', wallet_id: '#{wallet_id}'}" + end + + # Same as to_s. + # @return [String] a String representation of the Address + def inspect + to_s end # Requests funds for the address from the faucet and returns the faucet transaction. diff --git a/lib/coinbase/errors.rb b/lib/coinbase/errors.rb index 860189a2..9fc934c5 100644 --- a/lib/coinbase/errors.rb +++ b/lib/coinbase/errors.rb @@ -80,13 +80,16 @@ def self.from_error(err) end end - # The string representation of the error. + # Returns a String representation of the APIError. + # @return [String] a String representation of the APIError def to_s - message = "API Error \n" - message += "HTTP status code: #{http_code}\n" if http_code - message += "API error code: #{api_code}\n" if api_code - message += "API error message: #{api_message}\n" if api_message - message + "APIError{http_code: #{@http_code}, api_code: #{@api_code}, api_message: #{@api_message}}" + end + + # Same as to_s. + # @return [String] a String representation of the APIError + def inspect + to_s end end diff --git a/lib/coinbase/faucet_transaction.rb b/lib/coinbase/faucet_transaction.rb index cd8eb56f..15f1eb80 100644 --- a/lib/coinbase/faucet_transaction.rb +++ b/lib/coinbase/faucet_transaction.rb @@ -6,6 +6,8 @@ module Coinbase # in the native Asset of the Network. Transfers should be created through Wallet#transfer or # Address#transfer. class FaucetTransaction + # Returns a new FaucetTransaction object. Do not use this method directly - instead, use Address#faucet. + # @param model [Coinbase::Client::FaucetTransaction] The underlying FaucetTransaction object def initialize(model) @model = model end @@ -17,5 +19,24 @@ def initialize(model) def transaction_hash model.transaction_hash end + + # Returns the link to the transaction on the blockchain explorer. + # @return [String] The link to the transaction on the blockchain explorer + def transaction_link + # TODO: Parameterize this by Network. + "https://sepolia.basescan.org/tx/#{transaction_hash}" + end + + # Returns a String representation of the FaucetTransaction. + # @return [String] a String representation of the FaucetTransaction + def to_s + "Coinbase::FaucetTransaction{transaction_hash: '#{transaction_hash}', transaction_link: '#{transaction_link}'}" + end + + # Same as to_s. + # @return [String] a String representation of the FaucetTransaction + def inspect + to_s + end end end diff --git a/lib/coinbase/transfer.rb b/lib/coinbase/transfer.rb index beb1bb96..69ae6158 100644 --- a/lib/coinbase/transfer.rb +++ b/lib/coinbase/transfer.rb @@ -77,6 +77,13 @@ def amount BigDecimal(@model.amount) / BigDecimal(Coinbase::WEI_PER_ETHER.to_s) end + # Returns the link to the transaction on the blockchain explorer. + # @return [String] The link to the transaction on the blockchain explorer + def transaction_link + # TODO: Parameterize this by Network. + "https://sepolia.basescan.org/tx/#{transaction_hash}" + end + # Returns the Unsigned Payload of the Transfer. # @return [String] The Unsigned Payload def unsigned_payload @@ -163,5 +170,20 @@ def wait!(interval_seconds = 0.2, timeout_seconds = 10) self end + + # Returns a String representation of the Transfer. + # @return [String] a String representation of the Transfer + def to_s + "Coinbase::Transfer{transfer_id: '#{transfer_id}', network_id: '#{network_id}', " + + "from_address_id: '#{from_address_id}', destination_address_id: '#{destination_address_id}', " + + "asset_id: '#{asset_id}', amount: '#{amount}', transaction_hash: '#{transaction_hash}', " + + "transaction_link: '#{transaction_link}', status: '#{status}'}" + end + + # Same as to_s. + # @return [String] a String representation of the Transfer + def inspect + to_s + end end end diff --git a/lib/coinbase/user.rb b/lib/coinbase/user.rb index 895099a6..a519075c 100644 --- a/lib/coinbase/user.rb +++ b/lib/coinbase/user.rb @@ -70,10 +70,10 @@ def list_wallet_ids # Coinbase.configuration.backup_file_path. # # @param wallet [Coinbase::Wallet] The wallet model to save. - # @param encrypt [bool] Boolean representing whether the backup persisted to local file system should be encrypted - # or not. Data is unencrypted by default. + # @param encrypt [bool] (Optional) Boolean representing whether the backup persisted to local file system should be + # encrypted or not. Data is unencrypted by default. # @return [Coinbase::Wallet] the saved wallet. - def save_wallet(wallet, encrypt = false) + def save_wallet(wallet, encrypt: false) existing_seeds_in_store = existing_seeds data = wallet.export seed_to_store = data.seed @@ -138,6 +138,18 @@ def load_wallets wallets end + # Returns a string representation of the User. + # @return [String] a string representation of the User + def to_s + "Coinbase::User{user_id: '#{user_id}'}" + end + + # Same as to_s. + # @return [String] a string representation of the User + def inspect + to_s + end + private def addresses_api diff --git a/lib/coinbase/wallet.rb b/lib/coinbase/wallet.rb index 4f1f0efa..76af2cae 100644 --- a/lib/coinbase/wallet.rb +++ b/lib/coinbase/wallet.rb @@ -161,6 +161,19 @@ def export Data.new(wallet_id: wallet_id, seed: @master.seed_hex) end + # Returns a String representation of the Wallet. + # @return [String] a String representation of the Wallet + def to_s + "Coinbase::Wallet{wallet_id: '#{wallet_id}', network_id: '#{network_id}', " + + "default_address: '#{default_address.address_id}'}" + end + + # Same as to_s. + # @return [String] a String representation of the Wallet + def inspect + to_s + end + # The data required to recreate a Wallet. class Data attr_reader :wallet_id, :seed diff --git a/spec/unit/coinbase/address_spec.rb b/spec/unit/coinbase/address_spec.rb index 514dd897..532efc86 100644 --- a/spec/unit/coinbase/address_spec.rb +++ b/spec/unit/coinbase/address_spec.rb @@ -383,10 +383,4 @@ end end end - - describe '#to_s' do - it 'returns the address as a string' do - expect(address.to_s).to eq(address_id) - end - end end diff --git a/spec/unit/coinbase/user_spec.rb b/spec/unit/coinbase/user_spec.rb index cc55344c..0ee9fc86 100644 --- a/spec/unit/coinbase/user_spec.rb +++ b/spec/unit/coinbase/user_spec.rb @@ -183,7 +183,7 @@ end it 'saves the Wallet data when encryption is true' do - saved_wallet = user.save_wallet(seed_wallet, true) + saved_wallet = user.save_wallet(seed_wallet, encrypt: true) # Verify that the file has new wallet. stored_seed_data = File.read(Coinbase.configuration.backup_file_path) wallets = JSON.parse(stored_seed_data)