Documentation
¶
Index ¶
- Variables
- func IntegerDivision(_ *big.Int, in []*big.Int, out []*big.Int) error
- type API
- type BatchCreateUserCircuit
- func NewBatchCreateUserCircuit(userAssetCounts uint32, allAssetCounts uint32, batchCounts uint32) *BatchCreateUserCircuit
- func NewVerifyBatchCreateUserCircuit(commitment []byte) *BatchCreateUserCircuit
- func SetBatchCreateUserCircuitWitness(batchWitness *utils.BatchCreateUserWitness) (witness *BatchCreateUserCircuit, err error)
- type CexAssetInfo
- type CreateUserOperation
- type TierRatio
- type UserAssetInfo
- type UserAssetMeta
- type Variable
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// is poseidon hash(empty account info)
EmptyAccountLeafNodeHash, _ = new(big.Int).SetString("0f870d7404597dad9eca7c50a6f0af812ab7cd6a11d5c464d4031a3272377b95", 16)
)
Functions ¶
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(userAssetCounts uint32, allAssetCounts 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 AssetsForUpdateCex []UserAssetMeta AccountIndex Variable AccountIdHash Variable AccountProof [utils.AccountTreeDepth]Variable }
type UserAssetInfo ¶
type UserAssetInfo struct { AssetIndex Variable // The index means the position of tier ratios where the boundary value is larger than the collateral. LoanCollateralIndex Variable // If the flag is 1, the boundary value of last tier ratio is less than the collateral. LoanCollateralFlag Variable MarginCollateralIndex Variable MarginCollateralFlag Variable PortfolioMarginCollateralIndex Variable PortfolioMarginCollateralFlag Variable }
type UserAssetMeta ¶ added in v1.1.0
Click to show internal directories.
Click to hide internal directories.