Merge pull request #3515 from XRPLF/rename-remove-regular-key

Rename 'Change or Remove Regular Key' & cleanup
This commit is contained in:
Rome Reginelli
2026-02-24 14:02:08 -08:00
committed by GitHub
27 changed files with 16 additions and 176 deletions

View File

@@ -75,7 +75,7 @@ Si una dirección de reserva se ve comprometida, las consecuencias son similares
- [Claves criptográficas](cryptographic-keys.md)
- **Tutoriales:**
- [Asignar par de claves regulares](/docs/tutorials/best-practices/key-management/assign-a-regular-key-pair.md)
- [Cambiar o eliminar par de claves regulares](/docs/tutorials/best-practices/key-management/change-or-remove-a-regular-key-pair.md)
- [Cambiar o eliminar par de claves regulares](/docs/tutorials/best-practices/key-management/remove-a-regular-key-pair.md)
- **Referencias:**
- [metodo account_info][]
- [Transacción SetRegularKey][]

View File

@@ -249,7 +249,7 @@ Los pasos para derivar par de claves de cuenta XRP Ledger secp256k1 desde un val
- [Direcciones de emisión y operacionales](account-types.md)
- **Tutoriales:**
- [Asignación de par de claves normales](/docs/tutorials/best-practices/key-management/assign-a-regular-key-pair.md)
- [Cambiar o eliminar par de claves normales](/docs/tutorials/best-practices/key-management/change-or-remove-a-regular-key-pair.md)
- [Cambiar o eliminar par de claves normales](/docs/tutorials/best-practices/key-management/remove-a-regular-key-pair.md)
- **Referencias:**
- [Transacción SetRegularKey][]
- [Objeto de ledger AccountRoot](../../references/protocol/ledger-data/ledger-entry-types/accountroot.md)

View File

@@ -74,7 +74,7 @@ labels:
- [暗号鍵](cryptographic-keys.md)
- **チュートリアル:**
- [レギュラーキーペアの割り当て](../../tutorials/best-practices/key-management/assign-a-regular-key-pair.md)
- [レギュラーキーペアの変更または削除](../../tutorials/best-practices/key-management/change-or-remove-a-regular-key-pair.md)
- [レギュラーキーペアの変更または削除](../../tutorials/best-practices/key-management/remove-a-regular-key-pair.md)
- **リファレンス:**
- [account_infoメソッド][]
- [SetRegularKeyトランザクション][]

View File

@@ -251,7 +251,7 @@ XRP Ledgerアカウントキーでのsecp256k1鍵導出に、Ed25519鍵導出よ
- [発行アドレスと運用アドレス](account-types.md)
- **チュートリアル:**
- [レギュラーキーペアの割り当て](../../tutorials/best-practices/key-management/assign-a-regular-key-pair.md)
- [レギュラーキーペアの変更または削除](../../tutorials/best-practices/key-management/change-or-remove-a-regular-key-pair.md)
- [レギュラーキーペアの変更または削除](../../tutorials/best-practices/key-management/remove-a-regular-key-pair.md)
- **リファレンス:**
- [SetRegularKeyトランザクション][]
- [AccountRootレジャーオブジェクト](../../references/protocol/ledger-data/ledger-entry-types/accountroot.md)

View File

