Skip to main content

Sign Stellar Transaction with Ledger on the command line.

Project description

strledger - Sign Stellar Transaction with Ledger on the command line.

example

Installation

pip install -U strledger

Cli Usage

Usage: strledger [OPTIONS] COMMAND [ARGS]...

  Stellar Ledger commands.

  This project is built on the basis of ledgerctl, you can check ledgerctl for
  more features.

Options:
  -v, --verbose  Display exchanged APDU.
  --help         Show this message and exit.

Commands:
  app-info      Get Stellar app info.
  get-address   Get Stellar public address.
  sign-auth     Sign a base64-encoded soroban authorization...
  sign-tx       Sign a base64-encoded transaction envelope.
  sign-tx-hash  Sign a hex encoded transaction hash.
  version       Get strledger version info.

Library Usage

from strledger import get_default_client

client = get_default_client()
# Use the Stellar Python SDK to build a transaction, see https://github.com/StellarCN/py-stellar-base
transaction_envelope = ...
client.sign_transaction(transaction_envelope=transaction_envelope, keypair_index=0)
print(f"signed tx: {transaction_envelope.to_xdr()}")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

strledger-0.6.2.tar.gz (6.7 kB view hashes)

Uploaded Source

Built Distribution

strledger-0.6.2-py3-none-any.whl (8.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page