Documentation
¶
Index ¶
- func DecodeProtobufVarint(buf []byte) (result uint64, buflen int, err error)
- func EncodeProtobufVarint(x uint64) []byte
- func ReadProtobufVarint(r bytereader) (uint64, int64, error)
- type Address
- type Amount
- type BodyCallSC
- type BodyExecuteSC
- type BodyRollBuy
- type BodyRollSell
- type BodyTransaction
- type ChainId
- type DataStoreItem
- type Operation
- type OperationBody
- type OperationType
- type PublicKey
- type RPC
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeProtobufVarint ¶
DecodeProtobufVarint decodes a varint encoded following protobuf conventions
func EncodeProtobufVarint ¶
EncodeProtobufVarint encodes the given integer using protobuf conventions
func ReadProtobufVarint ¶
Types ¶
type Address ¶
type Address struct { Category uint64 // 0 for User, 1 for Smart contract Version uint64 Hash []byte // Underlying blake3 hash }
func (*Address) MarshalBinary ¶
MarshalBinary encodes the address in massa byte format (for compatibility)
func (*Address) ReadFrom ¶
ReadFrom reads a binary address from a given source, which is made of two varint (category, version) followed by 32 bytes of hash
func (*Address) SetValue ¶
SetValue computes the hash of the provided buffer and sets it as address Hash
type BodyCallSC ¶
type BodyExecuteSC ¶
type BodyExecuteSC struct { MaxGas uint64 MaxCoins Amount Bytecode []byte // Raw bytes of bytecode to execute (up to 10MB) Datastore []*DataStoreItem // Concatenated datastore items. (keyval, keys up to }
type BodyRollBuy ¶
type BodyRollBuy struct {
Rolls uint64
}
type BodyRollSell ¶
type BodyRollSell struct {
Rolls uint64
}
type BodyTransaction ¶
func (*BodyTransaction) Bytes ¶
func (tx *BodyTransaction) Bytes() []byte
func (*BodyTransaction) Type ¶
func (tx *BodyTransaction) Type() OperationType
func (*BodyTransaction) UnmarshalBinary ¶
func (tx *BodyTransaction) UnmarshalBinary(buf []byte) error
type DataStoreItem ¶
type Operation ¶
type Operation struct { Fee Amount Expire uint64 // expire_period Body OperationBody }
func (*Operation) UnmarshalBinary ¶
type OperationBody ¶
type OperationType ¶
type OperationType uint32
const ( OpTransaction OperationType = iota // 0 OpRollBuy // 1 OpRollSell // 2 OpExecuteSC // 3 OpCallSC // 4 )
type PublicKey ¶
func (*PublicKey) MarshalBinary ¶
func (*PublicKey) MarshalText ¶
func (*PublicKey) UnmarshalText ¶
type RPC ¶ added in v0.0.2
type RPC struct {
// contains filtered or unexported fields
}
func New ¶ added in v0.0.2
func New(target string, opts ...grpc.DialOption) (*RPC, error)
New returns a new connection to a massa node
grpc://localhost:33037
func (*RPC) Public ¶ added in v0.0.2
func (rpc *RPC) Public() massagrpc.PublicServiceClient
Public exposes the raw grpc public interface
Source Files
¶
Click to show internal directories.
Click to hide internal directories.