SecureWallet

Function and data to recover, sign transaction and hold the account information

@safe
struct SecureWallet (
Net : SecureNet
) {}

Constructors

this
this(DevicePIN pin, RecoverGenerator wallet, AccountDetails account)
this
this(Document wallet_doc, Document pin_doc)
Undocumented in source.
this
this(const(string[]) questions, const(char[][]) answers, uint confidence, const(char[]) pincode)

Creates a wallet from a list for questions and answers

this
this(const(ubyte)[][] answers, uint confidence, const(char[]) pincode)
Undocumented in source.
this
this(const(char[]) passphrase, const(char[]) pincode, const(char[]) salt)
Undocumented in source.

Members

Functions

addBill
TagionBill addBill(Document doc)
Undocumented in source. Be warned that the author may not have intended to support it.
addBill
bool addBill(TagionBill bill)
Undocumented in source. Be warned that the author may not have intended to support it.
available_balance
TagionCurrency available_balance()

Calculates the amount which can be activate

billIndexes
const(DARTIndex[]) billIndexes(const(TagionBill)[] bills)
Undocumented in source. Be warned that the author may not have intended to support it.
changePincode
bool changePincode(const(char[]) pincode, const(char[]) new_pincode)

Check the pincode

checkLogin
void checkLogin()

Throws a WalletExceptions if the wallet is not logged in

checkPincode
bool checkPincode(const(char[]) pincode)

Checks if the pincode is correct

collectNets
const(SecureNet[]) collectNets(const(TagionBill[]) bills)
Undocumented in source. Be warned that the author may not have intended to support it.
confidence
uint confidence()
correct
bool correct(const(string[]) questions, const(char[][]) answers)

Checks that the answers to the question is correct

createNFT
Result!bool createNFT(Document nft_data, SignedContract signed_contract)
Undocumented in source. Be warned that the author may not have intended to support it.
createPayment
Result!bool createPayment(const(TagionBill)[] to_pay, SignedContract signed_contract, TagionCurrency fees, bool print)
Undocumented in source. Be warned that the author may not have intended to support it.
derivePubkey
Pubkey derivePubkey()
Undocumented in source. Be warned that the author may not have intended to support it.
getDeriversState
Buffer getDeriversState()
Undocumented in source. Be warned that the author may not have intended to support it.
getEncrAccount
const(CiphDoc) getEncrAccount()
Undocumented in source. Be warned that the author may not have intended to support it.
getEncrDerivers
const(CiphDoc) getEncrDerivers()
Undocumented in source. Be warned that the author may not have intended to support it.
getFee
Result!bool getFee(const(TagionBill)[] to_pay, TagionCurrency fees, bool print)
Undocumented in source. Be warned that the author may not have intended to support it.
getFee
Result!bool getFee(const(Invoice[]) orders, TagionCurrency fees)
Undocumented in source. Be warned that the author may not have intended to support it.
getFee
Result!bool getFee(TagionCurrency amount, TagionCurrency fees)
Undocumented in source. Be warned that the author may not have intended to support it.
getPublicKey
Buffer getPublicKey()
Undocumented in source. Be warned that the author may not have intended to support it.
getRequestCheckWallet
const(HiRPC.Sender) getRequestCheckWallet(HiRPC hirpc, const(TagionBill)[] to_check)
Undocumented in source. Be warned that the author may not have intended to support it.
getRequestUpdateWallet
const(HiRPC.Sender) getRequestUpdateWallet(HiRPC hirpc)

Creates HiRPC to request an wallet update

invoices_to_bills
TagionBill[] invoices_to_bills(const(Invoice[]) orders)
Undocumented in source. Be warned that the author may not have intended to support it.
isLoggedin
bool isLoggedin()

Checks if the wallet contains a key-pair

lock_bills
void lock_bills(const(TagionBill[]) locked_bills)
Undocumented in source. Be warned that the author may not have intended to support it.
locked_balance
TagionCurrency locked_balance()

Calcutales the locked amount in the network

login
bool login(const(char[]) pincode)

Generates the key-pair from the pin code

logout
void logout()

Removes the key-pair

net
const(SecureNet) net()
Undocumented in source. Be warned that the author may not have intended to support it.
payment
Result!bool payment(const(Invoice[]) orders, SignedContract signed_contract, TagionCurrency fees)

Create a payment to a list of Invoices and produces a signed-contract Collect the bill need and sign them in the contract

pin
const(DevicePIN) pin()

Retreive the device-pin generation

recover
bool recover(const(string[]) questions, const(char[][]) answers, const(char[]) pincode)

Recover the key-pair from the quiz or the device-pincode

recover
bool recover(Buffer[] A, const(char[]) pincode)
Undocumented in source. Be warned that the author may not have intended to support it.
registerInvoice
void registerInvoice(Invoice invoice)

Register an invoice to the wallet

requestBill
TagionBill requestBill(TagionCurrency amount, sdt_t bill_time)
Undocumented in source. Be warned that the author may not have intended to support it.
setEncrAccount
void setEncrAccount(const(CiphDoc) cipher_doc)
Undocumented in source. Be warned that the author may not have intended to support it.
setEncrDerivers
void setEncrDerivers(const(CiphDoc) cipher_doc)
Undocumented in source. Be warned that the author may not have intended to support it.
setResponseCheckRead
bool setResponseCheckRead(const(HiRPC.Receiver) receiver)
Undocumented in source. Be warned that the author may not have intended to support it.
setResponseUpdateWallet
bool setResponseUpdateWallet(const(HiRPC.Receiver) receiver)

Update the the wallet for a request update

set_net
void set_net(SecureNet copy_net)
Undocumented in source. Be warned that the author may not have intended to support it.
set_pincode
void set_pincode(const(ubyte[]) R, const(char[]) pincode)
Undocumented in source.
total_balance
TagionCurrency total_balance()

Calcutales the total amount

unlockBills
void unlockBills()

Clear the locked bills

wallet
const(RecoverGenerator) wallet()

Static functions

calcTotal
TagionCurrency calcTotal(const(TagionBill[]) bills)

Calculates the amount in a list of bills

createInvoice
Invoice createInvoice(string label, TagionCurrency amount, Document info)

Create a new invoice which can be send to a payee

Static variables

dummy_nonce
auto dummy_nonce;
Undocumented in source.
dummy_pubkey
auto dummy_pubkey;
Undocumented in source.

Structs

DeriverState
struct DeriverState
Undocumented in source.

Variables

_net
SecureNet _net;
Undocumented in source.
_pin
DevicePIN _pin;

Information to check the Pin code

_wallet
RecoverGenerator _wallet;

Information to recover the seed-generator

account
AccountDetails account;

Account-details holding the bills and generator

snavs_byte_fee
enum long snavs_byte_fee;
Undocumented in source.

Meta