Documentation
¶
Index ¶
- Constants
- func NewVariablesFromOrder(scheme proto.Scheme, tx proto.Order) (map[string]Expr, error)
- func NewVariablesFromScriptAction(scheme proto.Scheme, action proto.ScriptAction, invokerPK crypto.PublicKey, ...) (map[string]Expr, error)
- func NewVariablesFromScriptTransfer(tx *proto.FullScriptTransfer) (map[string]Expr, error)
- func NewVariablesFromTransaction(scheme byte, t proto.Transaction) (map[string]Expr, error)
- func VariablesV1() map[string]Expr
- func VariablesV2() map[string]Expr
- func VariablesV3() map[string]Expr
- func VariablesV4() map[string]Expr
- type Actionable
- type AddressExpr
- type AliasExpr
- type ArrayExpr
- type AssetInfoExpr
- type AssetPairExpr
- type AttachedPaymentExpr
- type BalanceDetailsExpr
- type Block
- type BlockInfoExpr
- type BlockV2
- type BooleanExpr
- type BurnExpr
- type BuyExpr
- type BytesExpr
- type Callable
- type CeilingExpr
- type DApp
- type DappCallableFunc
- type DappMeta
- type DataEntryDeleteExpr
- func (a *DataEntryDeleteExpr) Eq(other Expr) bool
- func (a *DataEntryDeleteExpr) Evaluate(Scope) (Expr, error)
- func (a *DataEntryDeleteExpr) Get(name string) (Expr, error)
- func (a *DataEntryDeleteExpr) InstanceOf() string
- func (a *DataEntryDeleteExpr) ToAction(*crypto.Digest) (proto.ScriptAction, error)
- func (a *DataEntryDeleteExpr) Write(w io.Writer)
- type DataEntryExpr
- func (a *DataEntryExpr) Eq(other Expr) bool
- func (a *DataEntryExpr) Evaluate(Scope) (Expr, error)
- func (a *DataEntryExpr) Get(name string) (Expr, error)
- func (a *DataEntryExpr) InstanceOf() string
- func (a *DataEntryExpr) ToAction(*crypto.Digest) (proto.ScriptAction, error)
- func (a *DataEntryExpr) Write(w io.Writer)
- type Declaration
- type DownExpr
- type Expr
- func AppendToList(s Scope, e Exprs) (Expr, error)
- func AssetPair(s Scope, e Exprs) (Expr, error)
- func Burn(s Scope, e Exprs) (Expr, error)
- func CalculateAssetID(s Scope, e Exprs) (Expr, error)
- func Concat(s Scope, e Exprs) (Expr, error)
- func Contains(s Scope, e Exprs) (Expr, error)
- func DataEntry(s Scope, e Exprs) (Expr, error)
- func DataTransaction(s Scope, e Exprs) (Expr, error)
- func DeleteEntry(s Scope, e Exprs) (Expr, error)
- func ECRecover(s Scope, e Exprs) (Expr, error)
- func IndexOf(s Scope, e Exprs) (Expr, error)
- func Issue(s Scope, e Exprs) (Expr, error)
- func LastIndexOf(s Scope, e Exprs) (Expr, error)
- func LimitedCreateList(s Scope, e Exprs) (Expr, error)
- func Max(s Scope, e Exprs) (Expr, error)
- func Median(s Scope, e Exprs) (Expr, error)
- func Min(s Scope, e Exprs) (Expr, error)
- func NativeAddressFromRecipient(s Scope, e Exprs) (Expr, error)
- func NativeAddressToString(s Scope, e Exprs) (Expr, error)
- func NativeAssetBalanceV3(s Scope, e Exprs) (Expr, error)
- func NativeAssetBalanceV4(s Scope, e Exprs) (Expr, error)
- func NativeAssetInfoV3(s Scope, e Exprs) (Expr, error)
- func NativeAssetInfoV4(s Scope, e Exprs) (Expr, error)
- func NativeBlockInfoByHeight(s Scope, e Exprs) (Expr, error)
- func NativeBooleanToBytes(s Scope, e Exprs) (Expr, error)
- func NativeBooleanToString(s Scope, e Exprs) (Expr, error)
- func NativeBytesToLong(s Scope, e Exprs) (Expr, error)
- func NativeBytesToLongWithOffset(s Scope, e Exprs) (Expr, error)
- func NativeBytesToUTF8String(s Scope, e Exprs) (Expr, error)
- func NativeCheckMerkleProof(s Scope, e Exprs) (Expr, error)
- func NativeConcatBytes(s Scope, e Exprs) (Expr, error)
- func NativeConcatStrings(s Scope, e Exprs) (Expr, error)
- func NativeCreateList(s Scope, e Exprs) (Expr, error)
- func NativeDataBinaryFromArray(s Scope, e Exprs) (Expr, error)
- func NativeDataBinaryFromState(s Scope, e Exprs) (Expr, error)
- func NativeDataBooleanFromArray(s Scope, e Exprs) (Expr, error)
- func NativeDataBooleanFromState(s Scope, e Exprs) (Expr, error)
- func NativeDataIntegerFromArray(s Scope, e Exprs) (Expr, error)
- func NativeDataIntegerFromState(s Scope, e Exprs) (Expr, error)
- func NativeDataStringFromArray(s Scope, e Exprs) (Expr, error)
- func NativeDataStringFromState(s Scope, e Exprs) (Expr, error)
- func NativeDivLong(s Scope, e Exprs) (Expr, error)
- func NativeDropBytes(s Scope, e Exprs) (Expr, error)
- func NativeDropStrings(s Scope, e Exprs) (Expr, error)
- func NativeEq(s Scope, e Exprs) (Expr, error)
- func NativeFractionLong(s Scope, e Exprs) (Expr, error)
- func NativeFromBase16(s Scope, e Exprs) (Expr, error)
- func NativeFromBase58(s Scope, e Exprs) (Expr, error)
- func NativeFromBase64(s Scope, e Exprs) (Expr, error)
- func NativeGeLong(s Scope, e Exprs) (Expr, error)
- func NativeGetList(s Scope, e Exprs) (Expr, error)
- func NativeGtLong(s Scope, e Exprs) (Expr, error)
- func NativeIndexOfSubstring(s Scope, e Exprs) (Expr, error)
- func NativeIndexOfSubstringWithOffset(s Scope, e Exprs) (Expr, error)
- func NativeIsInstanceOf(s Scope, e Exprs) (Expr, error)
- func NativeLastIndexOfSubstring(s Scope, e Exprs) (Expr, error)
- func NativeLastIndexOfSubstringWithOffset(s Scope, e Exprs) (Expr, error)
- func NativeLogLong(s Scope, e Exprs) (Expr, error)
- func NativeLongToBytes(s Scope, e Exprs) (Expr, error)
- func NativeLongToString(s Scope, e Exprs) (Expr, error)
- func NativeModLong(s Scope, e Exprs) (Expr, error)
- func NativeMulLong(s Scope, e Exprs) (Expr, error)
- func NativeParseInt(s Scope, e Exprs) (Expr, error)
- func NativePowLong(s Scope, e Exprs) (Expr, error)
- func NativeSizeBytes(s Scope, e Exprs) (Expr, error)
- func NativeSizeList(s Scope, e Exprs) (Expr, error)
- func NativeSizeString(s Scope, e Exprs) (Expr, error)
- func NativeSplitString(s Scope, e Exprs) (Expr, error)
- func NativeStringToBytes(s Scope, e Exprs) (Expr, error)
- func NativeSubLong(s Scope, e Exprs) (Expr, error)
- func NativeSumLong(s Scope, e Exprs) (Expr, error)
- func NativeTakeBytes(s Scope, e Exprs) (Expr, error)
- func NativeTakeStrings(s Scope, e Exprs) (Expr, error)
- func NativeThrow(s Scope, e Exprs) (Expr, error)
- func NativeToBase16(s Scope, e Exprs) (Expr, error)
- func NativeToBase58(s Scope, e Exprs) (Expr, error)
- func NativeToBase64(s Scope, e Exprs) (Expr, error)
- func NativeTransactionByID(s Scope, e Exprs) (Expr, error)
- func NativeTransactionHeightByID(s Scope, e Exprs) (Expr, error)
- func NativeTransferTransactionByID(s Scope, e Exprs) (Expr, error)
- func NewObjectFromAssetInfoV3(info proto.AssetInfo) Expr
- func NewObjectFromAssetInfoV4(info proto.FullAssetInfo) Expr
- func NewObjectFromBlockInfo(info proto.BlockInfo) Expr
- func RebuildMerkleRoot(s Scope, e Exprs) (Expr, error)
- func Reissue(s Scope, e Exprs) (Expr, error)
- func ScriptResult(s Scope, e Exprs) (Expr, error)
- func ScriptTransfer(s Scope, e Exprs) (Expr, error)
- func SimplifiedIssue(s Scope, e Exprs) (Expr, error)
- func Sponsorship(s Scope, e Exprs) (Expr, error)
- func TransferFromProtobuf(s Scope, e Exprs) (Expr, error)
- func UserAddress(s Scope, e Exprs) (Expr, error)
- func UserAddressFromPublicKey(s Scope, e Exprs) (Expr, error)
- func UserAddressFromString(s Scope, e Exprs) (Expr, error)
- func UserAlias(s Scope, e Exprs) (Expr, error)
- func UserDataBinaryFromArrayByIndex(s Scope, e Exprs) (Expr, error)
- func UserDataBooleanFromArrayByIndex(s Scope, e Exprs) (Expr, error)
- func UserDataIntegerFromArrayByIndex(s Scope, e Exprs) (Expr, error)
- func UserDataStringFromArrayByIndex(s Scope, e Exprs) (Expr, error)
- func UserDropRightBytes(s Scope, e Exprs) (Expr, error)
- func UserDropRightString(s Scope, e Exprs) (Expr, error)
- func UserExtract(s Scope, e Exprs) (Expr, error)
- func UserFunctionNeq(s Scope, e Exprs) (Expr, error)
- func UserIsDefined(s Scope, e Exprs) (Expr, error)
- func UserTakeRightBytes(s Scope, e Exprs) (Expr, error)
- func UserTakeRightString(s Scope, e Exprs) (Expr, error)
- func UserThrow(_ Scope, _ Exprs) (Expr, error)
- func UserTransferSet(s Scope, e Exprs) (Expr, error)
- func UserUnaryMinus(s Scope, e Exprs) (Expr, error)
- func UserUnaryNot(s Scope, e Exprs) (Expr, error)
- func UserValue(s Scope, e Exprs) (Expr, error)
- func UserValueOrErrorMessage(s Scope, e Exprs) (Expr, error)
- func UserWavesBalanceV3(s Scope, e Exprs) (Expr, error)
- func UserWavesBalanceV4(s Scope, e Exprs) (Expr, error)
- func UserWriteSet(s Scope, e Exprs) (Expr, error)
- func ValueOrElse(s Scope, e Exprs) (Expr, error)
- type Exprs
- type FloorExpr
- type FuncCallExpr
- type FuncDeclaration
- type Function
- type FunctionCall
- type Functions
- type Getable
- type GetterExpr
- type HalfDownExpr
- type HalfEvenExpr
- type HalfUpExpr
- type IfExpr
- type InvalidAddressExpr
- type InvocationExpr
- type IssueExpr
- type LazyValueExpr
- type LetDeclaration
- type LetExpr
- type LongExpr
- type MD5Expr
- type NoAlgExpr
- type ObjectExpr
- type PredefFunction
- type Recipient
- type RecipientExpr
- type RefExpr
- type ReissueExpr
- func (a *ReissueExpr) Eq(other Expr) bool
- func (a *ReissueExpr) Evaluate(Scope) (Expr, error)
- func (a *ReissueExpr) Get(name string) (Expr, error)
- func (a *ReissueExpr) InstanceOf() string
- func (a *ReissueExpr) ToAction(*crypto.Digest) (proto.ScriptAction, error)
- func (a *ReissueExpr) Write(w io.Writer)
- type Result
- type SHA1Expr
- type SHA224Expr
- type SHA256Expr
- type SHA3224Expr
- type SHA3256Expr
- type SHA3384Expr
- type SHA3512Expr
- type SHA384Expr
- type SHA512Expr
- type Scope
- type ScopeImpl
- func (a *ScopeImpl) AddValue(name string, value Expr)
- func (a *ScopeImpl) Clone() Scope
- func (a *ScopeImpl) Initial() Scope
- func (a *ScopeImpl) Scheme() byte
- func (a *ScopeImpl) SetHeight(height uint64)
- func (a *ScopeImpl) SetLastBlockInfo(lastBlock Expr)
- func (a *ScopeImpl) SetThis(this Expr)
- func (a *ScopeImpl) SetTransaction(transaction map[string]Expr)
- func (a *ScopeImpl) State() types.SmartState
- func (a *ScopeImpl) Value(name string) (Expr, bool)
- type Script
- func (a *Script) CallFunction(scheme proto.Scheme, state types.SmartState, tx *proto.InvokeScriptWithProofs, ...) (bool, []proto.ScriptAction, error)
- func (a *Script) Eval(s Scope) (Result, error)
- func (a *Script) HasVerifier() bool
- func (a *Script) IsDapp() bool
- func (a *Script) Verify(scheme byte, state types.SmartState, object map[string]Expr, ...) (Result, error)
- type ScriptResultExpr
- type ScriptTransferExpr
- type SellExpr
- type SponsorshipExpr
- func (a *SponsorshipExpr) Eq(other Expr) bool
- func (a *SponsorshipExpr) Evaluate(Scope) (Expr, error)
- func (a *SponsorshipExpr) Get(name string) (Expr, error)
- func (a *SponsorshipExpr) InstanceOf() string
- func (a *SponsorshipExpr) ToAction(*crypto.Digest) (proto.ScriptAction, error)
- func (a *SponsorshipExpr) Write(w io.Writer)
- type StringExpr
- type Throw
- type TransferSetExpr
- type Unit
- type UpExpr
- type WriteSetExpr
Constants ¶
const ( MaxBytesResult = 65536 MaxStringResult = 32767 MaxBytesToVerify = 32 * 1024 DefaultThrowMessage = "Explicit script termination" MaxListSize = 1000 )
const InstanceFieldName = "$instance"
Variables ¶
This section is empty.
Functions ¶
func NewVariablesFromOrder ¶ added in v0.3.0
func NewVariablesFromScriptAction ¶ added in v0.5.0
func NewVariablesFromScriptTransfer ¶ added in v0.3.0
func NewVariablesFromScriptTransfer(tx *proto.FullScriptTransfer) (map[string]Expr, error)
func VariablesV1 ¶ added in v0.3.0
func VariablesV2 ¶ added in v0.3.0
func VariablesV3 ¶ added in v0.3.0
func VariablesV4 ¶ added in v0.5.0
Types ¶
type Actionable ¶ added in v0.5.0
type Actionable interface {
ToAction(parent *crypto.Digest) (proto.ScriptAction, error)
}
type AddressExpr ¶
func NewAddressFromProtoAddress ¶
func NewAddressFromProtoAddress(a proto.Address) *AddressExpr
func NewAddressFromString ¶
func NewAddressFromString(s string) (*AddressExpr, error)
func (*AddressExpr) Eq ¶
func (a *AddressExpr) Eq(other Expr) bool
func (*AddressExpr) InstanceOf ¶
func (a *AddressExpr) InstanceOf() string
func (*AddressExpr) Recipient ¶ added in v0.3.0
func (a *AddressExpr) Recipient() proto.Recipient
func (*AddressExpr) Write ¶
func (a *AddressExpr) Write(w io.Writer)
type AliasExpr ¶
func NewAliasFromProtoAlias ¶
func (*AliasExpr) InstanceOf ¶
type ArrayExpr ¶ added in v0.5.0
type ArrayExpr struct {
Items []Expr
}
func (*ArrayExpr) InstanceOf ¶ added in v0.5.0
type AssetInfoExpr ¶ added in v0.3.0
type AssetInfoExpr struct {
// contains filtered or unexported fields
}
func NewAssetInfo ¶ added in v0.3.0
func NewAssetInfo(obj object) *AssetInfoExpr
func (*AssetInfoExpr) Eq ¶ added in v0.3.0
func (a *AssetInfoExpr) Eq(other Expr) bool
func (*AssetInfoExpr) Evaluate ¶ added in v0.3.0
func (a *AssetInfoExpr) Evaluate(Scope) (Expr, error)
func (*AssetInfoExpr) InstanceOf ¶ added in v0.3.0
func (a *AssetInfoExpr) InstanceOf() string
func (*AssetInfoExpr) Write ¶ added in v0.3.0
func (a *AssetInfoExpr) Write(w io.Writer)
type AssetPairExpr ¶ added in v0.3.0
type AssetPairExpr struct {
// contains filtered or unexported fields
}
func NewAssetPair ¶ added in v0.3.0
func NewAssetPair(amountAsset Expr, priceAsset Expr) *AssetPairExpr
func (*AssetPairExpr) Eq ¶ added in v0.3.0
func (a *AssetPairExpr) Eq(other Expr) bool
func (*AssetPairExpr) Evaluate ¶ added in v0.3.0
func (a *AssetPairExpr) Evaluate(Scope) (Expr, error)
func (*AssetPairExpr) InstanceOf ¶ added in v0.3.0
func (a *AssetPairExpr) InstanceOf() string
func (*AssetPairExpr) Write ¶ added in v0.3.0
func (a *AssetPairExpr) Write(w io.Writer)
type AttachedPaymentExpr ¶ added in v0.3.0
type AttachedPaymentExpr struct {
// contains filtered or unexported fields
}
assetId ByteVector|Unit amount Int
func NewAttachedPaymentExpr ¶ added in v0.3.0
func NewAttachedPaymentExpr(assetId Expr, amount Expr) *AttachedPaymentExpr
func (*AttachedPaymentExpr) Eq ¶ added in v0.3.0
func (a *AttachedPaymentExpr) Eq(other Expr) bool
func (*AttachedPaymentExpr) Evaluate ¶ added in v0.3.0
func (a *AttachedPaymentExpr) Evaluate(Scope) (Expr, error)
func (*AttachedPaymentExpr) Get ¶ added in v0.3.0
func (a *AttachedPaymentExpr) Get(key string) (Expr, error)
func (*AttachedPaymentExpr) InstanceOf ¶ added in v0.3.0
func (a *AttachedPaymentExpr) InstanceOf() string
func (*AttachedPaymentExpr) Write ¶ added in v0.3.0
func (a *AttachedPaymentExpr) Write(w io.Writer)
type BalanceDetailsExpr ¶ added in v0.7.0
type BalanceDetailsExpr struct {
// contains filtered or unexported fields
}
func NewBalanceDetailsExpr ¶ added in v0.7.0
func NewBalanceDetailsExpr(balance *proto.FullWavesBalance) *BalanceDetailsExpr
func (*BalanceDetailsExpr) Eq ¶ added in v0.7.0
func (a *BalanceDetailsExpr) Eq(other Expr) bool
func (*BalanceDetailsExpr) Evaluate ¶ added in v0.7.0
func (a *BalanceDetailsExpr) Evaluate(Scope) (Expr, error)
func (*BalanceDetailsExpr) Get ¶ added in v0.7.0
func (a *BalanceDetailsExpr) Get(key string) (Expr, error)
func (*BalanceDetailsExpr) InstanceOf ¶ added in v0.7.0
func (a *BalanceDetailsExpr) InstanceOf() string
func (*BalanceDetailsExpr) Write ¶ added in v0.7.0
func (a *BalanceDetailsExpr) Write(w io.Writer)
type Block ¶
func (*Block) InstanceOf ¶
type BlockInfoExpr ¶ added in v0.3.0
type BlockInfoExpr struct {
// contains filtered or unexported fields
}
func NewBlockInfo ¶ added in v0.3.0
func NewBlockInfo(scheme proto.Scheme, header *proto.BlockHeader, height proto.Height) (*BlockInfoExpr, error)
func (*BlockInfoExpr) Eq ¶ added in v0.3.0
func (a *BlockInfoExpr) Eq(other Expr) bool
func (*BlockInfoExpr) Evaluate ¶ added in v0.3.0
func (a *BlockInfoExpr) Evaluate(Scope) (Expr, error)
func (*BlockInfoExpr) InstanceOf ¶ added in v0.3.0
func (a *BlockInfoExpr) InstanceOf() string
func (*BlockInfoExpr) Write ¶ added in v0.3.0
func (a *BlockInfoExpr) Write(w io.Writer)
type BlockV2 ¶ added in v0.3.0
func (*BlockV2) InstanceOf ¶ added in v0.3.0
type BooleanExpr ¶
type BooleanExpr struct {
Value bool
}
func NewBoolean ¶
func NewBoolean(value bool) *BooleanExpr
func (*BooleanExpr) Eq ¶
func (a *BooleanExpr) Eq(other Expr) bool
func (*BooleanExpr) InstanceOf ¶
func (a *BooleanExpr) InstanceOf() string
func (*BooleanExpr) Write ¶
func (a *BooleanExpr) Write(w io.Writer)
type BurnExpr ¶ added in v0.5.0
func NewBurnExpr ¶ added in v0.5.0
func (*BurnExpr) InstanceOf ¶ added in v0.5.0
type Callable ¶
func SimpleTypeConstructorFactory ¶ added in v0.3.0
type CeilingExpr ¶ added in v0.3.0
type CeilingExpr struct{}
func (*CeilingExpr) Eq ¶ added in v0.3.0
func (a *CeilingExpr) Eq(other Expr) bool
func (*CeilingExpr) InstanceOf ¶ added in v0.3.0
func (a *CeilingExpr) InstanceOf() string
func (*CeilingExpr) Write ¶ added in v0.3.0
func (a *CeilingExpr) Write(w io.Writer)
type DApp ¶ added in v0.3.0
type DApp struct { DAppVersion byte LibVersion byte Meta DappMeta Declarations Exprs CallableFuncs map[string]*DappCallableFunc Verifier *DappCallableFunc }
type DappCallableFunc ¶ added in v0.3.0
type DappCallableFunc struct { AnnotationInvokeName string FuncDecl *FuncDeclaration }
type DataEntryDeleteExpr ¶ added in v0.5.0
type DataEntryDeleteExpr struct {
// contains filtered or unexported fields
}
func NewDataEntryDeleteExpr ¶ added in v0.5.0
func NewDataEntryDeleteExpr(key string) *DataEntryDeleteExpr
func (*DataEntryDeleteExpr) Eq ¶ added in v0.5.0
func (a *DataEntryDeleteExpr) Eq(other Expr) bool
func (*DataEntryDeleteExpr) Evaluate ¶ added in v0.5.0
func (a *DataEntryDeleteExpr) Evaluate(Scope) (Expr, error)
func (*DataEntryDeleteExpr) Get ¶ added in v0.5.0
func (a *DataEntryDeleteExpr) Get(name string) (Expr, error)
func (*DataEntryDeleteExpr) InstanceOf ¶ added in v0.5.0
func (a *DataEntryDeleteExpr) InstanceOf() string
func (*DataEntryDeleteExpr) ToAction ¶ added in v0.5.0
func (a *DataEntryDeleteExpr) ToAction(*crypto.Digest) (proto.ScriptAction, error)
func (*DataEntryDeleteExpr) Write ¶ added in v0.5.0
func (a *DataEntryDeleteExpr) Write(w io.Writer)
type DataEntryExpr ¶ added in v0.3.0
type DataEntryExpr struct {
// contains filtered or unexported fields
}
func DataEntries ¶ added in v0.3.0
func DataEntries(params ...*DataEntryExpr) []*DataEntryExpr
func NewDataEntry ¶ added in v0.3.0
func NewDataEntry(key string, value Expr) *DataEntryExpr
func (*DataEntryExpr) Eq ¶ added in v0.3.0
func (a *DataEntryExpr) Eq(other Expr) bool
func (*DataEntryExpr) Evaluate ¶ added in v0.3.0
func (a *DataEntryExpr) Evaluate(Scope) (Expr, error)
func (*DataEntryExpr) InstanceOf ¶ added in v0.3.0
func (a *DataEntryExpr) InstanceOf() string
func (*DataEntryExpr) ToAction ¶ added in v0.5.0
func (a *DataEntryExpr) ToAction(*crypto.Digest) (proto.ScriptAction, error)
func (*DataEntryExpr) Write ¶ added in v0.3.0
func (a *DataEntryExpr) Write(w io.Writer)
type Declaration ¶ added in v0.3.0
type Declaration interface {
Eval(s Scope)
}
type DownExpr ¶ added in v0.3.0
type DownExpr struct{}
func (*DownExpr) InstanceOf ¶ added in v0.3.0
type Expr ¶
type Expr interface { Write(io.Writer) Evaluate(Scope) (Expr, error) Eq(Expr) bool InstanceOf() string }
func NativeAddressToString ¶ added in v0.3.0
func NativeAssetBalanceV3 ¶ added in v0.7.0
Asset balance for account
func NativeAssetBalanceV4 ¶ added in v0.7.0
func NativeAssetInfoV3 ¶ added in v0.7.0
1004: accepts id: []byte
func NativeBlockInfoByHeight ¶ added in v0.3.0
1005:
func NativeBooleanToBytes ¶
Boolean to bytes representation (1 - true, 0 - false)
func NativeBooleanToString ¶
String representation
func NativeBytesToLongWithOffset ¶ added in v0.3.0
func NativeBytesToUTF8String ¶ added in v0.3.0
func NativeCheckMerkleProof ¶ added in v0.3.0
func NativeConcatBytes ¶
Limited bytes concatenation
func NativeConcatStrings ¶
Limited strings concatenation
func NativeDataBinaryFromArray ¶
Get bytes from data of DataTransaction
func NativeDataBinaryFromState ¶ added in v0.3.0
Get bytes from account state
func NativeDataBooleanFromArray ¶
Get boolean from data of DataTransaction
func NativeDataBooleanFromState ¶
Get bool from account state
func NativeDataIntegerFromArray ¶ added in v0.3.0
Get integer from data of DataTransaction
func NativeDataIntegerFromState ¶ added in v0.3.0
Get integer from account state
func NativeDataStringFromArray ¶
Get string from data of DataTransaction
func NativeDataStringFromState ¶
Get string from account state
func NativeDropStrings ¶
Remove string prefix
func NativeFractionLong ¶
Multiply and division with big integer intermediate representation
func NativeFromBase16 ¶ added in v0.3.0
Base16 (Hex) decode
func NativeFromBase64 ¶ added in v0.3.0
Base64 decode
func NativeGetList ¶
Get list element by position
func NativeIndexOfSubstring ¶ added in v0.3.0
func NativeIndexOfSubstringWithOffset ¶ added in v0.3.0
func NativeIsInstanceOf ¶
Internal function to check value type
func NativeLastIndexOfSubstring ¶ added in v0.3.0
func NativeLastIndexOfSubstringWithOffset ¶ added in v0.3.0
func NativeLogLong ¶ added in v0.3.0
NativeLogLong calculates logarithm.
func NativeLongToBytes ¶
Long to big endian bytes
func NativeLongToString ¶
String representation
func NativePowLong ¶ added in v0.3.0
NativePowLong calculates power.
func NativeSizeString ¶
String size in characters
func NativeStringToBytes ¶
String to bytes representation
func NativeToBase16 ¶ added in v0.3.0
Base16 (Hex) encode
func NativeToBase64 ¶ added in v0.3.0
Base64 encode
func NativeTransactionByID ¶
Lookup transaction
func NativeTransactionHeightByID ¶
Height when transaction was stored to blockchain
func NativeTransferTransactionByID ¶ added in v0.3.0
1006: returns Union[TransferTransaction, Unit]
func NewObjectFromAssetInfoV3 ¶ added in v0.7.0
func NewObjectFromAssetInfoV4 ¶ added in v0.7.0
func NewObjectFromAssetInfoV4(info proto.FullAssetInfo) Expr
func NewObjectFromBlockInfo ¶ added in v0.3.0
func SimplifiedIssue ¶ added in v0.7.0
SimplifiedIssue is a constructor of IssueExpr with some parameters set to default values
func TransferFromProtobuf ¶ added in v0.5.0
func UserAddressFromString ¶
Decode account address
func UserValueOrErrorMessage ¶ added in v0.3.0
type FloorExpr ¶ added in v0.3.0
type FloorExpr struct{}
func (*FloorExpr) InstanceOf ¶ added in v0.3.0
type FuncCallExpr ¶ added in v0.3.0
type FuncCallExpr struct {
Func Expr
}
func NewFuncCall ¶
func NewFuncCall(f Expr) *FuncCallExpr
func (*FuncCallExpr) Eq ¶ added in v0.3.0
func (a *FuncCallExpr) Eq(other Expr) bool
func (*FuncCallExpr) Evaluate ¶ added in v0.3.0
func (a *FuncCallExpr) Evaluate(s Scope) (Expr, error)
func (*FuncCallExpr) InstanceOf ¶ added in v0.3.0
func (a *FuncCallExpr) InstanceOf() string
func (*FuncCallExpr) Write ¶ added in v0.3.0
func (a *FuncCallExpr) Write(w io.Writer)
type FuncDeclaration ¶ added in v0.3.0
func (*FuncDeclaration) Eq ¶ added in v0.3.0
func (a *FuncDeclaration) Eq(other Expr) bool
func (*FuncDeclaration) Evaluate ¶ added in v0.3.0
func (a *FuncDeclaration) Evaluate(s Scope) (Expr, error)
func (*FuncDeclaration) InstanceOf ¶ added in v0.3.0
func (a *FuncDeclaration) InstanceOf() string
func (*FuncDeclaration) Write ¶ added in v0.3.0
func (a *FuncDeclaration) Write(w io.Writer)
type Function ¶ added in v0.3.0
func FunctionFromPredefined ¶ added in v0.3.0
func NewFunctionWithScope ¶ added in v0.3.0
func (*Function) InstanceOf ¶ added in v0.3.0
type FunctionCall ¶ added in v0.3.0
func NewFunctionCall ¶ added in v0.3.0
func NewFunctionCall(name string, argv Exprs) *FunctionCall
func (*FunctionCall) Eq ¶ added in v0.3.0
func (a *FunctionCall) Eq(other Expr) bool
func (*FunctionCall) Evaluate ¶ added in v0.3.0
func (a *FunctionCall) Evaluate(s Scope) (Expr, error)
func (*FunctionCall) InstanceOf ¶ added in v0.3.0
func (a *FunctionCall) InstanceOf() string
func (*FunctionCall) Write ¶ added in v0.3.0
func (a *FunctionCall) Write(w io.Writer)
type GetterExpr ¶
func NewGetterExpr ¶
func NewGetterExpr(object Expr, key string) *GetterExpr
func (*GetterExpr) Eq ¶
func (a *GetterExpr) Eq(other Expr) bool
func (*GetterExpr) InstanceOf ¶
func (a *GetterExpr) InstanceOf() string
func (*GetterExpr) Write ¶
func (a *GetterExpr) Write(w io.Writer)
type HalfDownExpr ¶ added in v0.3.0
type HalfDownExpr struct{}
func (*HalfDownExpr) Eq ¶ added in v0.3.0
func (a *HalfDownExpr) Eq(other Expr) bool
func (*HalfDownExpr) Evaluate ¶ added in v0.3.0
func (a *HalfDownExpr) Evaluate(Scope) (Expr, error)
func (*HalfDownExpr) InstanceOf ¶ added in v0.3.0
func (a *HalfDownExpr) InstanceOf() string
func (*HalfDownExpr) Write ¶ added in v0.3.0
func (a *HalfDownExpr) Write(w io.Writer)
type HalfEvenExpr ¶ added in v0.3.0
type HalfEvenExpr struct{}
func (*HalfEvenExpr) Eq ¶ added in v0.3.0
func (a *HalfEvenExpr) Eq(other Expr) bool
func (*HalfEvenExpr) Evaluate ¶ added in v0.3.0
func (a *HalfEvenExpr) Evaluate(Scope) (Expr, error)
func (*HalfEvenExpr) InstanceOf ¶ added in v0.3.0
func (a *HalfEvenExpr) InstanceOf() string
func (*HalfEvenExpr) Write ¶ added in v0.3.0
func (a *HalfEvenExpr) Write(w io.Writer)
type HalfUpExpr ¶ added in v0.3.0
type HalfUpExpr struct{}
func (*HalfUpExpr) Eq ¶ added in v0.3.0
func (a *HalfUpExpr) Eq(other Expr) bool
func (*HalfUpExpr) InstanceOf ¶ added in v0.3.0
func (a *HalfUpExpr) InstanceOf() string
func (*HalfUpExpr) Write ¶ added in v0.3.0
func (a *HalfUpExpr) Write(w io.Writer)
type IfExpr ¶
func (*IfExpr) InstanceOf ¶
type InvalidAddressExpr ¶ added in v0.3.0
type InvalidAddressExpr BytesExpr
func (*InvalidAddressExpr) Eq ¶ added in v0.3.0
func (a *InvalidAddressExpr) Eq(other Expr) bool
func (*InvalidAddressExpr) Evaluate ¶ added in v0.3.0
func (a *InvalidAddressExpr) Evaluate(Scope) (Expr, error)
func (*InvalidAddressExpr) Get ¶ added in v0.3.0
func (a *InvalidAddressExpr) Get(name string) (Expr, error)
func (*InvalidAddressExpr) InstanceOf ¶ added in v0.3.0
func (a *InvalidAddressExpr) InstanceOf() string
func (*InvalidAddressExpr) Write ¶ added in v0.3.0
func (a *InvalidAddressExpr) Write(w io.Writer)
type InvocationExpr ¶ added in v0.3.0
type InvocationExpr struct {
// contains filtered or unexported fields
}
func (*InvocationExpr) Eq ¶ added in v0.3.0
func (a *InvocationExpr) Eq(other Expr) bool
func (*InvocationExpr) Evaluate ¶ added in v0.3.0
func (a *InvocationExpr) Evaluate(Scope) (Expr, error)
func (*InvocationExpr) Get ¶ added in v0.3.0
func (a *InvocationExpr) Get(name string) (Expr, error)
func (*InvocationExpr) InstanceOf ¶ added in v0.3.0
func (a *InvocationExpr) InstanceOf() string
func (*InvocationExpr) Write ¶ added in v0.3.0
func (a *InvocationExpr) Write(w io.Writer)
type IssueExpr ¶ added in v0.5.0
type IssueExpr struct { Name string Description string Quantity int64 Decimals int64 Reissuable bool Nonce int64 }
func NewIssueExpr ¶ added in v0.5.0
func (*IssueExpr) InstanceOf ¶ added in v0.5.0
type LazyValueExpr ¶ added in v0.3.0
will be calculated in future, with known Scope
func NewLazyValue ¶ added in v0.3.0
func NewLazyValue(Expr Expr, Scope Scope) *LazyValueExpr
func (*LazyValueExpr) Eq ¶ added in v0.3.0
func (a *LazyValueExpr) Eq(other Expr) bool
func (*LazyValueExpr) Evaluate ¶ added in v0.3.0
func (a *LazyValueExpr) Evaluate(Scope) (Expr, error)
func (*LazyValueExpr) InstanceOf ¶ added in v0.3.0
func (a *LazyValueExpr) InstanceOf() string
func (*LazyValueExpr) Write ¶ added in v0.3.0
func (a *LazyValueExpr) Write(w io.Writer)
type LetDeclaration ¶ added in v0.3.0
type LetDeclaration struct {
// contains filtered or unexported fields
}
func (*LetDeclaration) Eval ¶ added in v0.3.0
func (a *LetDeclaration) Eval(s Scope)
type LetExpr ¶
func (*LetExpr) InstanceOf ¶ added in v0.3.0
type NoAlgExpr ¶ added in v0.3.0
type NoAlgExpr struct{}
func (*NoAlgExpr) InstanceOf ¶ added in v0.3.0
type ObjectExpr ¶
type ObjectExpr struct {
// contains filtered or unexported fields
}
func NewObject ¶
func NewObject(fields map[string]Expr) *ObjectExpr
func (*ObjectExpr) Eq ¶
func (a *ObjectExpr) Eq(other Expr) bool
func (*ObjectExpr) InstanceOf ¶
func (a *ObjectExpr) InstanceOf() string
func (*ObjectExpr) Write ¶
func (a *ObjectExpr) Write(w io.Writer)
type PredefFunction ¶ added in v0.3.0
type PredefFunction struct {
// contains filtered or unexported fields
}
func (*PredefFunction) Eq ¶ added in v0.3.0
func (a *PredefFunction) Eq(other Expr) bool
func (*PredefFunction) Evaluate ¶ added in v0.3.0
func (a *PredefFunction) Evaluate(s Scope) (Expr, error)
func (*PredefFunction) InstanceOf ¶ added in v0.3.0
func (a *PredefFunction) InstanceOf() string
func (*PredefFunction) Write ¶ added in v0.3.0
func (a *PredefFunction) Write(w io.Writer)
type RecipientExpr ¶
func NewRecipientFromProtoRecipient ¶
func NewRecipientFromProtoRecipient(a proto.Recipient) *RecipientExpr
func (*RecipientExpr) Eq ¶
func (a *RecipientExpr) Eq(other Expr) bool
func (*RecipientExpr) InstanceOf ¶
func (a *RecipientExpr) InstanceOf() string
func (*RecipientExpr) Recipient ¶ added in v0.3.0
func (a *RecipientExpr) Recipient() proto.Recipient
func (*RecipientExpr) Write ¶
func (a *RecipientExpr) Write(w io.Writer)
type ReissueExpr ¶ added in v0.5.0
func NewReissueExpr ¶ added in v0.5.0
func NewReissueExpr(assetID []byte, quantity int64, reissuable bool) (*ReissueExpr, error)
func (*ReissueExpr) Eq ¶ added in v0.5.0
func (a *ReissueExpr) Eq(other Expr) bool
func (*ReissueExpr) InstanceOf ¶ added in v0.5.0
func (a *ReissueExpr) InstanceOf() string
func (*ReissueExpr) ToAction ¶ added in v0.5.0
func (a *ReissueExpr) ToAction(*crypto.Digest) (proto.ScriptAction, error)
func (*ReissueExpr) Write ¶ added in v0.5.0
func (a *ReissueExpr) Write(w io.Writer)
type SHA1Expr ¶ added in v0.3.0
type SHA1Expr struct{}
func (*SHA1Expr) InstanceOf ¶ added in v0.3.0
type SHA224Expr ¶ added in v0.3.0
type SHA224Expr struct{}
func (*SHA224Expr) Eq ¶ added in v0.3.0
func (a *SHA224Expr) Eq(other Expr) bool
func (*SHA224Expr) InstanceOf ¶ added in v0.3.0
func (a *SHA224Expr) InstanceOf() string
func (*SHA224Expr) Write ¶ added in v0.3.0
func (a *SHA224Expr) Write(w io.Writer)
type SHA256Expr ¶ added in v0.3.0
type SHA256Expr struct{}
func (*SHA256Expr) Eq ¶ added in v0.3.0
func (a *SHA256Expr) Eq(other Expr) bool
func (*SHA256Expr) InstanceOf ¶ added in v0.3.0
func (a *SHA256Expr) InstanceOf() string
func (*SHA256Expr) Write ¶ added in v0.3.0
func (a *SHA256Expr) Write(w io.Writer)
type SHA3224Expr ¶ added in v0.3.0
type SHA3224Expr struct{}
func (*SHA3224Expr) Eq ¶ added in v0.3.0
func (a *SHA3224Expr) Eq(other Expr) bool
func (*SHA3224Expr) InstanceOf ¶ added in v0.3.0
func (a *SHA3224Expr) InstanceOf() string
func (*SHA3224Expr) Write ¶ added in v0.3.0
func (a *SHA3224Expr) Write(w io.Writer)
type SHA3256Expr ¶ added in v0.3.0
type SHA3256Expr struct{}
func (*SHA3256Expr) Eq ¶ added in v0.3.0
func (a *SHA3256Expr) Eq(other Expr) bool
func (*SHA3256Expr) InstanceOf ¶ added in v0.3.0
func (a *SHA3256Expr) InstanceOf() string
func (*SHA3256Expr) Write ¶ added in v0.3.0
func (a *SHA3256Expr) Write(w io.Writer)
type SHA3384Expr ¶ added in v0.3.0
type SHA3384Expr struct{}
func (*SHA3384Expr) Eq ¶ added in v0.3.0
func (a *SHA3384Expr) Eq(other Expr) bool
func (*SHA3384Expr) InstanceOf ¶ added in v0.3.0
func (a *SHA3384Expr) InstanceOf() string
func (*SHA3384Expr) Write ¶ added in v0.3.0
func (a *SHA3384Expr) Write(w io.Writer)
type SHA3512Expr ¶ added in v0.3.0
type SHA3512Expr struct{}
func (*SHA3512Expr) Eq ¶ added in v0.3.0
func (a *SHA3512Expr) Eq(other Expr) bool
func (*SHA3512Expr) InstanceOf ¶ added in v0.3.0
func (a *SHA3512Expr) InstanceOf() string
func (*SHA3512Expr) Write ¶ added in v0.3.0
func (a *SHA3512Expr) Write(w io.Writer)
type SHA384Expr ¶ added in v0.3.0
type SHA384Expr struct{}
func (*SHA384Expr) Eq ¶ added in v0.3.0
func (a *SHA384Expr) Eq(other Expr) bool
func (*SHA384Expr) InstanceOf ¶ added in v0.3.0
func (a *SHA384Expr) InstanceOf() string
func (*SHA384Expr) Write ¶ added in v0.3.0
func (a *SHA384Expr) Write(w io.Writer)
type SHA512Expr ¶ added in v0.3.0
type SHA512Expr struct{}
func (SHA512Expr) Eq ¶ added in v0.3.0
func (a SHA512Expr) Eq(other Expr) bool
func (*SHA512Expr) InstanceOf ¶ added in v0.3.0
func (a *SHA512Expr) InstanceOf() string
func (*SHA512Expr) Write ¶ added in v0.3.0
func (a *SHA512Expr) Write(w io.Writer)
type ScopeImpl ¶
type ScopeImpl struct {
// contains filtered or unexported fields
}
func (*ScopeImpl) SetLastBlockInfo ¶ added in v0.3.0
func (*ScopeImpl) SetTransaction ¶ added in v0.3.0
func (*ScopeImpl) State ¶
func (a *ScopeImpl) State() types.SmartState
type Script ¶ added in v0.3.0
type Script struct { Version int HasBlockV2 bool HasArrays bool Verifier Expr DApp DApp // contains filtered or unexported fields }
func BuildScript ¶ added in v0.3.0
func (*Script) CallFunction ¶ added in v0.3.0
func (a *Script) CallFunction(scheme proto.Scheme, state types.SmartState, tx *proto.InvokeScriptWithProofs, this, lastBlock Expr) (bool, []proto.ScriptAction, error)
func (*Script) HasVerifier ¶ added in v0.3.0
type ScriptResultExpr ¶ added in v0.3.0
type ScriptResultExpr struct { WriteSet *WriteSetExpr TransferSet *TransferSetExpr }
func NewScriptResult ¶ added in v0.3.0
func NewScriptResult(writeSet *WriteSetExpr, transferSet *TransferSetExpr) *ScriptResultExpr
func (*ScriptResultExpr) Eq ¶ added in v0.3.0
func (a *ScriptResultExpr) Eq(other Expr) bool
func (*ScriptResultExpr) Evaluate ¶ added in v0.3.0
func (a *ScriptResultExpr) Evaluate(Scope) (Expr, error)
func (*ScriptResultExpr) InstanceOf ¶ added in v0.3.0
func (a *ScriptResultExpr) InstanceOf() string
func (*ScriptResultExpr) ToActions ¶ added in v0.5.0
func (a *ScriptResultExpr) ToActions() ([]proto.ScriptAction, error)
func (*ScriptResultExpr) Write ¶ added in v0.3.0
func (a *ScriptResultExpr) Write(w io.Writer)
type ScriptTransferExpr ¶ added in v0.3.0
type ScriptTransferExpr struct {
// contains filtered or unexported fields
}
func NewScriptTransfer ¶ added in v0.3.0
func NewScriptTransfer(recipient Recipient, amount *LongExpr, asset Expr) (*ScriptTransferExpr, error)
func (*ScriptTransferExpr) Eq ¶ added in v0.3.0
func (a *ScriptTransferExpr) Eq(other Expr) bool
func (*ScriptTransferExpr) Evaluate ¶ added in v0.3.0
func (a *ScriptTransferExpr) Evaluate(Scope) (Expr, error)
func (*ScriptTransferExpr) InstanceOf ¶ added in v0.3.0
func (a *ScriptTransferExpr) InstanceOf() string
func (*ScriptTransferExpr) ToAction ¶ added in v0.5.0
func (a *ScriptTransferExpr) ToAction(*crypto.Digest) (proto.ScriptAction, error)
func (*ScriptTransferExpr) Write ¶ added in v0.3.0
func (a *ScriptTransferExpr) Write(w io.Writer)
type SellExpr ¶ added in v0.3.0
type SellExpr struct{}
func (*SellExpr) InstanceOf ¶ added in v0.3.0
type SponsorshipExpr ¶ added in v0.7.0
func NewSponsorshipExpr ¶ added in v0.7.0
func NewSponsorshipExpr(assetID []byte, minFee int64) (*SponsorshipExpr, error)
func (*SponsorshipExpr) Eq ¶ added in v0.7.0
func (a *SponsorshipExpr) Eq(other Expr) bool
func (*SponsorshipExpr) Evaluate ¶ added in v0.7.0
func (a *SponsorshipExpr) Evaluate(Scope) (Expr, error)
func (*SponsorshipExpr) Get ¶ added in v0.7.0
func (a *SponsorshipExpr) Get(name string) (Expr, error)
func (*SponsorshipExpr) InstanceOf ¶ added in v0.7.0
func (a *SponsorshipExpr) InstanceOf() string
func (*SponsorshipExpr) ToAction ¶ added in v0.7.0
func (a *SponsorshipExpr) ToAction(*crypto.Digest) (proto.ScriptAction, error)
func (*SponsorshipExpr) Write ¶ added in v0.7.0
func (a *SponsorshipExpr) Write(w io.Writer)
type StringExpr ¶
type StringExpr struct {
Value string
}
func NewString ¶
func NewString(value string) *StringExpr
func (*StringExpr) Eq ¶
func (a *StringExpr) Eq(other Expr) bool
func (*StringExpr) InstanceOf ¶
func (a *StringExpr) InstanceOf() string
func (*StringExpr) Write ¶
func (a *StringExpr) Write(w io.Writer)
type TransferSetExpr ¶ added in v0.3.0
type TransferSetExpr struct {
// contains filtered or unexported fields
}
func NewTransferSet ¶ added in v0.3.0
func NewTransferSet(e ...*ScriptTransferExpr) *TransferSetExpr
func (*TransferSetExpr) Eq ¶ added in v0.3.0
func (a *TransferSetExpr) Eq(other Expr) bool
func (*TransferSetExpr) Evaluate ¶ added in v0.3.0
func (a *TransferSetExpr) Evaluate(Scope) (Expr, error)
func (*TransferSetExpr) InstanceOf ¶ added in v0.3.0
func (a *TransferSetExpr) InstanceOf() string
func (*TransferSetExpr) ToActions ¶ added in v0.5.0
func (a *TransferSetExpr) ToActions() ([]proto.ScriptAction, error)
func (*TransferSetExpr) Write ¶ added in v0.3.0
func (a *TransferSetExpr) Write(w io.Writer)
type WriteSetExpr ¶ added in v0.3.0
type WriteSetExpr struct {
// contains filtered or unexported fields
}
func NewWriteSet ¶ added in v0.3.0
func NewWriteSet(e ...*DataEntryExpr) *WriteSetExpr
func (*WriteSetExpr) Eq ¶ added in v0.3.0
func (a *WriteSetExpr) Eq(other Expr) bool
func (*WriteSetExpr) Evaluate ¶ added in v0.3.0
func (a *WriteSetExpr) Evaluate(Scope) (Expr, error)
func (*WriteSetExpr) InstanceOf ¶ added in v0.3.0
func (a *WriteSetExpr) InstanceOf() string
func (*WriteSetExpr) ToActions ¶ added in v0.5.0
func (a *WriteSetExpr) ToActions() ([]proto.ScriptAction, error)
func (*WriteSetExpr) Write ¶ added in v0.3.0
func (a *WriteSetExpr) Write(w io.Writer)