Prerequisites
This guide assumes you’ve completed the steps to create an account, organization, and API keypair as described in the Account Setup section.Installation
Install the Turnkey CLI to get started:Transaction Signing
1
Setup
Set the An API keypair is required to authenticate requests to the Turnkey API.Create a new key named Create a new encryption key using the turnkey CLI:You’ll see output like this:Follow the instructions in this guide to add your new public API key to your organization via the dashboard.
ORGANIZATION_ID environment variable to your organization ID. This will be used to identify your organization in the API requests.quickstart using the turnkey CLI:2
Create Wallet
Wallets are collections of cryptographic key pairs typically used for sending and receiving digital assets. To create one, we need to provide a name:
This command requires a key named If the key exists but has not been added to your organization, you’ll see an error like this:If the encryption key doesn’t exist, you’ll see an error like this:
quickstart to exist in your configuration. This key should have been created during the Quickstart guide. It also requires you to create an encryption key named “default” which you’d find in the encryption-keys directory of your turnkey config. If you haven’t created those yet, please complete the initial setup steps first.If the key doesn’t exist, you’ll see an error like this:3
Create Ethereum Account
To create a cryptographic key pair on our new wallet, we need to pass our desired address format:This command will produce an Ethereum address (e.g.
0x08cb1216C95149DF66978b574E484869512CE2bF) that we’ll need to sign a transaction. You can see your new Wallet account with:4
Sign a Transaction
Now you can sign an Ethereum transaction with this new address with our If you’d like to broadcast your transaction, you can easily do so
via Etherscan.
sign_transaction endpoint. Make sure to replace the unsignedTransaction below with your own. You can use our simple transaction generator if you need a quick transaction for testing: