Use TipLink

The Use TipLink tool, part of AgentiPy, allows users to create TipLinks. TipLink is a service on Solana that enables sending SOL or SPL tokens via a shareable link, making it easy to tip users or onboard new users to crypto without needing their wallet address beforehand. This tool uses an Agentipy proxy service to create these TipLinks.

Functionality

This tool is implemented in the TiplinkManager class. It interacts with an Agentipy proxy service (agent.base_proxy_url) to create TipLinks. The agent's private key is encrypted and sent to this proxy, and an OpenAI API key (agent.openai_api_key) also seems to be part of the payload.

Key Methods:

  • create_tiplink(agent: SolanaAgentKit, amount: float, spl_mint_address: Optional[str] = None) -> Optional[Dict[str, Any]]:

    • Creates a new TipLink funded by the agent's wallet.

    • Parameters:

      • agent: The SolanaAgentKit instance.

      • amount: The amount of SOL or SPL tokens to fund the TipLink with.

      • spl_mint_address (Optional): If creating a TipLink for an SPL token, this is its mint address (string). If None, SOL is used.

    • Sends a request to the Agentipy proxy endpoint (/tiplink/create-tiplink).

    • The response from the proxy is expected to contain the TipLink URL and transaction details for funding it.

    • Returns a dictionary with the TipLink URL, transaction details, or an error.

Important Considerations:

  • Proxy Service: This tool relies on an Agentipy proxy service. The functionality is dependent on this proxy's correct implementation of TipLink creation.

  • On-Chain Fund Transfer: Creating a TipLink is an on-chain action that transfers SOL or SPL tokens from your (the agent's) wallet to a new TipLink account/address. This requires SOL for gas fees and sufficient balance of the asset being tipped.

  • TipLink Security: Once a TipLink is created and funded, the link itself is the key to accessing the funds. Share these links securely.

  • API Keys: An openai_api_key is passed to the proxy; its role in TipLink creation should be understood from the proxy's documentation. The agent's Solana private key is also encrypted and sent.

Source Code

You can find the source code for this tool on GitHub: https://github.com/niceberginc/agentipy/blob/main/agentipy/tools/use_tiplink.py

Last updated