Documentation
¶
Index ¶
- Variables
- type AccountBalance
- type AccountDependency
- type AccountMetadataRow
- type AccountsMetadata
- type BalanceQuery
- type BalanceQueryItem
- type BalanceRow
- type Balances
- type ExecutionResult
- type InterpreterError
- type MetaDependency
- type Metadata
- type MetadataQuery
- type MissingFundsErr
- type ParseResult
- func (p ParseResult) GetNeededVariables() map[string]string
- func (p ParseResult) GetParsingErrors() []ParserError
- func (p ParseResult) GetSource() string
- func (p ParseResult) ResolveDependencies(ctx context.Context, vars VariablesMap, store Store) (ResolvedDependencies, error)
- func (p ParseResult) Run(ctx context.Context, vars VariablesMap, store Store) (ExecutionResult, InterpreterError)
- func (p ParseResult) RunWithFeatureFlags(ctx context.Context, vars VariablesMap, store Store, ...) (ExecutionResult, InterpreterError)
- type ParserError
- type Posting
- type ResolvedDependencies
- type SetAccountMetadataRow
- type SetAccountsMetadata
- type StaticStore
- type Store
- type Value
- type VariablesMap
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrScalingNotSupported = interpreter.ErrScalingNotSupported
View Source
var ParseErrorsToString = parser.ParseErrorsToString
Functions ¶
This section is empty.
Types ¶
type AccountBalance ¶
type AccountBalance = interpreter.AccountBalance
type AccountDependency ¶ added in v0.0.25
type AccountDependency = interpreter.AccountDependency
type AccountMetadataRow ¶ added in v0.0.25
type AccountMetadataRow = interpreter.AccountMetadataRow
Input account metadata (opaque, string-valued) read via meta()
type AccountsMetadata ¶
type AccountsMetadata = interpreter.AccountsMetadata
type BalanceQuery ¶
type BalanceQuery = interpreter.BalanceQuery
For each account, list of the needed assets
type BalanceQueryItem ¶ added in v0.0.25
type BalanceQueryItem = interpreter.BalanceQueryItem
type BalanceRow ¶ added in v0.0.25
type BalanceRow = interpreter.BalanceRow
type Balances ¶
type Balances = interpreter.Balances
type ExecutionResult ¶
type ExecutionResult = interpreter.ExecutionResult
type InterpreterError ¶
type InterpreterError = interpreter.InterpreterError
type MetaDependency ¶ added in v0.0.25
type MetaDependency = interpreter.MetaDependency
type MetadataQuery ¶
type MetadataQuery = interpreter.MetadataQuery
type MissingFundsErr ¶
type MissingFundsErr = interpreter.MissingFundsErr
type ParseResult ¶
type ParseResult struct {
// contains filtered or unexported fields
}
This struct represents a parsed numscript source code
func Parse ¶
func Parse(code string) ParseResult
func (ParseResult) GetNeededVariables ¶
func (p ParseResult) GetNeededVariables() map[string]string
Returns a map from a variable's name to its type.
doesn't include variables whose value is already defined within the script
func (ParseResult) GetParsingErrors ¶
func (p ParseResult) GetParsingErrors() []ParserError
func (ParseResult) GetSource ¶
func (p ParseResult) GetSource() string
func (ParseResult) ResolveDependencies ¶ added in v0.0.25
func (p ParseResult) ResolveDependencies(ctx context.Context, vars VariablesMap, store Store) (ResolvedDependencies, error)
ResolveDependencies statically determines which accounts and metadata the script reads and writes, resolving account/asset/key expressions against the given vars and store.
func (ParseResult) Run ¶
func (p ParseResult) Run(ctx context.Context, vars VariablesMap, store Store) (ExecutionResult, InterpreterError)
func (ParseResult) RunWithFeatureFlags ¶
func (p ParseResult) RunWithFeatureFlags( ctx context.Context, vars VariablesMap, store Store, featureFlags map[string]struct{}, ) (ExecutionResult, InterpreterError)
type ParserError ¶
type ParserError = parser.ParserError
type Posting ¶
type Posting = interpreter.Posting
type ResolvedDependencies ¶ added in v0.0.25
type ResolvedDependencies = interpreter.ResolvedDependencies
type SetAccountMetadataRow ¶ added in v0.0.25
type SetAccountMetadataRow = interpreter.SetAccountMetadataRow
The account metadata set during the execution (tagged, typed values)
type SetAccountsMetadata ¶ added in v0.0.25
type SetAccountsMetadata = interpreter.SetAccountsMetadata
type StaticStore ¶
type StaticStore = interpreter.StaticStore
type Store ¶
type Store = interpreter.Store
type Value ¶
type Value = interpreter.Value
type VariablesMap ¶
type VariablesMap = interpreter.VariablesMap
Click to show internal directories.
Click to hide internal directories.