1Shot icon

1Shot

Interact with the blockchain and web3 via 1Shot API

Actions5

Overview

This node integrates with the 1Shot API to interact with blockchain transactions and Web3 functionalities. Specifically, for the Transaction resource with the default operation, it allows users to execute or read blockchain transactions by sending custom parameters in JSON format to the 1Shot API endpoints.

Common scenarios include:

  • Executing a prepared blockchain transaction by providing its ID and parameters.
  • Reading the status or details of a specific blockchain transaction.

Practical example:

  • A user wants to send tokens to a specific address on a blockchain. They prepare a transaction in 1Shot, then use this node to execute that transaction by passing the transaction ID and parameters such as recipient address and amount.

Properties

Name Meaning
Parameters A JSON object containing the parameters to pass to the transaction function. For example: {"to": "0x3e6a2f0CBA03d293B54c9fCF354948903007a798", "amount": "10000"}

Output

The node outputs an array of JSON objects representing the response from the 1Shot API after executing or reading a transaction. The structure depends on the API response but generally includes transaction execution results or transaction details.

If the node interacts with binary data (not applicable here), it would summarize the meaning accordingly, but this node only returns JSON responses.

Dependencies

  • Requires an OAuth2 API credential configured in n8n to authenticate requests against the 1Shot API.
  • The base URL for API requests is https://api.1shotapi.com/v0.
  • The node uses authenticated HTTP requests with bearer tokens to communicate with the 1Shot service.

Troubleshooting

  • Common issues:

    • Invalid or expired API credentials will cause authentication failures.
    • Malformed JSON in the Parameters property can cause request errors.
    • Using unsupported operations or resources will throw errors.
  • Error messages:

    • "Unsupported operation: <operation>" — Occurs if an operation other than "execute" or "read" is used for the Transaction resource. Ensure you select a supported operation.
    • Authentication errors (e.g., HTTP 403) indicate invalid or expired tokens; re-authenticate your API credentials.
    • JSON parsing errors when inputting Parameters mean the JSON is not well-formed; validate your JSON syntax.

Links and References

Discussion