im

package
v0.0.0-...-168a7d3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NodeType_name = map[int32]string{
	0: "Super",
	1: "Master",
}
View Source
var NodeType_value = map[string]int32{
	"Super":  0,
	"Master": 1,
}
View Source
var TransactionType_name = map[int32]string{
	0: "Normal",
	1: "Unrecorded",
}
View Source
var TransactionType_value = map[string]int32{
	"Normal":     0,
	"Unrecorded": 1,
}

Functions

This section is empty.

Types

type Assets

type Assets struct {
	Avail                uint64   `protobuf:"varint,1,opt,name=Avail,proto3" json:"Avail,omitempty"`
	Vote                 uint64   `protobuf:"varint,2,opt,name=Vote,proto3" json:"Vote,omitempty"`
	Locked               uint64   `protobuf:"varint,3,opt,name=Locked,proto3" json:"Locked,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Assets) Descriptor

func (*Assets) Descriptor() ([]byte, []int)

func (*Assets) GetAvail

func (m *Assets) GetAvail() uint64

func (*Assets) GetLocked

func (m *Assets) GetLocked() uint64

func (*Assets) GetVote

func (m *Assets) GetVote() uint64

func (*Assets) ProtoMessage

func (*Assets) ProtoMessage()

func (*Assets) Reset

func (m *Assets) Reset()

func (*Assets) String

func (m *Assets) String() string

func (*Assets) XXX_DiscardUnknown

func (m *Assets) XXX_DiscardUnknown()

func (*Assets) XXX_Marshal

func (m *Assets) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Assets) XXX_Merge

func (m *Assets) XXX_Merge(src proto.Message)

func (*Assets) XXX_Size

func (m *Assets) XXX_Size() int

func (*Assets) XXX_Unmarshal

func (m *Assets) XXX_Unmarshal(b []byte) error

type Block

type Block struct {
	ChainID              string   `protobuf:"bytes,1,opt,name=ChainID,proto3" json:"ChainID,omitempty"`
	Parent               string   `protobuf:"bytes,2,opt,name=Parent,proto3" json:"Parent,omitempty"`
	Index                uint64   `protobuf:"varint,3,opt,name=Index,proto3" json:"Index,omitempty"`
	Timestamp            uint32   `protobuf:"varint,4,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"`
	Packager             string   `protobuf:"bytes,5,opt,name=Packager,proto3" json:"Packager,omitempty"`
	Txc                  uint32   `protobuf:"varint,6,opt,name=Txc,proto3" json:"Txc,omitempty"`
	Txs                  []byte   `protobuf:"bytes,7,opt,name=Txs,proto3" json:"Txs,omitempty"`
	ExtraData            []byte   `protobuf:"bytes,8,opt,name=ExtraData,proto3" json:"ExtraData,omitempty"`
	AppendData           []byte   `protobuf:"bytes,9,opt,name=AppendData,proto3" json:"AppendData,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Block) Descriptor

func (*Block) Descriptor() ([]byte, []int)

func (*Block) GetAppendData

func (m *Block) GetAppendData() []byte

func (*Block) GetChainID

func (m *Block) GetChainID() string

func (*Block) GetExtraData

func (m *Block) GetExtraData() []byte

func (*Block) GetHash

func (b *Block) GetHash() EComm.Hash

func (*Block) GetIndex

func (m *Block) GetIndex() uint64

func (*Block) GetPackager

func (m *Block) GetPackager() string

func (*Block) GetParent

func (m *Block) GetParent() string

func (*Block) GetTimestamp

func (m *Block) GetTimestamp() uint32

func (*Block) GetTxc

func (m *Block) GetTxc() uint32

func (*Block) GetTxs

func (m *Block) GetTxs() []byte

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

func (*Block) ReadTxsFromDAG

func (m *Block) ReadTxsFromDAG(ctx context.Context, ind *core.IpfsNode) []*Transaction

func (*Block) Reset

func (m *Block) Reset()

func (*Block) String

func (m *Block) String() string

func (*Block) XXX_DiscardUnknown

func (m *Block) XXX_DiscardUnknown()

func (*Block) XXX_Marshal

func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Block) XXX_Merge

