crypto_apis 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +51 -15
- data/docs/BroadcastLocallySignedTransactionR.md +24 -0
- data/docs/BroadcastLocallySignedTransactionRB.md +20 -0
- data/docs/BroadcastLocallySignedTransactionRBData.md +18 -0
- data/docs/BroadcastLocallySignedTransactionRBDataItem.md +22 -0
- data/docs/BroadcastLocallySignedTransactionRData.md +18 -0
- data/docs/BroadcastLocallySignedTransactionRI.md +18 -0
- data/docs/BroadcastTransactionFail.md +24 -0
- data/docs/BroadcastTransactionFailData.md +22 -0
- data/docs/BroadcastTransactionFailDataItem.md +24 -0
- data/docs/BroadcastTransactionSuccess.md +24 -0
- data/docs/BroadcastTransactionSuccessData.md +22 -0
- data/docs/BroadcastTransactionSuccessDataItem.md +22 -0
- data/docs/CreateCoinsTransactionRequestFromAddressRBDataItem.md +6 -2
- data/docs/CreateCoinsTransactionRequestFromAddressRI.md +4 -0
- data/docs/CreateCoinsTransactionRequestFromWalletRBDataItem.md +7 -3
- data/docs/{CreateCoinsTransactionRequestFromWalletRBDataItemDestinations.md → CreateCoinsTransactionRequestFromWalletRBDataItemRecipients.md} +3 -3
- data/docs/CreateCoinsTransactionRequestFromWalletRI.md +4 -0
- data/docs/CreateTokensTransactionRequestFromAddressRBDataItem.md +6 -2
- data/docs/CreateTokensTransactionRequestFromAddressRI.md +4 -0
- data/docs/FeaturesApi.md +167 -0
- data/docs/{ListReceivingAddressesR.md → GenerateDepositAddressR.md} +3 -3
- data/docs/{GenerateReceivingAddressRB.md → GenerateDepositAddressRB.md} +3 -3
- data/docs/GenerateDepositAddressRBData.md +18 -0
- data/docs/{GenerateReceivingAddressRBDataItem.md → GenerateDepositAddressRBDataItem.md} +2 -2
- data/docs/GenerateDepositAddressRData.md +18 -0
- data/docs/{GenerateReceivingAddressRI.md → GenerateDepositAddressRI.md} +2 -2
- data/docs/GeneratingApi.md +16 -16
- data/docs/GetAddressDetailsRIConfirmedBalance.md +2 -2
- data/docs/GetAddressDetailsRITotalReceived.md +2 -2
- data/docs/GetAddressDetailsRITotalSpent.md +2 -2
- data/docs/GetBlockDetailsByBlockHashRIBS.md +2 -0
- data/docs/GetBlockDetailsByBlockHashRIBSBSC.md +36 -0
- data/docs/GetBlockDetailsByBlockHeightRIBS.md +2 -0
- data/docs/GetBlockDetailsByBlockHeightRIBSBSC.md +34 -0
- data/docs/GetLatestMinedBlockRIBS.md +2 -0
- data/docs/GetLatestMinedBlockRIBSBSC.md +34 -0
- data/docs/GetTransactionDetailsByTransactionIDRIBS.md +2 -0
- data/docs/GetTransactionDetailsByTransactionIDRIBSBSC.md +28 -0
- data/docs/GetTransactionDetailsByTransactionIDRIBSBSCGasPrice.md +20 -0
- data/docs/GetTransactionDetailsByTransactionIDRIFee.md +1 -1
- data/docs/InformativeApi.md +15 -15
- data/docs/{GenerateReceivingAddressR.md → ListDepositAddressesR.md} +3 -3
- data/docs/{ListReceivingAddressesRData.md → ListDepositAddressesRData.md} +3 -3
- data/docs/{ListReceivingAddressesRI.md → ListDepositAddressesRI.md} +2 -2
- data/docs/ListTransactionsByAddressRIBS.md +2 -0
- data/docs/ListTransactionsByAddressRIBSBSC.md +30 -0
- data/docs/ListTransactionsByBlockHashRIBS.md +2 -0
- data/docs/ListTransactionsByBlockHashRIBSBSC.md +30 -0
- data/docs/ListTransactionsByBlockHashRIFee.md +1 -1
- data/docs/ListTransactionsByBlockHeightRIBS.md +2 -0
- data/docs/ListTransactionsByBlockHeightRIBSBSC.md +28 -0
- data/docs/ListTransactionsByBlockHeightRIBSBSCGasPrice.md +20 -0
- data/docs/ListXRPRippleTransactionsByAddressRI.md +2 -4
- data/docs/TransactionRequestApproval.md +24 -0
- data/docs/TransactionRequestApprovalData.md +22 -0
- data/docs/TransactionRequestApprovalDataItem.md +28 -0
- data/docs/TransactionRequestBroadcasted.md +24 -0
- data/docs/TransactionRequestBroadcastedData.md +22 -0
- data/docs/TransactionRequestBroadcastedDataItem.md +30 -0
- data/docs/TransactionRequestFail.md +24 -0
- data/docs/TransactionRequestFailData.md +22 -0
- data/docs/TransactionRequestFailDataItem.md +30 -0
- data/docs/TransactionRequestMined.md +24 -0
- data/docs/TransactionRequestMinedData.md +22 -0
- data/docs/TransactionRequestRejection.md +24 -0
- data/docs/TransactionRequestRejectionData.md +22 -0
- data/docs/TransactionRequestRejectionDataItem.md +28 -0
- data/docs/TransactionsApi.md +10 -10
- data/docs/XRPRippleApi.md +3 -1
- data/lib/crypto_apis.rb +46 -11
- data/lib/crypto_apis/api/features_api.rb +194 -0
- data/lib/crypto_apis/api/generating_api.rb +17 -17
- data/lib/crypto_apis/api/informative_api.rb +18 -18
- data/lib/crypto_apis/api/transactions_api.rb +10 -10
- data/lib/crypto_apis/api/unified_endpoints_api.rb +7 -7
- data/lib/crypto_apis/api/xrp_ripple_api.rb +7 -0
- data/lib/crypto_apis/models/broadcast_locally_signed_transaction_r.rb +263 -0
- data/lib/crypto_apis/models/broadcast_locally_signed_transaction_r_data.rb +223 -0
- data/lib/crypto_apis/models/broadcast_locally_signed_transaction_rb.rb +233 -0
- data/lib/crypto_apis/models/broadcast_locally_signed_transaction_rb_data.rb +223 -0
- data/lib/crypto_apis/models/broadcast_locally_signed_transaction_rb_data_item.rb +249 -0
- data/lib/crypto_apis/models/broadcast_locally_signed_transaction_ri.rb +224 -0
- data/lib/crypto_apis/models/broadcast_transaction_fail.rb +268 -0
- data/lib/crypto_apis/models/broadcast_transaction_fail_data.rb +254 -0
- data/lib/crypto_apis/models/broadcast_transaction_fail_data_item.rb +270 -0
- data/lib/crypto_apis/models/broadcast_transaction_success.rb +268 -0
- data/lib/crypto_apis/models/broadcast_transaction_success_data.rb +254 -0
- data/lib/crypto_apis/models/broadcast_transaction_success_data_item.rb +255 -0
- data/lib/crypto_apis/models/create_coins_transaction_request_from_address_rb_data_item.rb +30 -10
- data/lib/crypto_apis/models/create_coins_transaction_request_from_address_ri.rb +21 -1
- data/lib/crypto_apis/models/create_coins_transaction_request_from_wallet_rb_data_item.rb +38 -18
- data/lib/crypto_apis/models/{create_coins_transaction_request_from_wallet_rb_data_item_destinations.rb → create_coins_transaction_request_from_wallet_rb_data_item_recipients.rb} +4 -4
- data/lib/crypto_apis/models/create_coins_transaction_request_from_wallet_ri.rb +21 -1
- data/lib/crypto_apis/models/create_tokens_transaction_request_from_address_rb_data_item.rb +30 -10
- data/lib/crypto_apis/models/create_tokens_transaction_request_from_address_ri.rb +31 -1
- data/lib/crypto_apis/models/{list_receiving_addresses_r.rb → generate_deposit_address_r.rb} +4 -4
- data/lib/crypto_apis/models/{generate_receiving_address_r_data.rb → generate_deposit_address_r_data.rb} +4 -4
- data/lib/crypto_apis/models/{generate_receiving_address_rb.rb → generate_deposit_address_rb.rb} +4 -4
- data/lib/crypto_apis/models/{generate_receiving_address_rb_data.rb → generate_deposit_address_rb_data.rb} +4 -4
- data/lib/crypto_apis/models/{generate_receiving_address_rb_data_item.rb → generate_deposit_address_rb_data_item.rb} +3 -3
- data/lib/crypto_apis/models/{list_receiving_addresses_ri.rb → generate_deposit_address_ri.rb} +3 -3
- data/lib/crypto_apis/models/get_address_details_ri_confirmed_balance.rb +0 -1
- data/lib/crypto_apis/models/get_address_details_ri_total_received.rb +0 -1
- data/lib/crypto_apis/models/get_address_details_ri_total_spent.rb +0 -1
- data/lib/crypto_apis/models/get_block_details_by_block_hash_ribs.rb +1 -0
- data/lib/crypto_apis/models/get_block_details_by_block_hash_ribsbsc.rb +361 -0
- data/lib/crypto_apis/models/get_block_details_by_block_height_ribs.rb +1 -0
- data/lib/crypto_apis/models/get_block_details_by_block_height_ribsbsc.rb +345 -0
- data/lib/crypto_apis/models/get_latest_mined_block_ribs.rb +1 -0
- data/lib/crypto_apis/models/get_latest_mined_block_ribsbsc.rb +345 -0
- data/lib/crypto_apis/models/get_transaction_details_by_transaction_idri_fee.rb +0 -1
- data/lib/crypto_apis/models/get_transaction_details_by_transaction_idribs.rb +1 -0
- data/lib/crypto_apis/models/get_transaction_details_by_transaction_idribsbsc.rb +299 -0
- data/lib/crypto_apis/models/get_transaction_details_by_transaction_idribsbsc_gas_price.rb +238 -0
- data/lib/crypto_apis/models/{generate_receiving_address_r.rb → list_deposit_addresses_r.rb} +4 -4
- data/lib/crypto_apis/models/{list_receiving_addresses_r_data.rb → list_deposit_addresses_r_data.rb} +4 -4
- data/lib/crypto_apis/models/{generate_receiving_address_ri.rb → list_deposit_addresses_ri.rb} +3 -3
- data/lib/crypto_apis/models/list_transactions_by_address_ribs.rb +1 -0
- data/lib/crypto_apis/models/list_transactions_by_address_ribsbsc.rb +314 -0
- data/lib/crypto_apis/models/list_transactions_by_block_hash_ri_fee.rb +0 -1
- data/lib/crypto_apis/models/list_transactions_by_block_hash_ribs.rb +1 -0
- data/lib/crypto_apis/models/list_transactions_by_block_hash_ribsbsc.rb +314 -0
- data/lib/crypto_apis/models/list_transactions_by_block_height_ribs.rb +1 -0
- data/lib/crypto_apis/models/list_transactions_by_block_height_ribsbsc.rb +299 -0
- data/lib/crypto_apis/models/list_transactions_by_block_height_ribsbsc_gas_price.rb +238 -0
- data/lib/crypto_apis/models/list_xrp_ripple_transactions_by_address_ri.rb +1 -16
- data/lib/crypto_apis/models/transaction_request_approval.rb +268 -0
- data/lib/crypto_apis/models/transaction_request_approval_data.rb +254 -0
- data/lib/crypto_apis/models/transaction_request_approval_data_item.rb +300 -0
- data/lib/crypto_apis/models/transaction_request_broadcasted.rb +268 -0
- data/lib/crypto_apis/models/transaction_request_broadcasted_data.rb +254 -0
- data/lib/crypto_apis/models/transaction_request_broadcasted_data_item.rb +315 -0
- data/lib/crypto_apis/models/transaction_request_fail.rb +268 -0
- data/lib/crypto_apis/models/transaction_request_fail_data.rb +254 -0
- data/lib/crypto_apis/models/transaction_request_fail_data_item.rb +315 -0
- data/lib/crypto_apis/models/transaction_request_mined.rb +268 -0
- data/lib/crypto_apis/models/transaction_request_mined_data.rb +254 -0
- data/lib/crypto_apis/models/transaction_request_rejection.rb +268 -0
- data/lib/crypto_apis/models/transaction_request_rejection_data.rb +254 -0
- data/lib/crypto_apis/models/transaction_request_rejection_data_item.rb +300 -0
- data/lib/crypto_apis/version.rb +1 -1
- data/spec/api/{validating_api_spec.rb → features_api_spec.rb} +21 -6
- data/spec/api/generating_api_spec.rb +5 -5
- data/spec/api/informative_api_spec.rb +5 -5
- data/spec/api/transactions_api_spec.rb +1 -1
- data/spec/api/xrp_ripple_api_spec.rb +1 -0
- data/spec/models/broadcast_locally_signed_transaction_r_data_spec.rb +34 -0
- data/spec/models/broadcast_locally_signed_transaction_r_spec.rb +52 -0
- data/spec/models/broadcast_locally_signed_transaction_rb_data_item_spec.rb +46 -0
- data/spec/models/broadcast_locally_signed_transaction_rb_data_spec.rb +34 -0
- data/spec/models/broadcast_locally_signed_transaction_rb_spec.rb +40 -0
- data/spec/models/broadcast_locally_signed_transaction_ri_spec.rb +34 -0
- data/spec/models/broadcast_transaction_fail_data_item_spec.rb +52 -0
- data/spec/models/broadcast_transaction_fail_data_spec.rb +46 -0
- data/spec/models/broadcast_transaction_fail_spec.rb +52 -0
- data/spec/models/broadcast_transaction_success_data_item_spec.rb +46 -0
- data/spec/models/broadcast_transaction_success_data_spec.rb +46 -0
- data/spec/models/broadcast_transaction_success_spec.rb +52 -0
- data/spec/models/create_coins_transaction_request_from_address_rb_data_item_spec.rb +13 -1
- data/spec/models/create_coins_transaction_request_from_address_ri_spec.rb +12 -0
- data/spec/models/{create_coins_transaction_request_from_wallet_rb_data_item_destinations_spec.rb → create_coins_transaction_request_from_wallet_rb_data_item_recipients_spec.rb} +6 -6
- data/spec/models/create_coins_transaction_request_from_wallet_rb_data_item_spec.rb +13 -1
- data/spec/models/create_coins_transaction_request_from_wallet_ri_spec.rb +12 -0
- data/spec/models/create_tokens_transaction_request_from_address_rb_data_item_spec.rb +13 -1
- data/spec/models/create_tokens_transaction_request_from_address_ri_spec.rb +12 -0
- data/spec/models/{generate_receiving_address_r_data_spec.rb → generate_deposit_address_r_data_spec.rb} +6 -6
- data/spec/models/{list_receiving_addresses_r_spec.rb → generate_deposit_address_r_spec.rb} +6 -6
- data/spec/models/{generate_receiving_address_rb_data_item_spec.rb → generate_deposit_address_rb_data_item_spec.rb} +6 -6
- data/spec/models/{generate_receiving_address_rb_data_spec.rb → generate_deposit_address_rb_data_spec.rb} +6 -6
- data/spec/models/{generate_receiving_address_rb_spec.rb → generate_deposit_address_rb_spec.rb} +6 -6
- data/spec/models/{list_receiving_addresses_ri_spec.rb → generate_deposit_address_ri_spec.rb} +6 -6
- data/spec/models/get_block_details_by_block_hash_ribsbsc_spec.rb +88 -0
- data/spec/models/get_block_details_by_block_height_ribsbsc_spec.rb +82 -0
- data/spec/models/get_latest_mined_block_ribsbsc_spec.rb +82 -0
- data/spec/models/get_transaction_details_by_transaction_idribsbsc_gas_price_spec.rb +40 -0
- data/spec/models/get_transaction_details_by_transaction_idribsbsc_spec.rb +64 -0
- data/spec/models/{list_receiving_addresses_r_data_spec.rb → list_deposit_addresses_r_data_spec.rb} +6 -6
- data/spec/models/{generate_receiving_address_r_spec.rb → list_deposit_addresses_r_spec.rb} +6 -6
- data/spec/models/{generate_receiving_address_ri_spec.rb → list_deposit_addresses_ri_spec.rb} +6 -6
- data/spec/models/list_transactions_by_address_ribsbsc_spec.rb +70 -0
- data/spec/models/list_transactions_by_block_hash_ribsbsc_spec.rb +70 -0
- data/spec/models/list_transactions_by_block_height_ribsbsc_gas_price_spec.rb +40 -0
- data/spec/models/list_transactions_by_block_height_ribsbsc_spec.rb +64 -0
- data/spec/models/list_xrp_ripple_transactions_by_address_ri_spec.rb +0 -6
- data/spec/models/transaction_request_approval_data_item_spec.rb +64 -0
- data/spec/models/transaction_request_approval_data_spec.rb +46 -0
- data/spec/models/transaction_request_approval_spec.rb +52 -0
- data/spec/models/transaction_request_broadcasted_data_item_spec.rb +70 -0
- data/spec/models/transaction_request_broadcasted_data_spec.rb +46 -0
- data/spec/models/transaction_request_broadcasted_spec.rb +52 -0
- data/spec/models/transaction_request_fail_data_item_spec.rb +70 -0
- data/spec/models/transaction_request_fail_data_spec.rb +46 -0
- data/spec/models/transaction_request_fail_spec.rb +52 -0
- data/spec/models/transaction_request_mined_data_spec.rb +46 -0
- data/spec/models/transaction_request_mined_spec.rb +52 -0
- data/spec/models/transaction_request_rejection_data_item_spec.rb +64 -0
- data/spec/models/transaction_request_rejection_data_spec.rb +46 -0
- data/spec/models/transaction_request_rejection_spec.rb +52 -0
- metadata +186 -46
- data/docs/GenerateReceivingAddressRBData.md +0 -18
- data/docs/GenerateReceivingAddressRData.md +0 -18
- data/docs/ValidatingApi.md +0 -87
- data/lib/crypto_apis/api/validating_api.rb +0 -108
@@ -1,18 +0,0 @@
|
|
1
|
-
# CryptoApis::GenerateReceivingAddressRBData
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **item** | [**GenerateReceivingAddressRBDataItem**](GenerateReceivingAddressRBDataItem.md) | | |
|
8
|
-
|
9
|
-
## Example
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
require 'crypto_apis'
|
13
|
-
|
14
|
-
instance = CryptoApis::GenerateReceivingAddressRBData.new(
|
15
|
-
item: null
|
16
|
-
)
|
17
|
-
```
|
18
|
-
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# CryptoApis::GenerateReceivingAddressRData
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **item** | [**GenerateReceivingAddressRI**](GenerateReceivingAddressRI.md) | | |
|
8
|
-
|
9
|
-
## Example
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
require 'crypto_apis'
|
13
|
-
|
14
|
-
instance = CryptoApis::GenerateReceivingAddressRData.new(
|
15
|
-
item: null
|
16
|
-
)
|
17
|
-
```
|
18
|
-
|
data/docs/ValidatingApi.md
DELETED
@@ -1,87 +0,0 @@
|
|
1
|
-
# CryptoApis::ValidatingApi
|
2
|
-
|
3
|
-
All URIs are relative to *https://rest.cryptoapis.io/v2*
|
4
|
-
|
5
|
-
| Method | HTTP request | Description |
|
6
|
-
| ------ | ------------ | ----------- |
|
7
|
-
| [**validate_address**](ValidatingApi.md#validate_address) | **POST** /blockchain-tools/{blockchain}/{network}/addresses/validate | Validate Address |
|
8
|
-
|
9
|
-
|
10
|
-
## validate_address
|
11
|
-
|
12
|
-
> <ValidateAddressR> validate_address(blockchain, network, opts)
|
13
|
-
|
14
|
-
Validate Address
|
15
|
-
|
16
|
-
This endpoint checks user public addresses whether they are valid or not.
|
17
|
-
|
18
|
-
### Examples
|
19
|
-
|
20
|
-
```ruby
|
21
|
-
require 'time'
|
22
|
-
require 'crypto_apis'
|
23
|
-
# setup authorization
|
24
|
-
CryptoApis.configure do |config|
|
25
|
-
# Configure API key authorization: ApiKey
|
26
|
-
config.api_key['ApiKey'] = 'YOUR API KEY'
|
27
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
28
|
-
# config.api_key_prefix['ApiKey'] = 'Bearer'
|
29
|
-
end
|
30
|
-
|
31
|
-
api_instance = CryptoApis::ValidatingApi.new
|
32
|
-
blockchain = 'bitcoin' # String | Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
|
33
|
-
network = 'mainnet' # String | Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\", \"rinkeby\" are test networks.
|
34
|
-
opts = {
|
35
|
-
context: 'context_example', # String | In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
|
36
|
-
validate_address_rb: CryptoApis::ValidateAddressRB.new({data: CryptoApis::ValidateAddressRBData.new({item: CryptoApis::ValidateAddressRBDataItem.new({address: 'mho4jHBcrNCncKt38trJahXakuaBnS7LK5'})})}) # ValidateAddressRB |
|
37
|
-
}
|
38
|
-
|
39
|
-
begin
|
40
|
-
# Validate Address
|
41
|
-
result = api_instance.validate_address(blockchain, network, opts)
|
42
|
-
p result
|
43
|
-
rescue CryptoApis::ApiError => e
|
44
|
-
puts "Error when calling ValidatingApi->validate_address: #{e}"
|
45
|
-
end
|
46
|
-
```
|
47
|
-
|
48
|
-
#### Using the validate_address_with_http_info variant
|
49
|
-
|
50
|
-
This returns an Array which contains the response data, status code and headers.
|
51
|
-
|
52
|
-
> <Array(<ValidateAddressR>, Integer, Hash)> validate_address_with_http_info(blockchain, network, opts)
|
53
|
-
|
54
|
-
```ruby
|
55
|
-
begin
|
56
|
-
# Validate Address
|
57
|
-
data, status_code, headers = api_instance.validate_address_with_http_info(blockchain, network, opts)
|
58
|
-
p status_code # => 2xx
|
59
|
-
p headers # => { ... }
|
60
|
-
p data # => <ValidateAddressR>
|
61
|
-
rescue CryptoApis::ApiError => e
|
62
|
-
puts "Error when calling ValidatingApi->validate_address_with_http_info: #{e}"
|
63
|
-
end
|
64
|
-
```
|
65
|
-
|
66
|
-
### Parameters
|
67
|
-
|
68
|
-
| Name | Type | Description | Notes |
|
69
|
-
| ---- | ---- | ----------- | ----- |
|
70
|
-
| **blockchain** | **String** | Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. | |
|
71
|
-
| **network** | **String** | Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\", \"rinkeby\" are test networks. | |
|
72
|
-
| **context** | **String** | In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. | [optional] |
|
73
|
-
| **validate_address_rb** | [**ValidateAddressRB**](ValidateAddressRB.md) | | [optional] |
|
74
|
-
|
75
|
-
### Return type
|
76
|
-
|
77
|
-
[**ValidateAddressR**](ValidateAddressR.md)
|
78
|
-
|
79
|
-
### Authorization
|
80
|
-
|
81
|
-
[ApiKey](../README.md#ApiKey)
|
82
|
-
|
83
|
-
### HTTP request headers
|
84
|
-
|
85
|
-
- **Content-Type**: application/json
|
86
|
-
- **Accept**: application/json
|
87
|
-
|
@@ -1,108 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#CryptoAPIs
|
3
|
-
|
4
|
-
#Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of their blockchain applications. Crypto APIs 2.0 provides unified endpoints and data, raw data, automatic tokens and coins forwardings, callback functionalities, and much more.
|
5
|
-
|
6
|
-
The version of the OpenAPI document: 2.0.0
|
7
|
-
Contact: developers@cryptoapis.io
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.2.1-SNAPSHOT
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'cgi'
|
14
|
-
|
15
|
-
module CryptoApis
|
16
|
-
class ValidatingApi
|
17
|
-
attr_accessor :api_client
|
18
|
-
|
19
|
-
def initialize(api_client = ApiClient.default)
|
20
|
-
@api_client = api_client
|
21
|
-
end
|
22
|
-
# Validate Address
|
23
|
-
# This endpoint checks user public addresses whether they are valid or not.
|
24
|
-
# @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
|
25
|
-
# @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\", \"rinkeby\" are test networks.
|
26
|
-
# @param [Hash] opts the optional parameters
|
27
|
-
# @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
|
28
|
-
# @option opts [ValidateAddressRB] :validate_address_rb
|
29
|
-
# @return [ValidateAddressR]
|
30
|
-
def validate_address(blockchain, network, opts = {})
|
31
|
-
data, _status_code, _headers = validate_address_with_http_info(blockchain, network, opts)
|
32
|
-
data
|
33
|
-
end
|
34
|
-
|
35
|
-
# Validate Address
|
36
|
-
# This endpoint checks user public addresses whether they are valid or not.
|
37
|
-
# @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
|
38
|
-
# @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\", \"rinkeby\" are test networks.
|
39
|
-
# @param [Hash] opts the optional parameters
|
40
|
-
# @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
|
41
|
-
# @option opts [ValidateAddressRB] :validate_address_rb
|
42
|
-
# @return [Array<(ValidateAddressR, Integer, Hash)>] ValidateAddressR data, response status code and response headers
|
43
|
-
def validate_address_with_http_info(blockchain, network, opts = {})
|
44
|
-
if @api_client.config.debugging
|
45
|
-
@api_client.config.logger.debug 'Calling API: ValidatingApi.validate_address ...'
|
46
|
-
end
|
47
|
-
# verify the required parameter 'blockchain' is set
|
48
|
-
if @api_client.config.client_side_validation && blockchain.nil?
|
49
|
-
fail ArgumentError, "Missing the required parameter 'blockchain' when calling ValidatingApi.validate_address"
|
50
|
-
end
|
51
|
-
# verify enum value
|
52
|
-
allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum", "ethereum-classic", "xrp"]
|
53
|
-
if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
|
54
|
-
fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
|
55
|
-
end
|
56
|
-
# verify the required parameter 'network' is set
|
57
|
-
if @api_client.config.client_side_validation && network.nil?
|
58
|
-
fail ArgumentError, "Missing the required parameter 'network' when calling ValidatingApi.validate_address"
|
59
|
-
end
|
60
|
-
# verify enum value
|
61
|
-
allowable_values = ["mainnet", "testnet", "ropsten", "rinkeby", "mordor", "kotti"]
|
62
|
-
if @api_client.config.client_side_validation && !allowable_values.include?(network)
|
63
|
-
fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}"
|
64
|
-
end
|
65
|
-
# resource path
|
66
|
-
local_var_path = '/blockchain-tools/{blockchain}/{network}/addresses/validate'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s))
|
67
|
-
|
68
|
-
# query parameters
|
69
|
-
query_params = opts[:query_params] || {}
|
70
|
-
query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil?
|
71
|
-
|
72
|
-
# header parameters
|
73
|
-
header_params = opts[:header_params] || {}
|
74
|
-
# HTTP header 'Accept' (if needed)
|
75
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
76
|
-
# HTTP header 'Content-Type'
|
77
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
78
|
-
|
79
|
-
# form parameters
|
80
|
-
form_params = opts[:form_params] || {}
|
81
|
-
|
82
|
-
# http body (model)
|
83
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'validate_address_rb'])
|
84
|
-
|
85
|
-
# return_type
|
86
|
-
return_type = opts[:debug_return_type] || 'ValidateAddressR'
|
87
|
-
|
88
|
-
# auth_names
|
89
|
-
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
90
|
-
|
91
|
-
new_options = opts.merge(
|
92
|
-
:operation => :"ValidatingApi.validate_address",
|
93
|
-
:header_params => header_params,
|
94
|
-
:query_params => query_params,
|
95
|
-
:form_params => form_params,
|
96
|
-
:body => post_body,
|
97
|
-
:auth_names => auth_names,
|
98
|
-
:return_type => return_type
|
99
|
-
)
|
100
|
-
|
101
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
102
|
-
if @api_client.config.debugging
|
103
|
-
@api_client.config.logger.debug "API called: ValidatingApi#validate_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
104
|
-
end
|
105
|
-
return data, status_code, headers
|
106
|
-
end
|
107
|
-
end
|
108
|
-
end
|