Documentation
¶
Index ¶
- Constants
- func NewArgsParser(args []Value) *argsParser
- func Reconcile(asset string, senders []Sender, receivers []Receiver) ([]Posting, InterpreterError)
- func RunProgram(ctx context.Context, program parser.Program, vars map[string]string, ...) (*ExecutionResult, InterpreterError)
- type AccountAddress
- type AccountBalance
- type AccountMetadata
- type AccountsMetadata
- type Asset
- type BadArityErr
- type BadPortionParsingErr
- type BalanceQuery
- type Balances
- type ExecutionResult
- type ExperimentalFeature
- type FeatureFlag
- type InterpreterError
- type InvalidAllotmentInSendAll
- type InvalidAllotmentSum
- type InvalidMonetaryLiteral
- type InvalidNumberLiteral
- type InvalidTypeErr
- type InvalidUnboundedInSendAll
- type Metadata
- type MetadataNotFound
- type MetadataQuery
- type MismatchedCurrencyError
- type MissingFundsErr
- type MissingVariableErr
- type Monetary
- type MonetaryInt
- type NegativeAmountErr
- type NegativeBalanceError
- type Portion
- type Posting
- type QueryBalanceError
- type QueryMetadataError
- type Receiver
- type ReconcileError
- type Sender
- type StaticStore
- type Store
- type String
- type TypeError
- type UnboundFunctionErr
- type UnboundVariableErr
- type Value
- type VariablesMap
Constants ¶
View Source
const KEPT_ADDR = "<kept>"
Variables ¶
This section is empty.
Functions ¶
func NewArgsParser ¶
func NewArgsParser(args []Value) *argsParser
func Reconcile ¶
func Reconcile(asset string, senders []Sender, receivers []Receiver) ([]Posting, InterpreterError)
func RunProgram ¶
func RunProgram( ctx context.Context, program parser.Program, vars map[string]string, store Store, featureFlags map[string]struct{}, ) (*ExecutionResult, InterpreterError)
Types ¶
type AccountAddress ¶
type AccountAddress string
func (AccountAddress) String ¶
func (v AccountAddress) String() string
type AccountBalance ¶
type AccountMetadata ¶
type AccountsMetadata ¶
type AccountsMetadata map[string]AccountMetadata
type BadArityErr ¶
func (BadArityErr) Error ¶
func (e BadArityErr) Error() string
type BadPortionParsingErr ¶ added in v0.0.10
func (BadPortionParsingErr) Error ¶ added in v0.0.10
func (e BadPortionParsingErr) Error() string
type BalanceQuery ¶
For each account, list of the needed assets
type Balances ¶
type Balances map[string]AccountBalance
type ExecutionResult ¶
type ExecutionResult struct { Postings []Posting `json:"postings"` Metadata Metadata `json:"txMeta"` AccountsMetadata AccountsMetadata `json:"accountsMeta"` }
type ExperimentalFeature ¶ added in v0.0.10
func (ExperimentalFeature) Error ¶ added in v0.0.10
func (e ExperimentalFeature) Error() string
type FeatureFlag ¶ added in v0.0.10
type FeatureFlag = string
const ExperimentalOverdraftFunctionFeatureFlag FeatureFlag = "experimental-overdraft-function"
type InterpreterError ¶
func ParsePortionSpecific ¶ added in v0.0.10
func ParsePortionSpecific(input string) (*big.Rat, InterpreterError)
type InvalidAllotmentInSendAll ¶
func (InvalidAllotmentInSendAll) Error ¶
func (e InvalidAllotmentInSendAll) Error() string
type InvalidAllotmentSum ¶
func (InvalidAllotmentSum) Error ¶
func (e InvalidAllotmentSum) Error() string
type InvalidMonetaryLiteral ¶
func (InvalidMonetaryLiteral) Error ¶
func (e InvalidMonetaryLiteral) Error() string
type InvalidNumberLiteral ¶
func (InvalidNumberLiteral) Error ¶
func (e InvalidNumberLiteral) Error() string
type InvalidTypeErr ¶
func (InvalidTypeErr) Error ¶
func (e InvalidTypeErr) Error() string
type InvalidUnboundedInSendAll ¶
func (InvalidUnboundedInSendAll) Error ¶
func (e InvalidUnboundedInSendAll) Error() string
type MetadataNotFound ¶
func (MetadataNotFound) Error ¶
func (e MetadataNotFound) Error() string
type MetadataQuery ¶
For each account, list of the needed keys
type MismatchedCurrencyError ¶
func (MismatchedCurrencyError) Error ¶
func (e MismatchedCurrencyError) Error() string
type MissingFundsErr ¶
func (MissingFundsErr) Error ¶
func (e MissingFundsErr) Error() string
type MissingVariableErr ¶
func (MissingVariableErr) Error ¶
func (e MissingVariableErr) Error() string
type Monetary ¶
type Monetary struct { Amount MonetaryInt Asset Asset }
func (Monetary) MarshalJSON ¶
type MonetaryInt ¶
func NewMonetaryInt ¶
func NewMonetaryInt(n int64) MonetaryInt
func (MonetaryInt) Add ¶ added in v0.0.10
func (m MonetaryInt) Add(other MonetaryInt) MonetaryInt
func (MonetaryInt) MarshalJSON ¶
func (v MonetaryInt) MarshalJSON() ([]byte, error)
func (MonetaryInt) String ¶
func (v MonetaryInt) String() string
func (MonetaryInt) Sub ¶ added in v0.0.10
func (m MonetaryInt) Sub(other MonetaryInt) MonetaryInt
type NegativeAmountErr ¶
type NegativeAmountErr struct { parser.Range Amount MonetaryInt }
func (NegativeAmountErr) Error ¶
func (e NegativeAmountErr) Error() string
type NegativeBalanceError ¶
func (NegativeBalanceError) Error ¶
func (e NegativeBalanceError) Error() string
type Portion ¶
func (Portion) MarshalJSON ¶
type QueryBalanceError ¶
func (QueryBalanceError) Error ¶
func (e QueryBalanceError) Error() string
type QueryMetadataError ¶
func (QueryMetadataError) Error ¶
func (e QueryMetadataError) Error() string
type ReconcileError ¶
func (ReconcileError) Error ¶
func (e ReconcileError) Error() string
type StaticStore ¶
type StaticStore struct { Balances Balances Meta AccountsMetadata }
func (StaticStore) GetAccountsMetadata ¶
func (s StaticStore) GetAccountsMetadata(context.Context, MetadataQuery) (AccountsMetadata, error)
func (StaticStore) GetBalances ¶
func (s StaticStore) GetBalances(context.Context, BalanceQuery) (Balances, error)
type Store ¶
type Store interface { GetBalances(context.Context, BalanceQuery) (Balances, error) GetAccountsMetadata(context.Context, MetadataQuery) (AccountsMetadata, error) }
type UnboundFunctionErr ¶
func (UnboundFunctionErr) Error ¶
func (e UnboundFunctionErr) Error() string
type UnboundVariableErr ¶
func (UnboundVariableErr) Error ¶
func (e UnboundVariableErr) Error() string
type VariablesMap ¶
Click to show internal directories.
Click to hide internal directories.