Documentation ¶
Index ¶
- Constants
- type CashTokensProof
- type Cashier
- func (c *Cashier) DecryptForPaidUser(encodedMetaData []byte, encryptedData []byte, reencryptPubKey []byte, ...) (*ReencryptedDataForPaidUser, error)
- func (c *Cashier) DecryptForTokenOwner(encodedMetaData []byte, encryptedData []byte, reencryptPubKey []byte, ...) (*ReencryptedDataForTokenOwner, error)
- func (c *Cashier) JudgeStochasticPayment(rawTx []byte) (*PaymentJudgment, error)
- func (c *Cashier) ProveCashTokensOwnership(txid string, vout uint32) (*CashTokensProof, error)
- type ICashier
- type LogInfo
- type PaymentJudgment
- type ReencryptedDataForPaidUser
- type ReencryptedDataForTokenOwner
- type TokenMetaData
Constants ¶
View Source
const (
PossibilityByteCount = 2 // bytes
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CashTokensProof ¶
type Cashier ¶
type Cashier struct {
// contains filtered or unexported fields
}
func NewCashier ¶
func NewCashier(bchClient bch.IBchClient, privKey *ecdsa.PrivateKey) *Cashier
func (*Cashier) DecryptForPaidUser ¶
func (*Cashier) DecryptForTokenOwner ¶
func (*Cashier) JudgeStochasticPayment ¶
func (c *Cashier) JudgeStochasticPayment(rawTx []byte) (*PaymentJudgment, error)
func (*Cashier) ProveCashTokensOwnership ¶
func (c *Cashier) ProveCashTokensOwnership(txid string, vout uint32) (*CashTokensProof, error)
type ICashier ¶
type ICashier interface { JudgeStochasticPayment(rawTx []byte) (*PaymentJudgment, error) ProveCashTokensOwnership(txid string, vout uint32) (*CashTokensProof, error) DecryptForTokenOwner(encodedMetaData []byte, encryptedData []byte, reencryptPubKey []byte, txid string, vout uint32) (*ReencryptedDataForTokenOwner, error) DecryptForPaidUser(encodedMetaData []byte, encryptedData []byte, reencryptPubKey []byte, rawTx []byte) (*ReencryptedDataForPaidUser, error) }
type LogInfo ¶
type LogInfo struct { ChainId *hexutil.Big `json:"chainId"` Timestamp *hexutil.Big `json:"timestamp"` Address common.Address `json:"address"` Topics []common.Hash `json:"topics"` Data hexutil.Bytes `json:"data"` }
LogInfo is copied from ElfinGuard
type PaymentJudgment ¶
type PaymentJudgment struct { Prob16 uint16 `json:"prob16"` Rand16 uint16 `json:"rand16"` VrfAlpha hexutil.Bytes `json:"vrfAlpha"` VrfBeta hexutil.Bytes `json:"vrfBeta"` VrfPi hexutil.Bytes `json:"vrfPi"` LogInfo hexutil.Bytes `json:"logInfo"` LogSig hexutil.Bytes `json:"logSig"` LogRaw LogInfo `json:"rawLog"` // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.