Class: CryptoApis::HDWalletsApi
- Inherits:
-
Object
- Object
- CryptoApis::HDWalletsApi
- Defined in:
- lib/crypto_apis/api/hd_wallets_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#derive_and_sync_new_change_addresses(blockchain, network, opts = {}) ⇒ DeriveAndSyncNewChangeAddressesR
Derive And Sync New Change Addresses Through this endpoint users can derive 100 change addresses, starting from the last index we have data for, which are then added to the xPub, subscribed for syncing, and start recording data.
-
#derive_and_sync_new_change_addresses_with_http_info(blockchain, network, opts = {}) ⇒ Array<(DeriveAndSyncNewChangeAddressesR, Integer, Hash)>
Derive And Sync New Change Addresses Through this endpoint users can derive 100 change addresses, starting from the last index we have data for, which are then added to the xPub, subscribed for syncing, and start recording data.
-
#derive_and_sync_new_receiving_addresses(blockchain, network, opts = {}) ⇒ DeriveAndSyncNewReceivingAddressesR
Derive And Sync New Receiving Addresses Through this endpoint users can derive 100 receiving addresses, starting from the last index we have data for, which are then added to the xPub, subscribed for syncing, and start recording data.
-
#derive_and_sync_new_receiving_addresses_with_http_info(blockchain, network, opts = {}) ⇒ Array<(DeriveAndSyncNewReceivingAddressesR, Integer, Hash)>
Derive And Sync New Receiving Addresses Through this endpoint users can derive 100 receiving addresses, starting from the last index we have data for, which are then added to the xPub, subscribed for syncing, and start recording data.
-
#get_hd_wallet__x_pub_y_pub_z_pub_assets(blockchain, extended_public_key, network, opts = {}) ⇒ GetHDWalletXPubYPubZPubAssetsR
Get HD Wallet (xPub, yPub, zPub) Assets This endpoint will return details on assets we support for a specified from the customer extended public key (xPub).
-
#get_hd_wallet__x_pub_y_pub_z_pub_assets_with_http_info(blockchain, extended_public_key, network, opts = {}) ⇒ Array<(GetHDWalletXPubYPubZPubAssetsR, Integer, Hash)>
Get HD Wallet (xPub, yPub, zPub) Assets This endpoint will return details on assets we support for a specified from the customer extended public key (xPub).
-
#get_hd_wallet__x_pub_y_pub_z_pub_details(blockchain, extended_public_key, network, opts = {}) ⇒ GetHDWalletXPubYPubZPubDetailsR
Get HD Wallet (xPub, yPub, zPub) Details HD wallet details is useful endpoint to get the most important data about HD wallet without the need to do a lot of calculations, once the HD Wallet is synced using Sync endpoint we keep it up to date and we calculate these details in advance.
-
#get_hd_wallet__x_pub_y_pub_z_pub_details_with_http_info(blockchain, extended_public_key, network, opts = {}) ⇒ Array<(GetHDWalletXPubYPubZPubDetailsR, Integer, Hash)>
Get HD Wallet (xPub, yPub, zPub) Details HD wallet details is useful endpoint to get the most important data about HD wallet without the need to do a lot of calculations, once the HD Wallet is synced using Sync endpoint we keep it up to date and we calculate these details in advance.
-
#initialize(api_client = ApiClient.default) ⇒ HDWalletsApi
constructor
A new instance of HDWalletsApi.
-
#list_hd_wallet__x_pub_y_pub_z_pub_transactions(blockchain, extended_public_key, network, opts = {}) ⇒ ListHDWalletXPubYPubZPubTransactionsR
List HD Wallet (xPub, yPub, zPub) Transactions This endpoint will list HD Wallet transactions.
-
#list_hd_wallet__x_pub_y_pub_z_pub_transactions_with_http_info(blockchain, extended_public_key, network, opts = {}) ⇒ Array<(ListHDWalletXPubYPubZPubTransactionsR, Integer, Hash)>
List HD Wallet (xPub, yPub, zPub) Transactions This endpoint will list HD Wallet transactions.
-
#list_hd_wallet__x_pub_y_pub_z_pub_utxos(blockchain, extended_public_key, network, opts = {}) ⇒ ListHDWalletXPubYPubZPubUTXOsR
List HD Wallet (xPub, yPub, zPub) UTXOs Through this endpoint you can list HD wallet’s UTXOs (Unspent Transaction Outputs) by providing extended public key of an already synced HD wallet.
-
#list_hd_wallet__x_pub_y_pub_z_pub_utxos_with_http_info(blockchain, extended_public_key, network, opts = {}) ⇒ Array<(ListHDWalletXPubYPubZPubUTXOsR, Integer, Hash)>
List HD Wallet (xPub, yPub, zPub) UTXOs Through this endpoint you can list HD wallet's UTXOs (Unspent Transaction Outputs) by providing extended public key of an already synced HD wallet.
-
#list_synced_addresses(blockchain, extended_public_key, network, opts = {}) ⇒ ListSyncedAddressesR
List Synced Addresses Through this endpoint users can list all addresses that Crypto APIs has synced for a specific xPub.
-
#list_synced_addresses_with_http_info(blockchain, extended_public_key, network, opts = {}) ⇒ Array<(ListSyncedAddressesR, Integer, Hash)>
List Synced Addresses Through this endpoint users can list all addresses that Crypto APIs has synced for a specific xPub.
-
#prepare_a_utxo_based_transaction_from_hd_wallet__x_pub_y_pub_z_pub(blockchain, network, opts = {}) ⇒ PrepareAUTXOBasedTransactionFromHDWalletXPubYPubZPubR
Prepare A UTXO-Based Transaction From HD Wallet (xPub, yPub, zPub) Through the “Prepare a UTXO-based transaction from xPub” endpoint users can prepare a transaction for signing from all synced with Crypto APIs addresses for the specific xPub.
-
#prepare_a_utxo_based_transaction_from_hd_wallet__x_pub_y_pub_z_pub_with_http_info(blockchain, network, opts = {}) ⇒ Array<(PrepareAUTXOBasedTransactionFromHDWalletXPubYPubZPubR, Integer, Hash)>
Prepare A UTXO-Based Transaction From HD Wallet (xPub, yPub, zPub) Through the “Prepare a UTXO-based transaction from xPub” endpoint users can prepare a transaction for signing from all synced with Crypto APIs addresses for the specific xPub.
-
#prepare_an_account_based_transaction_from_hd_wallet__x_pub_y_pub_z_pub(blockchain, network, opts = {}) ⇒ PrepareAnAccountBasedTransactionFromHDWalletXPubYPubZPubR
Prepare An Account-Based Transaction From HD Wallet (xPub, yPub, zPub) Through the “Prepare an account-based transaction from xPub” endpoint users can prepare a transaction for signing from a synced with Crypto APIs address from the specific xPub.
-
#prepare_an_account_based_transaction_from_hd_wallet__x_pub_y_pub_z_pub_with_http_info(blockchain, network, opts = {}) ⇒ Array<(PrepareAnAccountBasedTransactionFromHDWalletXPubYPubZPubR, Integer, Hash)>
Prepare An Account-Based Transaction From HD Wallet (xPub, yPub, zPub) Through the “Prepare an account-based transaction from xPub” endpoint users can prepare a transaction for signing from a synced with Crypto APIs address from the specific xPub.
-
#sync_hd_wallet__x_pub_y_pub_z_pub(blockchain, network, opts = {}) ⇒ SyncHDWalletXPubYPubZPubR
Sync HD Wallet (xPub, yPub, zPub) HD wallets usually have a lot of addresses and transactions, getting the data on demand is a heavy operation.
-
#sync_hd_wallet__x_pub_y_pub_z_pub_with_http_info(blockchain, network, opts = {}) ⇒ Array<(SyncHDWalletXPubYPubZPubR, Integer, Hash)>
Sync HD Wallet (xPub, yPub, zPub) HD wallets usually have a lot of addresses and transactions, getting the data on demand is a heavy operation.
-
#sync_new_hd_wallet__x_pub_y_pub_z_pub(blockchain, network, opts = {}) ⇒ SyncNewHDWalletXPubYPubZPubR
Sync New HD Wallet (xPub, yPub, zPub) Through this endpoint users can add a brand new xPub to the Crypto APIs system to be ready for deriving.
-
#sync_new_hd_wallet__x_pub_y_pub_z_pub_with_http_info(blockchain, network, opts = {}) ⇒ Array<(SyncNewHDWalletXPubYPubZPubR, Integer, Hash)>
Sync New HD Wallet (xPub, yPub, zPub) Through this endpoint users can add a brand new xPub to the Crypto APIs system to be ready for deriving.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ HDWalletsApi
Returns a new instance of HDWalletsApi.
19 20 21 |
# File 'lib/crypto_apis/api/hd_wallets_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/crypto_apis/api/hd_wallets_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#derive_and_sync_new_change_addresses(blockchain, network, opts = {}) ⇒ DeriveAndSyncNewChangeAddressesR
Derive And Sync New Change Addresses Through this endpoint users can derive 100 change addresses, starting from the last index we have data for, which are then added to the xPub, subscribed for syncing, and start recording data. If no data is available, it will start from index 0.
30 31 32 33 |
# File 'lib/crypto_apis/api/hd_wallets_api.rb', line 30 def derive_and_sync_new_change_addresses(blockchain, network, opts = {}) data, _status_code, _headers = derive_and_sync_new_change_addresses_with_http_info(blockchain, network, opts) data end |
#derive_and_sync_new_change_addresses_with_http_info(blockchain, network, opts = {}) ⇒ Array<(DeriveAndSyncNewChangeAddressesR, Integer, Hash)>
Derive And Sync New Change Addresses Through this endpoint users can derive 100 change addresses, starting from the last index we have data for, which are then added to the xPub, subscribed for syncing, and start recording data. If no data is available, it will start from index 0.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/crypto_apis/api/hd_wallets_api.rb', line 43 def derive_and_sync_new_change_addresses_with_http_info(blockchain, network, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HDWalletsApi.derive_and_sync_new_change_addresses ...' end # verify the required parameter 'blockchain' is set if @api_client.config.client_side_validation && blockchain.nil? fail ArgumentError, "Missing the required parameter 'blockchain' when calling HDWalletsApi.derive_and_sync_new_change_addresses" end # verify enum value allowable_values = ["bitcoin"] if @api_client.config.client_side_validation && !allowable_values.include?(blockchain) fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}" end # verify the required parameter 'network' is set if @api_client.config.client_side_validation && network.nil? fail ArgumentError, "Missing the required parameter 'network' when calling HDWalletsApi.derive_and_sync_new_change_addresses" end # verify enum value allowable_values = ["mainnet", "testnet"] if @api_client.config.client_side_validation && !allowable_values.include?(network) fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}" end # resource path local_var_path = '/blockchain-data/{blockchain}/{network}/hd/derive-sync-change'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'derive_and_sync_new_change_addresses_rb']) # return_type return_type = opts[:debug_return_type] || 'DeriveAndSyncNewChangeAddressesR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"HDWalletsApi.derive_and_sync_new_change_addresses", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: HDWalletsApi#derive_and_sync_new_change_addresses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#derive_and_sync_new_receiving_addresses(blockchain, network, opts = {}) ⇒ DeriveAndSyncNewReceivingAddressesR
Derive And Sync New Receiving Addresses Through this endpoint users can derive 100 receiving addresses, starting from the last index we have data for, which are then added to the xPub, subscribed for syncing, and start recording data. If no data is available, it will start from index 0.
119 120 121 122 |
# File 'lib/crypto_apis/api/hd_wallets_api.rb', line 119 def derive_and_sync_new_receiving_addresses(blockchain, network, opts = {}) data, _status_code, _headers = derive_and_sync_new_receiving_addresses_with_http_info(blockchain, network, opts) data end |
#derive_and_sync_new_receiving_addresses_with_http_info(blockchain, network, opts = {}) ⇒ Array<(DeriveAndSyncNewReceivingAddressesR, Integer, Hash)>
Derive And Sync New Receiving Addresses Through this endpoint users can derive 100 receiving addresses, starting from the last index we have data for, which are then added to the xPub, subscribed for syncing, and start recording data. If no data is available, it will start from index 0.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
# File 'lib/crypto_apis/api/hd_wallets_api.rb', line 132 def derive_and_sync_new_receiving_addresses_with_http_info(blockchain, network, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HDWalletsApi.derive_and_sync_new_receiving_addresses ...' end # verify the required parameter 'blockchain' is set if @api_client.config.client_side_validation && blockchain.nil? fail ArgumentError, "Missing the required parameter 'blockchain' when calling HDWalletsApi.derive_and_sync_new_receiving_addresses" end # verify enum value allowable_values = ["bitcoin", "ethereum"] if @api_client.config.client_side_validation && !allowable_values.include?(blockchain) fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}" end # verify the required parameter 'network' is set if @api_client.config.client_side_validation && network.nil? fail ArgumentError, "Missing the required parameter 'network' when calling HDWalletsApi.derive_and_sync_new_receiving_addresses" end # verify enum value allowable_values = ["mainnet", "testnet", "goerli"] if @api_client.config.client_side_validation && !allowable_values.include?(network) fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}" end # resource path local_var_path = '/blockchain-data/{blockchain}/{network}/hd/derive-and-sync'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'derive_and_sync_new_receiving_addresses_rb']) # return_type return_type = opts[:debug_return_type] || 'DeriveAndSyncNewReceivingAddressesR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"HDWalletsApi.derive_and_sync_new_receiving_addresses", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: HDWalletsApi#derive_and_sync_new_receiving_addresses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_hd_wallet__x_pub_y_pub_z_pub_assets(blockchain, extended_public_key, network, opts = {}) ⇒ GetHDWalletXPubYPubZPubAssetsR
Get HD Wallet (xPub, yPub, zPub) Assets This endpoint will return details on assets we support for a specified from the customer extended public key (xPub). These could be cryptocurrencies, fungible or non-fungible (NFT) tokens. Each asset has a unique identifier - assetId, and a unique symbol in the form of a string, e.g. "USDT".
209 210 211 212 |
# File 'lib/crypto_apis/api/hd_wallets_api.rb', line 209 def get_hd_wallet__x_pub_y_pub_z_pub_assets(blockchain, extended_public_key, network, opts = {}) data, _status_code, _headers = get_hd_wallet__x_pub_y_pub_z_pub_assets_with_http_info(blockchain, extended_public_key, network, opts) data end |
#get_hd_wallet__x_pub_y_pub_z_pub_assets_with_http_info(blockchain, extended_public_key, network, opts = {}) ⇒ Array<(GetHDWalletXPubYPubZPubAssetsR, Integer, Hash)>
Get HD Wallet (xPub, yPub, zPub) Assets This endpoint will return details on assets we support for a specified from the customer extended public key (xPub). These could be cryptocurrencies, fungible or non-fungible (NFT) tokens. Each asset has a unique identifier - assetId, and a unique symbol in the form of a string, e.g. "USDT".
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/crypto_apis/api/hd_wallets_api.rb', line 223 def get_hd_wallet__x_pub_y_pub_z_pub_assets_with_http_info(blockchain, extended_public_key, network, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HDWalletsApi.get_hd_wallet__x_pub_y_pub_z_pub_assets ...' end # verify the required parameter 'blockchain' is set if @api_client.config.client_side_validation && blockchain.nil? fail ArgumentError, "Missing the required parameter 'blockchain' when calling HDWalletsApi.get_hd_wallet__x_pub_y_pub_z_pub_assets" end # verify enum value allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum", "zcash", "ethereum-classic", "binance-smart-chain", "xrp"] if @api_client.config.client_side_validation && !allowable_values.include?(blockchain) fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}" end # verify the required parameter 'extended_public_key' is set if @api_client.config.client_side_validation && extended_public_key.nil? fail ArgumentError, "Missing the required parameter 'extended_public_key' when calling HDWalletsApi.get_hd_wallet__x_pub_y_pub_z_pub_assets" end # verify the required parameter 'network' is set if @api_client.config.client_side_validation && network.nil? fail ArgumentError, "Missing the required parameter 'network' when calling HDWalletsApi.get_hd_wallet__x_pub_y_pub_z_pub_assets" end # verify enum value allowable_values = ["mainnet", "testnet", "mordor", "goerli"] if @api_client.config.client_side_validation && !allowable_values.include?(network) fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}" end allowable_values = ["account", "bip32"] if @api_client.config.client_side_validation && opts[:'derivation'] && !allowable_values.include?(opts[:'derivation']) fail ArgumentError, "invalid value for \"derivation\", must be one of #{allowable_values}" end # resource path local_var_path = '/blockchain-data/{blockchain}/{network}/hd/{extendedPublicKey}/assets'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'extendedPublicKey' + '}', CGI.escape(extended_public_key.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil? query_params[:'derivation'] = opts[:'derivation'] if !opts[:'derivation'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetHDWalletXPubYPubZPubAssetsR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"HDWalletsApi.get_hd_wallet__x_pub_y_pub_z_pub_assets", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: HDWalletsApi#get_hd_wallet__x_pub_y_pub_z_pub_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_hd_wallet__x_pub_y_pub_z_pub_details(blockchain, extended_public_key, network, opts = {}) ⇒ GetHDWalletXPubYPubZPubDetailsR
Get HD Wallet (xPub, yPub, zPub) Details HD wallet details is useful endpoint to get the most important data about HD wallet without the need to do a lot of calculations, once the HD Wallet is synced using Sync endpoint we keep it up to date and we calculate these details in advance.
304 305 306 307 |
# File 'lib/crypto_apis/api/hd_wallets_api.rb', line 304 def get_hd_wallet__x_pub_y_pub_z_pub_details(blockchain, extended_public_key, network, opts = {}) data, _status_code, _headers = get_hd_wallet__x_pub_y_pub_z_pub_details_with_http_info(blockchain, extended_public_key, network, opts) data end |
#get_hd_wallet__x_pub_y_pub_z_pub_details_with_http_info(blockchain, extended_public_key, network, opts = {}) ⇒ Array<(GetHDWalletXPubYPubZPubDetailsR, Integer, Hash)>
Get HD Wallet (xPub, yPub, zPub) Details HD wallet details is useful endpoint to get the most important data about HD wallet without the need to do a lot of calculations, once the HD Wallet is synced using Sync endpoint we keep it up to date and we calculate these details in advance.
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 |
# File 'lib/crypto_apis/api/hd_wallets_api.rb', line 318 def get_hd_wallet__x_pub_y_pub_z_pub_details_with_http_info(blockchain, extended_public_key, network, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HDWalletsApi.get_hd_wallet__x_pub_y_pub_z_pub_details ...' end # verify the required parameter 'blockchain' is set if @api_client.config.client_side_validation && blockchain.nil? fail ArgumentError, "Missing the required parameter 'blockchain' when calling HDWalletsApi.get_hd_wallet__x_pub_y_pub_z_pub_details" end # verify enum value allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum", "zcash", "ethereum-classic", "binance-smart-chain", "xrp"] if @api_client.config.client_side_validation && !allowable_values.include?(blockchain) fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}" end # verify the required parameter 'extended_public_key' is set if @api_client.config.client_side_validation && extended_public_key.nil? fail ArgumentError, "Missing the required parameter 'extended_public_key' when calling HDWalletsApi.get_hd_wallet__x_pub_y_pub_z_pub_details" end # verify the required parameter 'network' is set if @api_client.config.client_side_validation && network.nil? fail ArgumentError, "Missing the required parameter 'network' when calling HDWalletsApi.get_hd_wallet__x_pub_y_pub_z_pub_details" end # verify enum value allowable_values = ["mainnet", "testnet", "mordor", "goerli"] if @api_client.config.client_side_validation && !allowable_values.include?(network) fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}" end allowable_values = ["account", "bip32"] if @api_client.config.client_side_validation && opts[:'derivation'] && !allowable_values.include?(opts[:'derivation']) fail ArgumentError, "invalid value for \"derivation\", must be one of #{allowable_values}" end # resource path local_var_path = '/blockchain-data/{blockchain}/{network}/hd/{extendedPublicKey}/details'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'extendedPublicKey' + '}', CGI.escape(extended_public_key.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil? query_params[:'derivation'] = opts[:'derivation'] if !opts[:'derivation'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetHDWalletXPubYPubZPubDetailsR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"HDWalletsApi.get_hd_wallet__x_pub_y_pub_z_pub_details", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: HDWalletsApi#get_hd_wallet__x_pub_y_pub_z_pub_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_hd_wallet__x_pub_y_pub_z_pub_transactions(blockchain, extended_public_key, network, opts = {}) ⇒ ListHDWalletXPubYPubZPubTransactionsR
List HD Wallet (xPub, yPub, zPub) Transactions This endpoint will list HD Wallet transactions.
401 402 403 404 |
# File 'lib/crypto_apis/api/hd_wallets_api.rb', line 401 def list_hd_wallet__x_pub_y_pub_z_pub_transactions(blockchain, extended_public_key, network, opts = {}) data, _status_code, _headers = list_hd_wallet__x_pub_y_pub_z_pub_transactions_with_http_info(blockchain, extended_public_key, network, opts) data end |
#list_hd_wallet__x_pub_y_pub_z_pub_transactions_with_http_info(blockchain, extended_public_key, network, opts = {}) ⇒ Array<(ListHDWalletXPubYPubZPubTransactionsR, Integer, Hash)>
List HD Wallet (xPub, yPub, zPub) Transactions This endpoint will list HD Wallet transactions.
417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 |
# File 'lib/crypto_apis/api/hd_wallets_api.rb', line 417 def list_hd_wallet__x_pub_y_pub_z_pub_transactions_with_http_info(blockchain, extended_public_key, network, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HDWalletsApi.list_hd_wallet__x_pub_y_pub_z_pub_transactions ...' end # verify the required parameter 'blockchain' is set if @api_client.config.client_side_validation && blockchain.nil? fail ArgumentError, "Missing the required parameter 'blockchain' when calling HDWalletsApi.list_hd_wallet__x_pub_y_pub_z_pub_transactions" end # verify enum value allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum", "zcash", "ethereum-classic", "binance-smart-chain", "xrp"] if @api_client.config.client_side_validation && !allowable_values.include?(blockchain) fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}" end # verify the required parameter 'extended_public_key' is set if @api_client.config.client_side_validation && extended_public_key.nil? fail ArgumentError, "Missing the required parameter 'extended_public_key' when calling HDWalletsApi.list_hd_wallet__x_pub_y_pub_z_pub_transactions" end # verify the required parameter 'network' is set if @api_client.config.client_side_validation && network.nil? fail ArgumentError, "Missing the required parameter 'network' when calling HDWalletsApi.list_hd_wallet__x_pub_y_pub_z_pub_transactions" end # verify enum value allowable_values = ["mainnet", "testnet", "mordor", "goerli"] if @api_client.config.client_side_validation && !allowable_values.include?(network) fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}" end allowable_values = ["account", "bip32"] if @api_client.config.client_side_validation && opts[:'derivation'] && !allowable_values.include?(opts[:'derivation']) fail ArgumentError, "invalid value for \"derivation\", must be one of #{allowable_values}" end # resource path local_var_path = '/blockchain-data/{blockchain}/{network}/hd/{extendedPublicKey}/transactions'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'extendedPublicKey' + '}', CGI.escape(extended_public_key.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil? query_params[:'derivation'] = opts[:'derivation'] if !opts[:'derivation'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListHDWalletXPubYPubZPubTransactionsR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"HDWalletsApi.list_hd_wallet__x_pub_y_pub_z_pub_transactions", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: HDWalletsApi#list_hd_wallet__x_pub_y_pub_z_pub_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_hd_wallet__x_pub_y_pub_z_pub_utxos(blockchain, extended_public_key, network, opts = {}) ⇒ ListHDWalletXPubYPubZPubUTXOsR
List HD Wallet (xPub, yPub, zPub) UTXOs Through this endpoint you can list HD wallet’s UTXOs (Unspent Transaction Outputs) by providing extended public key of an already synced HD wallet.
502 503 504 505 |
# File 'lib/crypto_apis/api/hd_wallets_api.rb', line 502 def list_hd_wallet__x_pub_y_pub_z_pub_utxos(blockchain, extended_public_key, network, opts = {}) data, _status_code, _headers = list_hd_wallet__x_pub_y_pub_z_pub_utxos_with_http_info(blockchain, extended_public_key, network, opts) data end |
#list_hd_wallet__x_pub_y_pub_z_pub_utxos_with_http_info(blockchain, extended_public_key, network, opts = {}) ⇒ Array<(ListHDWalletXPubYPubZPubUTXOsR, Integer, Hash)>
List HD Wallet (xPub, yPub, zPub) UTXOs Through this endpoint you can list HD wallet's UTXOs (Unspent Transaction Outputs) by providing extended public key of an already synced HD wallet.
518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 |
# File 'lib/crypto_apis/api/hd_wallets_api.rb', line 518 def list_hd_wallet__x_pub_y_pub_z_pub_utxos_with_http_info(blockchain, extended_public_key, network, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HDWalletsApi.list_hd_wallet__x_pub_y_pub_z_pub_utxos ...' end # verify the required parameter 'blockchain' is set if @api_client.config.client_side_validation && blockchain.nil? fail ArgumentError, "Missing the required parameter 'blockchain' when calling HDWalletsApi.list_hd_wallet__x_pub_y_pub_z_pub_utxos" end # verify enum value allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "zcash"] if @api_client.config.client_side_validation && !allowable_values.include?(blockchain) fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}" end # verify the required parameter 'extended_public_key' is set if @api_client.config.client_side_validation && extended_public_key.nil? fail ArgumentError, "Missing the required parameter 'extended_public_key' when calling HDWalletsApi.list_hd_wallet__x_pub_y_pub_z_pub_utxos" end # verify the required parameter 'network' is set if @api_client.config.client_side_validation && network.nil? fail ArgumentError, "Missing the required parameter 'network' when calling HDWalletsApi.list_hd_wallet__x_pub_y_pub_z_pub_utxos" end # verify enum value allowable_values = ["mainnet", "testnet"] if @api_client.config.client_side_validation && !allowable_values.include?(network) fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}" end allowable_values = ["account", "bip32"] if @api_client.config.client_side_validation && opts[:'derivation'] && !allowable_values.include?(opts[:'derivation']) fail ArgumentError, "invalid value for \"derivation\", must be one of #{allowable_values}" end # resource path local_var_path = '/blockchain-data/{blockchain}/{network}/hd/{extendedPublicKey}/utxos'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'extendedPublicKey' + '}', CGI.escape(extended_public_key.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil? query_params[:'derivation'] = opts[:'derivation'] if !opts[:'derivation'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListHDWalletXPubYPubZPubUTXOsR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"HDWalletsApi.list_hd_wallet__x_pub_y_pub_z_pub_utxos", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: HDWalletsApi#list_hd_wallet__x_pub_y_pub_z_pub_utxos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_synced_addresses(blockchain, extended_public_key, network, opts = {}) ⇒ ListSyncedAddressesR
List Synced Addresses Through this endpoint users can list all addresses that Crypto APIs has synced for a specific xPub. This includes previous and current/new xPubs, what addresses we’ve synced for them, etc.
604 605 606 607 |
# File 'lib/crypto_apis/api/hd_wallets_api.rb', line 604 def list_synced_addresses(blockchain, extended_public_key, network, opts = {}) data, _status_code, _headers = list_synced_addresses_with_http_info(blockchain, extended_public_key, network, opts) data end |
#list_synced_addresses_with_http_info(blockchain, extended_public_key, network, opts = {}) ⇒ Array<(ListSyncedAddressesR, Integer, Hash)>
List Synced Addresses Through this endpoint users can list all addresses that Crypto APIs has synced for a specific xPub. This includes previous and current/new xPubs, what addresses we’ve synced for them, etc.
621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 |
# File 'lib/crypto_apis/api/hd_wallets_api.rb', line 621 def list_synced_addresses_with_http_info(blockchain, extended_public_key, network, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HDWalletsApi.list_synced_addresses ...' end # verify the required parameter 'blockchain' is set if @api_client.config.client_side_validation && blockchain.nil? fail ArgumentError, "Missing the required parameter 'blockchain' when calling HDWalletsApi.list_synced_addresses" end # verify enum value allowable_values = ["bitcoin", "ethereum"] if @api_client.config.client_side_validation && !allowable_values.include?(blockchain) fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}" end # verify the required parameter 'extended_public_key' is set if @api_client.config.client_side_validation && extended_public_key.nil? fail ArgumentError, "Missing the required parameter 'extended_public_key' when calling HDWalletsApi.list_synced_addresses" end # verify the required parameter 'network' is set if @api_client.config.client_side_validation && network.nil? fail ArgumentError, "Missing the required parameter 'network' when calling HDWalletsApi.list_synced_addresses" end # verify enum value allowable_values = ["mainnet", "testnet", "goerli"] if @api_client.config.client_side_validation && !allowable_values.include?(network) fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}" end allowable_values = ["p2pkh", "p2sh", "p2wpkh", "p2pkh-cash", "p2sh-cash", "standard", "classic"] if @api_client.config.client_side_validation && opts[:'address_format'] && !allowable_values.include?(opts[:'address_format']) fail ArgumentError, "invalid value for \"address_format\", must be one of #{allowable_values}" end # resource path local_var_path = '/blockchain-data/{blockchain}/{network}/hd/{extendedPublicKey}/synced-addresses'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'extendedPublicKey' + '}', CGI.escape(extended_public_key.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil? query_params[:'addressFormat'] = opts[:'address_format'] if !opts[:'address_format'].nil? query_params[:'isChangeAddress'] = opts[:'is_change_address'] if !opts[:'is_change_address'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListSyncedAddressesR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"HDWalletsApi.list_synced_addresses", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: HDWalletsApi#list_synced_addresses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#prepare_a_utxo_based_transaction_from_hd_wallet__x_pub_y_pub_z_pub(blockchain, network, opts = {}) ⇒ PrepareAUTXOBasedTransactionFromHDWalletXPubYPubZPubR
Prepare A UTXO-Based Transaction From HD Wallet (xPub, yPub, zPub) Through the “Prepare a UTXO-based transaction from xPub” endpoint users can prepare a transaction for signing from all synced with Crypto APIs addresses for the specific xPub. This is based on the ‘selectionStrategy` and the addresses’ balances. In the case a user has an address not synced with Crypto APIs, it will not be included. This endpoint applies to all supported UTXO-based blockchain protocols, e.g. Bitcoin, Litecoin, etc.
704 705 706 707 |
# File 'lib/crypto_apis/api/hd_wallets_api.rb', line 704 def prepare_a_utxo_based_transaction_from_hd_wallet__x_pub_y_pub_z_pub(blockchain, network, opts = {}) data, _status_code, _headers = prepare_a_utxo_based_transaction_from_hd_wallet__x_pub_y_pub_z_pub_with_http_info(blockchain, network, opts) data end |
#prepare_a_utxo_based_transaction_from_hd_wallet__x_pub_y_pub_z_pub_with_http_info(blockchain, network, opts = {}) ⇒ Array<(PrepareAUTXOBasedTransactionFromHDWalletXPubYPubZPubR, Integer, Hash)>
Prepare A UTXO-Based Transaction From HD Wallet (xPub, yPub, zPub) Through the “Prepare a UTXO-based transaction from xPub” endpoint users can prepare a transaction for signing from all synced with Crypto APIs addresses for the specific xPub. This is based on the `selectionStrategy` and the addresses’ balances. In the case a user has an address not synced with Crypto APIs, it will not be included. This endpoint applies to all supported UTXO-based blockchain protocols, e.g. Bitcoin, Litecoin, etc.
717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 |
# File 'lib/crypto_apis/api/hd_wallets_api.rb', line 717 def prepare_a_utxo_based_transaction_from_hd_wallet__x_pub_y_pub_z_pub_with_http_info(blockchain, network, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HDWalletsApi.prepare_a_utxo_based_transaction_from_hd_wallet__x_pub_y_pub_z_pub ...' end # verify the required parameter 'blockchain' is set if @api_client.config.client_side_validation && blockchain.nil? fail ArgumentError, "Missing the required parameter 'blockchain' when calling HDWalletsApi.prepare_a_utxo_based_transaction_from_hd_wallet__x_pub_y_pub_z_pub" end # verify enum value allowable_values = ["bitcoin"] if @api_client.config.client_side_validation && !allowable_values.include?(blockchain) fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}" end # verify the required parameter 'network' is set if @api_client.config.client_side_validation && network.nil? fail ArgumentError, "Missing the required parameter 'network' when calling HDWalletsApi.prepare_a_utxo_based_transaction_from_hd_wallet__x_pub_y_pub_z_pub" end # verify enum value allowable_values = ["testnet", "mainnet"] if @api_client.config.client_side_validation && !allowable_values.include?(network) fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}" end # resource path local_var_path = '/blockchain-data/{blockchain}/{network}/transactions/prepare-utxo-transaction'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'prepare_autxo_based_transaction_from_hd_wallet_x_pub_y_pub_z_pub_rb']) # return_type return_type = opts[:debug_return_type] || 'PrepareAUTXOBasedTransactionFromHDWalletXPubYPubZPubR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"HDWalletsApi.prepare_a_utxo_based_transaction_from_hd_wallet__x_pub_y_pub_z_pub", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: HDWalletsApi#prepare_a_utxo_based_transaction_from_hd_wallet__x_pub_y_pub_z_pub\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#prepare_an_account_based_transaction_from_hd_wallet__x_pub_y_pub_z_pub(blockchain, network, opts = {}) ⇒ PrepareAnAccountBasedTransactionFromHDWalletXPubYPubZPubR
Prepare An Account-Based Transaction From HD Wallet (xPub, yPub, zPub) Through the “Prepare an account-based transaction from xPub” endpoint users can prepare a transaction for signing from a synced with Crypto APIs address from the specific xPub. This endpoint applies to all supported account-based blockchain protocols, e.g. Ethereum, BSC, etc
793 794 795 796 |
# File 'lib/crypto_apis/api/hd_wallets_api.rb', line 793 def prepare_an_account_based_transaction_from_hd_wallet__x_pub_y_pub_z_pub(blockchain, network, opts = {}) data, _status_code, _headers = prepare_an_account_based_transaction_from_hd_wallet__x_pub_y_pub_z_pub_with_http_info(blockchain, network, opts) data end |
#prepare_an_account_based_transaction_from_hd_wallet__x_pub_y_pub_z_pub_with_http_info(blockchain, network, opts = {}) ⇒ Array<(PrepareAnAccountBasedTransactionFromHDWalletXPubYPubZPubR, Integer, Hash)>
Prepare An Account-Based Transaction From HD Wallet (xPub, yPub, zPub) Through the “Prepare an account-based transaction from xPub” endpoint users can prepare a transaction for signing from a synced with Crypto APIs address from the specific xPub. This endpoint applies to all supported account-based blockchain protocols, e.g. Ethereum, BSC, etc
806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 |
# File 'lib/crypto_apis/api/hd_wallets_api.rb', line 806 def prepare_an_account_based_transaction_from_hd_wallet__x_pub_y_pub_z_pub_with_http_info(blockchain, network, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HDWalletsApi.prepare_an_account_based_transaction_from_hd_wallet__x_pub_y_pub_z_pub ...' end # verify the required parameter 'blockchain' is set if @api_client.config.client_side_validation && blockchain.nil? fail ArgumentError, "Missing the required parameter 'blockchain' when calling HDWalletsApi.prepare_an_account_based_transaction_from_hd_wallet__x_pub_y_pub_z_pub" end # verify enum value allowable_values = ["ethereum"] if @api_client.config.client_side_validation && !allowable_values.include?(blockchain) fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}" end # verify the required parameter 'network' is set if @api_client.config.client_side_validation && network.nil? fail ArgumentError, "Missing the required parameter 'network' when calling HDWalletsApi.prepare_an_account_based_transaction_from_hd_wallet__x_pub_y_pub_z_pub" end # verify enum value allowable_values = ["mainnet", "goerli"] if @api_client.config.client_side_validation && !allowable_values.include?(network) fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}" end # resource path local_var_path = '/blockchain-data/{blockchain}/{network}/transactions/prepare-account-based-transaction'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'prepare_an_account_based_transaction_from_hd_wallet_x_pub_y_pub_z_pub_rb']) # return_type return_type = opts[:debug_return_type] || 'PrepareAnAccountBasedTransactionFromHDWalletXPubYPubZPubR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"HDWalletsApi.prepare_an_account_based_transaction_from_hd_wallet__x_pub_y_pub_z_pub", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: HDWalletsApi#prepare_an_account_based_transaction_from_hd_wallet__x_pub_y_pub_z_pub\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sync_hd_wallet__x_pub_y_pub_z_pub(blockchain, network, opts = {}) ⇒ SyncHDWalletXPubYPubZPubR
Sync HD Wallet (xPub, yPub, zPub) HD wallets usually have a lot of addresses and transactions, getting the data on demand is a heavy operation. That’s why we have created this feature, to be able to get HD wallet details or transactions this HD wallet must be synced first. In addition to the initial sync we keep updating the synced HD wallets all the time.
882 883 884 885 |
# File 'lib/crypto_apis/api/hd_wallets_api.rb', line 882 def sync_hd_wallet__x_pub_y_pub_z_pub(blockchain, network, opts = {}) data, _status_code, _headers = sync_hd_wallet__x_pub_y_pub_z_pub_with_http_info(blockchain, network, opts) data end |
#sync_hd_wallet__x_pub_y_pub_z_pub_with_http_info(blockchain, network, opts = {}) ⇒ Array<(SyncHDWalletXPubYPubZPubR, Integer, Hash)>
Sync HD Wallet (xPub, yPub, zPub) HD wallets usually have a lot of addresses and transactions, getting the data on demand is a heavy operation. That's why we have created this feature, to be able to get HD wallet details or transactions this HD wallet must be synced first. In addition to the initial sync we keep updating the synced HD wallets all the time.
895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 |
# File 'lib/crypto_apis/api/hd_wallets_api.rb', line 895 def sync_hd_wallet__x_pub_y_pub_z_pub_with_http_info(blockchain, network, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HDWalletsApi.sync_hd_wallet__x_pub_y_pub_z_pub ...' end # verify the required parameter 'blockchain' is set if @api_client.config.client_side_validation && blockchain.nil? fail ArgumentError, "Missing the required parameter 'blockchain' when calling HDWalletsApi.sync_hd_wallet__x_pub_y_pub_z_pub" end # verify enum value allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum", "zcash", "ethereum-classic", "binance-smart-chain", "xrp"] if @api_client.config.client_side_validation && !allowable_values.include?(blockchain) fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}" end # verify the required parameter 'network' is set if @api_client.config.client_side_validation && network.nil? fail ArgumentError, "Missing the required parameter 'network' when calling HDWalletsApi.sync_hd_wallet__x_pub_y_pub_z_pub" end # verify enum value allowable_values = ["mainnet", "testnet", "mordor", "goerli"] if @api_client.config.client_side_validation && !allowable_values.include?(network) fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}" end # resource path local_var_path = '/blockchain-data/{blockchain}/{network}/hd/sync'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'sync_hd_wallet_x_pub_y_pub_z_pub_rb']) # return_type return_type = opts[:debug_return_type] || 'SyncHDWalletXPubYPubZPubR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"HDWalletsApi.sync_hd_wallet__x_pub_y_pub_z_pub", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: HDWalletsApi#sync_hd_wallet__x_pub_y_pub_z_pub\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sync_new_hd_wallet__x_pub_y_pub_z_pub(blockchain, network, opts = {}) ⇒ SyncNewHDWalletXPubYPubZPubR
Sync New HD Wallet (xPub, yPub, zPub) Through this endpoint users can add a brand new xPub to the Crypto APIs system to be ready for deriving. Unlike our other similar endpoint “Sync HD Wallet (xPub, yPub, zPub)”, this endpoint does not create new addresses nor syncs old data.
971 972 973 974 |
# File 'lib/crypto_apis/api/hd_wallets_api.rb', line 971 def sync_new_hd_wallet__x_pub_y_pub_z_pub(blockchain, network, opts = {}) data, _status_code, _headers = sync_new_hd_wallet__x_pub_y_pub_z_pub_with_http_info(blockchain, network, opts) data end |
#sync_new_hd_wallet__x_pub_y_pub_z_pub_with_http_info(blockchain, network, opts = {}) ⇒ Array<(SyncNewHDWalletXPubYPubZPubR, Integer, Hash)>
Sync New HD Wallet (xPub, yPub, zPub) Through this endpoint users can add a brand new xPub to the Crypto APIs system to be ready for deriving. Unlike our other similar endpoint “Sync HD Wallet (xPub, yPub, zPub)”, this endpoint does not create new addresses nor syncs old data.
984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 |
# File 'lib/crypto_apis/api/hd_wallets_api.rb', line 984 def sync_new_hd_wallet__x_pub_y_pub_z_pub_with_http_info(blockchain, network, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HDWalletsApi.sync_new_hd_wallet__x_pub_y_pub_z_pub ...' end # verify the required parameter 'blockchain' is set if @api_client.config.client_side_validation && blockchain.nil? fail ArgumentError, "Missing the required parameter 'blockchain' when calling HDWalletsApi.sync_new_hd_wallet__x_pub_y_pub_z_pub" end # verify enum value allowable_values = ["bitcoin", "ethereum"] if @api_client.config.client_side_validation && !allowable_values.include?(blockchain) fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}" end # verify the required parameter 'network' is set if @api_client.config.client_side_validation && network.nil? fail ArgumentError, "Missing the required parameter 'network' when calling HDWalletsApi.sync_new_hd_wallet__x_pub_y_pub_z_pub" end # verify enum value allowable_values = ["mainnet", "testnet", "goerli"] if @api_client.config.client_side_validation && !allowable_values.include?(network) fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}" end # resource path local_var_path = '/blockchain-data/{blockchain}/{network}/hd/sync-new'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'sync_new_hd_wallet_x_pub_y_pub_z_pub_rb']) # return_type return_type = opts[:debug_return_type] || 'SyncNewHDWalletXPubYPubZPubR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"HDWalletsApi.sync_new_hd_wallet__x_pub_y_pub_z_pub", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: HDWalletsApi#sync_new_hd_wallet__x_pub_y_pub_z_pub\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |