Skip to main content

cryptocom-tools-token

Token tools for Crypto.com Developer Platform.

Installation

pip install cryptocom-tools-token

Read Tools (No Signer Required)

Query token balances without signing transactions.

from cryptocom_tools_token import GetNativeBalanceTool, GetERC20BalanceTool

# Query native CRO balance
balance_tool = GetNativeBalanceTool()
result = balance_tool.invoke({"address": "0x..."})

# Query ERC20 token balance
erc20_tool = GetERC20BalanceTool()
result = erc20_tool.invoke({
    "address": "0x...",
    "contract_address": "0x..."
})

Write Tools (Signer Required)

Execute token operations that require transaction signing.

from cryptocom_tools_token import TransferNativeTool, SwapTokenTool, WrapTokenTool
from cryptocom_tools_wallet import PrivateKeySigner

# Create a signer (implements Signer protocol)
signer = PrivateKeySigner.from_env()

# Transfer native tokens
transfer_tool = TransferNativeTool(signer=signer)
result = transfer_tool.invoke({"to": "0x...", "amount": 1.5})

# Swap tokens
swap_tool = SwapTokenTool(signer=signer)
result = swap_tool.invoke({
    "token_in": "native",  # or token address
    "token_out": "0x5C7F8...",  # USDC address
    "amount": 100
})

# Wrap CRO to WCRO
wrap_tool = WrapTokenTool(signer=signer)
result = wrap_tool.invoke({"amount": 50})

License

MIT

Metadata

Release files for cryptocom-tools-token 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cryptocom-tools-token 2.0.0
File Size Uploaded Provenance
cryptocom_tools_token-2.0.0.tar.gz 11.7 kB Without provenance Details

Release files / cryptocom_tools_token-2.0.0.tar.gz

Download URL cryptocom_tools_token-2.0.0.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2e1d20e1c6b98b7a49133af4694fec889e9f59fddd33c6126f26565cb89cfc2b
BLAKE2b-256 checksum
How to use checksums
bd20cef97f478ad93562a44b9f9e9c3100dfd179a59a6570a4245fcde79622f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.9

Security for cryptocom-tools-token 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.0.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page