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.2.tar.gz (4.4 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.2-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.2.tar.gz.

File metadata

  • Download URL: goat_sdk_plugin_spl_token-0.1.2.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.13.1 Linux/6.13.0-1-MANJARO

File hashes

Hashes for goat_sdk_plugin_spl_token-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d7f150dec2f1cc9aa6fdac5bb96ed489a2379c8ee016a9701f3d097a4ed2c8f1
MD5 fd4d61c9c74114ff3b106357ad85353c
BLAKE2b-256 c07b8399eb6d910fbd56ecb4776591908aef46e20e97493dc3ad1e75a6524648

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for goat_sdk_plugin_spl_token-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 833670ef5d02ec88877184c1426f5de86cd92b4b603b8dd5977d62f198f4954d
MD5 fe85869e3b8d51cbcd5ae5a14670e0a2
BLAKE2b-256 d5bf753acaa72c50031d51be899d87750e17674599417890125a4e6d9ce67bba

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