symbolchain.facade package

Submodules

symbolchain.facade.BatchOperations module

class symbolchain.facade.BatchOperations.BatchOperations(facade, output_file_prefix='')

Bases: object

Provides facade-based batch operations.

exception PrepareError(message)

Bases: Exception

Error that is thrown when a batch prepare operation fails.

load_all(transactions_yaml_input)

Loads all transactions from YAML.

prepare_all(transactions, signature_storage, output_directory)

Prepares multiple transactions by attaching signatures to each and producing files that can be sent to the network.

sign_all(transactions, private_key_storage, signature_storage)

Signs multiple transactions and saves the signatures as multiple qrcodes.

symbolchain.facade.NemFacade module

class symbolchain.facade.NemFacade.NemAccount(facade, key_pair)

Bases: NemPublicAccount

NEM account.

message_encoder()

Creates a message encoder that can be used for encrypting and encoding messages between two parties.

sign_transaction(transaction)

Signs a NEM transaction.

class symbolchain.facade.NemFacade.NemFacade(network, account_descriptor_repository=None)

Bases: object

Facade used to interact with NEM blockchain.

class Address(address)

Bases: ByteArray

Represents a nem address.

ENCODED_SIZE = 40
SIZE = 25
BIP32_CURVE_NAME = 'ed25519-keccak'
class KeyPair(private_key)

Bases: object

Represents an ED25519 private and public key.

property private_key

Gets the private key.

property public_key

Gets the public key.

sign(message)

Signs a message with the private key.

class SharedKey

Bases: SharedKey

static derive_shared_key(key_pair, other_public_key)

Derives shared encryption key from private key and public key.

static derive_shared_key_deprecated(key_pair, other_public_key, salt)

Derives shared encryption key from private key, public key and salt.

note: this method uses _old_ method of deriving shared key and has been deprecated.

class Verifier(public_key)

Bases: object

Verifies signatures signed by a single key pair.

verify(message, signature)

Verifies a message signature.

static bip32_node_to_key_pair(bip32_node)

Derives a NEM KeyPair from a BIP32 node.

bip32_path(account_id)

Creates a network compatible BIP32 path for the specified account.

create_account(private_key)

Creates a NEM account from a private key.

create_public_account(public_key)

Creates a NEM public account from a public key.

static extract_signing_payload(transaction)

Gets the payload to sign given a NEM transaction.

static hash_transaction(transaction)

Hashes a NEM transaction.

now()

Creates a network timestamp representing the current time.

sign_transaction(key_pair, transaction)

Signs a NEM transaction.

verify_transaction(transaction, signature)

Verifies a NEM transaction.

class symbolchain.facade.NemFacade.NemPublicAccount(facade, public_key)

Bases: object

NEM public account.

symbolchain.facade.SymbolFacade module

class symbolchain.facade.SymbolFacade.SymbolAccount(facade, key_pair)

Bases: SymbolPublicAccount

Symbol account.

cosign_transaction(transaction, detached=False)

Cosigns a Symbol transaction.

cosign_transaction_hash(transaction_hash, detached=False)

Cosigns a Symbol transaction hash.

message_encoder()

Creates a message encoder that can be used for encrypting and encoding messages between two parties.

sign_transaction(transaction)

Signs a Symbol transaction.

class symbolchain.facade.SymbolFacade.SymbolFacade(network, account_descriptor_repository=None)

Bases: object

Facade used to interact with Symbol blockchain.

class Address(address)

Bases: ByteArray

Represents a Symbol address.

ENCODED_SIZE = 39
SIZE = 24
static from_decoded_address_hex_string(hex_string)

Creates an address from a decoded address hex string (typically from REST).

static from_namespace_id(namespace_id, network_identifier)

Creates an address from a namespace id.

to_namespace_id()

Attempts to convert this address into a namespace id.

BIP32_CURVE_NAME = 'ed25519'
class KeyPair(private_key)

Bases: object

Represents an ED25519 private and public key.

property private_key

Gets the private key.

property public_key

Gets the public key.

sign(message)

Signs a message with the private key.

class SharedKey

Bases: SharedKey

static derive_shared_key(key_pair, other_public_key)

Derives shared encryption key from private key and public key.

class Verifier(public_key)

Bases: object

Verifies signatures signed by a single key pair.

verify(message, signature)

Verifies a message signature.

static bip32_node_to_key_pair(bip32_node)

Derives a Symbol KeyPair from a BIP32 node.

bip32_path(account_id)

Creates a network compatible BIP32 path for the specified account.

cosign_transaction(key_pair, transaction, detached=False)

Cosigns a Symbol transaction.

static cosign_transaction_hash(key_pair, transaction_hash, detached=False)

Cosigns a Symbol transaction hash.

create_account(private_key)

Creates a Symbol account from a private key.

create_public_account(public_key)

Creates a Symbol public account from a public key.

extract_signing_payload(transaction)

Gets the payload to sign given a Symbol transaction.

static hash_embedded_transactions(embedded_transactions)

Hashes embedded transactions of an aggregate.

hash_transaction(transaction)

Hashes a Symbol transaction.

now()

Creates a network timestamp representing the current time.

sign_transaction(key_pair, transaction)

Signs a Symbol transaction.

verify_transaction(transaction, signature)

Verifies a Symbol transaction.

class symbolchain.facade.SymbolFacade.SymbolPublicAccount(facade, public_key)

Bases: object

Symbol public account.

Module contents