Versions in this module Expand all Collapse all v1 v1.1.0 Aug 26, 2021 v1.0.3 Oct 25, 2021 v1.0.2 Aug 26, 2021 v1.0.1 Aug 25, 2021 Changes in this version + var OpCodePrices = map[OpCode]int64 + func CreateMultiSigRedeemScript(m int, ps []crypto.ECPoint) ([]byte, error) + func CreateSignatureRedeemScript(p *crypto.ECPoint) ([]byte, error) + func IsMultiSigContract(script []byte) (bool, int, int, []crypto.ECPoint) + func IsSignatureContract(script []byte) bool + func MakeScript(scriptHash *helper.UInt160, operation string, args []interface{}) ([]byte, error) + type ByteSlice []byte + func (bs ByteSlice) GetVarSize() int + func (bs ByteSlice) IsMultiSigContract() bool + func (bs ByteSlice) IsMultiSigContractWithCounts() (bool, int, int) + func (bs ByteSlice) IsMultiSigContractWithPoints() (bool, int, []crypto.ECPoint) + func (bs ByteSlice) IsSignatureContract() bool + func (bs ByteSlice) IsStandardContract() bool + type CallFlags byte + const All + const AllowCall + const AllowNotify + const None + const ReadOnly + const ReadStates + const States + const WriteStates + type Contract struct + ParameterList []ContractParameterType + Script []byte + func CreateContract(parameterList []ContractParameterType, redeemScript []byte) *Contract + func CreateContractWithScriptHash(scriptHash *helper.UInt160, parameterList []ContractParameterType) *Contract + func CreateMultiSigContract(m int, publicKeys []crypto.ECPoint) (*Contract, error) + func CreateSignatureContract(publicKey *crypto.ECPoint) (*Contract, error) + func (c *Contract) GetScriptHash() *helper.UInt160 + type ContractParameter struct + Type ContractParameterType + Value interface{} + type ContractParameterType byte + const Any + const Array + const Boolean + const ByteArray + const Hash160 + const Hash256 + const Integer + const InteropInterface + const Map + const PublicKey + const Signature + const String + const Void + func NewContractParameterTypeFromString(s string) (ContractParameterType, error) + func (cpt ContractParameterType) String() string + type InteropService string + var System_Contract_Call InteropService = "System.Contract.Call" + var System_Contract_CallNative InteropService = "System.Contract.CallNative" + var System_Contract_CreateMultisigAccount InteropService = "System.Contract.CreateMultisigAccount" + var System_Contract_CreateStandardAccount InteropService = "System.Contract.CreateStandardAccount" + var System_Contract_GetCallFlags InteropService = "System.Contract.GetCallFlags" + var System_Contract_IsStandard InteropService = "System.Contract.IsStandard" + var System_Contract_NativeOnPersist InteropService = "System.Contract.NativeOnPersist" + var System_Contract_NativePostPersist InteropService = "System.Contract.NativePostPersist" + var System_Crypto_CheckMultisig InteropService = "System.Crypto.CheckMultisig" + var System_Crypto_CheckSig InteropService = "System.Crypto.CheckSig" + func (p InteropService) ToInteropMethodHash() uint + type OpCode byte + const ABORT + const ABS + const ADD + const AND + const APPEND + const ASSERT + const BOOLAND + const BOOLOR + const CALL + const CALLA + const CALLT + const CALL_L + const CAT + const CLEAR + const CLEARITEMS + const CONVERT + const DEC + const DEPTH + const DIV + const DROP + const DUP + const ENDFINALLY + const ENDTRY + const ENDTRY_L + const EQUAL + const GE + const GT + const HASKEY + const INC + const INITSLOT + const INITSSLOT + const INVERT + const ISNULL + const ISTYPE + const JMP + const JMPEQ + const JMPEQ_L + const JMPGE + const JMPGE_L + const JMPGT + const JMPGT_L + const JMPIF + const JMPIFNOT + const JMPIFNOT_L + const JMPIF_L + const JMPLE + const JMPLE_L + const JMPLT + const JMPLT_L + const JMPNE + const JMPNE_L + const JMP_L + const KEYS + const LDARG + const LDARG0 + const LDARG1 + const LDARG2 + const LDARG3 + const LDARG4 + const LDARG5 + const LDARG6 + const LDLOC + const LDLOC0 + const LDLOC1 + const LDLOC2 + const LDLOC3 + const LDLOC4 + const LDLOC5 + const LDLOC6 + const LDSFLD + const LDSFLD0 + const LDSFLD1 + const LDSFLD2 + const LDSFLD3 + const LDSFLD4 + const LDSFLD5 + const LDSFLD6 + const LE + const LEFT + const LT + const MAX + const MEMCPY + const MIN + const MOD + const MUL + const NEGATE + const NEWARRAY + const NEWARRAY0 + const NEWARRAY_T + const NEWBUFFER + const NEWMAP + const NEWSTRUCT + const NEWSTRUCT0 + const NIP + const NOP + const NOT + const NOTEQUAL + const NUMEQUAL + const NUMNOTEQUAL + const NZ + const OR + const OVER + const PACK + const PICK + const PICKITEM + const POPITEM + const POW + const PUSH0 + const PUSH1 + const PUSH10 + const PUSH11 + const PUSH12 + const PUSH13 + const PUSH14 + const PUSH15 + const PUSH16 + const PUSH2 + const PUSH3 + const PUSH4 + const PUSH5 + const PUSH6 + const PUSH7 + const PUSH8 + const PUSH9 + const PUSHA + const PUSHDATA1 + const PUSHDATA2 + const PUSHDATA4 + const PUSHINT128 + const PUSHINT16 + const PUSHINT256 + const PUSHINT32 + const PUSHINT64 + const PUSHINT8 + const PUSHM1 + const PUSHNULL + const REMOVE + const RET + const REVERSE3 + const REVERSE4 + const REVERSEITEMS + const REVERSEN + const RIGHT + const ROLL + const ROT + const SETITEM + const SHL + const SHR + const SIGN + const SIZE + const SQRT + const STARG + const STARG0 + const STARG1 + const STARG2 + const STARG3 + const STARG4 + const STARG5 + const STARG6 + const STLOC + const STLOC0 + const STLOC1 + const STLOC2 + const STLOC3 + const STLOC4 + const STLOC5 + const STLOC6 + const STSFLD + const STSFLD0 + const STSFLD1 + const STSFLD2 + const STSFLD3 + const STSFLD4 + const STSFLD5 + const STSFLD6 + const SUB + const SUBSTR + const SWAP + const SYSCALL + const THROW + const TRY + const TRY_L + const TUCK + const UNPACK + const VALUES + const WITHIN + const XDROP + const XOR + type ScriptBuilder struct + func NewScriptBuilder() ScriptBuilder + func (sb *ScriptBuilder) CreateArray(list []interface{}) + func (sb *ScriptBuilder) CreateMap(m map[interface{}]interface{}) + func (sb *ScriptBuilder) Emit(op OpCode, arg ...byte) + func (sb *ScriptBuilder) EmitCall(offset int) + func (sb *ScriptBuilder) EmitDynamicCall(scriptHash *helper.UInt160, operation string, args []interface{}) + func (sb *ScriptBuilder) EmitDynamicCallObj(scriptHash *helper.UInt160, operation string, flags CallFlags, ...) + func (sb *ScriptBuilder) EmitJump(op OpCode, offset int) + func (sb *ScriptBuilder) EmitOpCodes(ops ...OpCode) + func (sb *ScriptBuilder) EmitPushBigInt(number *big.Int) + func (sb *ScriptBuilder) EmitPushBool(data bool) + func (sb *ScriptBuilder) EmitPushBytes(data []byte) + func (sb *ScriptBuilder) EmitPushInteger(num interface{}) + func (sb *ScriptBuilder) EmitPushObject(obj interface{}) + func (sb *ScriptBuilder) EmitPushParameter(param ContractParameter) + func (sb *ScriptBuilder) EmitPushSerializable(data io.ISerializable) + func (sb *ScriptBuilder) EmitPushString(data string) + func (sb *ScriptBuilder) EmitRaw(arg []byte) + func (sb *ScriptBuilder) EmitSysCall(api uint) + func (sb *ScriptBuilder) EmitSysCallObj(method uint, args ...interface{}) + func (sb *ScriptBuilder) ToArray() ([]byte, error)