Skip to main content

Goat plugin for spl_token

Project description

SPL Token Plugin for GOAT SDK

A plugin for the GOAT SDK that provides functionality for interacting with Solana Program Library (SPL) tokens on the Solana blockchain.

Installation

# Install the plugin
poetry add goat-sdk-plugin-spl-tokens

# Install required wallet dependency
poetry add goat-sdk-wallet-solana

Usage

from goat_plugins.spl_token import spl_token, SplTokenPluginOptions

# Initialize the plugin
options = SplTokenPluginOptions(
    rpc_url="${RPC_PROVIDER_URL}"  # Your Solana RPC URL
)
plugin = spl_token(options)

# Get token account info
token_info = await plugin.get_token_account_info(
    token_address="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",  # USDC
    wallet_address="your_wallet_address"
)

# Transfer tokens
transfer = await plugin.transfer(
    token_address="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",  # USDC
    recipient="recipient_wallet_address",
    amount=1000000,  # 1 USDC (6 decimals)
)

# Create token account
new_account = await plugin.create_token_account(
    token_mint="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",  # USDC
    owner="owner_wallet_address"
)

Features

  • Token Account Management:

    • Create token accounts
    • Close token accounts
    • Get account information
    • Get token balances
  • Token Operations:

    • Transfer tokens
    • Approve token delegation
    • Revoke token delegation
    • Burn tokens
  • Token Mint Operations:

    • Create token mints
    • Mint new tokens
    • Set mint authority
    • Freeze/thaw accounts
  • Advanced Features:

    • Multi-signature support
    • Associated token accounts
    • Token program v2 support
    • Metadata program integration
  • Network Support:

    • Solana Mainnet
    • Solana Testnet
    • Solana Devnet

License

This project is licensed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

goat_sdk_plugin_spl_token-0.1.4.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

goat_sdk_plugin_spl_token-0.1.4-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file goat_sdk_plugin_spl_token-0.1.4.tar.gz.

File metadata

  • Download URL: goat_sdk_plugin_spl_token-0.1.4.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.16 Linux/6.8.0-1021-azure

File hashes

Hashes for goat_sdk_plugin_spl_token-0.1.4.tar.gz
Algorithm Hash digest
SHA256 f78037620c7026b31b1846615e9bc03d80f7d590af666eacb5eaf5c5551414bd
MD5 fc018ddd85e6410379af01267ab177aa
BLAKE2b-256 5ece044ff3176107cc07371201b7f40060d440eafe2c699ff39b05d85f22a142

See more details on using hashes here.

File details

Details for the file goat_sdk_plugin_spl_token-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for goat_sdk_plugin_spl_token-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bcb7152f8d4cecbeed21eb6ad34c9551ab3653c9aa8f0e2351632b20a4080d92
MD5 edc5adb444de4e1f58bbdd9547999ada
BLAKE2b-256 50eedacbd258a7e830b73ae50f5e76eedb2c90322890bae0c213c6da7d3a9232

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page