Documentation
¶
Index ¶
- Variables
- func CheckValueInRange(api API, value Variable)
- func VerifyMerkleProof(api API, merkleRoot Variable, node Variable, proofSet, helper []Variable)
- type API
- type BatchCreateUserCircuit
- func NewBatchCreateUserCircuit(assetCounts uint32, batchCounts uint32) *BatchCreateUserCircuit
- func NewVerifyBatchCreateUserCircuit(commitment []byte) *BatchCreateUserCircuit
- func SetBatchCreateUserCircuitWitness(batchWitness *utils.BatchCreateUserWitness) (witness *BatchCreateUserCircuit, err error)
- type CexAssetInfo
- type CreateUserOperation
- type UserAssetInfo
- type Variable
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// is poseidon hash(empty account info)
EmptyAccountLeafNodeHash, _ = new(big.Int).SetString("221970e0ba2d0b02a979e616cf186305372e73aab1e74f749772c9fef54dbf91", 16)
)
Functions ¶
func CheckValueInRange ¶
check value is in [0, 2^64-1] range
Types ¶
type BatchCreateUserCircuit ¶
type BatchCreateUserCircuit struct { BatchCommitment Variable `gnark:",public"` BeforeAccountTreeRoot Variable AfterAccountTreeRoot Variable BeforeCEXAssetsCommitment Variable AfterCEXAssetsCommitment Variable BeforeCexAssets []CexAssetInfo CreateUserOps []CreateUserOperation }
func NewBatchCreateUserCircuit ¶
func NewBatchCreateUserCircuit(assetCounts uint32, batchCounts uint32) *BatchCreateUserCircuit
func NewVerifyBatchCreateUserCircuit ¶
func NewVerifyBatchCreateUserCircuit(commitment []byte) *BatchCreateUserCircuit
func SetBatchCreateUserCircuitWitness ¶
func SetBatchCreateUserCircuitWitness(batchWitness *utils.BatchCreateUserWitness) (witness *BatchCreateUserCircuit, err error)
func (BatchCreateUserCircuit) Define ¶
func (b BatchCreateUserCircuit) Define(api API) error
type CexAssetInfo ¶
type CreateUserOperation ¶
type CreateUserOperation struct { BeforeAccountTreeRoot Variable AfterAccountTreeRoot Variable Assets []UserAssetInfo AccountIndex Variable AccountIdHash Variable AccountProof [utils.AccountTreeDepth]Variable }
type UserAssetInfo ¶
type Variable ¶
func AccountIdToMerkleHelper ¶
func ComputeUserAssetsCommitment ¶
func ComputeUserAssetsCommitment(api API, assets []UserAssetInfo) Variable
Click to show internal directories.
Click to hide internal directories.