Skip to content

Instantly share code, notes, and snippets.

import {
getSignatureOracleRequest,
getDappPublicKey,
} from "./utils/oracle_requester";
import { PriceMessage } from "./utils/types";
app.get(
"/getPrice",
async (req: Request, res: Response<PriceMessage>, next) => {
try {
@gguuttss
gguuttss / derive_account_address.py
Created January 13, 2026 14:43
deriving account address of private key hex
from radix_engine_toolkit import (
PrivateKey,
derive_virtual_account_address_from_public_key,
)
def derive_account_address(private_key_hex: str, network_id: int = 0x01) -> str:
private_key_bytes = bytes.fromhex(private_key_hex)
private_key = PrivateKey.new_secp256k1(private_key_bytes)
public_key = private_key.public_key()
import requests
import json
def fetch_account_details(account):
url = "https://mainnet.radixdlt.com/state/entity/details"
payload = {
"addresses": [account],
"aggregation_level": "Vault",
"opt_ins": {
"ancestor_identities": True,
import requests
import json
# URL to send the POST request to
url = "https://stokenet.radixdlt.com/transaction/preview"
manifest_string = """
CALL_METHOD
Address("component_tdx_2_1cp4j27fcr4e74g59euhje8wk4u4q0jq358jf8u4j4z7znfqnj6jx0q")
"free_stab"
import requests
from radix_engine_toolkit import *
from typing import Tuple
import secrets
class GatewayApiClient:
BASE_URL = "https://stokenet.radixdlt.com"
@staticmethod
def current_epoch() -> int: