SkyApi - the Ruby gem for the Skycoin REST API.
Skycoin is a next-generation cryptocurrency.
This SDK is automatically generated by the OpenAPI Generator project:
- API version: 0.27.0
- Package version: 0.27.0
- Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://skycoin.net
To build the Ruby code into a gem:
gem build sky_api.gemspec
Then either install the gem locally:
gem install ./sky_api-0.27.0.gem
(for development, run gem install --dev ./sky_api-0.27.0.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'sky_api', '~> 0.27.0'
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'sky_api', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Please follow the installation procedure and then run the following code:
# Load the gem
require 'sky_api'
api_instance = SkyApi::DefaultApi.new
begin
#Returns the total number of unique address that have coins.
result = api_instance.address_count
p result
rescue SkyApi::ApiError => e
puts "Exception when calling DefaultApi->address_count: #{e}"
end
All URIs are relative to http://127.0.0.1:6420
Class | Method | HTTP request | Description |
---|---|---|---|
SkyApi::DefaultApi | address_count | GET /api/v1/addresscount | Returns the total number of unique address that have coins. |
SkyApi::DefaultApi | address_uxouts | GET /api/v1/address_uxouts | |
SkyApi::DefaultApi | api_v1_rawtx_get | GET /api/v1/rawtx | |
SkyApi::DefaultApi | api_v2_metrics_get | GET /api/v2/metrics | |
SkyApi::DefaultApi | balance_get | GET /api/v1/balance | Returns the balance of one or more addresses, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends. |
SkyApi::DefaultApi | balance_post | POST /api/v1/balance | Returns the balance of one or more addresses, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends. |
SkyApi::DefaultApi | block | GET /api/v1/block | Returns the balance of one or more addresses, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends. |
SkyApi::DefaultApi | blockchain_metadata | GET /api/v1/blockchain/metadata | Returns the blockchain metadata. |
SkyApi::DefaultApi | blockchain_progress | GET /api/v1/blockchain/progress | Returns the blockchain sync progress. |
SkyApi::DefaultApi | blocks | GET /api/v1/blocks | Returns the balance of one or more addresses, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends. |
SkyApi::DefaultApi | coin_supply | GET /api/v1/coinSupply | |
SkyApi::DefaultApi | csrf | GET /api/v1/csrf | Creates a new CSRF token. Previous CSRF tokens are invalidated by this call. |
SkyApi::DefaultApi | data_delete | DELETE /api/v2/data | |
SkyApi::DefaultApi | data_get | GET /api/v2/data | |
SkyApi::DefaultApi | data_post | POST /api/v2/data | |
SkyApi::DefaultApi | default_connections | GET /api/v1/network/defaultConnections | defaultConnectionsHandler returns the list of default hardcoded bootstrap addresses.\n They are not necessarily connected to. |
SkyApi::DefaultApi | health | GET /api/v1/health | Returns node health data. |
SkyApi::DefaultApi | last_blocks | GET /api/v1/last_blocks | |
SkyApi::DefaultApi | network_connection | GET /api/v1/network/connection | This endpoint returns a specific connection. |
SkyApi::DefaultApi | network_connections | GET /api/v1/network/connections | This endpoint returns all outgoings connections. |
SkyApi::DefaultApi | network_connections_disconnect | POST /api/v1/network/connection/disconnect | |
SkyApi::DefaultApi | network_connections_exchange | GET /api/v1/network/connections/exchange | |
SkyApi::DefaultApi | network_connections_trust | GET /api/v1/network/connections/trust | trustConnectionsHandler returns all trusted connections.\n They are not necessarily connected to. In the default configuration, these will be a subset of the default hardcoded bootstrap addresses. |
SkyApi::DefaultApi | outputs_get | GET /api/v1/outputs | If neither addrs nor hashes are specificed, return all unspent outputs. If only one filter is specified, then return outputs match the filter. Both filters cannot be specified. |
SkyApi::DefaultApi | outputs_post | POST /api/v1/outputs | If neither addrs nor hashes are specificed, return all unspent outputs. If only one filter is specified, then return outputs match the filter. Both filters cannot be specified. |
SkyApi::DefaultApi | pending_txs | GET /api/v1/pendingTxs | |
SkyApi::DefaultApi | resend_unconfirmed_txns | POST /api/v1/resendUnconfirmedTxns | |
SkyApi::DefaultApi | richlist | GET /api/v1/richlist | Returns the top skycoin holders. |
SkyApi::DefaultApi | transaction | GET /api/v1/transaction | |
SkyApi::DefaultApi | transaction_inject | POST /api/v1/injectTransaction | Broadcast a hex-encoded, serialized transaction to the network. |
SkyApi::DefaultApi | transaction_post | POST /api/v2/transaction | |
SkyApi::DefaultApi | transaction_post_unspent | POST /api/v2/transaction/unspent | |
SkyApi::DefaultApi | transaction_raw | GET /api/v2/transaction/raw | Returns the hex-encoded byte serialization of a transaction. The transaction may be confirmed or unconfirmed. |
SkyApi::DefaultApi | transaction_verify | POST /api/v2/transaction/verify | |
SkyApi::DefaultApi | transactions_get | GET /api/v1/transactions | Returns transactions that match the filters. |
SkyApi::DefaultApi | transactions_post | POST /api/v1/transactions | Returns transactions that match the filters. |
SkyApi::DefaultApi | uxout | GET /api/v1/uxout | Returns an unspent output by ID. |
SkyApi::DefaultApi | verify_address | POST /api/v2/address/verify | Verifies a Skycoin address. |
SkyApi::DefaultApi | version | GET /api/v1/version | |
SkyApi::DefaultApi | wallet | GET /api/v1/wallet | Returns a wallet by id. |
SkyApi::DefaultApi | wallet_balance | GET /api/v1/wallet/balance | Returns the wallet's balance, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends. |
SkyApi::DefaultApi | wallet_create | POST /api/v1/wallet/create | |
SkyApi::DefaultApi | wallet_decrypt | POST /api/v1/wallet/decrypt | Decrypts wallet. |
SkyApi::DefaultApi | wallet_encrypt | POST /api/v1/wallet/encrypt | Encrypt wallet. |
SkyApi::DefaultApi | wallet_folder | GET /api/v1/wallets/folderName | |
SkyApi::DefaultApi | wallet_new_address | POST /api/v1/wallet/newAddress | |
SkyApi::DefaultApi | wallet_new_seed | GET /api/v1/wallet/newSeed | |
SkyApi::DefaultApi | wallet_recover | POST /api/v2/wallet/recover | Recovers an encrypted wallet by providing the seed. The first address will be generated from seed and compared to the first address of the specified wallet. If they match, the wallet will be regenerated with an optional password. If the wallet is not encrypted, an error is returned. |
SkyApi::DefaultApi | wallet_seed | POST /api/v1/wallet/seed | This endpoint only works for encrypted wallets. If the wallet is unencrypted, The seed will be not returned. |
SkyApi::DefaultApi | wallet_seed_verify | POST /api/v2/wallet/seed/verify | Verifies a wallet seed. |
SkyApi::DefaultApi | wallet_transaction | POST /api/v1/wallet/transaction | Creates a signed transaction |
SkyApi::DefaultApi | wallet_transaction_sign | POST /api/v2/wallet/transaction/sign | Creates a signed transaction |
SkyApi::DefaultApi | wallet_transactions | GET /api/v1/wallet/transactions | |
SkyApi::DefaultApi | wallet_unload | POST /api/v1/wallet/unload | Unloads wallet from the wallet service. |
SkyApi::DefaultApi | wallet_update | POST /api/v1/wallet/update | Update the wallet. |
SkyApi::DefaultApi | wallets | GET /api/v1/wallets |
- SkyApi::Address
- SkyApi::ApiV1PendingTxsTransaction
- SkyApi::ApiV1PendingTxsTransactionOutputs
- SkyApi::BlockSchema
- SkyApi::BlockSchemaBody
- SkyApi::BlockVerboseSchema
- SkyApi::BlockVerboseSchemaBody
- SkyApi::BlockVerboseSchemaHeader
- SkyApi::InlineResponse200
- SkyApi::InlineResponse2001
- SkyApi::InlineResponse20010
- SkyApi::InlineResponse2002
- SkyApi::InlineResponse2003
- SkyApi::InlineResponse2004
- SkyApi::InlineResponse2005
- SkyApi::InlineResponse2006
- SkyApi::InlineResponse2007
- SkyApi::InlineResponse2008
- SkyApi::InlineResponse2008Data
- SkyApi::InlineResponse2009
- SkyApi::InlineResponseDefault
- SkyApi::NetworkConnectionSchema
- SkyApi::NetworkConnectionSchemaUnconfirmedVerifyTransaction
- SkyApi::Transaction
- SkyApi::TransactionEncoded
- SkyApi::TransactionEncodedS
- SkyApi::TransactionStatus
- SkyApi::TransactionTxn
- SkyApi::TransactionV2ParamsAddress
- SkyApi::TransactionV2ParamsAddressHoursSelection
- SkyApi::TransactionV2ParamsUnspent
- SkyApi::TransactionV2ParamsUnspentHoursSelection
- SkyApi::TransactionV2ParamsUnspentTo
- SkyApi::TransactionVerbose
- SkyApi::TransactionVerboseTxn
- SkyApi::TransactionVerboseTxnInputs
- SkyApi::TransactionVerifyRequest
- SkyApi::WalletTransactionRequest
- SkyApi::WalletTransactionRequestHoursSelection
- SkyApi::WalletTransactionRequestWallet
- SkyApi::WalletTransactionSignRequest
- Type: API key
- API key parameter name: X-CSRF-TOKEN
- Location: HTTP header