Documentation ¶
Index ¶
- Constants
- Variables
- type Block
- type BlockBody
- type BlockHeader
- type BlockMetadata
- type BlockProof
- type BlockTransaction
- type Crypto
- type Log
- type Receipt
- type TransactParams
- type Transaction
- func (*Transaction) Descriptor() ([]byte, []int)
- func (m *Transaction) GetChainId() uint32
- func (m *Transaction) GetData() []byte
- func (m *Transaction) GetNonce() string
- func (m *Transaction) GetQuota() uint64
- func (m *Transaction) GetTo() string
- func (m *Transaction) GetValidUntilBlock() uint64
- func (m *Transaction) GetValue() uint64
- func (m *Transaction) GetVersion() uint32
- func (*Transaction) ProtoMessage()
- func (m *Transaction) Reset()
- func (m *Transaction) String() string
- func (m *Transaction) XXX_DiscardUnknown()
- func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Transaction) XXX_Merge(src proto.Message)
- func (m *Transaction) XXX_Size() int
- func (m *Transaction) XXX_Unmarshal(b []byte) error
- type TransactionStatus
- type UnverifiedTransaction
- func (*UnverifiedTransaction) Descriptor() ([]byte, []int)
- func (m *UnverifiedTransaction) GetCrypto() Crypto
- func (m *UnverifiedTransaction) GetSignature() []byte
- func (m *UnverifiedTransaction) GetTransaction() *Transaction
- func (*UnverifiedTransaction) ProtoMessage()
- func (m *UnverifiedTransaction) Reset()
- func (m *UnverifiedTransaction) String() string
- func (m *UnverifiedTransaction) XXX_DiscardUnknown()
- func (m *UnverifiedTransaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *UnverifiedTransaction) XXX_Merge(src proto.Message)
- func (m *UnverifiedTransaction) XXX_Size() int
- func (m *UnverifiedTransaction) XXX_Unmarshal(b []byte) error
Constants ¶
View Source
const AddressLength = 20
Variables ¶
View Source
var Crypto_name = map[int32]string{
0: "SECP",
1: "SM2",
}
View Source
var Crypto_value = map[string]int32{
"SECP": 0,
"SM2": 1,
}
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct { Version int `json:"version"` Hash string `json:"hash"` Header *BlockHeader `json:"header"` Body *BlockBody `json:"body"` }
type BlockBody ¶
type BlockBody struct {
Transactions []*BlockTransaction `json:"transactions"`
}
type BlockHeader ¶
type BlockHeader struct { Timestamp int64 `json:"timestamp"` PrevHash string `json:"prevHash"` Proof *BlockProof `json:"proof"` StateRoot string `json:"stateRoot"` TransactionsRoot string `json:"transactionsRoot"` ReceiptsRoot string `json:"receiptsRoot"` GasUsed string `json:"gasUsed"` Number string `json:"number"` Proposer string `json:"proposer"` }
type BlockMetadata ¶
type BlockProof ¶
type BlockTransaction ¶
type Log ¶
type Log struct { Address string `json:"address"` Topics []string `json:"topics"` Data string `json:"data"` BlockHash string `json:"blockHash"` BlockNumber string `json:"blockNumber"` TransactionHash string `json:"transactionHash"` TransactionIndex string `json:"transactionIndex"` LogIndex string `json:"logIndex"` TransactionLogIndex string `json:"transactionLogIndex"` }
type Receipt ¶
type Receipt struct { TransactionHash string `json:"transactionHash"` TransactionIndex string `json:"transactionIndex"` BlockHash string `json:"blockHash"` BlockNumber string `json:"blockNumber"` CumulativeGasUsed string `json:"cumulativeGasUsed"` GasUsed string `json:"gasUsed"` ContractAddress string `json:"contractAddress"` Logs []*Log `json:"logs"` Root string `json:"root"` LogsBloom string `json:"logsBloom"` ErrorMessage string `json:"errorMessage"` }
type TransactParams ¶
type TransactParams struct { HexPrivateKey string To string Nonce string ValidUntilBlock *big.Int Value *big.Int Quota *big.Int ChainID uint32 Version uint32 }
TransactParams is the collection of authorization data required to create a valid CITA transaction.
type Transaction ¶
type Transaction struct { To string `protobuf:"bytes,1,opt,name=to" json:"to,omitempty"` Nonce string `protobuf:"bytes,2,opt,name=nonce" json:"nonce,omitempty"` Quota uint64 `protobuf:"varint,3,opt,name=quota" json:"quota,omitempty"` ValidUntilBlock uint64 `protobuf:"varint,4,opt,name=valid_until_block,json=validUntilBlock" json:"valid_until_block,omitempty"` Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"` Value uint64 `protobuf:"varint,6,opt,name=value" json:"value,omitempty"` ChainId uint32 `protobuf:"varint,7,opt,name=chain_id,json=chainId" json:"chain_id,omitempty"` Version uint32 `protobuf:"varint,8,opt,name=version" json:"version,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Transaction) Descriptor ¶
func (*Transaction) Descriptor() ([]byte, []int)
func (*Transaction) GetChainId ¶
func (m *Transaction) GetChainId() uint32
func (*Transaction) GetData ¶
func (m *Transaction) GetData() []byte
func (*Transaction) GetNonce ¶
func (m *Transaction) GetNonce() string
func (*Transaction) GetQuota ¶
func (m *Transaction) GetQuota() uint64
func (*Transaction) GetTo ¶
func (m *Transaction) GetTo() string
func (*Transaction) GetValidUntilBlock ¶
func (m *Transaction) GetValidUntilBlock() uint64
func (*Transaction) GetValue ¶
func (m *Transaction) GetValue() uint64
func (*Transaction) GetVersion ¶
func (m *Transaction) GetVersion() uint32
func (*Transaction) ProtoMessage ¶
func (*Transaction) ProtoMessage()
func (*Transaction) Reset ¶
func (m *Transaction) Reset()
func (*Transaction) String ¶
func (m *Transaction) String() string
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 (dst *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 TransactionStatus ¶
type UnverifiedTransaction ¶
type UnverifiedTransaction struct { Transaction *Transaction `protobuf:"bytes,1,opt,name=transaction" json:"transaction,omitempty"` Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` Crypto Crypto `protobuf:"varint,3,opt,name=crypto,enum=proto.Crypto" json:"crypto,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*UnverifiedTransaction) Descriptor ¶
func (*UnverifiedTransaction) Descriptor() ([]byte, []int)
func (*UnverifiedTransaction) GetCrypto ¶
func (m *UnverifiedTransaction) GetCrypto() Crypto
func (*UnverifiedTransaction) GetSignature ¶
func (m *UnverifiedTransaction) GetSignature() []byte
func (*UnverifiedTransaction) GetTransaction ¶
func (m *UnverifiedTransaction) GetTransaction() *Transaction
func (*UnverifiedTransaction) ProtoMessage ¶
func (*UnverifiedTransaction) ProtoMessage()
func (*UnverifiedTransaction) Reset ¶
func (m *UnverifiedTransaction) Reset()
func (*UnverifiedTransaction) String ¶
func (m *UnverifiedTransaction) String() string
func (*UnverifiedTransaction) XXX_DiscardUnknown ¶
func (m *UnverifiedTransaction) XXX_DiscardUnknown()
func (*UnverifiedTransaction) XXX_Marshal ¶
func (m *UnverifiedTransaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UnverifiedTransaction) XXX_Merge ¶
func (dst *UnverifiedTransaction) XXX_Merge(src proto.Message)
func (*UnverifiedTransaction) XXX_Size ¶
func (m *UnverifiedTransaction) XXX_Size() int
func (*UnverifiedTransaction) XXX_Unmarshal ¶
func (m *UnverifiedTransaction) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.