Versions in this module Expand all Collapse all v0 v0.2.0 Oct 9, 2026 v0.1.2 Oct 9, 2026 v0.1.1 Oct 6, 2026 Changes in this version + const SectionInstructions + const SectionIntsPool + const SectionMaxRegisters + const SectionStringsPool + var CurrentBytecodeVersion = BytecodeVersion + func Verify(p Program) error + type AssetMismatchError struct + Expected string + Got string + func (e AssetMismatchError) Error() string + type BadMetaValueError struct + Account string + Key string + Raw string + func (e BadMetaValueError) Error() string + type BytecodeVersion struct + Major uint16 + Minor uint16 + func PeekProgramVersion(buf []byte) (BytecodeVersion, error) + func PeekVarsVersion(buf []byte) (BytecodeVersion, error) + func (v BytecodeVersion) CanRead(encoded BytecodeVersion) bool + func (v BytecodeVersion) String() string + type CannotCastScopedAccountToString struct + Account string + Scope string + func (e CannotCastScopedAccountToString) Error() string + type DivideByZeroError struct + Numerator big.Int + func (e DivideByZeroError) Error() string + type ExecutionError interface + func Exec[S Store](ctx context.Context, vm *Vm, vars *Vars, store S) (funds.ExecutionResult, ExecutionError) + type Instruction struct + A byte + B byte + C byte + Opcode byte + func NewBC(opcode Opcode, a byte, bc uint16) Instruction + func (i Instruction) GetBC() uint16 + type InternalError struct + Err error + func (e InternalError) Error() string + func (e InternalError) Unwrap() error + type InvalidAccountName struct + Name string + func (e InvalidAccountName) Error() string + type InvalidAllotmentSum struct + ActualSum big.Rat + func (e InvalidAllotmentSum) Error() string + type InvalidColor struct + Color string + func (e InvalidColor) Error() string + type InvalidPostingError struct + Posting funds.Posting + func (e InvalidPostingError) Error() string + type InvalidScope struct + Scope string + func (e InvalidScope) Error() string + type InvalidUncappedSource struct + Account string + func (e InvalidUncappedSource) Error() string + type MetadataNotFoundError struct + Account string + Key string + func (e MetadataNotFoundError) Error() string + type MissingFundsError struct + Asset string + Got *big.Int + Needed *big.Int + func (e MissingFundsError) Error() string + type NegativeAmountError struct + Amount big.Int + func (e NegativeAmountError) Error() string + type NegativeBalanceError struct + Account string + Amount big.Int + func (e NegativeBalanceError) Error() string + type NegativePortionError struct + Portion big.Rat + func (e NegativePortionError) Error() string + type Opcode byte + const Op_AddInt + const Op_AddPortion + const Op_AddString + const Op_AssertLeftover + const Op_AssertNonNegativeAmount + const Op_AssertNonNegativeBalance + const Op_AssertNonNegativePortion + const Op_AssertSameAsset + const Op_AssertUnscoped + const Op_AssertValidAccount + const Op_AssertValidColor + const Op_AssertValidScope + const Op_Balance + const Op_BoolCopy + const Op_CheckEnoughFunds + const Op_ConstFalse + const Op_ConstTrue + const Op_EqInt + const Op_EqPortion + const Op_IntCopy + const Op_IntToPortion + const Op_IntToString + const Op_IsZero + const Op_Jmp + const Op_JmpIfFalse + const Op_JmpIfTrue + const Op_LoadInt + const Op_LoadStr + const Op_LoadVarInt + const Op_LoadVarStr + const Op_LtInt + const Op_LtPortion + const Op_MarkEnd + const Op_MarkPush + const Op_MetaInt + const Op_MetaMonetary + const Op_MetaPortion + const Op_MetaStr + const Op_MkPortion + const Op_MonetaryToString + const Op_MulPortion + const Op_NegInt + const Op_Not + const Op_PortionCopy + const Op_PortionToInt + const Op_PortionToString + const Op_PullAccount + const Op_Save + const Op_SendToAccount + const Op_SetAccountMeta + const Op_SetCurrentAsset + const Op_SetTxMeta + const Op_StrCopy + const Op_StrEq + const Op_SubInt + const Op_SubPortion + type Program struct + Instructions []Instruction + IntsPool []big.Int + MaxRegBool byte + MaxRegInt byte + MaxRegPortion byte + MaxRegString byte + StringsPool []string + Version BytecodeVersion + func DecodeProgram(buf []byte) (Program, error) + func (p Program) Encode() []byte + type Store interface + GetBalance func(ctx context.Context, account string, scope string, asset string, color string) (*big.Int, error) + GetMetadata func(ctx context.Context, account, scope, key string) (string, bool, error) + type StoreError struct + Wrapped error + func (e StoreError) Error() string + func (e StoreError) Unwrap() error + type UnsupportedBytecodeVersionError struct + Encoded BytecodeVersion + Supported BytecodeVersion + func (e UnsupportedBytecodeVersionError) Error() string + type Vars struct + IntsPool []big.Int + StringsPool []string + Version BytecodeVersion + func DecodeVars(buf []byte) (Vars, error) + func (v Vars) Encode() []byte + type VerifiedVarsInfo struct + func VerifyWithVars(p Program, vars *Vars) (VerifiedVarsInfo, error) + func (info VerifiedVarsInfo) CheckVars(vars *Vars) bool + type Vm struct + Program Program + func NewVm(program Program) *Vm