func (m *Block) XXX_Merge(src proto.Message)

func (*Block) XXX_Size

func (m *Block) XXX_Size() int

func (*Block) XXX_Unmarshal

func (m *Block) XXX_Unmarshal(b []byte) error

type ChainInfo

type ChainInfo struct {
	ChainID              string   `protobuf:"bytes,1,opt,name=ChainID,proto3" json:"ChainID,omitempty"`
	BlockIndex           uint64   `protobuf:"varint,2,opt,name=BlockIndex,proto3" json:"BlockIndex,omitempty"`
	Indexes              []byte   `protobuf:"bytes,3,opt,name=Indexes,proto3" json:"Indexes,omitempty"`
	FinalCVFS            []byte   `protobuf:"bytes,4,opt,name=FinalCVFS,proto3" json:"FinalCVFS,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ChainInfo) Descriptor

func (*ChainInfo) Descriptor() ([]byte, []int)

func (*ChainInfo) GetBlockIndex

func (m *ChainInfo) GetBlockIndex() uint64

func (*ChainInfo) GetChainID

func (m *ChainInfo) GetChainID() string

func (*ChainInfo) GetFinalCVFS

func (m *ChainInfo) GetFinalCVFS() []byte

func (*ChainInfo) GetHash

func (m *ChainInfo) GetHash() EComm.Hash

func (*ChainInfo) GetIndexes

func (m *ChainInfo) GetIndexes() []byte

func (*ChainInfo) ProtoMessage

func (*ChainInfo) ProtoMessage()

func (*ChainInfo) Reset

func (m *ChainInfo) Reset()

func (*ChainInfo) String

func (m *ChainInfo) String() string

func (*ChainInfo) XXX_DiscardUnknown

func (m *ChainInfo) XXX_DiscardUnknown()

func (*ChainInfo) XXX_Marshal

func (m *ChainInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChainInfo) XXX_Merge

func (m *ChainInfo) XXX_Merge(src proto.Message)

func (*ChainInfo) XXX_Size

func (m *ChainInfo) XXX_Size() int

func (*ChainInfo) XXX_Unmarshal

func (m *ChainInfo) XXX_Unmarshal(b []byte) error

type Electoral

type Electoral struct {
	BestIndex            uint64   `protobuf:"varint,1,opt,name=BestIndex,proto3" json:"BestIndex,omitempty"`
	BlockIndex           uint64   `protobuf:"varint,2,opt,name=BlockIndex,proto3" json:"BlockIndex,omitempty"`
	From                 []byte   `protobuf:"bytes,3,opt,name=From,proto3" json:"From,omitempty"`
	ToPeerId             string   `protobuf:"bytes,4,opt,name=ToPeerId,proto3" json:"ToPeerId,omitempty"`
	Time                 uint32   `protobuf:"varint,5,opt,name=Time,proto3" json:"Time,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Electoral) Descriptor

func (*Electoral) Descriptor() ([]byte, []int)

func (*Electoral) GetBestIndex

func (m *Electoral) GetBestIndex() uint64

func (*Electoral) GetBlockIndex

func (m *Electoral) GetBlockIndex() uint64

func (*Electoral) GetFrom

func (m *Electoral) GetFrom() []byte

func (*Electoral) GetTime

func (m *Electoral) GetTime() uint32

func (*Electoral) GetToPeerId

func (m *Electoral) GetToPeerId() string

func (*Electoral) ProtoMessage

func (*Electoral) ProtoMessage()

func (*Electoral) Reset

func (m *Electoral) Reset()

func (*Electoral) String

func (m *Electoral) String() string

func (*Electoral) XXX_DiscardUnknown

func (m *Electoral) XXX_DiscardUnknown()

func (*Electoral) XXX_Marshal

func (m *Electoral) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Electoral) XXX_Merge

func (m *Electoral) XXX_Merge(src proto.Message)

func (*Electoral) XXX_Size

func (m *Electoral) XXX_Size() int

func (*Electoral) XXX_Unmarshal

func (m *Electoral) XXX_Unmarshal(b []byte) error

