Actions7
Overview
This node integrates with the Turnkey API to manage cryptocurrency wallets and accounts. Specifically, the "Create Wallet Accounts" operation allows users to create multiple accounts within an existing wallet by specifying account details such as cryptographic curve, derivation path, and address format.
Common scenarios for this node include:
- Automating the creation of multiple blockchain accounts under a single wallet for organizational or development purposes.
- Managing hierarchical deterministic (HD) wallet accounts programmatically.
- Supporting various blockchain address formats and curves to accommodate different cryptocurrencies.
For example, a user can create several Bitcoin and Ethereum accounts under one wallet by providing the appropriate paths and address formats, enabling streamlined wallet management in workflows.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method of authentication; currently supports only "API Key". |
| Organization ID | The unique identifier of the Turnkey organization under which the wallet exists. Required to scope the request. |
| Wallet ID | Identifier of the wallet for which new accounts will be created. |
| Accounts | A collection of account definitions to create. Each account includes: - Curve: Cryptographic curve used (SECP256K1 or ED25519). - Path Format: Currently only BIP32 supported. - Path: Derivation path string (required). - Address Format: Specifies the blockchain address format, e.g., Bitcoin Mainnet P2PKH, Ethereum, Solana, etc. |
Output
The output is a JSON object representing the response from the Turnkey API after creating wallet accounts. This typically includes details about the newly created accounts such as their addresses, public keys, and metadata returned by the API.
No binary data output is produced by this operation.
Example output structure (simplified):
{
"activity": {
"result": {
"createdAccounts": [
{
"address": "string",
"publicKey": "string",
"curve": "string",
"path": "string",
"addressFormat": "string"
}
]
}
}
}
Dependencies
- Requires an API key credential for authenticating with the Turnkey API.
- Uses the Turnkey client library (
@turnkey/http) to communicate with the API. - The node expects the user to provide the organization ID and wallet ID.
- No additional environment variables are required beyond the API key credential.
Troubleshooting
- Missing or invalid API key: Ensure that the API key credential is correctly configured and has sufficient permissions.
- Invalid Organization ID or Wallet ID: Verify that the provided IDs exist and belong to your Turnkey organization.
- Invalid account parameters: The
pathfield is required for each account; missing or malformed paths will cause errors. - Unsupported operation error: If an unsupported operation is selected, the node will throw an error indicating the operation is not supported.
- Network or API errors: Check network connectivity and Turnkey API status if requests fail unexpectedly.
Error messages generally indicate the nature of the failure, such as missing parameters or API communication issues, and should be addressed accordingly.
Links and References
- Turnkey API Documentation (general reference for API capabilities)
- Hierarchical Deterministic Wallets (BIP32)
- Cryptographic Curves SECP256K1 and ED25519
- Blockchain Address Formats