Skip to main content

Quickstart | Signing Automation

Create a 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:

turnkey wallets create --name default --key-name quickstart

Create an Ethereum account

To create a cryptographic key pair on our new Wallet, we need to pass our desired address format:

turnkey wallets accounts create --wallet default --address-format ADDRESS_FORMAT_ETHEREUM --key-name quickstart

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:

turnkey wallets accounts list --wallet default --key-name quickstart

Sign a Transaction

Now you can sign an Ethereum transaction with this new address with our 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:

turnkey request --path /public/v1/submit/sign_transaction --body '{
"timestampMs": "'"$(date +%s)"'000",
"type": "ACTIVITY_TYPE_SIGN_TRANSACTION_V2",
"organizationId": "'"$ORGANIZATION_ID"'",
"parameters": {
"type": "TRANSACTION_TYPE_ETHEREUM",
"signWith": "<Your Ethereum address>",
"unsignedTransaction": "<Your Transaction>"
}
}' --key-name quickstart

If you'd like to broadcast your transaction, you can easily do so via Etherscan.

Next Steps