Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
 - Variables
 - func Address(val string, tzOnly bool) ([]byte, error)
 - func CollectStrings(node *base.Node, tryUnpack bool) ([]string, error)
 - func Contract(val string) (string, error)
 - func DecodeString(str string) string
 - func Forge(node *base.Node) ([]byte, error)
 - func ForgeArray(value []byte, l uint64) []byte
 - func ForgeBool(value bool) []byte
 - func ForgeInt(value *types.BigInt) ([]byte, error)
 - func ForgeNat(value *types.BigInt) ([]byte, error)
 - func ForgeString(value string) ([]byte, error)
 - func OPG(branch string, operations ...node.Operation) ([]byte, error)
 - func PublicKey(val string) ([]byte, error)
 - func ToString(node *base.Node) (string, error)
 - func Transaction(transaction node.Transaction) ([]byte, error)
 - func TrimPackByte(data []byte) ([]byte, error)
 - func TryUnpackString(str string) []*base.Node
 - func UnforgeAddress(str string) (string, error)
 - func UnforgeBakerHash(str string) (string, error)
 - func UnforgeChainID(str string) (string, error)
 - func UnforgeContract(str string) (string, error)
 - func UnforgeOpgHash(input string) (string, error)
 - func UnforgePublicKey(str string) (string, error)
 - func UnforgeSignature(str string) (string, error)
 - func Unpack(data []byte) ([]*base.Node, error)
 - func UnpackString(str string) ([]*base.Node, error)
 - type Array
 - type Bytes
 - type Forger
 - type Int
 - type Michelson
 - type Object
 - type String
 - type Unforger
 
Constants ¶
      View Source
      
  const ( ByteInt = 0x00 ByteString = 0x01 ByteArray = 0x02 BytePrim = 0x03 BytePrimAnnots = 0x04 BytePrimArg = 0x05 BytePrimArgAnnots = 0x06 BytePrimArgs = 0x07 BytePrimArgsAnnots = 0x08 ByteGeneralPrim = 0x09 ByteBytes = 0x0a )
first bytes
      View Source
      
  const ( PackPrefix = "05" PackPrefixByte = 0x05 )
pack prefix
      View Source
      
  const (
	PrimArray = "_array"
)
    custom prim
Variables ¶
      View Source
      
  var ( ErrTooFewBytes = errors.New("too few bytes") ErrInvalidKeyword = errors.New("invalid prim keyword") ErrUnknownTypeCode = errors.New("unknown type code") )
errors
Functions ¶
func CollectStrings ¶
CollectStrings - returns strings contained in tree. If `tryUnpack` is true, it tries to unpack bytes value.
func Transaction ¶ added in v0.1.33
func Transaction(transaction node.Transaction) ([]byte, error)
Transaction -
func TryUnpackString ¶
TryUnpackString - try unpack `str` to tree. If try failed returns `nil`
Types ¶
 Click to show internal directories. 
   Click to hide internal directories.