Python Documentation

The PyLibSIMBA module API reference

pylibsimba

 

pylibsimba.simba.Simbachain(endpoint, wallet)

Main object to interact with the PyLibSIMBA API

pylibsimba.wallet.Wallet(signing_confirmation)

 

pylibsimba.pages.PagedResponse(data, url, simba)

Wrapper for paged responses

Indices and tables

pylibsimba

Functions

get_simba_instance(url, wallet, api_key, …)

Create an instance of a Simbachain API interaction class Automatically takes care of choosing the correct implementation and running initialization.

 

pylibsimba.simba.Simbachain

class pylibsimba.simba.Simbachain(endpoint: strwallet)

Main object to interact with the PyLibSIMBA API

__init__(endpoint: strwallet)

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(endpoint, wallet)

Initialize self.

add_funds()

Add funds to the attached Wallet.

api_auth_headers()

 

call_method(method, parameters)

Call a method on the API

call_method_with_file(method, parameters, files)

Call a method on the API with files

check_transaction_done(txn)

Check if the transaction is complete

check_transaction_status(txn_id)

Gets the status of a transaction by ID

check_transaction_status_from_object(txn)

Gets the status of a transaction

get_balance()

Get the balance for the attached Wallet

get_bundle_for_transaction(…[, stream])

Gets the bundle for a transaction

get_bundle_metadata_for_transaction(…)

Gets the bundle metadata for a transaction

get_file_from_bundle_by_name_for_transaction(…)

Gets a file from the bundle for a transaction

get_file_from_bundle_for_transaction(…[, …])

Gets a file from the bundle for a transaction

get_method_transactions(method, parameters)

Gets a paged list of transactions for the method

get_organisations([base_url])

Gets a paged list of organisations

get_transaction(transaction_id_or_hash)

Gets a specific transaction

get_transaction_status(transaction_id_or_hash)

Gets the status of a specific transaction

get_transactions(parameters)

Gets a paged list of transactions

management_auth_headers()

 

send_transaction_request(url)

Internal function for sending transaction GET requests

set_api_key(api_key)

 

set_management_key(management_key)

 

set_wallet(wallet)

 

validate_any_get_call()

Validate the method call against the app metadata

validate_call(method_name, parameters[, files])

Validate the method call against the app metadata

validate_get_call(method_name, parameters)

Validate the method call against the app metadata

wait_for_success_or_error(txn_id[, …])

 

pylibsimba.wallet.Wallet

class pylibsimba.wallet.Wallet(signing_confirmation)

__init__(signing_confirmation)

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(signing_confirmation)

Initialize self.

default_accept()

 

delete_wallet()

Remove the current wallet.

generate_wallet([mnemonic])

Create a new wallet.

generate_wallet_from_mnemonic([mnemonic])

Create a new wallet using that wallet’s mnemonic.

generate_wallet_from_private_key(private_key)

Create a new wallet using that wallet’s private key.

get_address()

The address associated with this wallet

sign(payload)

Sign the payload with the wallet

unlock_wallet(passkey)

If the wallet is locked, unlock it with the given passkey

wallet_exists()

Does a wallet currently exist?

pylibsimba.pages.PagedResponse

classpylibsimba.pages.PagedResponse(dataurlsimba: Simbachain)

Wrapper for paged responses

__init__(dataurlsimba: Simbachain)

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(data, url, simba)

Initialize self.

count()

 

returns

The number of results available

 

current_page()

 

returns

The current page number

 

data()

Returns the actual data

next()

Grab the next page

next_page()

 

returns

The next page number

 

previous()

Grab the previous page

previous_page()

 

returns

The previous page number