Documentation ¶
Index ¶
- Constants
- func GenerateProof(r1cs frontend.CompiledConstraintSystem, provingKey groth16.ProvingKey, ...) (proof groth16.Proof, err error)
- func LoadProvingKey(filepath string) (pk groth16.ProvingKey, err error)
- func LoadVerifyingKey(filepath string) (verifyingKey groth16.VerifyingKey, err error)
- func SetFixedAccountArray(proof [][]byte) (res [AccountMerkleLevels][]byte, err error)
- func SetFixedAccountAssetArray(proof [][]byte) (res [AssetMerkleLevels][]byte, err error)
- func SetFixedNftArray(proof [][]byte) (res [NftMerkleLevels][]byte, err error)
- type AccountWitnessInfo
- type FormattedProof
- type GasWitness
- type NftWitnessInfo
- type TxWitness
- type WitnessHelper
Constants ¶
View Source
const ( NbAccountAssetsPerAccount = ctypes.NbAccountAssetsPerAccount NbAccountsPerTx = ctypes.NbAccountsPerTx AssetMerkleLevels = circuit.AssetMerkleLevels NftMerkleLevels = circuit.NftMerkleLevels AccountMerkleLevels = circuit.AccountMerkleLevels LastAccountIndex = circuit.LastAccountIndex LastAccountAssetId = circuit.LastAccountAssetId LastNftIndex = circuit.LastNftIndex )
Variables ¶
This section is empty.
Functions ¶
func GenerateProof ¶
func GenerateProof( r1cs frontend.CompiledConstraintSystem, provingKey groth16.ProvingKey, verifyingKey groth16.VerifyingKey, cBlock *circuit.Block, ) (proof groth16.Proof, err error)
func LoadProvingKey ¶
func LoadProvingKey(filepath string) (pk groth16.ProvingKey, err error)
func LoadVerifyingKey ¶
func LoadVerifyingKey(filepath string) (verifyingKey groth16.VerifyingKey, err error)
func SetFixedAccountArray ¶
func SetFixedAccountArray(proof [][]byte) (res [AccountMerkleLevels][]byte, err error)
func SetFixedAccountAssetArray ¶
func SetFixedAccountAssetArray(proof [][]byte) (res [AssetMerkleLevels][]byte, err error)
func SetFixedNftArray ¶
func SetFixedNftArray(proof [][]byte) (res [NftMerkleLevels][]byte, err error)
Types ¶
type AccountWitnessInfo ¶
type FormattedProof ¶
func FormatProof ¶
func FormatProof(oProof groth16.Proof, oldRoot, newRoot, commitment []byte) (proof *FormattedProof, err error)
type GasWitness ¶ added in v0.0.4
type NftWitnessInfo ¶
type WitnessHelper ¶
type WitnessHelper struct {
// contains filtered or unexported fields
}
func NewWitnessHelper ¶
func NewWitnessHelper(treeCtx *tree.Context, accountTree, nftTree bsmt.SparseMerkleTree, assetTrees *tree.AssetTreeCache, accountModel account.AccountModel, accountHistoryModel account.AccountHistoryModel) *WitnessHelper
func (*WitnessHelper) ConstructGasWitness ¶ added in v0.0.4
func (w *WitnessHelper) ConstructGasWitness(block *block.Block) (cryptoGas *GasWitness, err error)
func (*WitnessHelper) ConstructTxWitness ¶
func (*WitnessHelper) ResetCache ¶ added in v0.0.4
func (w *WitnessHelper) ResetCache(height int64) error
Click to show internal directories.
Click to hide internal directories.