Documentation
¶
Index ¶
- func ComputeBalanceTree(client *ethclient.Client, bridgeAddress common.Address, l2RawClaims []byte, ...) (common.Hash, map[string]*big.Int, error)
- func ComputeNullifierTree(rawClaims []byte) (common.Hash, error)
- func FromBool(b bool) common.Hash
- func FromU256(u *big.Int) common.Hash
- func GetBalanceTreeData(opts *BalanceTreeOptions) ([]byte, []byte, error)
- func GetInputData(args []string, fileName string) ([]byte, error)
- func IsMessageClaim(input []byte) (bool, error)
- func Uint32ToBytesLittleEndian(num uint32) []byte
- type BalanceTreeOptions
- type Balancer
- type FileOptions
- type Node
- type Nullifier
- type NullifierKey
- type TokenInfo
- type Tree
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeBalanceTree ¶
func ComputeBalanceTree(client *ethclient.Client, bridgeAddress common.Address, l2RawClaims []byte, l2NetworkID uint32, l2RawDeposits []byte) (common.Hash, map[string]*big.Int, error)
computeBalanceTree computes the balance tree root from claims and deposits data
func ComputeNullifierTree ¶
computeNullifierTree computes the nullifier tree root from raw claims data
func GetBalanceTreeData ¶
func GetBalanceTreeData(opts *BalanceTreeOptions) ([]byte, []byte, error)
getBalanceTreeData reads the claims and deposits files
func GetInputData ¶
getInputData reads input data from file, args, or stdin
func IsMessageClaim ¶
Types ¶
type BalanceTreeOptions ¶
type BalanceTreeOptions struct {
L2ClaimsFile, L2DepositsFile, BridgeAddress, RpcURL string
L2NetworkID uint32
Insecure bool
}
BalanceTreeOptions holds options for the balance tree command
type Balancer ¶
type Balancer struct {
// contains filtered or unexported fields
}
func NewBalanceTree ¶
type FileOptions ¶
type FileOptions struct {
FileName string
}
FileOptions holds options for file input
type Nullifier ¶
type Nullifier struct {
// contains filtered or unexported fields
}
func NewNullifierTree ¶
func (*Nullifier) UpdateNullifierTree ¶
func (n *Nullifier) UpdateNullifierTree(nullifier NullifierKey) (common.Hash, error)
type NullifierKey ¶
NullifierKey struct
func (*NullifierKey) ToBits ¶
func (n *NullifierKey) ToBits() []bool
Directories
¶
| Path | Synopsis |
|---|---|
|
Package balance provides the compute-balance-tree command.
|
Package balance provides the compute-balance-tree command. |
|
Package combined provides the compute-balance-nullifier-tree command.
|
Package combined provides the compute-balance-nullifier-tree command. |
|
Package nullifier provides the compute-nullifier-tree command.
|
Package nullifier provides the compute-nullifier-tree command. |
Click to show internal directories.
Click to hide internal directories.