Documentation ¶
Index ¶
- func Check(e error)
- func CompareCommitment(u *Commitment, v *Commitment) bool
- func DecodeAccount(accStr string) (*PublicKey, *Commitment, error)
- func DecodePoints(bytes []byte) (*r255.Element, *r255.Element)
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func ScalarFromBytes(b [32]byte) (*r255.Scalar, error)
- type Commitment
- type Keeper
- func (k Keeper) DeductFeeFromPrivatePool(ctx sdk.Context, fee uint64) error
- func (k Keeper) GetMintOrBurnTradingBtc(ctx sdk.Context, twilightAddress string) ([]types.MsgMintBurnTradingBtc, bool)
- func (k Keeper) GetNextUnlockingReserve(ctx sdk.Context) (*uint64, *volttypes.BtcReserve, error)
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) GetTransferTx(ctx sdk.Context, txId string) (types.MsgTransferTx, bool)
- func (k Keeper) HasUsedQqAccount(ctx sdk.Context, QqAccount string) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MarkQqAccountAsUsed(ctx sdk.Context, QqAccount string)
- func (k Keeper) MintOrBurnTradingBtc(goCtx context.Context, req *types.QueryMintOrBurnTradingBtcRequest) (*types.QueryMintOrBurnTradingBtcResponse, error)
- func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) SetMintOrBurnTradingBtc(ctx sdk.Context, msg *types.MsgMintBurnTradingBtc) error
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetTransferTx(ctx sdk.Context, txId string, txByteCode string, txFee uint64, ...)
- func (k Keeper) TransferTx(goCtx context.Context, req *types.QueryTransferTxRequest) (*types.QueryTransferTxResponse, error)
- type PublicKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareCommitment ¶
func CompareCommitment(u *Commitment, v *Commitment) bool
CompareCommitment compares two commitments
func DecodeAccount ¶
func DecodeAccount(accStr string) (*PublicKey, *Commitment, error)
DecodeAccount returns the Pk and Commitment reconstructed from hex
func DecodePoints ¶
DecodePoints returns the underlying Ristretto Points reconstructed from the concatenated byte array
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type Commitment ¶
Commitment struct
func GenerateCommitment ¶
GenerateCommitment creates commitment over balance c = k*g (where k is a random scalar) d = vG + kh (where v is balance, G is base point, k is random scalar and h is grsk generated in pk)
type Keeper ¶
type Keeper struct { VoltKeeper *voltkeeper.Keeper BankKeeper types.BankKeeper // contains filtered or unexported fields }
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey storetypes.StoreKey, ps paramtypes.Subspace, voltKeeper *voltkeeper.Keeper, bankKeeper types.BankKeeper, ) *Keeper
func (Keeper) DeductFeeFromPrivatePool ¶
DeductFeeFromPrivatePool deducts the fee from the private pool in the reserve and adds it to the fee pool
func (Keeper) GetMintOrBurnTradingBtc ¶
func (k Keeper) GetMintOrBurnTradingBtc(ctx sdk.Context, twilightAddress string) ([]types.MsgMintBurnTradingBtc, bool)
GetMintOrBurnTradingBtc returns the stored mint or burn quisquis btc using given twilight address
func (Keeper) GetNextUnlockingReserve ¶
GetNextUnlockingReserve returns the next reserve id to be unlocked
func (Keeper) GetTransferTx ¶
GetTransferTx returns the stored transfer tx using given txId
func (Keeper) HasUsedQqAccount ¶
HasUsedQqAccount checks if a QqAccount was used before
func (Keeper) MarkQqAccountAsUsed ¶
MarkQqAccountAsUsed saves the used Qqaccount in a new KV store to avoid being reused
func (Keeper) MintOrBurnTradingBtc ¶
func (k Keeper) MintOrBurnTradingBtc(goCtx context.Context, req *types.QueryMintOrBurnTradingBtcRequest) (*types.QueryMintOrBurnTradingBtcResponse, error)
func (Keeper) Params ¶
func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) SetMintOrBurnTradingBtc ¶
SetMintOrBurnTradingBtc mints or burns quisquis btc
func (Keeper) SetTransferTx ¶
func (k Keeper) SetTransferTx(ctx sdk.Context, txId string, txByteCode string, txFee uint64, zkOracleAddress string)
SetTransferTx sets the transfer tx
func (Keeper) TransferTx ¶
func (k Keeper) TransferTx(goCtx context.Context, req *types.QueryTransferTxRequest) (*types.QueryTransferTxResponse, error)