# \#api

**URL:** https://radixtalk.com/tag/api/117.md

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

---

## [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…

---

## [Stake / Unstake via API](https://radixtalk.com/t/stake-unstake-via-api/445)

<div class="topic-metadata">

**Author:** [@Peachy](https://radixtalk.com/u/Peachy)\
**Replies:** 3\
**Last updated:** [18 April 2022 03:36 UTC](https://radixtalk.com/t/stake-unstake-via-api/445 "2022-04-18T03:36:45Z")

</div>

Has anyone here used the APIs for staking / unstaking found here? \*Staking may be started by transferring XRD from an account to a prepared\_stake entity with a specific validator. Once XRD is in this entity, at some po…

---

## [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 setup your own Radix Gateway API server](https://radixtalk.com/t/how-to-setup-your-own-radix-gateway-api-server/323)

<div class="topic-metadata">

**Author:** [@Mleekko](https://radixtalk.com/u/Mleekko)\
**Replies:** 0\
**Last updated:** [3 February 2022 02:47 UTC](https://radixtalk.com/t/how-to-setup-your-own-radix-gateway-api-server/323 "2022-02-03T02:47:55Z")

</div>

Radix Gateway API setup The setup includes: Radix Full Node + Data Aggregator + Gateway API + Postres DB used by Aggregator + Read-only Replica used by the Gateway API itself, all running on the same dedicated server. T…

---

## [What is the maximum length of messages in a transaction?](https://radixtalk.com/t/what-is-the-maximum-length-of-messages-in-a-transaction/276)

<div class="topic-metadata">

**Author:** [@Stuart](https://radixtalk.com/u/Stuart)\
**Replies:** 2\
**Last updated:** [26 January 2022 17:18 UTC](https://radixtalk.com/t/what-is-the-maximum-length-of-messages-in-a-transaction/276 "2022-01-26T17:18:00Z")

</div>

The maximum number of characters you can send in a transaction depends on the method used and whether the message is plaintext or encrypted: Method Type Max Length Radix Wallet (v1.2) Plaintext 125 Radix Walle…

---

## [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 do I encode a transaction message so that it displays correctly in the Radix Desktop Wallet?](https://radixtalk.com/t/how-do-i-encode-a-transaction-message-so-that-it-displays-correctly-in-the-radix-desktop-wallet/170)

<div class="topic-metadata">

**Author:** [@Stuart](https://radixtalk.com/u/Stuart)\
**Replies:** 6\
**Last updated:** [1 January 2022 19:24 UTC](https://radixtalk.com/t/how-do-i-encode-a-transaction-message-so-that-it-displays-correctly-in-the-radix-desktop-wallet/170 "2022-01-01T19:24:04Z")

</div>

The Radix Desktop Wallet expects messages to be hex encoded strings prefixed with 0000 For example, to send a message that will display as Hello in the wallet, you could use the following python snippet: "0000" + "Hell…

---

## [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-…
