Wallet

Undocumented in source.

Members

Functions

available_balance
TagionCurrency available_balance()

Calculates the amount which can be activate

deriveNewPubkey
void deriveNewPubkey()

Derives a new pubkey Requires saving afterwards

differenceInIndices
const(HiRPC.Sender) differenceInIndices(const(HiRPC.Receiver) receiver)

Second stage in updating wallet. Takes a read trt.dartRead recorder. Creates an array of DARTindices from readIndicesByPubkey recorder If some indices were found in the wallet but not in the trt, the indices are removed from the wallet. If some indices were found in the trt but not in the wallet, the indices are put into a new dartRead request.

forceBill
TagionBill forceBill(TagionCurrency amount)

Adds a bill with the given amount to the wallet. Note should only be used for testing

getCurrentPubkey
Pubkey getCurrentPubkey()
locked_balance
TagionCurrency locked_balance()

Calcutales the locked amount in the network

readContractsTRT
const(HiRPC.Sender) readContractsTRT(const(Document)[] contracts, HiRPC hirpc)

Used for reading contract from TRT. Creates a trt.dartRead command for the TRT. Takes hash of given contract and creates dart index with #contract for lookup in TRT These indices are put into the trt.dartRead specifying the command.

readIndicesByPubkey
const(HiRPC.Sender) readIndicesByPubkey(HiRPC hirpc)

Used for first step in updating wallet from TRT. Creates a trt.dartRead command for the TRT. Takes all derivers in the wallet and convert the pubkeys to #pubkey for lookup in TRT These indices are put into the trt.dartRead specifying the command.

total_balance
TagionCurrency total_balance()

Calcutales the total amount

updateFromRead
bool updateFromRead(const(HiRPC.Receiver) receiver)

Updates the wallet based on the received dartRead

Variables

_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