This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| getSignatureOracleRequest, | |
| getDappPublicKey, | |
| } from "./utils/oracle_requester"; | |
| import { PriceMessage } from "./utils/types"; | |
| app.get( | |
| "/getPrice", | |
| async (req: Request, res: Response<PriceMessage>, next) => { | |
| try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: |