Documentation
¶
Overview ¶
Package ultpb is a generated protocol buffer package.
It is generated from these files:
account.proto asset.proto consensus.proto ledger.proto liability.proto offer.proto transaction.proto trust.proto
It has these top-level messages:
Account Asset ConsensusValue Quorum Nominate Ballot Prepare Confirm Externalize Statement LedgerHeader Ledger LedgerCheckpoint Liability Price Offer Op Tx TxSet CreateAccountOp PaymentOp PathPaymentOp TrustOp AllowTrustOp OfferOp Trust
Index ¶
- Variables
- func Encode(msg proto.Message) ([]byte, error)
- func GetLedgerHeaderKey(lh *LedgerHeader) (string, error)
- func GetTxKey(tx *Tx) (string, error)
- func GetTxSetKey(ts *TxSet) (string, error)
- func SHA256Hash(msg proto.Message) (string, error)
- func SHA256HashBytes(msg proto.Message) ([32]byte, error)
- type Account
- func (*Account) Descriptor() ([]byte, []int)
- func (m *Account) GetAccountID() string
- func (m *Account) GetBalance() int64
- func (m *Account) GetEntryCount() int32
- func (m *Account) GetLiability() *Liability
- func (m *Account) GetSeqNum() uint64
- func (m *Account) GetSigner() string
- func (m *Account) GetTxKeyList() []string
- func (*Account) ProtoMessage()
- func (m *Account) Reset()
- func (m *Account) String() string
- type AllowTrustOp
- type Asset
- type AssetType
- type Ballot
- type Confirm
- func (*Confirm) Descriptor() ([]byte, []int)
- func (m *Confirm) GetB() *Ballot
- func (m *Confirm) GetHC() uint32
- func (m *Confirm) GetLC() uint32
- func (m *Confirm) GetPC() uint32
- func (m *Confirm) GetQuorumHash() string
- func (*Confirm) ProtoMessage()
- func (m *Confirm) Reset()
- func (m *Confirm) String() string
- type ConsensusValue
- type CreateAccountOp
- type Externalize
- type Ledger
- type LedgerCheckpoint
- func (*LedgerCheckpoint) Descriptor() ([]byte, []int)
- func (m *LedgerCheckpoint) GetCurrLedgerHeader() *LedgerHeader
- func (m *LedgerCheckpoint) GetCurrLedgerHeaderHash() string
- func (m *LedgerCheckpoint) GetLargestConsensusIndex() uint64
- func (m *LedgerCheckpoint) GetLastCloseTime() int64
- func (m *LedgerCheckpoint) GetLedgerHeaderCount() int64
- func (m *LedgerCheckpoint) GetPrevLedgerHeader() *LedgerHeader
- func (m *LedgerCheckpoint) GetPrevLedgerHeaderHash() string
- func (*LedgerCheckpoint) ProtoMessage()
- func (m *LedgerCheckpoint) Reset()
- func (m *LedgerCheckpoint) String() string
- type LedgerHeader
- func (*LedgerHeader) Descriptor() ([]byte, []int)
- func (m *LedgerHeader) GetBaseFee() int64
- func (m *LedgerHeader) GetBaseReserve() int64
- func (m *LedgerHeader) GetConsensusValue() string
- func (m *LedgerHeader) GetMaxTxListSize() uint32
- func (m *LedgerHeader) GetPrevLedgerHash() string
- func (m *LedgerHeader) GetSeqNum() uint64
- func (m *LedgerHeader) GetTotalTokens() int64
- func (m *LedgerHeader) GetTxSetHash() string
- func (m *LedgerHeader) GetVersion() uint32
- func (*LedgerHeader) ProtoMessage()
- func (m *LedgerHeader) Reset()
- func (m *LedgerHeader) String() string
- type Liability
- type Nominate
- type Offer
- func (*Offer) Descriptor() ([]byte, []int)
- func (m *Offer) GetAccountID() string
- func (m *Offer) GetAmount() int64
- func (m *Offer) GetBuyAsset() *Asset
- func (m *Offer) GetOfferID() string
- func (m *Offer) GetPassive() int32
- func (m *Offer) GetPrice() *Price
- func (m *Offer) GetSellAsset() *Asset
- func (*Offer) ProtoMessage()
- func (m *Offer) Reset()
- func (m *Offer) String() string
- type OfferOp
- func (*OfferOp) Descriptor() ([]byte, []int)
- func (m *OfferOp) GetAmount() int64
- func (m *OfferOp) GetBuyingAsset() *Asset
- func (m *OfferOp) GetOfferID() string
- func (m *OfferOp) GetPassive() int32
- func (m *OfferOp) GetPrice() *Price
- func (m *OfferOp) GetSellingAsset() *Asset
- func (*OfferOp) ProtoMessage()
- func (m *OfferOp) Reset()
- func (m *OfferOp) String() string
- type Op
- func (*Op) Descriptor() ([]byte, []int)
- func (m *Op) GetCreateAccount() *CreateAccountOp
- func (m *Op) GetOp() isOp_Op
- func (m *Op) GetOpType() OpType
- func (m *Op) GetPathPayment() *PathPaymentOp
- func (m *Op) GetPayment() *PaymentOp
- func (m *Op) GetTrust() *TrustOp
- func (*Op) ProtoMessage()
- func (m *Op) Reset()
- func (m *Op) String() string
- func (*Op) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type OpType
- type Op_CreateAccount
- type Op_PathPayment
- type Op_Payment
- type Op_Trust
- type PathPaymentOp
- func (*PathPaymentOp) Descriptor() ([]byte, []int)
- func (m *PathPaymentOp) GetAccountID() string
- func (m *PathPaymentOp) GetDstAsset() *Asset
- func (m *PathPaymentOp) GetPath() []*Asset
- func (m *PathPaymentOp) GetSrcAmount() int64
- func (m *PathPaymentOp) GetSrcAsset() *Asset
- func (*PathPaymentOp) ProtoMessage()
- func (m *PathPaymentOp) Reset()
- func (m *PathPaymentOp) String() string
- type PaymentOp
- type Prepare
- func (*Prepare) Descriptor() ([]byte, []int)
- func (m *Prepare) GetB() *Ballot
- func (m *Prepare) GetHC() uint32
- func (m *Prepare) GetLC() uint32
- func (m *Prepare) GetP() *Ballot
- func (m *Prepare) GetQ() *Ballot
- func (m *Prepare) GetQuorumHash() string
- func (*Prepare) ProtoMessage()
- func (m *Prepare) Reset()
- func (m *Prepare) String() string
- type Price
- type Quorum
- type Statement
- func (*Statement) Descriptor() ([]byte, []int)
- func (m *Statement) GetConfirm() *Confirm
- func (m *Statement) GetExternalize() *Externalize
- func (m *Statement) GetIndex() uint64
- func (m *Statement) GetNodeID() string
- func (m *Statement) GetNominate() *Nominate
- func (m *Statement) GetPrepare() *Prepare
- func (m *Statement) GetStatementType() StatementType
- func (m *Statement) GetStmt() isStatement_Stmt
- func (*Statement) ProtoMessage()
- func (m *Statement) Reset()
- func (m *Statement) String() string
- func (*Statement) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type StatementType
- type Statement_Confirm
- type Statement_Externalize
- type Statement_Nominate
- type Statement_Prepare
- type Trust
- func (*Trust) Descriptor() ([]byte, []int)
- func (m *Trust) GetAccountID() string
- func (m *Trust) GetAsset() *Asset
- func (m *Trust) GetAuthorized() int32
- func (m *Trust) GetBalance() int64
- func (m *Trust) GetLiability() *Liability
- func (m *Trust) GetLimit() int64
- func (*Trust) ProtoMessage()
- func (m *Trust) Reset()
- func (m *Trust) String() string
- type TrustOp
- type Tx
- type TxSet
Constants ¶
This section is empty.
Variables ¶
var AssetType_name = map[int32]string{
0: "NATIVE",
1: "CUSTOM",
}
var AssetType_value = map[string]int32{
"NATIVE": 0,
"CUSTOM": 1,
}
var OpType_name = map[int32]string{
0: "CREATE_ACCOUNT",
1: "PAYMENT",
2: "PATH_PAYMENT",
3: "TRUST",
}
var OpType_value = map[string]int32{
"CREATE_ACCOUNT": 0,
"PAYMENT": 1,
"PATH_PAYMENT": 2,
"TRUST": 3,
}
var StatementType_name = map[int32]string{
0: "NOMINATE",
1: "PREPARE",
2: "CONFIRM",
3: "EXTERNALIZE",
}
var StatementType_value = map[string]int32{
"NOMINATE": 0,
"PREPARE": 1,
"CONFIRM": 2,
"EXTERNALIZE": 3,
}
Functions ¶
func GetLedgerHeaderKey ¶
func GetLedgerHeaderKey(lh *LedgerHeader) (string, error)
Hash ledger header and encode to ledger header ULTKey
func GetTxSetKey ¶
Hash txset and encode to txset ULTKey
func SHA256Hash ¶
Compute sha256 checksum of proto message
Types ¶
type Account ¶
type Account struct { // Public key of the account. AccountID string `protobuf:"bytes,1,opt,name=AccountID" json:"AccountID,omitempty"` // The account balance in ULU. Balance int64 `protobuf:"varint,2,opt,name=Balance" json:"Balance,omitempty"` // Public key of the signer of the account. Signer string `protobuf:"bytes,3,opt,name=Signer" json:"Signer,omitempty"` // Latest transaction sequence number. SeqNum uint64 `protobuf:"varint,4,opt,name=SeqNum" json:"SeqNum,omitempty"` // The number of entries belong to the account. EntryCount int32 `protobuf:"varint,5,opt,name=EntryCount" json:"EntryCount,omitempty"` // ULTkeys of transactions belongs to this account. TxKeyList []string `protobuf:"bytes,6,rep,name=TxKeyList" json:"TxKeyList,omitempty"` // Liability of the native asset. Liability *Liability `protobuf:"bytes,7,opt,name=Liability" json:"Liability,omitempty"` }
func (*Account) Descriptor ¶
func (*Account) GetAccountID ¶
func (*Account) GetBalance ¶
func (*Account) GetEntryCount ¶
func (*Account) GetLiability ¶
func (*Account) GetTxKeyList ¶
func (*Account) ProtoMessage ¶
func (*Account) ProtoMessage()
type AllowTrustOp ¶
type AllowTrustOp struct { // The account id of trustor. AccountID string `protobuf:"bytes,1,opt,name=AccountID" json:"AccountID,omitempty"` // Asset to trust. Asset *Asset `protobuf:"bytes,2,opt,name=Asset" json:"Asset,omitempty"` // Authorization flag. Authorized int32 `protobuf:"varint,3,opt,name=Authorized" json:"Authorized,omitempty"` }
AllowTrustOp creates an op to manage the authorization of the custom asset.
func (*AllowTrustOp) Descriptor ¶
func (*AllowTrustOp) Descriptor() ([]byte, []int)
func (*AllowTrustOp) GetAccountID ¶
func (m *AllowTrustOp) GetAccountID() string
func (*AllowTrustOp) GetAsset ¶
func (m *AllowTrustOp) GetAsset() *Asset
func (*AllowTrustOp) GetAuthorized ¶
func (m *AllowTrustOp) GetAuthorized() int32
func (*AllowTrustOp) ProtoMessage ¶
func (*AllowTrustOp) ProtoMessage()
func (*AllowTrustOp) Reset ¶
func (m *AllowTrustOp) Reset()
func (*AllowTrustOp) String ¶
func (m *AllowTrustOp) String() string
type Asset ¶
type Asset struct { AssetType AssetType `protobuf:"varint,1,opt,name=AssetType,enum=ultpb.AssetType" json:"AssetType,omitempty"` // User defined asset name. The length of the // name should not be more than four. AssetName string `protobuf:"bytes,2,opt,name=AssetName" json:"AssetName,omitempty"` // The issuer account of the asset. Issuer string `protobuf:"bytes,3,opt,name=Issuer" json:"Issuer,omitempty"` }
func (*Asset) Descriptor ¶
func (*Asset) GetAssetName ¶
func (*Asset) GetAssetType ¶
func (*Asset) ProtoMessage ¶
func (*Asset) ProtoMessage()
type Ballot ¶
type Ballot struct { // Ballot counter. Counter uint32 `protobuf:"varint,1,opt,name=Counter" json:"Counter,omitempty"` // Composite candidate value. Value string `protobuf:"bytes,2,opt,name=Value" json:"Value,omitempty"` }
Ballot is used to finalize a consensus value for a specific decree.
func (*Ballot) Descriptor ¶
func (*Ballot) GetCounter ¶
func (*Ballot) ProtoMessage ¶
func (*Ballot) ProtoMessage()
type Confirm ¶
type Confirm struct { // Current working ballot. B *Ballot `protobuf:"bytes,1,opt,name=B" json:"B,omitempty"` // Counter of the highest ballot accepted as prepared. PC uint32 `protobuf:"varint,2,opt,name=PC" json:"PC,omitempty"` // Counter of the lowest ballot accepted as committed. LC uint32 `protobuf:"varint,3,opt,name=LC" json:"LC,omitempty"` // Counter of the highest ballot accepted as committed. HC uint32 `protobuf:"varint,4,opt,name=HC" json:"HC,omitempty"` QuorumHash string `protobuf:"bytes,5,opt,name=QuorumHash" json:"QuorumHash,omitempty"` }
Confirm message for ballot protocol.
func DecodeConfirm ¶
Decode pb message to ballot confirm statement
func (*Confirm) Descriptor ¶
func (*Confirm) GetQuorumHash ¶
func (*Confirm) ProtoMessage ¶
func (*Confirm) ProtoMessage()
type ConsensusValue ¶
type ConsensusValue struct { // Hash of the transaction set. TxSetHash string `protobuf:"bytes,1,opt,name=TxSetHash" json:"TxSetHash,omitempty"` // Propose time of the consensus value. ProposeTime int64 `protobuf:"varint,2,opt,name=ProposeTime" json:"ProposeTime,omitempty"` }
ConsensusValue is used for reaching consensus in FBA.
func DecodeConsensusValue ¶
func DecodeConsensusValue(b []byte) (*ConsensusValue, error)
Decode pb message to consensus value
func (*ConsensusValue) Descriptor ¶
func (*ConsensusValue) Descriptor() ([]byte, []int)
func (*ConsensusValue) GetProposeTime ¶
func (m *ConsensusValue) GetProposeTime() int64
func (*ConsensusValue) GetTxSetHash ¶
func (m *ConsensusValue) GetTxSetHash() string
func (*ConsensusValue) ProtoMessage ¶
func (*ConsensusValue) ProtoMessage()
func (*ConsensusValue) Reset ¶
func (m *ConsensusValue) Reset()
func (*ConsensusValue) String ¶
func (m *ConsensusValue) String() string
type CreateAccountOp ¶
type CreateAccountOp struct { // Destination account. AccountID string `protobuf:"bytes,1,opt,name=AccountID" json:"AccountID,omitempty"` // Initial balance in ULU. Balance int64 `protobuf:"varint,2,opt,name=Balance" json:"Balance,omitempty"` }
CreateAccountOp creates a new account by sending some native asset to it from the source account.
func DecodeCreateAccountOp ¶
func DecodeCreateAccountOp(b []byte) (*CreateAccountOp, error)
Decode pb message to CreateAccountOp
func (*CreateAccountOp) Descriptor ¶
func (*CreateAccountOp) Descriptor() ([]byte, []int)
func (*CreateAccountOp) GetAccountID ¶
func (m *CreateAccountOp) GetAccountID() string
func (*CreateAccountOp) GetBalance ¶
func (m *CreateAccountOp) GetBalance() int64
func (*CreateAccountOp) ProtoMessage ¶
func (*CreateAccountOp) ProtoMessage()
func (*CreateAccountOp) Reset ¶
func (m *CreateAccountOp) Reset()
func (*CreateAccountOp) String ¶
func (m *CreateAccountOp) String() string
type Externalize ¶
type Externalize struct { // Lowest ballot confirmed as committed. B *Ballot `protobuf:"bytes,1,opt,name=B" json:"B,omitempty"` // Counter of the highest ballot accepted as committed. HC uint32 `protobuf:"varint,2,opt,name=HC" json:"HC,omitempty"` QuorumHash string `protobuf:"bytes,3,opt,name=QuorumHash" json:"QuorumHash,omitempty"` }
Externalize message for ballot protocol.
func DecodeExternalize ¶
func DecodeExternalize(b []byte) (*Externalize, error)
Decode pb message to ballot externalize statement
func (*Externalize) Descriptor ¶
func (*Externalize) Descriptor() ([]byte, []int)
func (*Externalize) GetB ¶
func (m *Externalize) GetB() *Ballot
func (*Externalize) GetHC ¶
func (m *Externalize) GetHC() uint32
func (*Externalize) GetQuorumHash ¶
func (m *Externalize) GetQuorumHash() string
func (*Externalize) ProtoMessage ¶
func (*Externalize) ProtoMessage()
func (*Externalize) Reset ¶
func (m *Externalize) Reset()
func (*Externalize) String ¶
func (m *Externalize) String() string
type Ledger ¶
type Ledger struct { LedgerHeader *LedgerHeader `protobuf:"bytes,1,opt,name=LedgerHeader" json:"LedgerHeader,omitempty"` TxSet *TxSet `protobuf:"bytes,2,opt,name=TxSet" json:"TxSet,omitempty"` }
Full ledger info of a ledger index.
func (*Ledger) Descriptor ¶
func (*Ledger) GetLedgerHeader ¶
func (m *Ledger) GetLedgerHeader() *LedgerHeader
func (*Ledger) ProtoMessage ¶
func (*Ledger) ProtoMessage()
type LedgerCheckpoint ¶
type LedgerCheckpoint struct { // Timestamp of last ledger closed. LastCloseTime int64 `protobuf:"varint,1,opt,name=LastCloseTime" json:"LastCloseTime,omitempty"` // The number of ledgers processed. LedgerHeaderCount int64 `protobuf:"varint,2,opt,name=LedgerHeaderCount" json:"LedgerHeaderCount,omitempty"` // The largest consensus index that the manager met. LargestConsensusIndex uint64 `protobuf:"varint,3,opt,name=LargestConsensusIndex" json:"LargestConsensusIndex,omitempty"` // Previous committed ledger header. PrevLedgerHeader *LedgerHeader `protobuf:"bytes,4,opt,name=PrevLedgerHeader" json:"PrevLedgerHeader,omitempty"` // Hash of previous committed ledger header. PrevLedgerHeaderHash string `protobuf:"bytes,5,opt,name=PrevLedgerHeaderHash" json:"PrevLedgerHeaderHash,omitempty"` // Current latest committed ledger header. CurrLedgerHeader *LedgerHeader `protobuf:"bytes,6,opt,name=CurrLedgerHeader" json:"CurrLedgerHeader,omitempty"` // Hash of current latest committed ledger header. CurrLedgerHeaderHash string `protobuf:"bytes,7,opt,name=CurrLedgerHeaderHash" json:"CurrLedgerHeaderHash,omitempty"` }
LedgerCheckpoint contains the states of the latest closed ledger. It is mainly used for making the snapshot of the states of the latest closed ledger so that the node can recover its states after node failures.
func DecodeLedgerCheckpoint ¶
func DecodeLedgerCheckpoint(b []byte) (*LedgerCheckpoint, error)
Decoder pb messge to ledger checkpoint.
func (*LedgerCheckpoint) Descriptor ¶
func (*LedgerCheckpoint) Descriptor() ([]byte, []int)
func (*LedgerCheckpoint) GetCurrLedgerHeader ¶
func (m *LedgerCheckpoint) GetCurrLedgerHeader() *LedgerHeader
func (*LedgerCheckpoint) GetCurrLedgerHeaderHash ¶
func (m *LedgerCheckpoint) GetCurrLedgerHeaderHash() string
func (*LedgerCheckpoint) GetLargestConsensusIndex ¶
func (m *LedgerCheckpoint) GetLargestConsensusIndex() uint64
func (*LedgerCheckpoint) GetLastCloseTime ¶
func (m *LedgerCheckpoint) GetLastCloseTime() int64
func (*LedgerCheckpoint) GetLedgerHeaderCount ¶
func (m *LedgerCheckpoint) GetLedgerHeaderCount() int64
func (*LedgerCheckpoint) GetPrevLedgerHeader ¶
func (m *LedgerCheckpoint) GetPrevLedgerHeader() *LedgerHeader
func (*LedgerCheckpoint) GetPrevLedgerHeaderHash ¶
func (m *LedgerCheckpoint) GetPrevLedgerHeaderHash() string
func (*LedgerCheckpoint) ProtoMessage ¶
func (*LedgerCheckpoint) ProtoMessage()
func (*LedgerCheckpoint) Reset ¶
func (m *LedgerCheckpoint) Reset()
func (*LedgerCheckpoint) String ¶
func (m *LedgerCheckpoint) String() string
type LedgerHeader ¶
type LedgerHeader struct { // Version of pb message, each time we update the pb message definition, the // version number will incremented. The specific version number to use is // hard coded and changed each time we do some changes. Version uint32 `protobuf:"varint,1,opt,name=Version" json:"Version,omitempty"` // Hash of the previous ledger. PrevLedgerHash string `protobuf:"bytes,2,opt,name=PrevLedgerHash" json:"PrevLedgerHash,omitempty"` // Hash of the transaction set in this ledger. TxSetHash string `protobuf:"bytes,3,opt,name=TxSetHash" json:"TxSetHash,omitempty"` // The consensus value the network agreed in hex coding string. ConsensusValue string `protobuf:"bytes,4,opt,name=ConsensusValue" json:"ConsensusValue,omitempty"` // Maximun number of transactions allowed in a transaction list. MaxTxListSize uint32 `protobuf:"varint,5,opt,name=MaxTxListSize" json:"MaxTxListSize,omitempty"` // Sequence number of this ledger. SeqNum uint64 `protobuf:"varint,6,opt,name=SeqNum" json:"SeqNum,omitempty"` // Total number of tokens in existence. TotalTokens int64 `protobuf:"varint,7,opt,name=TotalTokens" json:"TotalTokens,omitempty"` // Base fee per operation. BaseFee int64 `protobuf:"varint,8,opt,name=BaseFee" json:"BaseFee,omitempty"` // Base reserve for an account. BaseReserve int64 `protobuf:"varint,9,opt,name=BaseReserve" json:"BaseReserve,omitempty"` }
func DecodeLedgerHeader ¶
func DecodeLedgerHeader(b []byte) (*LedgerHeader, error)
Decode pb message to ledger header.
func (*LedgerHeader) Descriptor ¶
func (*LedgerHeader) Descriptor() ([]byte, []int)
func (*LedgerHeader) GetBaseFee ¶
func (m *LedgerHeader) GetBaseFee() int64
func (*LedgerHeader) GetBaseReserve ¶
func (m *LedgerHeader) GetBaseReserve() int64
func (*LedgerHeader) GetConsensusValue ¶
func (m *LedgerHeader) GetConsensusValue() string
func (*LedgerHeader) GetMaxTxListSize ¶
func (m *LedgerHeader) GetMaxTxListSize() uint32
func (*LedgerHeader) GetPrevLedgerHash ¶
func (m *LedgerHeader) GetPrevLedgerHash() string
func (*LedgerHeader) GetSeqNum ¶
func (m *LedgerHeader) GetSeqNum() uint64
func (*LedgerHeader) GetTotalTokens ¶
func (m *LedgerHeader) GetTotalTokens() int64
func (*LedgerHeader) GetTxSetHash ¶
func (m *LedgerHeader) GetTxSetHash() string
func (*LedgerHeader) GetVersion ¶
func (m *LedgerHeader) GetVersion() uint32
func (*LedgerHeader) ProtoMessage ¶
func (*LedgerHeader) ProtoMessage()
func (*LedgerHeader) Reset ¶
func (m *LedgerHeader) Reset()
func (*LedgerHeader) String ¶
func (m *LedgerHeader) String() string
type Liability ¶
type Liability struct { // Buying liability. Buying int64 `protobuf:"varint,1,opt,name=Buying" json:"Buying,omitempty"` // Selling liability. Selling int64 `protobuf:"varint,2,opt,name=Selling" json:"Selling,omitempty"` }
Account and Trust liabilities.
func (*Liability) Descriptor ¶
func (*Liability) GetSelling ¶
func (*Liability) ProtoMessage ¶
func (*Liability) ProtoMessage()
type Nominate ¶
type Nominate struct { VoteList []string `protobuf:"bytes,1,rep,name=VoteList" json:"VoteList,omitempty"` AcceptList []string `protobuf:"bytes,2,rep,name=AcceptList" json:"AcceptList,omitempty"` QuorumHash string `protobuf:"bytes,3,opt,name=QuorumHash" json:"QuorumHash,omitempty"` }
Nominate statement is used to find a candidate value for a specific decree.
func DecodeNominate ¶
Decode pb message to nominate statement
func (*Nominate) Descriptor ¶
func (*Nominate) GetAcceptList ¶
func (*Nominate) GetQuorumHash ¶
func (*Nominate) GetVoteList ¶
func (*Nominate) ProtoMessage ¶
func (*Nominate) ProtoMessage()
type Offer ¶
type Offer struct { // Seller of the offer. AccountID string `protobuf:"bytes,1,opt,name=AccountID" json:"AccountID,omitempty"` // ID of the offer. OfferID string `protobuf:"bytes,2,opt,name=OfferID" json:"OfferID,omitempty"` // Asset for selling. SellAsset *Asset `protobuf:"bytes,3,opt,name=SellAsset" json:"SellAsset,omitempty"` // Asset for buying. BuyAsset *Asset `protobuf:"bytes,4,opt,name=BuyAsset" json:"BuyAsset,omitempty"` // The amount of asset for selling. Amount int64 `protobuf:"varint,5,opt,name=Amount" json:"Amount,omitempty"` // The price of the selling asset in terms of buying asset. Price *Price `protobuf:"bytes,6,opt,name=Price" json:"Price,omitempty"` // Whether the offer is passive. Passive int32 `protobuf:"varint,7,opt,name=Passive" json:"Passive,omitempty"` }
func (*Offer) Descriptor ¶
func (*Offer) GetAccountID ¶
func (*Offer) GetBuyAsset ¶
func (*Offer) GetOfferID ¶
func (*Offer) GetPassive ¶
func (*Offer) GetSellAsset ¶
func (*Offer) ProtoMessage ¶
func (*Offer) ProtoMessage()
type OfferOp ¶
type OfferOp struct { // Asset for selling. SellingAsset *Asset `protobuf:"bytes,1,opt,name=SellingAsset" json:"SellingAsset,omitempty"` // Asset for buying. BuyingAsset *Asset `protobuf:"bytes,2,opt,name=BuyingAsset" json:"BuyingAsset,omitempty"` // The amount of asset for selling. Amount int64 `protobuf:"varint,3,opt,name=Amount" json:"Amount,omitempty"` // The price of selling asset in terms of buying asset in fractional format. // For instance, if the price = 3/4, then it means the price of one selling // asset is 3/4 buying asset. Price *Price `protobuf:"bytes,4,opt,name=Price" json:"Price,omitempty"` // ID of this offer, this field is empty for an new offer. OfferID string `protobuf:"bytes,5,opt,name=OfferID" json:"OfferID,omitempty"` // Whether the offer is passive. Passive int32 `protobuf:"varint,6,opt,name=Passive" json:"Passive,omitempty"` }
OfferOp creates an asset exchange offer to exchange specified asset pairs.
func (*OfferOp) Descriptor ¶
func (*OfferOp) GetBuyingAsset ¶
func (*OfferOp) GetOfferID ¶
func (*OfferOp) GetPassive ¶
func (*OfferOp) GetSellingAsset ¶
func (*OfferOp) ProtoMessage ¶
func (*OfferOp) ProtoMessage()
type Op ¶
type Op struct { OpType OpType `protobuf:"varint,1,opt,name=OpType,enum=ultpb.OpType" json:"OpType,omitempty"` // Types that are valid to be assigned to Op: // *Op_CreateAccount // *Op_Payment // *Op_PathPayment // *Op_Trust Op isOp_Op `protobuf_oneof:"Op"` }
Operation is the concrete way to mutate a account.
func (*Op) Descriptor ¶
func (*Op) GetCreateAccount ¶
func (m *Op) GetCreateAccount() *CreateAccountOp
func (*Op) GetPathPayment ¶
func (m *Op) GetPathPayment() *PathPaymentOp
func (*Op) GetPayment ¶
func (*Op) ProtoMessage ¶
func (*Op) ProtoMessage()
type OpType ¶
type OpType int32
Every operation is related to a specific account and each transaction could contain one or more operations.
func (OpType) EnumDescriptor ¶
type Op_CreateAccount ¶
type Op_CreateAccount struct {
CreateAccount *CreateAccountOp `protobuf:"bytes,2,opt,name=CreateAccount,oneof"`
}
type Op_PathPayment ¶
type Op_PathPayment struct {
PathPayment *PathPaymentOp `protobuf:"bytes,4,opt,name=PathPayment,oneof"`
}
type Op_Payment ¶
type Op_Payment struct {
Payment *PaymentOp `protobuf:"bytes,3,opt,name=Payment,oneof"`
}
type PathPaymentOp ¶
type PathPaymentOp struct { // Source asset to send. SrcAsset *Asset `protobuf:"bytes,1,opt,name=SrcAsset" json:"SrcAsset,omitempty"` // The amount of source asset to send. SrcAmount int64 `protobuf:"varint,2,opt,name=SrcAmount" json:"SrcAmount,omitempty"` // Destination account of the path payment. AccountID string `protobuf:"bytes,3,opt,name=AccountID" json:"AccountID,omitempty"` // Destination asset type. DstAsset *Asset `protobuf:"bytes,4,opt,name=DstAsset" json:"DstAsset,omitempty"` // Payment asset path. Path []*Asset `protobuf:"bytes,5,rep,name=Path" json:"Path,omitempty"` }
PathPaymentOp creates an peer-to-peer payment which could use multiple hops of asset exchanges to reach the deal by utilizing an intelligent asset exchanges path.
func (*PathPaymentOp) Descriptor ¶
func (*PathPaymentOp) Descriptor() ([]byte, []int)
func (*PathPaymentOp) GetAccountID ¶
func (m *PathPaymentOp) GetAccountID() string
func (*PathPaymentOp) GetDstAsset ¶
func (m *PathPaymentOp) GetDstAsset() *Asset
func (*PathPaymentOp) GetPath ¶
func (m *PathPaymentOp) GetPath() []*Asset
func (*PathPaymentOp) GetSrcAmount ¶
func (m *PathPaymentOp) GetSrcAmount() int64
func (*PathPaymentOp) GetSrcAsset ¶
func (m *PathPaymentOp) GetSrcAsset() *Asset
func (*PathPaymentOp) ProtoMessage ¶
func (*PathPaymentOp) ProtoMessage()
func (*PathPaymentOp) Reset ¶
func (m *PathPaymentOp) Reset()
func (*PathPaymentOp) String ¶
func (m *PathPaymentOp) String() string
type PaymentOp ¶
type PaymentOp struct { // Destination account of the payment. AccountID string `protobuf:"bytes,1,opt,name=AccountID" json:"AccountID,omitempty"` // Asset type of payment. Asset *Asset `protobuf:"bytes,2,opt,name=Asset" json:"Asset,omitempty"` // The amount of payment in specified asset type. Amount int64 `protobuf:"varint,3,opt,name=Amount" json:"Amount,omitempty"` }
PaymentOp creates an peer-to-peer payment from the source account to the destination account in specified asset type.
func DecodePaymentOp ¶
Decode pb message to PaymentOp
func (*PaymentOp) Descriptor ¶
func (*PaymentOp) GetAccountID ¶
func (*PaymentOp) ProtoMessage ¶
func (*PaymentOp) ProtoMessage()
type Prepare ¶
type Prepare struct { // Current working ballot. B *Ballot `protobuf:"bytes,1,opt,name=B" json:"B,omitempty"` // Two hightest ballots accepted as // prepared such as Q < P and Q ~ P. Q *Ballot `protobuf:"bytes,2,opt,name=Q" json:"Q,omitempty"` P *Ballot `protobuf:"bytes,3,opt,name=P" json:"P,omitempty"` // Counter of highest ballot confirmed as prepared. HC uint32 `protobuf:"varint,4,opt,name=HC" json:"HC,omitempty"` // Counter of lowest ballot confirmed as prepared. LC uint32 `protobuf:"varint,5,opt,name=LC" json:"LC,omitempty"` QuorumHash string `protobuf:"bytes,6,opt,name=QuorumHash" json:"QuorumHash,omitempty"` }
Prepare message for ballot protocol.
func DecodePrepare ¶
Decode pb message to ballot prepare statement
func (*Prepare) Descriptor ¶
func (*Prepare) GetQuorumHash ¶
func (*Prepare) ProtoMessage ¶
func (*Prepare) ProtoMessage()
type Price ¶
type Price struct { Numerator int64 `protobuf:"varint,1,opt,name=Numerator" json:"Numerator,omitempty"` Denominator int64 `protobuf:"varint,2,opt,name=Denominator" json:"Denominator,omitempty"` }
func (*Price) Descriptor ¶
func (*Price) GetDenominator ¶
func (*Price) GetNumerator ¶
func (*Price) ProtoMessage ¶
func (*Price) ProtoMessage()
type Quorum ¶
type Quorum struct { // We choose the threshold to be a floatint point number instead of // an integer to maintain a more conservative and safer // requirement of the quorum. For instance, if the threshold // is 0.6 and the number of validators is 7, the required number // of nodes needed to pass a decision would be 4.2 in floating point, // and we take the ceiling of the number to be the final required // integer threshold which is 5. As a result the requirement // is sticter than that to set the threshold to 4 in integer form. Threshold float64 `protobuf:"fixed64,1,opt,name=Threshold" json:"Threshold,omitempty"` Validators []string `protobuf:"bytes,2,rep,name=Validators" json:"Validators,omitempty"` NestQuorums []*Quorum `protobuf:"bytes,3,rep,name=NestQuorums" json:"NestQuorums,omitempty"` }
Each ULTNode is associated with a quorum, every message related to FBA consensus should contain the quorum of the node.
func (*Quorum) Descriptor ¶
func (*Quorum) GetNestQuorums ¶
func (*Quorum) GetThreshold ¶
func (*Quorum) GetValidators ¶
func (*Quorum) ProtoMessage ¶
func (*Quorum) ProtoMessage()
type Statement ¶
type Statement struct { StatementType StatementType `protobuf:"varint,1,opt,name=StatementType,enum=ultpb.StatementType" json:"StatementType,omitempty"` // Node ID of source node. NodeID string `protobuf:"bytes,2,opt,name=NodeID" json:"NodeID,omitempty"` // Decree index. Index uint64 `protobuf:"varint,3,opt,name=Index" json:"Index,omitempty"` // Types that are valid to be assigned to Stmt: // *Statement_Nominate // *Statement_Prepare // *Statement_Confirm // *Statement_Externalize Stmt isStatement_Stmt `protobuf_oneof:"Stmt"` }
func DecodeStatement ¶
Decode pb message to statement
func (*Statement) Descriptor ¶
func (*Statement) GetConfirm ¶
func (*Statement) GetExternalize ¶
func (m *Statement) GetExternalize() *Externalize
func (*Statement) GetNominate ¶
func (*Statement) GetPrepare ¶
func (*Statement) GetStatementType ¶
func (m *Statement) GetStatementType() StatementType
func (*Statement) ProtoMessage ¶
func (*Statement) ProtoMessage()
type StatementType ¶
type StatementType int32
Statement is an abstractive value for nodes to vote and reach consensus. Each statement type has its corresponding data encoded in pb and saved in Data field.
const ( StatementType_NOMINATE StatementType = 0 StatementType_PREPARE StatementType = 1 StatementType_CONFIRM StatementType = 2 StatementType_EXTERNALIZE StatementType = 3 )
func (StatementType) EnumDescriptor ¶
func (StatementType) EnumDescriptor() ([]byte, []int)
func (StatementType) String ¶
func (x StatementType) String() string
type Statement_Confirm ¶
type Statement_Confirm struct {
Confirm *Confirm `protobuf:"bytes,6,opt,name=Confirm,oneof"`
}
type Statement_Externalize ¶
type Statement_Externalize struct {
Externalize *Externalize `protobuf:"bytes,7,opt,name=Externalize,oneof"`
}
type Statement_Nominate ¶
type Statement_Nominate struct {
Nominate *Nominate `protobuf:"bytes,4,opt,name=Nominate,oneof"`
}
type Statement_Prepare ¶
type Statement_Prepare struct {
Prepare *Prepare `protobuf:"bytes,5,opt,name=Prepare,oneof"`
}
type Trust ¶
type Trust struct { // Owner of this trust. AccountID string `protobuf:"bytes,1,opt,name=AccountID" json:"AccountID,omitempty"` // Trusted asset. Asset *Asset `protobuf:"bytes,2,opt,name=Asset" json:"Asset,omitempty"` // Balance of the trusted asset. Balance int64 `protobuf:"varint,3,opt,name=Balance" json:"Balance,omitempty"` // Upper limit the balance of the trusted asset. Limit int64 `protobuf:"varint,4,opt,name=Limit" json:"Limit,omitempty"` // Liability of the trusted asset. Liability *Liability `protobuf:"bytes,5,opt,name=Liability" json:"Liability,omitempty"` // Whether the trust if authorized. Authorized int32 `protobuf:"varint,6,opt,name=Authorized" json:"Authorized,omitempty"` }
func (*Trust) Descriptor ¶
func (*Trust) GetAccountID ¶
func (*Trust) GetAuthorized ¶
func (*Trust) GetBalance ¶
func (*Trust) GetLiability ¶
func (*Trust) ProtoMessage ¶
func (*Trust) ProtoMessage()
type TrustOp ¶
type TrustOp struct { // Asset to trust. Asset *Asset `protobuf:"bytes,2,opt,name=Asset" json:"Asset,omitempty"` // Limit of the trustline. Limit int64 `protobuf:"varint,3,opt,name=Limit" json:"Limit,omitempty"` }
TrustOp creates a trustline for the source account to trust a custom asset issued by other account.
func (*TrustOp) Descriptor ¶
func (*TrustOp) ProtoMessage ¶
func (*TrustOp) ProtoMessage()
type Tx ¶
type Tx struct { // The source account for the transaction. AccountID string `protobuf:"bytes,1,opt,name=AccountID" json:"AccountID,omitempty"` // Fee of the transaction that the source account wishes to pay. Fee int64 `protobuf:"varint,2,opt,name=Fee" json:"Fee,omitempty"` // Extra note about the transaction. Note string `protobuf:"bytes,3,opt,name=Note" json:"Note,omitempty"` // Unique transaction sequence number, the number is used for // distinguishing transactions initiated from the same source // account. The number should be larger than the latest sequence // number of the confirmed transactions belong to the source account. SeqNum uint64 `protobuf:"varint,4,opt,name=SeqNum" json:"SeqNum,omitempty"` // List of operations. OpList []*Op `protobuf:"bytes,5,rep,name=OpList" json:"OpList,omitempty"` }
Tx is the abstraction of the concrete actions that the node will execute.
func (*Tx) Descriptor ¶
func (*Tx) GetAccountID ¶
func (*Tx) ProtoMessage ¶
func (*Tx) ProtoMessage()
type TxSet ¶
type TxSet struct { // Hash of previous closed ledger header. PrevLedgerHash string `protobuf:"bytes,1,opt,name=PrevLedgerHash" json:"PrevLedgerHash,omitempty"` // List of transactions. TxList []*Tx `protobuf:"bytes,2,rep,name=TxList" json:"TxList,omitempty"` }
TxSet is the container of a number of transactions that are waiting to be confirmed in consensus by the Ultiledger network.
func (*TxSet) Descriptor ¶
func (*TxSet) GetPrevLedgerHash ¶
func (*TxSet) ProtoMessage ¶
func (*TxSet) ProtoMessage()