type GenAssets

type GenAssets struct {
	Avail                uint64   `protobuf:"varint,1,opt,name=Avail,proto3" json:"Avail,omitempty"`
	Vote                 uint64   `protobuf:"varint,2,opt,name=Vote,proto3" json:"Vote,omitempty"`
	Locked               uint64   `protobuf:"varint,3,opt,name=Locked,proto3" json:"Locked,omitempty"`
	Owner                []byte   `protobuf:"bytes,4,opt,name=Owner,proto3" json:"Owner,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GenAssets) Descriptor

func (*GenAssets) Descriptor() ([]byte, []int)

func (*GenAssets) GetAvail

func (m *GenAssets) GetAvail() uint64

func (*GenAssets) GetLocked

func (m *GenAssets) GetLocked() uint64

func (*GenAssets) GetOwner

func (m *GenAssets) GetOwner() []byte

func (*GenAssets) GetVote

func (m *GenAssets) GetVote() uint64

func (*GenAssets) ProtoMessage

func (*GenAssets) ProtoMessage()

func (*GenAssets) Reset

func (m *GenAssets) Reset()

func (*GenAssets) String

func (m *GenAssets) String() string

func (*GenAssets) XXX_DiscardUnknown

func (m *GenAssets) XXX_DiscardUnknown()

func (*GenAssets) XXX_Marshal

func (m *GenAssets) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenAssets) XXX_Merge

func (m *GenAssets) XXX_Merge(src proto.Message)

func (*GenAssets) XXX_Size

func (m *GenAssets) XXX_Size() int

func (*GenAssets) XXX_Unmarshal

func (m *GenAssets) XXX_Unmarshal(b []byte) error

type GenBlock

type GenBlock struct {
	ChainID              string       `protobuf:"bytes,1,opt,name=ChainID,proto3" json:"ChainID,omitempty"`
	Parent               string       `protobuf:"bytes,2,opt,name=Parent,proto3" json:"Parent,omitempty"`
	Index                uint64       `protobuf:"varint,3,opt,name=Index,proto3" json:"Index,omitempty"`
	Timestamp            uint32       `protobuf:"varint,4,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"`
	Packager             string       `protobuf:"bytes,5,opt,name=Packager,proto3" json:"Packager,omitempty"`
	Txc                  uint32       `protobuf:"varint,6,opt,name=Txc,proto3" json:"Txc,omitempty"`
	Txs                  []byte       `protobuf:"bytes,7,opt,name=Txs,proto3" json:"Txs,omitempty"`
	ExtraData            []byte       `protobuf:"bytes,8,opt,name=ExtraData,proto3" json:"ExtraData,omitempty"`
	AppendData           []byte       `protobuf:"bytes,9,opt,name=AppendData,proto3" json:"AppendData,omitempty"`
	Award                []*GenAssets `protobuf:"bytes,10,rep,name=Award,proto3" json:"Award,omitempty"`
	SuperNodes           []*Node      `protobuf:"bytes,11,rep,name=SuperNodes,proto3" json:"SuperNodes,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*GenBlock) Descriptor

func (*GenBlock) Descriptor() ([]byte, []int)

func (*GenBlock) GetAppendData

func (m *GenBlock) GetAppendData() []byte

func (*GenBlock) GetAward

func (m *GenBlock) GetAward() []*GenAssets

func (*GenBlock) GetChainID

func (m *GenBlock) GetChainID() string

func (*GenBlock) GetExtraData

func (m *GenBlock) GetExtraData() []byte

func (*GenBlock) GetHash

func (m *GenBlock) GetHash() EComm.Hash

func (*GenBlock) GetIndex

func (m *GenBlock) GetIndex() uint64

func (*GenBlock) GetPackager

func (m *GenBlock) GetPackager() string

func (*GenBlock) GetParent

func (m *GenBlock) GetParent() string

func (*GenBlock) GetSuperNodes

func (m *GenBlock) GetSuperNodes() []*Node

func (*GenBlock) GetTimestamp

func (m *GenBlock) GetTimestamp() uint32

func (*GenBlock) GetTxc

func (m *GenBlock) GetTxc() uint32

func (*GenBlock) GetTxs

func (m *GenBlock) GetTxs() []byte

func (*GenBlock) ProtoMessage

func (*GenBlock) ProtoMessage()

func (*GenBlock) Reset

func (m *GenBlock) Reset()

func (*GenBlock) String

func (m *GenBlock) String() string

func (*GenBlock) XXX_DiscardUnknown

func (m *GenBlock) XXX_DiscardUnknown()

func (*GenBlock) XXX_Marshal

func (m *GenBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenBlock) XXX_Merge

func (m *GenBlock) XXX_Merge(src proto.Message)

func (*GenBlock) XXX_Size

func (m *GenBlock) XXX_Size() int

func (*GenBlock) XXX_Unmarshal

func (m *GenBlock) XXX_Unmarshal(b []byte) error

type Minined

type Minined struct {
	MBlock               *Block   `protobuf:"bytes,1,opt,name=MBlock,proto3" json:"MBlock,omitempty"`
	Batcher              []byte   `protobuf:"bytes,2,opt,name=Batcher,proto3" json:"Batcher,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Minined) Descriptor

func (*Minined) Descriptor() ([]byte, []int)

func (*Minined) GetBatcher

func (m *Minined) GetBatcher() []byte

func (*Minined) GetMBlock

func (m *Minined) GetMBlock() *Block

func (*Minined) ProtoMessage

func (*Minined) ProtoMessage()

func (*Minined) Reset

func (m *Minined) Reset()

func (*Minined) String

func (m *Minined) String() string

func (*Minined) XXX_DiscardUnknown

func (m *Minined) XXX_DiscardUnknown()

func (*Minined) XXX_Marshal

func (m *Minined) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Minined) XXX_Merge

func (m *Minined) XXX_Merge(src proto.Message)

func (*Minined) XXX_Size

func (m *Minined) XXX_Size() int

func (*Minined) XXX_Unmarshal

func (m *Minined) XXX_Unmarshal(b []byte) error

type Node

type Node struct {
	Type                 NodeType `protobuf:"varint,1,opt,name=Type,proto3,enum=im.NodeType" json:"Type,omitempty"`
	Votes                uint64   `protobuf:"varint,2,opt,name=Votes,proto3" json:"Votes,omitempty"`
	PeerID               string   `protobuf:"bytes,3,opt,name=PeerID,proto3" json:"PeerID,omitempty"`
	Owner                []byte   `protobuf:"bytes,5,opt,name=Owner,proto3" json:"Owner,omitempty"`
	Sig                  []byte   `protobuf:"bytes,4,opt,name=Sig,proto3" json:"Sig,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Node) Descriptor

func (*Node) Descriptor() ([]byte, []int)

func (*Node) GetOwner

func (m *Node) GetOwner() []byte

func (*Node) GetPeerID

func (m *Node) GetPeerID() string

func (*Node) GetSig

func (m *Node) GetSig() []byte

func (*Node) GetType

func (m *Node) GetType() NodeType

func (*Node) GetVotes

func (m *Node) GetVotes() uint64

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) Reset

func (m *Node) Reset()

func (*Node) String

func (m *Node) String() string

func (*Node) XXX_DiscardUnknown

func (m *Node) XXX_DiscardUnknown()

func (*Node) XXX_Marshal

func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Node) XXX_Merge

