Metadata-Version: 2.1
Name: ultimate-sol
Version: 0.0.1
Summary: This library contains a set of functions for interacting with Solana blockchain, as well as some third-party APIs such as Jupiter, DexScreener, etc.
Author-email: smbd0x <smbd0x@proton.me>
Project-URL: Homepage, https://github.com/smbd0x
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6.0
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: base58
Requires-Dist: construct
Requires-Dist: httpx
Requires-Dist: solana
Requires-Dist: solders

# Ultimate-Sol Python SDK #

## What is this? ##
This library contains a set of functions for interacting with Solana blockchain, as well as some third-party APIs such as Jupiter, DexScreener, etc.

## Quick Guide ##
### Installation ###
To install the library, enter command:

    pip install ultimate-sol


----------


### Quick start ###


Using the library is as simple and convenient as possible:


To interact directly with Solana blockchain, use `ultimate-sol.sol.SolClient` class:
    
    from ultimate-sol.sol import SolClient

    client = SolClient()
    account_address = '...'

    account_balance = client.get_sol_balance(account_address)

To interact with Jupiter API, use `ultimate-sol.jupiter.Jupiter` class:

    from ultimate-sol.jupiter import Jupiter
    from solders.keypair import Keypair
    
    secret_key = '...'
    keypair = Keypair.from_base58_string(secret_key)
    jupiter = Jupiter(keypair)

    quote = jupiter.quote(
                        input_mint='...',
                        output_mint='...',
                        amount=0,
                        ...
    )

### Perform and send a swap ###
To perform a swap and send it to blockchain, use this code:
    
    from ultimate-sol.sol import SolClient
    from ultimate-sol.jupiter import Jupiter
    from solders.keypair import Keypair

    secret_key = '...'
    keypair = Keypair.from_base58_string(secret_key)

    client = SolClient()
    jupiter = Jupiter(keypair)

    
    swap = jupiter.swap(
                        input_mint='...',
                        output_mint='...',
                        amount=0,
                        ...
    )
    tx_res = client.send_tx(swap, keypair)

### Get token info ###
To get info about a token, such as symbol or decimals, you can use the following code:
    
    from ultimate-sol.jupiter import get_token_info

    # Returns info about token, like decimals, symbol, logo and the like (works with pump.fun tokens).
    info = get_token_info('...')

Also, you can use `ultimate-sol.metadata.get_metadata` function. It might be faster than `jupiter.get_token_info` if you use a custom Solana Node.
    
    from ultimate-sol.sol import SolClient
    from ultimate-sol.metadata import get_metadata

    client = SolClient()
    info = get_metadata(client, '...')

### Other functions ###
You can also use this library to interact with some other APIs, such as DexScreener or SolanaFM. Example:

    from ultimate-sol.dexscreener import get_token_profile
    
    # Returns token profile (if exist) from dexscreener with name, symbol, price, volume, etc.
    token_profile = get_token_profile('...')  


----------


## Developer ##
My GitHub: [link](https://github.com/smbd0x) 
