March Docs

CryptoFee

Types

typeFeeKindFeeKind = ServiceFee | Gas#

Functions

fnaccountsaccounts(f : Fee) : List(LedgerAccount.Account) do match f do FeeValue(_, _, funding, expense) -> [funding, expense] end end#
fnamountamount(f : Fee) : CryptoIdentity.Amount do match f do FeeValue(_, a, _, _) -> a end end#
fncheck_accountscheck_accounts(accounts : List(LedgerAccount.Account)) : Result(Unit, CryptoError.Error)#

Repeated IDs must refer to identical account definitions.

fncheck_amount_referencecheck_amount_reference(a : CryptoIdentity.Amount, r : CryptoReference.Reference) : Result(Unit, CryptoError.Error)#
fncheck_referencecheck_reference(f : Fee, r : CryptoReference.Reference) : Result(Unit, CryptoError.Error)#
fnis_custodyis_custody(a : LedgerAccount.Account) : Bool#
fnkindkind(f : Fee) : FeeKind do match f do FeeValue(k, _, _, _) -> k end end#
fnmakemake(kind : FeeKind, amount : CryptoIdentity.Amount, funding : LedgerAccount.Account, expense : LedgerAccount.Account) : Result(Fee, CryptoError.Error)#
fnmatches_amountmatches_amount(a : LedgerAccount.Account, amount : CryptoIdentity.Amount) : Bool#
fnpostingspostings(f : Fee) : Result(List(LedgerEntry.Posting), CryptoError.Error)#