How-to for developers · Accounts, wallets and keys

Assign a Regular Key Pair

In plain words

This tutorial shows how to authorize a second key pair, called a regular key pair, to sign future transactions for your account. Unlike the master key pair, which is mathematically linked to the account's address, a regular key pair can be removed or replaced.

Written by zerps in plain words, from the source linked below.
Section
Tutorials

What you will do

You generate a regular key pair, attach it to your account and send a transaction signed with it. You also check which key signed a transaction. The same steps work for a first regular key pair, for replacing an existing one and for key rotation as a security measure.

What you need

You need a basic understanding of the XRP Ledger and of cryptographic keys. You also need a client library such as xrpl.js installed. The sample code funds one new account from the Testnet faucet, or you can use an existing account.

The steps in short

Generate the key pair on your own machine and store it securely. Send a SetRegularKey transaction to assign it to your account. You can sign this with the master key pair, an existing regular key pair or a multi-signing list. Then send a test transaction signed with the regular key pair. The sample sends an AccountSet transaction with no parameters, which only uses a sequence number and burns the transaction cost.

Checking the result

The SigningPubKey field of a transaction holds the public key of the key pair that signed it. If you signed with the regular key pair, the field holds that pair's public key. A tefBAD_AUTH result means the key you signed with does not match the regular key you set. A tefBAD_AUTH_MASTER or temBAD_AUTH_MASTER result means the account has no regular key assigned. You can use the account_info method to confirm the RegularKey field.

Good to know

Test the regular key before you take further steps such as disabling the master key pair. If you make a mistake and lose access to your account, no one can restore it for you. Never send your secret key in plain text over the internet.

Source: xrpl.org. Read 6 December 2026.

Zerpedia states what the source says, in plain words, and gives no opinion. How Zerpedia is made

zerps Trading tokens on the XRP Ledger carries risk, including total loss. zerps is a self-custodial interface; it does not hold funds, give advice, or execute trades on your behalf.