WAX icon

WAX

Interact with the WAX blockchain

Overview

The node interacts with the WAX blockchain, specifically allowing users to perform operations related to WAX accounts. The "Stake CPU" operation enables staking a specified amount of WAX tokens to the CPU resource of a given WAX account. Staking CPU is essential for users who want to increase their computational resources on the WAX blockchain, which can improve transaction processing speed and capacity.

Common scenarios include:

  • Developers or users wanting to allocate more CPU resources to their WAX account to handle higher transaction throughput.
  • Automated workflows that manage resource allocation on WAX accounts based on usage patterns.
  • Delegating CPU resources to another account by transferring staked tokens.

Practical example:

  • A user wants to stake 5 WAX tokens to their account's CPU to ensure smooth execution of smart contracts or transactions during peak activity times.

Properties

Name Meaning
API Endpoint The URL of the WAX blockchain API endpoint to connect to (default: https://wax.greymass.com).
Account Name The WAX account name on which to perform the CPU staking operation.
Amount (WAX) The amount of WAX tokens to stake to the CPU resource.
Transfer Stake to New Account Boolean flag indicating whether the ownership of the staked tokens should be transferred to a new account. Options: true or false.

Output

The node outputs JSON data representing the result of the staking operation on the WAX blockchain. This typically includes transaction details such as transaction ID, status, and any relevant blockchain response data confirming the staking action.

If the operation fails and "Continue On Fail" is enabled, the output will contain an error message in the JSON under the error key.

No binary data output is produced by this node.

Dependencies

  • Requires access to a WAX blockchain API endpoint (default is https://wax.greymass.com).
  • Optionally requires an API authentication token or private key credential to authorize staking transactions on behalf of the user.
  • Network connectivity to the specified WAX API endpoint must be available.

Troubleshooting

  • Common issues:

    • Incorrect or misspelled account name may cause transaction failure.
    • Insufficient WAX balance to cover the staking amount.
    • Network or endpoint connectivity problems.
    • Missing or invalid API credentials if required by the endpoint.
  • Error messages:

    • Errors returned from the blockchain API will be included in the output JSON under the error field if "Continue On Fail" is enabled.
    • Common errors include authorization failures, insufficient funds, or invalid parameters.
  • Resolution tips:

    • Verify the account name and ensure it exists on the WAX blockchain.
    • Check the WAX token balance before attempting to stake.
    • Confirm the API endpoint URL is correct and reachable.
    • Provide valid API credentials if the endpoint requires authentication.

Links and References

Discussion