@@ -158,7 +158,7 @@ For each persisted transaction without validated result:
{% admonition type="success" name="ヒント" %}[`AccountTxnID`フィールド](../../references/protocol/transactions/common-fields.md#accounttxnid)を使用すると、このような状況で冗長的なトランザクションが成功しないように防ぐことができます。{% /admonition %}
- 不正使用者に秘密鍵を使われてトランザクションを送信された場合。その場合は、可能であれば[キーペアをローテーション](../../tutorials/best-practices/key-management/change-or-remove-a-regular-key-pair.md)して、送信された他のトランザクションを確認します。また、ネットワークを監査して、その秘密鍵が大規模な侵入やセキュリティ侵害に関係していたかどうかを判断する必要があります。キーペアのローテーションに成功して、不正使用者がアカウントやシステムにアクセスできなくなったら、通常のアクティビティーを再開します。
- 不正使用者に秘密鍵を使われてトランザクションを送信された場合。その場合は、可能であれば[キーペアをローテーション](../../tutorials/best-practices/key-management/remove-a-regular-key-pair.md)して、送信された他のトランザクションを確認します。また、ネットワークを監査して、その秘密鍵が大規模な侵入やセキュリティ侵害に関係していたかどうかを判断する必要があります。キーペアのローテーションに成功して、不正使用者がアカウントやシステムにアクセスできなくなったら、通常のアクティビティーを再開します。
#### レジャーのギャップ

View File

@@ -1,5 +0,0 @@
# Use `SetRegularKey`
Use `SetRegularKey` to assign a key pair to a wallet and make a payment signed using the regular key wallet.
For more context, see [SetRegularKey](https://xrpl.org/setregularkey.html).

View File

@@ -1,10 +0,0 @@
# Set Regular Key (JavaScript)
Demonstrates how to set a regular key for an XRP Ledger account.
Quick setup and usage:
```sh
npm install
npx ts-node setRegularKey.ts
```

View File

@@ -1,13 +0,0 @@
{
"name": "set-regular-key",
"license": "MIT",
"dependencies": {
"xrpl": "^4.5.0"
},
"devDependencies": {
"ts-node": "^10.9.1",
"typescript": "^5.0.0",
"@types/node": "^20.0.0"
}
}

View File

@@ -1,56 +0,0 @@
/*
* Use `SetRegularKey` to assign a key pair to a wallet and make a payment signed using the regular key wallet.
* Reference: https://xrpl.org/setregularkey.html
*/
import { Client, Payment, SetRegularKey } from 'xrpl'
const client = new Client('wss://s.altnet.rippletest.net:51233')
async function setRegularKey(): Promise<void> {
await client.connect()
const { wallet: wallet1 } = await client.fundWallet()
const { wallet: wallet2 } = await client.fundWallet()
const { wallet: regularKeyWallet } = await client.fundWallet()
console.log('Balances before payment')
console.log(`Balance of ${wallet1.classicAddress} is ${await client.getXrpBalance(wallet1.classicAddress)}XRP`)
console.log(`Balance of ${wallet2.classicAddress} is ${await client.getXrpBalance(wallet2.classicAddress)}XRP`)
// assigns key-pair(regularKeyWallet) to wallet1 using `SetRegularKey`.
const tx: SetRegularKey = {
TransactionType: 'SetRegularKey',
Account: wallet1.classicAddress,
RegularKey: regularKeyWallet.classicAddress,
}
console.log('Submitting a SetRegularKey transaction...')
const response = await client.submitAndWait(tx, {
wallet: wallet1,
})
console.log('Response for successful SetRegularKey tx')
console.log(response)
/*
* when wallet1 sends payment to wallet2 and
* signs using the regular key wallet, the transaction goes through.
*/
const payment: Payment = {
TransactionType: 'Payment',
Account: wallet1.classicAddress,
Destination: wallet2.classicAddress,
Amount: '1000',
}
const submitTx = await client.submit(payment, {
wallet: regularKeyWallet,
})
console.log('Response for tx signed using Regular Key:')
console.log(submitTx)
console.log('Balances after payment:')
console.log(`Balance of ${wallet1.classicAddress} is ${await client.getXrpBalance(wallet1.classicAddress)}XRP`)
console.log(`Balance of ${wallet2.classicAddress} is ${await client.getXrpBalance(wallet2.classicAddress)}XRP`)
await client.disconnect()
}
void setRegularKey()

View File

@@ -1,10 +0,0 @@
{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
}
}

View File

@@ -1,12 +0,0 @@
# Set Regular Key (Python)
Demonstrates how to set a regular key for an XRP Ledger account.
Quick setup and usage:
```sh
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python setRegularKey.py
```

View File

@@ -1,2 +0,0 @@
xrpl-py>=4.4.0

View File

@@ -1,52 +0,0 @@
"""Example of how we can setting a regular key"""
from xrpl.account import get_balance
from xrpl.clients import JsonRpcClient
from xrpl.models.transactions import Payment, SetRegularKey
from xrpl.transaction import submit_and_wait
from xrpl.wallet import generate_faucet_wallet
# References
# - https://xrpl.org/assign-a-regular-key-pair.html#assign-a-regular-key-pair
# - https://xrpl.org/setregularkey.html#setregularkey
# - https://xrpl.org/change-or-remove-a-regular-key-pair.html
# Create a client to connect to the test network
client = JsonRpcClient("https://s.altnet.rippletest.net:51234")
# Creating two wallets to send money between
wallet1 = generate_faucet_wallet(client, debug=True)
wallet2 = generate_faucet_wallet(client, debug=True)
regular_key_wallet = generate_faucet_wallet(client, debug=True)
# Both balances should be zero since nothing has been sent yet
print("Balances before payment:")
print(get_balance(wallet1.address, client))
print(get_balance(wallet2.address, client))
# Assign key pair (regular_key_wallet) to wallet1 using SetRegularKey transaction
tx = SetRegularKey(
account=wallet1.address, regular_key=regular_key_wallet.address
)
set_regular_key_response = submit_and_wait(tx, client, wallet1)
print("Response for successful SetRegularKey tx:")
print(set_regular_key_response)
# Since regular_key_wallet is linked to wallet1,
# walet1 can send payment to wallet2 and have regular_key_wallet sign it
payment = Payment(
account=wallet1.address,
destination=wallet2.address,
amount="1000",
)
payment_response = submit_and_wait(payment, client, regular_key_wallet)
print("Response for tx signed using Regular Key:")
print(payment_response)
# Balance after sending 1000 from wallet1 to wallet2
print("Balances after payment:")
print(get_balance(wallet1.address, client))
print(get_balance(wallet2.address, client))

View File

@@ -75,7 +75,7 @@ If a standby address is compromised, the consequences are like an operational ad
- [Cryptographic Keys](cryptographic-keys.md)
- **Tutorials:**
- [Assign a Regular Key Pair](../../tutorials/best-practices/key-management/assign-a-regular-key-pair.md)
- [Change or Remove a Regular Key Pair](../../tutorials/best-practices/key-management/change-or-remove-a-regular-key-pair.md)
- [Remove a Regular Key Pair](../../tutorials/best-practices/key-management/remove-a-regular-key-pair.md)
- **References:**
- [account_info method][]
- [SetRegularKey transaction][]

View File

@@ -251,7 +251,7 @@ The steps to derive the XRP Ledger's secp256k1 account key pair from a seed valu
- [Issuing and Operational Addresses](account-types.md)
- **Tutorials:**
- [Assign a Regular Key Pair](../../tutorials/best-practices/key-management/assign-a-regular-key-pair.md)
- [Change or Remove a Regular Key Pair](../../tutorials/best-practices/key-management/change-or-remove-a-regular-key-pair.md)
- [Remove a Regular Key Pair](../../tutorials/best-practices/key-management/remove-a-regular-key-pair.md)
- **References:**
- [SetRegularKey transaction][]
- [AccountRoot ledger object](../../references/protocol/ledger-data/ledger-entry-types/accountroot.md)

View File

@@ -170,7 +170,7 @@ The difference between the two transaction failure cases (labeled (1) and (2) in
{% admonition type="success" name="Tip" %}The [`AccountTxnID` field](../../references/protocol/transactions/common-fields.md#accounttxnid) can help prevent redundant transactions from succeeding in this situation.{% /admonition %}
- A malicious actor may have used your secret key to send a transaction. If this is the case, [rotate your key pair](../../tutorials/best-practices/key-management/change-or-remove-a-regular-key-pair.md) if you can, and check for other transactions sent. You should also audit your network to determine if the secret key was part of a larger intrusion or security leak. When you successfully rotate your key pair and are certain that the malicious actor no longer has access to your accounts and systems, you can resume normal activities.
- A malicious actor may have used your secret key to send a transaction. If this is the case, [rotate your key pair](../../tutorials/best-practices/key-management/remove-a-regular-key-pair.md) if you can, and check for other transactions sent. You should also audit your network to determine if the secret key was part of a larger intrusion or security leak. When you successfully rotate your key pair and are certain that the malicious actor no longer has access to your accounts and systems, you can resume normal activities.
#### Ledger Gaps

View File

@@ -9,7 +9,7 @@ labels:
This tutorial shows how to authorize a secondary key pair, called a _[regular key pair](../../../concepts/accounts/cryptographic-keys.md)_, to sign future transactions. Unlike the master key pair, which is mathematically linked to the account's address, you can remove or replace the regular key pair, which is better for security.
You can use these steps to assign a regular key pair for the first time or to replace an existing regular key pair with a new one.
You can use these steps to assign a regular key pair for the first time or to replace an existing regular key pair with a new one. You can use this same process for key rotation as a proactive security measure.
## Goals
@@ -97,7 +97,7 @@ Use the [`Wallet.create()` class method](https://xrpl-py.readthedocs.io/en/stabl
Use a [SetRegularKey transaction][] to assign the new key pair to your account as a regular key pair.
{% admonition type="success" name="Tip" %}This example signs the transaction using the master key pair, but you could also use an existing regular key pair, or a [multi-signing list](../../../concepts/accounts/multi-signing.md) if your account has multi-signing set up.{% /admonition %}
{% admonition type="success" name="Tip: Rotating a Regular Key" %}This example signs the transaction using the master key pair, but you could also use an existing regular key pair, or a [multi-signing list](../../../concepts/accounts/multi-signing.md) if your account has multi-signing set up.{% /admonition %}
{% tabs %}
{% tab label="JavaScript" %}
@@ -156,7 +156,7 @@ Now that you're familiar with the benefits of assigning a regular key pair to an
- [Multi-Signing](../../../concepts/accounts/multi-signing.md)
- [Issuing and Operational Addresses](../../../concepts/accounts/account-types.md)
- **Tutorials:**
- [Change or Remove a Regular Key Pair](change-or-remove-a-regular-key-pair.md)
- [Remove a Regular Key Pair](remove-a-regular-key-pair.md)
- [Set Up Multi-Signing](set-up-multi-signing.md)
- [List XRP as an Exchange](../../../use-cases/defi/list-xrp-as-an-exchange.md)
- **References:**

View File

@@ -137,7 +137,7 @@ For more information about this and related topics, see:
- [Account Types](../../../concepts/accounts/account-types.md)
- **Tutorials:**
- [Assign a Regular Key Pair](assign-a-regular-key-pair.md)
- [Change or Remove a Regular Key Pair](change-or-remove-a-regular-key-pair.md)
- [Remove a Regular Key Pair](remove-a-regular-key-pair.md)
- [Set Up Multi-Signing](set-up-multi-signing.md)
- **References:**
- [account_info method][]

View File

@@ -127,7 +127,7 @@ There currently is no way to have more than one multi-signing list assigned to y
At this point, you can [send a multi-signed transaction](send-a-multi-signed-transaction.md). You may also want to:
* [Disable the master key pair](disable-master-key-pair.md).
* [Remove the regular key pair](change-or-remove-a-regular-key-pair.md) (if you previously set one)
* [Remove the regular key pair](remove-a-regular-key-pair.md) (if you previously set one)
## See Also

View File

@@ -276,7 +276,7 @@ After the transaction is validated, you can confirm the status of the Global Fre
- **Tutorials:**
- [Enable No Freeze](enable-no-freeze.md)
- [Freeze a Trust Line](freeze-a-trust-line.md)
- [Change or Remove a Regular Key Pair](../../best-practices/key-management/change-or-remove-a-regular-key-pair.md)
- [Remove a Regular Key Pair](../../best-practices/key-management/remove-a-regular-key-pair.md)
- **References:**
- [account_lines method][]
- [account_info method][]

View File

@@ -347,7 +347,7 @@ As before, wait for the transaction to be validated by consensus.
- **Tutorials:**
- [Enable No Freeze](enable-no-freeze.md)
- [Enact Global Freeze](enact-global-freeze.md)
- [Change or Remove a Regular Key Pair](../../best-practices/key-management/change-or-remove-a-regular-key-pair.md)
- [Remove a Regular Key Pair](../../best-practices/key-management/remove-a-regular-key-pair.md)
- **References:**
- [account_lines method][]
- [account_info method][]

View File

@@ -323,7 +323,7 @@
items:
- page: docs/tutorials/best-practices/key-management/assign-a-regular-key-pair.md
- page: docs/tutorials/best-practices/key-management/disable-master-key-pair.md
- page: docs/tutorials/best-practices/key-management/change-or-remove-a-regular-key-pair.md
- page: docs/tutorials/best-practices/key-management/remove-a-regular-key-pair.md
- page: docs/tutorials/best-practices/key-management/offline-account-setup.md
- page: docs/tutorials/best-practices/key-management/set-up-multi-signing.md
- page: docs/tutorials/best-practices/key-management/send-a-multi-signed-transaction.md