Tools for handling the encrypted keystore format used to store Stellar keypairs.
Project description
Stellar Keystore
This is a helper library for creating stellar keystore wallets.
Due to the lack of relevant SEPs currently, stellarport/stellar-keystore is the most widely applied implementation, so the implementation of this library is consistent with it.
What is a keystore wallet?
A keystore wallet is a data blob that stores an encrypted secret key. The objective of a keystore wallet is to allow a user who does not want to remember/manage a secret key and would instead rather manage a password, to store and securely encrypt their secret key using their desired password.
What does this library offer?
This library offers methods that will allow your application to create stellar keystore wallets (i.e. keystore wallets containing secret keys controlling stellar public keys) as well as retrieve a stellar keypair given a keystore wallet/password combination.
Installation
pip install stellar-keystore
Usage
from stellar_sdk import Keypair
from stellar_keystore import *
# Create a new keystore wallet
keypair = Keypair.random()
keystore_wallet = create_keystore(keypair, b"password")
# Retrieve the keypair from the keystore wallet
keypair = load_keystore(keystore_wallet, b"password")
API
def create_keystore(keypair: Keypair, password: bytes) -> dict:
"""Create a keystore from a keypair.
:param keypair: The keypair to create a keystore from.
:param password: The password to encrypt the keystore with.
:return: The keystore.
"""
pass
def load_keystore(keystore: dict, password: bytes) -> Keypair:
"""Load a keypair from a keystore.
:param keystore: The keystore to load a keypair from.
:param password: The password to decrypt the keystore with.
:return: The keypair.
"""
pass
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file stellar_keystore-0.1.2.tar.gz
.
File metadata
- Download URL: stellar_keystore-0.1.2.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67b6e692b48751000a304b5efc48c4edc22dc57be528a4d02ad53dd1faf9f098 |
|
MD5 | feacae577f14e7903a168d3f88dd98e3 |
|
BLAKE2b-256 | 0052cbea1ecc91b785a812b052b58295e5b549788d83cd836c61e9085fdebee0 |
File details
Details for the file stellar_keystore-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: stellar_keystore-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94514c7876e7656763a498a3caf064e57d10524967b8d9c3b31ab2b7abd9c2b7 |
|
MD5 | c79693e1965bbf5d1aada44383abc062 |
|
BLAKE2b-256 | 309ba29da946c0edcc14f6d72cc968eb4f6970b3248e6522c852323f67205514 |