Documentation ¶
Index ¶
- func CreateCustomTokenPrivacyReceiverArrayV2(dataReceiver interface{}) ([]*privacy.PaymentInfo, int64, error)
- type Tx
- func (tx Tx) CheckCMExistence(cm []byte, stateDB *statedb.StateDB, shardID byte, tokenID *common.Hash) (bool, error)
- func (tx *Tx) CheckData(db *statedb.StateDB) error
- func (tx *Tx) GetReceiverData() ([]privacy.Coin, error)
- func (tx Tx) GetTxActualSize() uint64
- func (tx Tx) GetTxBurnData() (bool, privacy.Coin, *common.Hash, error)
- func (tx Tx) GetTxFullBurnData() (bool, privacy.Coin, privacy.Coin, *common.Hash, error)
- func (tx Tx) GetTxMintData() (bool, privacy.Coin, *common.Hash, error)
- func (tx *Tx) Init(paramsInterface interface{}) error
- func (tx *Tx) InitForASM(params *TxPrivacyInitParamsForASM) error
- func (tx *Tx) InitTxSalary(salary uint64, receiverAddr *privacy.PaymentAddress, ...) error
- func (tx *Tx) LoadData(db *statedb.StateDB) error
- func (tx *Tx) Sign(sigPrivakey []byte) error
- func (tx Tx) ValidateSanityData(chainRetriever metadata.ChainRetriever, ...) (bool, error)
- func (tx *Tx) ValidateSanityDataByItSelf() (bool, error)
- func (tx *Tx) ValidateSanityDataWithBlockchain(chainRetriever metadata.ChainRetriever, ...) (bool, error)
- func (tx Tx) ValidateTransaction(boolParams map[string]bool, transactionStateDB *statedb.StateDB, ...) (bool, []privacy.Proof, error)
- func (tx Tx) ValidateTxByItself(boolParams map[string]bool, transactionStateDB *statedb.StateDB, ...) (bool, error)
- func (tx *Tx) ValidateTxCorrectness(transactionStateDB *statedb.StateDB) (bool, error)
- func (tx Tx) ValidateTxSalary(db *statedb.StateDB) (bool, error)
- func (tx *Tx) ValidateTxWithBlockChain(chainRetriever metadata.ChainRetriever, ...) error
- func (tx *Tx) Verify(boolParams map[string]bool, transactionStateDB *statedb.StateDB, ...) (bool, error)
- func (tx Tx) VerifyMinerCreatedTxBeforeGettingInBlock(mintdata *metadata.MintData, shardID byte, bcr metadata.ChainRetriever, ...) (bool, error)
- func (tx *Tx) VerifySigTx() (bool, error)
- type TxPrivacyInitParamsForASM
- type TxPrivacyTokenInitParamsForASM
- type TxToken
- func (tx *TxToken) CheckData(db *statedb.StateDB) error
- func (tx TxToken) GetTxActualSize() uint64
- func (tx *TxToken) Init(paramsInterface interface{}) error
- func (tx *TxToken) InitForASM(params *TxPrivacyTokenInitParamsForASM, serverTime int64) error
- func (tx TxToken) ListOTAHashH() []common.Hash
- func (tx *TxToken) LoadData(db *statedb.StateDB) error
- func (tx *TxToken) UnmarshalJSON(data []byte) error
- func (tx TxToken) ValidateSanityData(chainRetriever metadata.ChainRetriever, ...) (bool, error)
- func (tx *TxToken) ValidateSanityDataByItSelf() (bool, error)
- func (tx *TxToken) ValidateSanityDataWithBlockchain(chainRetriever metadata.ChainRetriever, ...) (bool, error)
- func (tx TxToken) ValidateTransaction(boolParams map[string]bool, transactionStateDB *statedb.StateDB, ...) (bool, []privacy.Proof, error)
- func (tx TxToken) ValidateTxByItself(boolParams map[string]bool, transactionStateDB *statedb.StateDB, ...) (bool, error)
- func (tx *TxToken) ValidateTxCorrectness(transactionStateDB *statedb.StateDB) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCustomTokenPrivacyReceiverArrayV2 ¶
func CreateCustomTokenPrivacyReceiverArrayV2(dataReceiver interface{}) ([]*privacy.PaymentInfo, int64, error)
CreateCustomTokenReceiverArray - parse data frm rpc request to create a list vout for preparing to create a custom token tx data interface is a map[paymentt-address]{transferring-amount}
Types ¶
type Tx ¶
type Tx struct {
tx_generic.TxBase
}
func (Tx) CheckCMExistence ¶
func (tx Tx) CheckCMExistence(cm []byte, stateDB *statedb.StateDB, shardID byte, tokenID *common.Hash) (bool, error)
CheckCMExistence returns true if cm exists in cm list
func (Tx) GetTxActualSize ¶
func (Tx) GetTxFullBurnData ¶
func (*Tx) InitForASM ¶
func (tx *Tx) InitForASM(params *TxPrivacyInitParamsForASM) error
TODO PRIVACY, WILL DO THIS LATER BECAUSE IT IS ASM
func (*Tx) InitTxSalary ¶
func (Tx) ValidateSanityData ¶
func (tx Tx) ValidateSanityData(chainRetriever metadata.ChainRetriever, shardViewRetriever metadata.ShardViewRetriever, beaconViewRetriever metadata.BeaconViewRetriever, beaconHeight uint64) (bool, error)
func (*Tx) ValidateSanityDataByItSelf ¶
func (*Tx) ValidateSanityDataWithBlockchain ¶
func (tx *Tx) ValidateSanityDataWithBlockchain( chainRetriever metadata.ChainRetriever, shardViewRetriever metadata.ShardViewRetriever, beaconViewRetriever metadata.BeaconViewRetriever, beaconHeight uint64, ) ( bool, error, )
func (Tx) ValidateTransaction ¶
func (Tx) ValidateTxByItself ¶
func (*Tx) ValidateTxCorrectness ¶
func (Tx) ValidateTxSalary ¶
ValidateTxSalary checks the following conditions for salary transactions (s, rs):
- the signature is valid
- the number of output coins is 1
- all fields of the output coins are valid
- the snd has not existed
- the commitment has been calculated correctly
func (*Tx) ValidateTxWithBlockChain ¶
func (tx *Tx) ValidateTxWithBlockChain(chainRetriever metadata.ChainRetriever, shardViewRetriever metadata.ShardViewRetriever, beaconViewRetriever metadata.BeaconViewRetriever, shardID byte, stateDB *statedb.StateDB) error
func (Tx) VerifyMinerCreatedTxBeforeGettingInBlock ¶
func (tx Tx) VerifyMinerCreatedTxBeforeGettingInBlock(mintdata *metadata.MintData, shardID byte, bcr metadata.ChainRetriever, accumulatedValues *metadata.AccumulatedValues, retriever metadata.ShardViewRetriever, viewRetriever metadata.BeaconViewRetriever) (bool, error)
func (*Tx) VerifySigTx ¶
VerifySigTx - verify signature on tx
type TxPrivacyInitParamsForASM ¶
type TxPrivacyInitParamsForASM struct {
// contains filtered or unexported fields
}
func NewTxPrivacyInitParamsForASM ¶
func NewTxPrivacyInitParamsForASM( senderSK *privacy.PrivateKey, paymentInfo []*privacy.PaymentInfo, inputCoins []privacy.PlainCoin, fee uint64, hasPrivacy bool, tokenID *common.Hash, metaData metadata.Metadata, info []byte, commitmentIndices []uint64, commitmentBytes [][]byte, myCommitmentIndices []uint64, sndOutputs []*privacy.Scalar) *TxPrivacyInitParamsForASM
func (*TxPrivacyInitParamsForASM) SetMetaData ¶
func (param *TxPrivacyInitParamsForASM) SetMetaData(meta metadata.Metadata)
type TxPrivacyTokenInitParamsForASM ¶
type TxPrivacyTokenInitParamsForASM struct {
// contains filtered or unexported fields
}
func NewTxPrivacyTokenInitParamsForASM ¶
func NewTxPrivacyTokenInitParamsForASM( senderKey *privacy.PrivateKey, paymentInfo []*privacy.PaymentInfo, inputCoin []privacy.PlainCoin, feeNativeCoin uint64, tokenParams *tx_generic.TokenParam, metaData metadata.Metadata, hasPrivacyCoin bool, hasPrivacyToken bool, shardID byte, info []byte, commitmentIndicesForNativeToken []uint64, commitmentBytesForNativeToken [][]byte, myCommitmentIndicesForNativeToken []uint64, sndOutputsForNativeToken []*privacy.Scalar, commitmentIndicesForPToken []uint64, commitmentBytesForPToken [][]byte, myCommitmentIndicesForPToken []uint64, sndOutputsForPToken []*privacy.Scalar) *TxPrivacyTokenInitParamsForASM
func (*TxPrivacyTokenInitParamsForASM) SetMetaData ¶
func (param *TxPrivacyTokenInitParamsForASM) SetMetaData(meta metadata.Metadata)
type TxToken ¶
type TxToken struct {
tx_generic.TxTokenBase
}
func (TxToken) GetTxActualSize ¶
func (*TxToken) InitForASM ¶
func (tx *TxToken) InitForASM(params *TxPrivacyTokenInitParamsForASM, serverTime int64) error
TODO Privacy, WILL DO THIS LATER BECAUSE IT IS ASM Init - build normal tx component and privacy custom token data
func (TxToken) ListOTAHashH ¶
func (*TxToken) UnmarshalJSON ¶
func (TxToken) ValidateSanityData ¶
func (tx TxToken) ValidateSanityData(chainRetriever metadata.ChainRetriever, shardViewRetriever metadata.ShardViewRetriever, beaconViewRetriever metadata.BeaconViewRetriever, beaconHeight uint64) (bool, error)
func (*TxToken) ValidateSanityDataByItSelf ¶
func (*TxToken) ValidateSanityDataWithBlockchain ¶
func (tx *TxToken) ValidateSanityDataWithBlockchain( chainRetriever metadata.ChainRetriever, shardViewRetriever metadata.ShardViewRetriever, beaconViewRetriever metadata.BeaconViewRetriever, beaconHeight uint64, ) ( bool, error, )
func (TxToken) ValidateTransaction ¶
func (TxToken) ValidateTxByItself ¶
Click to show internal directories.
Click to hide internal directories.