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.3.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.3-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.3.tar.gz.

File metadata

  • Download URL: goat_sdk_plugin_spl_token-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 b147aedafa7f7cc4a9ea3d1b35b7b3efe4a85508a3c9607f81ef78730aac270b
MD5 8272398cb98579084d1ce2b5fce1e8f5
BLAKE2b-256 f3806ec3e9bdf7444321e6f1a3f7e6ab473199a8d62ca7f21a25f4771efd0203

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for goat_sdk_plugin_spl_token-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 caf6eb26ef7d57c4d80d5df68fc590b4d1cd948c755e4cb249934b9c09cf6e3c
MD5 4d300d23933dbdd1f79ae45a4b908ff8
BLAKE2b-256 fef92c07b74d3082d9e818136fbd378f2cbef9d88c800c265f98e71025a19ee5

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