Skip to content

Instantly share code, notes, and snippets.

View antb123's full-sized avatar

antb123

View GitHub Profile
@antb123
antb123 / stellar-claimablebalance.py
Created September 8, 2021 01:36
get a stellar claimable balance using python sdk for AQUA token
from stellar_sdk import Server, Keypair, TransactionBuilder, Network, ClaimClaimableBalance
import json, requests, getpass, sys
# to run save to file
# sudo pip3 install stellar-sdk=2.13.0
# and then python3 ./thisfile.py
hz = Server(horizon_url="https://horizon.stellar.org/")
passw = getpass.getpass('stellar private key: ')
kp = Keypair.from_secret(passw)
{
"nonce": "<nonce>",
"transaction": {
"sender_info": {
"stellar_id": "<stellar_id with tempo 12345*tempo.eu.com> Optional",
"firstname": "<firstname> Required",
"lastname": "<lastname> Required",
"address1": "<address1> Required",
"address2": "<address2> Optional",
@antb123
antb123 / stellarauth.py
Last active October 13, 2018 20:54
stellarauth
import uuid, json, requests, hashlib, toml, base64, sys
from stellar_base.builder import Builder, HORIZON_TEST, HORIZON_LIVE
from stellar_base.keypair import Keypair
from stellar_base.address import Address
from stellar_addr_test import *
#test addresses
signing = {'addr': u'GCZF7CGJV75G2XNJOONJS5UZMASHPWUVJQMWTVDU5H3BS4OPXLSZ3AUH', 'seed': u'SA2HOOCG4L6NWZXS3HS5WR4RNB6K4Y3HMZUG7FP3CR3I5QCXRWE6XPMT'}
test_user= {'addr': u'GCWGEGQ5HT5NEFV7GMIGWZMZJVT6HZO5CQRBFXW3RXSFBKWH4XQZOQY7', 'seed': u'SA76APLWH7SI7IDEWUTUOBO3DUHFAELAPJZ2PX7P6XXUCLU5DIE3C62Y'}