func (m *Node) XXX_Merge(src proto.Message)

func (*Node) XXX_Size

func (m *Node) XXX_Size() int

func (*Node) XXX_Unmarshal

func (m *Node) XXX_Unmarshal(b []byte) error

type NodeType

type NodeType int32
const (
	NodeType_Super  NodeType = 0
	NodeType_Master NodeType = 1
)

func (NodeType) EnumDescriptor

func (NodeType) EnumDescriptor() ([]byte, []int)

func (NodeType) String

func (x NodeType) String() string

type Receipt

type Receipt struct {
	Stat                 int32    `protobuf:"varint,1,opt,name=Stat,proto3" json:"Stat,omitempty"`
	Message              string   `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"`
	Event                []string `protobuf:"bytes,3,rep,name=Event,proto3" json:"Event,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func ConfirmReceipt

func ConfirmReceipt(msg string, events []string) *Receipt

func ExpectedReceipt

func ExpectedReceipt(msg string, events []string) *Receipt

func (*Receipt) Descriptor

func (*Receipt) Descriptor() ([]byte, []int)

func (*Receipt) GetEvent

func (m *Receipt) GetEvent() []string

func (*Receipt) GetMessage

func (m *Receipt) GetMessage() string

func (*Receipt) GetStat

func (m *Receipt) GetStat() int32

func (*Receipt) ProtoMessage

func (*Receipt) ProtoMessage()

func (*Receipt) Reset

func (m *Receipt) Reset()

func (*Receipt) String

func (m *Receipt) String() string

func (*Receipt) XXX_DiscardUnknown

func (m *Receipt) XXX_DiscardUnknown()

func (*Receipt) XXX_Marshal

func (m *Receipt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Receipt) XXX_Merge

func (m *Receipt) XXX_Merge(src proto.Message)

func (*Receipt) XXX_Size

func (m *Receipt) XXX_Size() int

func (*Receipt) XXX_Unmarshal

func (m *Receipt) XXX_Unmarshal(b []byte) error

type Transaction

type Transaction struct {
	BlockIndex           uint64          `protobuf:"varint,1,opt,name=BlockIndex,proto3" json:"BlockIndex,omitempty"`
	From                 []byte          `protobuf:"bytes,2,opt,name=From,proto3" json:"From,omitempty"`
	To                   []byte          `protobuf:"bytes,3,opt,name=To,proto3" json:"To,omitempty"`
	Value                uint64          `protobuf:"varint,4,opt,name=Value,proto3" json:"Value,omitempty"`
	Type                 TransactionType `protobuf:"varint,5,opt,name=Type,proto3,enum=im.TransactionType" json:"Type,omitempty"`
	Tid                  uint64          `protobuf:"varint,6,opt,name=Tid,proto3" json:"Tid,omitempty"`
	Sig                  []byte          `protobuf:"bytes,7,opt,name=Sig,proto3" json:"Sig,omitempty"`
	Data                 string          `protobuf:"bytes,8,opt,name=Data,proto3" json:"Data,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*Transaction) Descriptor

func (*Transaction) Descriptor() ([]byte, []int)

func (*Transaction) GetBlockIndex

func (m *Transaction) GetBlockIndex() uint64

func (*Transaction) GetData

func (m *Transaction) GetData() string

func (*Transaction) GetFrom

func (m *Transaction) GetFrom() []byte

func (*Transaction) GetHash256

func (m *Transaction) GetHash256() EComm.Hash

func (*Transaction) GetSig

func (m *Transaction) GetSig() []byte

func (*Transaction) GetTid

func (m *Transaction) GetTid() uint64

func (*Transaction) GetTo

func (m *Transaction) GetTo() []byte

func (*Transaction) GetType

func (m *Transaction) GetType() TransactionType

func (*Transaction) GetValue

func (m *Transaction) GetValue() uint64

func (*Transaction) ProtoMessage

func (*Transaction) ProtoMessage()

func (*Transaction) Reset

func (m *Transaction) Reset()

func (*Transaction) String

func (m *Transaction) String() string

func (*Transaction) Verify

func (m *Transaction) Verify() bool

func (*Transaction) XXX_DiscardUnknown

func (m *Transaction) XXX_DiscardUnknown()

func (*Transaction) XXX_Marshal

func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Transaction) XXX_Merge

func (m *Transaction) XXX_Merge(src proto.Message)

func (*Transaction) XXX_Size

func (m *Transaction) XXX_Size() int

func (*Transaction) XXX_Unmarshal

func (m *Transaction) XXX_Unmarshal(b []byte) error

type TransactionType

type TransactionType int32
const (
	TransactionType_Normal     TransactionType = 0
	TransactionType_Unrecorded TransactionType = 1
)

func (TransactionType) EnumDescriptor

func (TransactionType) EnumDescriptor() ([]byte, []int)

func (TransactionType) String

func (x TransactionType) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL