# \#python

**URL:** https://radixtalk.com/tag/python/20.md

[Latest](https://radixtalk.com/latest.md) · [Categories](https://radixtalk.com/categories.md) · [Tags](https://radixtalk.com/tags.md)

---

## [How to create a Radix Wallet for development purposes](https://radixtalk.com/t/how-to-create-a-radix-wallet-for-development-purposes/61)

<div class="topic-metadata">

**Author:** [@Stuart](https://radixtalk.com/u/Stuart)\
**Replies:** 5\
**Last updated:** [29 November 2023 14:38 UTC](https://radixtalk.com/t/how-to-create-a-radix-wallet-for-development-purposes/61 "2023-11-29T14:38:46Z")

</div>

Creating a Radix Wallet Address for Development Purposes Radix Wallets are created using Elliptic Curve Cryptography (ECC) to generate a Private/Public Key pair. Specifically, we use an Elliptic Curve Digital Signature A…

---

## [What is the accumulator hash?](https://radixtalk.com/t/what-is-the-accumulator-hash/226)

<div class="topic-metadata">

**Author:** [@Stuart](https://radixtalk.com/u/Stuart)\
**Replies:** 1\
**Last updated:** [27 August 2022 22:22 UTC](https://radixtalk.com/t/what-is-the-accumulator-hash/226 "2022-08-27T22:22:42Z")

</div>

The accumulator hash is a fixed length value that is used to verify that the current transaction, and all transactions before it, have occurred in the correct order and have not been tampered with. How is it calculated? …

---

## [RadixLib - Radix Python Library](https://radixtalk.com/t/radixlib-radix-python-library/333)

<div class="topic-metadata">

**Author:** [@Stuart](https://radixtalk.com/u/Stuart)\
**Replies:** 7\
**Last updated:** [23 August 2022 02:32 UTC](https://radixtalk.com/t/radixlib-radix-python-library/333 "2022-08-23T02:32:46Z")

</div>

Developer: 0xOmar#4183 on Discord

---

## [How do I locally sign a transaction with a private key?](https://radixtalk.com/t/how-do-i-locally-sign-a-transaction-with-a-private-key/157)

<div class="topic-metadata">

**Author:** [@Stuart](https://radixtalk.com/u/Stuart)\
**Replies:** 11\
**Last updated:** [12 June 2022 14:49 UTC](https://radixtalk.com/t/how-do-i-locally-sign-a-transaction-with-a-private-key/157 "2022-06-12T14:49:48Z")

</div>

When you are making a transaction using the Node API, you will need to sign the transaction locally using your private key: Next, you need to sign the hashOfBlobToSign using the private key of your account (ie. the “fr…

---

## [How to convert a Wallet Address into a Public Key](https://radixtalk.com/t/how-to-convert-a-wallet-address-into-a-public-key/188)

<div class="topic-metadata">

**Author:** [@Stuart](https://radixtalk.com/u/Stuart)\
**Replies:** 4\
**Last updated:** [18 February 2022 16:27 UTC](https://radixtalk.com/t/how-to-convert-a-wallet-address-into-a-public-key/188 "2022-02-18T16:27:39Z")

</div>

import bech32 wallet\_address = "rdx1q...." \_hrp, wallet\_readdr\_5bit = bech32.bech32\_decode(wallet\_address) wallet\_readdr = bech32.convertbits(wallet\_readdr\_5bit, 5, 8, pad=False) # Remove the Radix Engine Address 04 p…

---

## [How to unregister a Validator Node using the Keystore file](https://radixtalk.com/t/how-to-unregister-a-validator-node-using-the-keystore-file/64)

<div class="topic-metadata">

**Author:** [@Stuart](https://radixtalk.com/u/Stuart)\
**Replies:** 2\
**Last updated:** [1 February 2022 10:02 UTC](https://radixtalk.com/t/how-to-unregister-a-validator-node-using-the-keystore-file/64 "2022-02-01T10:02:05Z")

</div>

The script below will unregister a validator node given its node-keystore.ks file and password. This is really only for emergency use where you’re unable to unregister a node because it is still syncing. The script read…

---

## [How to encrypt a transaction message that can be read by the Radix Wallet](https://radixtalk.com/t/how-to-encrypt-a-transaction-message-that-can-be-read-by-the-radix-wallet/202)

<div class="topic-metadata">

**Author:** [@Stuart](https://radixtalk.com/u/Stuart)\
**Replies:** 5\
**Last updated:** [8 January 2022 19:00 UTC](https://radixtalk.com/t/how-to-encrypt-a-transaction-message-that-can-be-read-by-the-radix-wallet/202 "2022-01-08T19:00:30Z")

</div>

TODO: Explain process step by step import os import bech32 import ecdsa import hashlib from ecdsa.curves import SECP256k1 from ecdsa.keys import SigningKey, VerifyingKey from Crypto.Protocol.KDF import scrypt from Crypt…

---

## [How to convert a Node Id (02... or 03...) from the Radix log file into a Validator Address (rv...)?](https://radixtalk.com/t/how-to-convert-a-node-id-02-or-03-from-the-radix-log-file-into-a-validator-address-rv/63)

<div class="topic-metadata">

**Author:** [@Stuart](https://radixtalk.com/u/Stuart)\
**Replies:** 0\
**Last updated:** [25 December 2021 14:04 UTC](https://radixtalk.com/t/how-to-convert-a-node-id-02-or-03-from-the-radix-log-file-into-a-validator-address-rv/63 "2021-12-25T14:04:41Z")

</div>

The Node Id reported in the Radix Node logs is a compressed public key - it starts with either 02 or 03 and is 33 bytes long. To convert it into a Validator Address then just bech32 encode it with a human readable part o…

---

## [How to convert a Node Address (rn...) into a Validator Address (rv...)](https://radixtalk.com/t/how-to-convert-a-node-address-rn-into-a-validator-address-rv/62)

<div class="topic-metadata">

**Author:** [@Stuart](https://radixtalk.com/u/Stuart)\
**Replies:** 0\
**Last updated:** [25 December 2021 14:02 UTC](https://radixtalk.com/t/how-to-convert-a-node-address-rn-into-a-validator-address-rv/62 "2021-12-25T14:02:56Z")

</div>

Both the node address and the validator address are Bech32 encodings of the same compressed public key with different human-readable parts (hrp). import bech32 node\_address = "rn1q22ts4wderfhzham0vnzs93g68d5hal3g8yyvv0…

---

## [How to convert a Validator Address (rv...) into a Node Address (rn...)](https://radixtalk.com/t/how-to-convert-a-validator-address-rv-into-a-node-address-rn/196)

<div class="topic-metadata">

**Author:** [@Stuart](https://radixtalk.com/u/Stuart)\
**Replies:** 0\
**Last updated:** [2 January 2022 15:08 UTC](https://radixtalk.com/t/how-to-convert-a-validator-address-rv-into-a-node-address-rn/196 "2022-01-02T15:08:27Z")

</div>

Both the node address and the validator address are Bech32 encodings of the same compressed public key with different human-readable parts (hrp). import bech32 validator\_address = "rv1q22ts4wderfhzham0vnzs93g68d5hal3g8…

---

## [How to calculate the Radix Resource Id (RRI) for a mutable token](https://radixtalk.com/t/how-to-calculate-the-radix-resource-id-rri-for-a-mutable-token/65)

<div class="topic-metadata">

**Author:** [@Stuart](https://radixtalk.com/u/Stuart)\
**Replies:** 0\
**Last updated:** [25 December 2021 14:16 UTC](https://radixtalk.com/t/how-to-calculate-the-radix-resource-id-rri-for-a-mutable-token/65 "2021-12-25T14:16:57Z")

</div>

Replace the public\_key\_hex with the public key used to create the token, and the symbol with the token symbol. import bech32 import hashlib public\_key\_hex = "02690937690ffb9d7ae8b67af05efc03a5a9f7e53933de80f92ce763a555…

---

## [How to convert a Public Key into a Wallet Address](https://radixtalk.com/t/how-to-convert-a-public-key-into-a-wallet-address/193)

<div class="topic-metadata">

**Author:** [@Stuart](https://radixtalk.com/u/Stuart)\
**Replies:** 0\
**Last updated:** [1 January 2022 22:25 UTC](https://radixtalk.com/t/how-to-convert-a-public-key-into-a-wallet-address/193 "2022-01-01T22:25:45Z")

</div>

import bech32 # public key in compressed format (33 bytes long and starts with 02 or 03) public\_key\_hex="02...." # Convert Compressed Public Key into a Radix Engine Address readdr\_bytes = b"\\x04" + bytearray.fromhex(pu…

---

## [How to decrypt an encrypted transaction message created by the Radix Wallet](https://radixtalk.com/t/how-to-decrypt-an-encrypted-transaction-message-created-by-the-radix-wallet/189)

<div class="topic-metadata">

**Author:** [@Stuart](https://radixtalk.com/u/Stuart)\
**Replies:** 5\
**Last updated:** [3 January 2022 17:35 UTC](https://radixtalk.com/t/how-to-decrypt-an-encrypted-transaction-message-created-by-the-radix-wallet/189 "2022-01-03T17:35:22Z")

</div>

How to decrypt an encrypted transaction message created by the Radix Wallet 0. Introduction The encryption scheme used by the Radix Wallet is called DH\_ADD\_EPH\_AESGCM256\_SCRYPT\_000 Where: DH → (Elliptic Curve) Diffie-…

---

## [RadixTalk adds support for Replit to run code snippets in the browser](https://radixtalk.com/t/radixtalk-adds-support-for-replit-to-run-code-snippets-in-the-browser/198)

<div class="topic-metadata">

**Author:** [@Stuart](https://radixtalk.com/u/Stuart)\
**Replies:** 0\
**Last updated:** [2 January 2022 16:23 UTC](https://radixtalk.com/t/radixtalk-adds-support-for-replit-to-run-code-snippets-in-the-browser/198 "2022-01-02T16:23:23Z")

</div>

RadixTalk is now using Replit.com to allow code snippets to be run in your browser without having to install Python or any libraries. Look for topics tagged with the replit tag to see what snippets are available.
