Documentation ¶
Index ¶
- Constants
- func ComputeHash(message string, pubX *big.Int, pubY *big.Int) (rX, rY, s, hashX *big.Int)
- func FindCollision(message string, rX *big.Int, rY *big.Int, s *big.Int, hashX *big.Int, ...) (newRX, newRY, newS *big.Int)
- func ReadUserAttrs(filename string) *abe.UserAttrs
- type BlockTransactions
- type DatabaseHashItem
- type ItemCount
- type ItemDigest
- type PubParams
- type QueryAccountNonceReply
- type QueryAccountNonceRequest
- type QueryByBlockNumberReply
- type QueryByBlockNumberRequest
- type QueryCountsByOneReply
- type QueryCountsByOneRequest
- type QueryDatabaseItem
- type QueryDatabaseItemReply
- type QueryDatabaseItemRequest
- type QueryRawTransactionReply
- type QueryRawTransactionRequest
- type QueryTransactionTypeReply
- type QueryTransactionTypeRequest
- type RawTransaction
- type RegulatorKey
- type SpectrumItem
- type SpectrumTransaction
- type SubmitDatabaseHashTransaction
Constants ¶
View Source
const ( ErrorNoError = 0 ErrorInvalidDigest = 1 ErrorInvalidSignature = 2 ErrorInvalidRawTransaction = 3 ErrorNoPermission = 4 ErrorRawTransactionReplayAttack = 5 ErrorInvalidSubmitDatabaseHashTransaction = 6 ErrorInvalidQuery = 7 ErrorNoSuchPath = 8 )
View Source
const ( TransactionDataUnknown = 0 TransactionDataOriginalData = 1 TransactionDataMetaData = 2 TransactionDataRegulatorData = 3 TransactionDataChangedData = 4 )
View Source
const ( TransactionUnknown = 0 TransactionSubmitDatabaseHashTransaction = 1 TransactionSpectrumTransaction = 2 )
Variables ¶
This section is empty.
Functions ¶
func ComputeHash ¶
func FindCollision ¶
func ReadUserAttrs ¶
Types ¶
type BlockTransactions ¶
type BlockTransactions struct {
ContentDigests []ItemDigest `json:"content_digests"`
}
type DatabaseHashItem ¶
type DatabaseHashItem SubmitDatabaseHashTransaction
type ItemDigest ¶
type ItemDigest struct {
ContentDigest string `json:"content-digest"`
}
type PubParams ¶
type QueryAccountNonceReply ¶
type QueryAccountNonceReply struct {
Nonce uint64 `json:"nonce"`
}
type QueryAccountNonceRequest ¶
type QueryAccountNonceRequest struct {
Account string `json:"account"`
}
type QueryByBlockNumberReply ¶
type QueryByBlockNumberReply struct { Existed bool `json:"existed"` Item []ItemDigest `json:"contentdigest"` }
type QueryByBlockNumberRequest ¶
type QueryByBlockNumberRequest struct {
BLockNumber int64 `json:"block_number"`
}
query by block number
type QueryCountsByOneReply ¶
type QueryCountsByOneRequest ¶
type QueryCountsByOneRequest struct {
One int64 `json:"query_counts"`
}
type QueryDatabaseItem ¶
type QueryDatabaseItem DatabaseHashItem
type QueryDatabaseItemReply ¶
type QueryDatabaseItemReply struct { Existed bool `json:"existed"` Item *QueryDatabaseItem `json:"item"` }
type QueryRawTransactionReply ¶
type QueryRawTransactionReply struct { Existed bool `json:"existed"` Item *RawTransaction `json:"rawtransction"` }
type QueryRawTransactionRequest ¶
type QueryRawTransactionRequest struct {
ContentDigest string `json:"content_digest"`
}
type QueryTransactionTypeReply ¶
type QueryTransactionTypeReply struct {
Item []ItemDigest `json:"contentdigests"`
}
type QueryTransactionTypeRequest ¶
type QueryTransactionTypeRequest struct {
DataType int64 `json:"transaction_datatype"`
}
can be 0 to 4
type RawTransaction ¶
type RawTransaction struct { TxDataType uint32 `json:"tx_data_type"` Type uint32 `json:"type"` Nonce []byte `json:"nonce"` Content []byte `json:"content"` // json string of a particular transaction HashMethod string `json:"hash_method"` ContentDigest []byte `json:"content_digest"` // sha256 or chameleon of Value SignMethod string `json:"sign_method"` Signature []byte `json:"signature"` // the signature of ValueHash PublicKey []byte `json:"public_key"` // the corresponding public key of the signature, ed25519 ChameleonRx []byte `json:"chameleon_hash_rx"` ChameleonRy []byte `json:"chameleon_hash_rY"` ChameleonS []byte `json:"chameleon_hash_s"` ChameleonPubx []byte `json:"chameleon_hash_pubX"` ChameleonPuby []byte `json:"chameleon_hash_pubY"` ChameleonPriv []byte `json:"chameleon_hash_priv"` //encryption }
func ChangeRawTransaction ¶
func ChangeRawTransaction(txNonce uint64, privKey ed25519.PrivKey, oldTransaction *RawTransaction, newMessage []byte, RePri []byte) (*RawTransaction, error)
func NewRawTransaction ¶
func (*RawTransaction) GetAccount ¶
func (self *RawTransaction) GetAccount() (string, error)
func (*RawTransaction) GetNonceAsNumber ¶
func (self *RawTransaction) GetNonceAsNumber() uint64
func (*RawTransaction) GetPublicKey ¶
func (self *RawTransaction) GetPublicKey() (crypto.PubKey, error)
func (*RawTransaction) VerifyHash ¶
func (self *RawTransaction) VerifyHash() (bool, error)
func (*RawTransaction) VerifySignature ¶
func (self *RawTransaction) VerifySignature() (bool, error)
type RegulatorKey ¶
type SpectrumItem ¶
type SpectrumItem SpectrumTransaction
type SpectrumTransaction ¶
Click to show internal directories.
Click to hide internal directories.