Documentation
¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type BaseUTXOKeeper
- func (bk *BaseUTXOKeeper) LockUTXO(ctx sdk.Context, hash string, vout uint64) error
- func (bk *BaseUTXOKeeper) LockUTXOs(ctx sdk.Context, utxos []*types.UTXO) error
- func (bk *BaseUTXOKeeper) SaveUTXO(ctx sdk.Context, utxo *types.UTXO)
- func (bk *BaseUTXOKeeper) SetOwnerRunesUTXO(ctx sdk.Context, utxo *types.UTXO, id string, amount string)
- func (bk *BaseUTXOKeeper) SetOwnerUTXO(ctx sdk.Context, utxo *types.UTXO)
- func (bk *BaseUTXOKeeper) SetOwnerUTXOByAmount(ctx sdk.Context, utxo *types.UTXO)
- func (bk *BaseUTXOKeeper) SetUTXO(ctx sdk.Context, utxo *types.UTXO)
- func (bk *BaseUTXOKeeper) SpendUTXO(ctx sdk.Context, hash string, vout uint64) error
- func (bk *BaseUTXOKeeper) SpendUTXOs(ctx sdk.Context, utxos []*types.UTXO) error
- func (bk *BaseUTXOKeeper) UnlockUTXO(ctx sdk.Context, hash string, vout uint64) error
- func (bk *BaseUTXOKeeper) UnlockUTXOs(ctx sdk.Context, utxos []*types.UTXO) error
- type BaseUTXOViewKeeper
- func (bvk *BaseUTXOViewKeeper) GetAllUTXOs(ctx sdk.Context) []*types.UTXO
- func (bvk *BaseUTXOViewKeeper) GetMinimumUTXOInAmount(ctx sdk.Context, addr string) *types.UTXO
- func (bvk *BaseUTXOViewKeeper) GetTargetRunesUTXOs(ctx sdk.Context, addr string, runeId string, targetAmount uint128.Uint128, ...) ([]*types.UTXO, []*types.RuneBalance)
- func (bvk *BaseUTXOViewKeeper) GetTargetRunesUTXOsByAddrAndThreshold(ctx sdk.Context, addr string, runeId string, threshold uint128.Uint128, ...) ([]*types.UTXO, []*types.RuneBalance)
- func (bvk *BaseUTXOViewKeeper) GetUTXO(ctx sdk.Context, hash string, vout uint64) *types.UTXO
- func (bvk *BaseUTXOViewKeeper) GetUTXOIteratorByAddr(ctx sdk.Context, addr string) types.UTXOIterator
- func (bvk *BaseUTXOViewKeeper) GetUTXOsByAddr(ctx sdk.Context, addr string) []*types.UTXO
- func (bvk *BaseUTXOViewKeeper) GetUnlockedUTXOCountAndBalancesByAddr(ctx sdk.Context, addr string) (uint32, int64, []*types.RuneBalance)
- func (bvk *BaseUTXOViewKeeper) GetUnlockedUTXOsByAddr(ctx sdk.Context, addr string) []*types.UTXO
- func (bvk *BaseUTXOViewKeeper) GetUnlockedUTXOsByAddrAndThreshold(ctx sdk.Context, addr string, threshold int64, maxNum uint32) []*types.UTXO
- func (bvk *BaseUTXOViewKeeper) HasUTXO(ctx sdk.Context, hash string, vout uint64) bool
- func (bvk *BaseUTXOViewKeeper) IsUTXOLocked(ctx sdk.Context, hash string, vout uint64) bool
- func (bvk *BaseUTXOViewKeeper) IterateAllUTXOs(ctx sdk.Context, cb func(utxo *types.UTXO) (stop bool))
- func (bvk *BaseUTXOViewKeeper) IterateRunesUTXOs(ctx sdk.Context, addr string, id string, ...)
- func (bvk *BaseUTXOViewKeeper) IterateRunesUTXOsReverse(ctx sdk.Context, addr string, id string, ...)
- func (bvk *BaseUTXOViewKeeper) IterateUTXOsByAddr(ctx sdk.Context, addr string, cb func(utxo *types.UTXO) (stop bool))
- func (bvk *BaseUTXOViewKeeper) IterateUTXOsByTxHash(ctx sdk.Context, hash string, cb func(utxo *types.UTXO) (stop bool))
- func (bvk *BaseUTXOViewKeeper) IterateUnlockedUTXOsByAddr(ctx sdk.Context, addr string, ...)
- type Keeper
- func (k Keeper) AddToBtcWithdrawRequestQueue(ctx sdk.Context, req *types.WithdrawRequest)
- func (k Keeper) AfterDeposit(ctx sdk.Context, addr string) error
- func (k Keeper) AfterWithdraw(ctx sdk.Context, txHash string) error
- func (k Keeper) BtcDenom(ctx sdk.Context) string
- func (k Keeper) BuildBtcBatchWithdrawSigningRequest(ctx sdk.Context, withdrawRequests []*types.WithdrawRequest, feeRate int64, ...) (*types.SigningRequest, error)
- func (k Keeper) BuildTransferVaultBtcSigningRequest(ctx sdk.Context, sourceVault *types.Vault, destVault *types.Vault, ...) (*types.SigningRequest, error)
- func (k Keeper) BuildTransferVaultRunesSigningRequest(ctx sdk.Context, sourceVault *types.Vault, destVault *types.Vault, ...) (*types.SigningRequest, error)
- func (k Keeper) BuildWithdrawBtcTx(ctx sdk.Context, sender string, amount sdk.Coin, feeRate int64, vault string) (*psbt.Packet, error)
- func (k Keeper) BuildWithdrawRunesTx(ctx sdk.Context, sender string, amount sdk.Coin, feeRate int64, vault string, ...) (*psbt.Packet, error)
- func (k Keeper) BuildWithdrawTx(ctx sdk.Context, sender string, amount sdk.Coin, feeRate int64) (*psbt.Packet, error)
- func (k Keeper) BurnAsset(ctx sdk.Context, address string, amount sdk.Coin) error
- func (k Keeper) BurnBtcNetworkFee(ctx sdk.Context, sender string, packet string) error
- func (k Keeper) CalcTotalWork(ctx sdk.Context, startHeight uint64, endHeight uint64) *big.Int
- func (k Keeper) CheckFeeRate(ctx sdk.Context, feeRate *types.FeeRate) error
- func (k Keeper) CheckVaults(ctx sdk.Context, vaults []string, vaultTypes []types.AssetType) error
- func (k Keeper) CompleteDKG(ctx sdk.Context, req *types.DKGCompletionRequest) error
- func (k Keeper) ConsolidateVaults(ctx sdk.Context, vaultVersion uint64, btcConsolidation *types.BtcConsolidation, ...) error
- func (k Keeper) DepositConfirmationDepth(ctx sdk.Context) int32
- func (k Keeper) DepositEnabled(ctx sdk.Context) bool
- func (k Keeper) EmitEvent(ctx sdk.Context, sender string, attr ...sdk.Attribute)
- func (k Keeper) EstimateWithdrawalNetworkFee(ctx sdk.Context, address string, amount sdk.Coin, feeRate int64) (sdk.Coin, error)
- func (k Keeper) FilterSigningRequestsByAddr(ctx sdk.Context, req *types.QuerySigningRequestsByAddressRequest) []*types.SigningRequest
- func (k Keeper) FilterSigningRequestsByStatus(ctx sdk.Context, req *types.QuerySigningRequestsRequest) ([]*types.SigningRequest, *query.PageResponse, error)
- func (k Keeper) GetAllBlockHeaders(ctx sdk.Context) []*types.BlockHeader
- func (k Keeper) GetAllDKGRequests(ctx sdk.Context) []*types.DKGRequest
- func (k Keeper) GetBestBlockHeader(ctx sdk.Context) *types.BlockHeader
- func (k Keeper) GetBlockHashByHeight(ctx sdk.Context, height uint64) string
- func (k Keeper) GetBlockHeader(ctx sdk.Context, hash string) *types.BlockHeader
- func (k Keeper) GetBlockHeaderByHeight(ctx sdk.Context, height uint64) *types.BlockHeader
- func (k Keeper) GetDKGCompletionRequests(ctx sdk.Context, id uint64) []*types.DKGCompletionRequest
- func (k Keeper) GetDKGRequest(ctx sdk.Context, id uint64) *types.DKGRequest
- func (k Keeper) GetDKGRequestExpirationTime(ctx sdk.Context) *time.Time
- func (k Keeper) GetDKGRequests(ctx sdk.Context, status types.DKGRequestStatus) []*types.DKGRequest
- func (k Keeper) GetFeeRate(ctx sdk.Context) *types.FeeRate
- func (k Keeper) GetLatestVaultVersion(ctx sdk.Context) uint64
- func (k Keeper) GetMaxUtxoNum(ctx sdk.Context) int
- func (keeper Keeper) GetNextDKGRequestID(ctx sdk.Context) uint64
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) GetPendingBtcWithdrawRequests(ctx sdk.Context, maxNum uint32) []*types.WithdrawRequest
- func (k Keeper) GetPendingDKGRequests(ctx sdk.Context) []*types.DKGRequest
- func (k Keeper) GetSigningRequest(ctx sdk.Context, sequence uint64) *types.SigningRequest
- func (k Keeper) GetSigningRequestByTxHash(ctx sdk.Context, hash string) *types.SigningRequest
- func (k Keeper) GetSigningRequestSequence(ctx sdk.Context) uint64
- func (k Keeper) GetVaultByAssetTypeAndVersion(ctx sdk.Context, assetType types.AssetType, version uint64) *types.Vault
- func (k Keeper) GetVaultVersionByAddress(ctx sdk.Context, address string) (uint64, bool)
- func (k Keeper) GetWithdrawRequest(ctx sdk.Context, sequence uint64) *types.WithdrawRequest
- func (k Keeper) GetWithdrawRequestSequence(ctx sdk.Context) uint64
- func (k Keeper) GetWithdrawRequestsByAddress(ctx sdk.Context, address string) []*types.WithdrawRequest
- func (k Keeper) GetWithdrawRequestsByTxHash(ctx sdk.Context, txHash string) []*types.WithdrawRequest
- func (k Keeper) HandleBtcWithdrawal(ctx sdk.Context, sender string, amount sdk.Coin) (*types.WithdrawRequest, error)
- func (k Keeper) HandleRunesWithdrawal(ctx sdk.Context, sender string, amount sdk.Coin) (*types.WithdrawRequest, error)
- func (k Keeper) HandleWithdrawal(ctx sdk.Context, sender string, amount sdk.Coin) (*types.WithdrawRequest, error)
- func (k Keeper) HasDKGCompletionRequest(ctx sdk.Context, id uint64, consAddress string) bool
- func (k Keeper) HasSigningRequest(ctx sdk.Context, sequence uint64) bool
- func (k Keeper) HasSigningRequestByTxHash(ctx sdk.Context, hash string) bool
- func (k Keeper) IncreaseVaultVersion(ctx sdk.Context) uint64
- func (k Keeper) IncreaseWithdrawRequestSequence(ctx sdk.Context) uint64
- func (k Keeper) IncrementSigningRequestSequence(ctx sdk.Context) uint64
- func (k Keeper) InitiateDKG(ctx sdk.Context, participants []*types.DKGParticipant, threshold uint32, ...) (*types.DKGRequest, error)
- func (k Keeper) InsertBlockHeaders(ctx sdk.Context, blockHeaders []*types.BlockHeader) error
- func (k Keeper) IsTrustedBtcRelayer(ctx sdk.Context, addr string) bool
- func (k Keeper) IsTrustedFeeProvider(ctx sdk.Context, addr string) bool
- func (k Keeper) IsTrustedNonBtcRelayer(ctx sdk.Context, addr string) bool
- func (k Keeper) IterateBlockHeaders(ctx sdk.Context, process func(header types.BlockHeader) (stop bool))
- func (k Keeper) IterateBtcWithdrawRequestQueue(ctx sdk.Context, cb func(req *types.WithdrawRequest) (stop bool))
- func (k Keeper) IterateDKGCompletionRequests(ctx sdk.Context, id uint64, ...)
- func (k Keeper) IterateDKGRequests(ctx sdk.Context, cb func(req *types.DKGRequest) (stop bool))
- func (k Keeper) IterateSigningRequests(ctx sdk.Context, cb func(signingRequest *types.SigningRequest) (stop bool))
- func (k Keeper) IterateWithdrawRequests(ctx sdk.Context, cb func(req *types.WithdrawRequest) (stop bool))
- func (k Keeper) IterateWithdrawRequestsByTxHash(ctx sdk.Context, txHash string, ...)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MaxReorgDepth(ctx sdk.Context) int32
- func (k Keeper) Mint(ctx sdk.Context, sender string, tx *btcutil.Tx, prevTx *btcutil.Tx, ...) (types.AssetType, btcutil.Address, error)
- func (k Keeper) NewRunesSigningRequest(ctx sdk.Context, sender string, amount sdk.Coin, feeRate int64, vault string, ...) (*types.SigningRequest, error)
- func (k Keeper) NewWithdrawRequest(ctx sdk.Context, sender string, amount string) *types.WithdrawRequest
- func (k Keeper) ProcessBitcoinDepositTransaction(ctx sdk.Context, msg *types.MsgSubmitDepositTransaction) (*chainhash.Hash, btcutil.Address, error)
- func (k Keeper) ProcessBitcoinWithdrawTransaction(ctx sdk.Context, msg *types.MsgSubmitWithdrawTransaction) (*chainhash.Hash, error)
- func (k Keeper) ProtocolDepositFeeEnabled(ctx sdk.Context) bool
- func (k Keeper) ProtocolFeeCollector(ctx sdk.Context) string
- func (k Keeper) ProtocolWithdrawFeeEnabled(ctx sdk.Context) bool
- func (k Keeper) QueryAllDKGRequests(goCtx context.Context, req *types.QueryAllDKGRequestsRequest) (*types.QueryAllDKGRequestsResponse, error)
- func (k Keeper) QueryBlockHeaderByHash(goCtx context.Context, req *types.QueryBlockHeaderByHashRequest) (*types.QueryBlockHeaderByHashResponse, error)
- func (k Keeper) QueryBlockHeaderByHeight(goCtx context.Context, req *types.QueryBlockHeaderByHeightRequest) (*types.QueryBlockHeaderByHeightResponse, error)
- func (k Keeper) QueryChainTip(goCtx context.Context, req *types.QueryChainTipRequest) (*types.QueryChainTipResponse, error)
- func (k Keeper) QueryDKGCompletionRequests(goCtx context.Context, req *types.QueryDKGCompletionRequestsRequest) (*types.QueryDKGCompletionRequestsResponse, error)
- func (k Keeper) QueryDKGRequest(goCtx context.Context, req *types.QueryDKGRequestRequest) (*types.QueryDKGRequestResponse, error)
- func (k Keeper) QueryDKGRequests(goCtx context.Context, req *types.QueryDKGRequestsRequest) (*types.QueryDKGRequestsResponse, error)
- func (k Keeper) QueryFeeRate(goCtx context.Context, req *types.QueryFeeRateRequest) (*types.QueryFeeRateResponse, error)
- func (k Keeper) QueryParams(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) QueryPendingBtcWithdrawRequests(goCtx context.Context, req *types.QueryPendingBtcWithdrawRequestsRequest) (*types.QueryPendingBtcWithdrawRequestsResponse, error)
- func (k Keeper) QuerySigningRequest(goCtx context.Context, req *types.QuerySigningRequestRequest) (*types.QuerySigningRequestResponse, error)
- func (k Keeper) QuerySigningRequestByTxHash(goCtx context.Context, req *types.QuerySigningRequestByTxHashRequest) (*types.QuerySigningRequestByTxHashResponse, error)
- func (k Keeper) QuerySigningRequests(goCtx context.Context, req *types.QuerySigningRequestsRequest) (*types.QuerySigningRequestsResponse, error)
- func (k Keeper) QuerySigningRequestsByAddress(goCtx context.Context, req *types.QuerySigningRequestsByAddressRequest) (*types.QuerySigningRequestsByAddressResponse, error)
- func (k Keeper) QueryUTXOCountAndBalancesByAddress(goCtx context.Context, req *types.QueryUTXOCountAndBalancesByAddressRequest) (*types.QueryUTXOCountAndBalancesByAddressResponse, error)
- func (k Keeper) QueryUTXOs(goCtx context.Context, req *types.QueryUTXOsRequest) (*types.QueryUTXOsResponse, error)
- func (k Keeper) QueryUTXOsByAddress(goCtx context.Context, req *types.QueryUTXOsByAddressRequest) (*types.QueryUTXOsByAddressResponse, error)
- func (k Keeper) QueryWithdrawRequestsByAddress(goCtx context.Context, req *types.QueryWithdrawRequestsByAddressRequest) (*types.QueryWithdrawRequestsByAddressResponse, error)
- func (k Keeper) QueryWithdrawRequestsByTxHash(goCtx context.Context, req *types.QueryWithdrawRequestsByTxHashRequest) (*types.QueryWithdrawRequestsByTxHashResponse, error)
- func (k Keeper) QueryWithdrawalNetworkFee(goCtx context.Context, req *types.QueryWithdrawalNetworkFeeRequest) (*types.QueryWithdrawalNetworkFeeResponse, error)
- func (k Keeper) RemoveFromBtcWithdrawRequestQueue(ctx sdk.Context, req *types.WithdrawRequest)
- func (k Keeper) RemoveSigningRequestStatus(ctx sdk.Context, sequence uint64)
- func (k Keeper) SetBestBlockHeader(ctx sdk.Context, header *types.BlockHeader)
- func (k Keeper) SetBlockHeader(ctx sdk.Context, header *types.BlockHeader)
- func (k Keeper) SetBlockHeaders(ctx sdk.Context, headers []*types.BlockHeader)
- func (k Keeper) SetDKGCompletionRequest(ctx sdk.Context, req *types.DKGCompletionRequest)
- func (k Keeper) SetDKGRequest(ctx sdk.Context, req *types.DKGRequest)
- func (keeper Keeper) SetDKGRequestID(ctx sdk.Context, id uint64)
- func (k Keeper) SetFeeRate(ctx sdk.Context, feeRate int64)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetSigningRequest(ctx sdk.Context, signingRequest *types.SigningRequest)
- func (k Keeper) SetSigningRequestStatus(ctx sdk.Context, sequence uint64, status types.SigningStatus)
- func (k Keeper) SetVaultVersion(ctx sdk.Context, version uint64)
- func (k Keeper) SetWithdrawRequest(ctx sdk.Context, req *types.WithdrawRequest)
- func (k Keeper) SetWithdrawRequestByTxHash(ctx sdk.Context, req *types.WithdrawRequest)
- func (k Keeper) TransferVault(ctx sdk.Context, sourceVersion uint64, destVersion uint64, ...) error
- func (k Keeper) UpdateVaults(ctx sdk.Context, newVaults []string, vaultTypes []types.AssetType)
- func (k Keeper) ValidateTransaction(ctx sdk.Context, txBytes string, prevTxBytes string, blockHash string, ...) (*btcutil.Tx, *btcutil.Tx, error)
- func (k Keeper) VaultTransferCompleted(ctx sdk.Context, vault string) bool
- func (k Keeper) VaultsTransferCompleted(ctx sdk.Context, version uint64) bool
- func (k Keeper) WithdrawConfirmationDepth(ctx sdk.Context) int32
- func (k Keeper) WithdrawEnabled(ctx sdk.Context) bool
- type UTXOIterator
- type UTXOKeeper
- type UTXOViewKeeper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type BaseUTXOKeeper ¶
type BaseUTXOKeeper struct {
BaseUTXOViewKeeper
// contains filtered or unexported fields
}
func NewBaseUTXOKeeper ¶
func NewBaseUTXOKeeper(cdc codec.BinaryCodec, storeKey storetypes.StoreKey) *BaseUTXOKeeper
func (*BaseUTXOKeeper) SaveUTXO ¶
func (bk *BaseUTXOKeeper) SaveUTXO(ctx sdk.Context, utxo *types.UTXO)
SaveUTXO saves the given utxo Intended to be used out of the module, such as genesis import
func (*BaseUTXOKeeper) SetOwnerRunesUTXO ¶
func (*BaseUTXOKeeper) SetOwnerUTXO ¶
func (bk *BaseUTXOKeeper) SetOwnerUTXO(ctx sdk.Context, utxo *types.UTXO)
func (*BaseUTXOKeeper) SetOwnerUTXOByAmount ¶
func (bk *BaseUTXOKeeper) SetOwnerUTXOByAmount(ctx sdk.Context, utxo *types.UTXO)
func (*BaseUTXOKeeper) SetUTXO ¶
func (bk *BaseUTXOKeeper) SetUTXO(ctx sdk.Context, utxo *types.UTXO)
func (*BaseUTXOKeeper) SpendUTXOs ¶
func (*BaseUTXOKeeper) UnlockUTXO ¶
func (*BaseUTXOKeeper) UnlockUTXOs ¶
type BaseUTXOViewKeeper ¶
type BaseUTXOViewKeeper struct {
// contains filtered or unexported fields
}
func NewBaseUTXOViewKeeper ¶
func NewBaseUTXOViewKeeper(cdc codec.BinaryCodec, storeKey storetypes.StoreKey) *BaseUTXOViewKeeper
func (*BaseUTXOViewKeeper) GetAllUTXOs ¶
func (bvk *BaseUTXOViewKeeper) GetAllUTXOs(ctx sdk.Context) []*types.UTXO
func (*BaseUTXOViewKeeper) GetMinimumUTXOInAmount ¶
GetMinimumUTXOInAmount gets the utxo with the minimum amount
func (*BaseUTXOViewKeeper) GetTargetRunesUTXOs ¶
func (bvk *BaseUTXOViewKeeper) GetTargetRunesUTXOs(ctx sdk.Context, addr string, runeId string, targetAmount uint128.Uint128, maxNum int) ([]*types.UTXO, []*types.RuneBalance)
GetTargetRunesUTXOs gets the unlocked runes utxos targeted by the given params
func (*BaseUTXOViewKeeper) GetTargetRunesUTXOsByAddrAndThreshold ¶
func (bvk *BaseUTXOViewKeeper) GetTargetRunesUTXOsByAddrAndThreshold(ctx sdk.Context, addr string, runeId string, threshold uint128.Uint128, maxNum uint32) ([]*types.UTXO, []*types.RuneBalance)
GetTargetRunesUTXOsByAddrAndThreshold gets the unlocked runes utxos that satisfy the maximum threshold for the specified rune id by the given address and maximum number Note: return all satisfying utxos if the maximum number set to 0
func (*BaseUTXOViewKeeper) GetUTXOIteratorByAddr ¶
func (bvk *BaseUTXOViewKeeper) GetUTXOIteratorByAddr(ctx sdk.Context, addr string) types.UTXOIterator
func (*BaseUTXOViewKeeper) GetUTXOsByAddr ¶
func (*BaseUTXOViewKeeper) GetUnlockedUTXOCountAndBalancesByAddr ¶
func (bvk *BaseUTXOViewKeeper) GetUnlockedUTXOCountAndBalancesByAddr(ctx sdk.Context, addr string) (uint32, int64, []*types.RuneBalance)
func (*BaseUTXOViewKeeper) GetUnlockedUTXOsByAddr ¶
func (*BaseUTXOViewKeeper) GetUnlockedUTXOsByAddrAndThreshold ¶
func (bvk *BaseUTXOViewKeeper) GetUnlockedUTXOsByAddrAndThreshold(ctx sdk.Context, addr string, threshold int64, maxNum uint32) []*types.UTXO
GetUnlockedUTXOsByAddrAndThreshold gets the unlocked utxos that satisfy the maximum threshold by the given address and maximum number Note: return all satisfying utxos if the maximum number set to 0
func (*BaseUTXOViewKeeper) IsUTXOLocked ¶
IsUTXOLocked returns true if the given utxo is locked, false otherwise. Note: it returns false if the given utxo does not exist.
func (*BaseUTXOViewKeeper) IterateAllUTXOs ¶
func (*BaseUTXOViewKeeper) IterateRunesUTXOs ¶
func (*BaseUTXOViewKeeper) IterateRunesUTXOsReverse ¶
func (*BaseUTXOViewKeeper) IterateUTXOsByAddr ¶
func (*BaseUTXOViewKeeper) IterateUTXOsByTxHash ¶
func (*BaseUTXOViewKeeper) IterateUnlockedUTXOsByAddr ¶
type Keeper ¶
type Keeper struct {
BaseUTXOKeeper
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey storetypes.StoreKey, bankKeeper types.BankKeeper, stakingKeeper types.StakingKeeper, incentiveKeeper types.IncentiveKeeper, authority string, ) *Keeper
func (Keeper) AddToBtcWithdrawRequestQueue ¶
func (k Keeper) AddToBtcWithdrawRequestQueue(ctx sdk.Context, req *types.WithdrawRequest)
AddToBtcWithdrawRequestQueue adds the given btc withdrawal request to the pending queue
func (Keeper) AfterDeposit ¶
AfterDeposit performs the extended logic after deposit
func (Keeper) AfterWithdraw ¶
AfterWithdraw performs the extended logic after withdrawal
func (Keeper) BuildBtcBatchWithdrawSigningRequest ¶
func (k Keeper) BuildBtcBatchWithdrawSigningRequest(ctx sdk.Context, withdrawRequests []*types.WithdrawRequest, feeRate int64, vault string) (*types.SigningRequest, error)
BuildBtcBatchWithdrawSigningRequest builds the signing request for btc batch withdrawal
func (Keeper) BuildTransferVaultBtcSigningRequest ¶
func (k Keeper) BuildTransferVaultBtcSigningRequest(ctx sdk.Context, sourceVault *types.Vault, destVault *types.Vault, targetUtxoNum uint32, feeRate int64) (*types.SigningRequest, error)
BuildTransferVaultBtcSigningRequest builds the signing request to transfer btc of the given vault
func (Keeper) BuildTransferVaultRunesSigningRequest ¶
func (k Keeper) BuildTransferVaultRunesSigningRequest(ctx sdk.Context, sourceVault *types.Vault, destVault *types.Vault, targetUtxoNum uint32, feeRate int64) (*types.SigningRequest, error)
BuildTransferVaultRunesSigningRequest builds the signing request to transfer runes of the given vault
func (Keeper) BuildWithdrawBtcTx ¶
func (k Keeper) BuildWithdrawBtcTx(ctx sdk.Context, sender string, amount sdk.Coin, feeRate int64, vault string) (*psbt.Packet, error)
BuildWithdrawBtcTx builds the bitcoin tx for the btc withdrawal
func (Keeper) BuildWithdrawRunesTx ¶
func (k Keeper) BuildWithdrawRunesTx(ctx sdk.Context, sender string, amount sdk.Coin, feeRate int64, vault string, btcVault string) (*psbt.Packet, error)
BuildWithdrawRunesTx builds the bitcoin tx for the runes withdrawal
func (Keeper) BuildWithdrawTx ¶
func (k Keeper) BuildWithdrawTx(ctx sdk.Context, sender string, amount sdk.Coin, feeRate int64) (*psbt.Packet, error)
BuildWithdrawTx builds the bitcoin tx for the given withdrawal
func (Keeper) BurnBtcNetworkFee ¶
BurnBtcNetworkFee burns the bitcoin network fee of the withdrawal psbt
func (Keeper) CalcTotalWork ¶
CalcTotalWork calculates the total work of the given range of block headers
func (Keeper) CheckFeeRate ¶
CheckFeeRate checks the given fee rate
func (Keeper) CheckVaults ¶
CheckVaults checks if the provided vaults are valid
func (Keeper) CompleteDKG ¶
CompleteDKG completes the DKG request by the DKG participant The DKG request will be completed when all participants submit the valid completion request before timeout
func (Keeper) ConsolidateVaults ¶
func (k Keeper) ConsolidateVaults(ctx sdk.Context, vaultVersion uint64, btcConsolidation *types.BtcConsolidation, runesConsolidations []*types.RunesConsolidation) error
ConsolidateVaults performs the UTXO consolidation for the given vaults
func (Keeper) DepositConfirmationDepth ¶
DepositConfirmationDepth gets the confirmation depth for deposit transactions
func (Keeper) DepositEnabled ¶
DepositEnabled returns true if deposit enabled, false otherwise
func (Keeper) EstimateWithdrawalNetworkFee ¶
func (k Keeper) EstimateWithdrawalNetworkFee(ctx sdk.Context, address string, amount sdk.Coin, feeRate int64) (sdk.Coin, error)
EstimateBtcNetworkFee estimates the btc network fee for the given withdrawal
func (Keeper) FilterSigningRequestsByAddr ¶
func (k Keeper) FilterSigningRequestsByAddr(ctx sdk.Context, req *types.QuerySigningRequestsByAddressRequest) []*types.SigningRequest
FilterSigningRequestsByAddr filters signing requests by address with pagination
func (Keeper) FilterSigningRequestsByStatus ¶
func (k Keeper) FilterSigningRequestsByStatus(ctx sdk.Context, req *types.QuerySigningRequestsRequest) ([]*types.SigningRequest, *query.PageResponse, error)
FilterSigningRequestsByStatus filters signing requests by status with pagination
func (Keeper) GetAllBlockHeaders ¶
func (k Keeper) GetAllBlockHeaders(ctx sdk.Context) []*types.BlockHeader
GetAllBlockHeaders returns all block headers
func (Keeper) GetAllDKGRequests ¶
func (k Keeper) GetAllDKGRequests(ctx sdk.Context) []*types.DKGRequest
GetAllDKGRequests gets all DKG requests
func (Keeper) GetBestBlockHeader ¶
func (k Keeper) GetBestBlockHeader(ctx sdk.Context) *types.BlockHeader
func (Keeper) GetBlockHashByHeight ¶
func (Keeper) GetBlockHeader ¶
func (Keeper) GetBlockHeaderByHeight ¶
func (Keeper) GetDKGCompletionRequests ¶
GetDKGCompletionRequests gets DKG completion requests by the given id
func (Keeper) GetDKGRequest ¶
GetDKGRequest gets the DKG request by the given id
func (Keeper) GetDKGRequestExpirationTime ¶
GetDKGRequestExpirationTime gets the expiration time of the DKG request
func (Keeper) GetDKGRequests ¶
func (k Keeper) GetDKGRequests(ctx sdk.Context, status types.DKGRequestStatus) []*types.DKGRequest
GetDKGRequests gets the DKG requests by the given status
func (Keeper) GetFeeRate ¶
GetFeeRate gets the bitcoin network fee rate
func (Keeper) GetLatestVaultVersion ¶
GetLatestVaultVersion gets the latest vault version
func (Keeper) GetMaxUtxoNum ¶
GetMaxUtxoNum gets the maximum utxo number for the signing request
func (Keeper) GetNextDKGRequestID ¶
GetNextDKGRequestID gets the next DKG request ID
func (Keeper) GetPendingBtcWithdrawRequests ¶
func (k Keeper) GetPendingBtcWithdrawRequests(ctx sdk.Context, maxNum uint32) []*types.WithdrawRequest
GetPendingBtcWithdrawRequests gets the pending btc withdrawal requests up to the given maximum number
func (Keeper) GetPendingDKGRequests ¶
func (k Keeper) GetPendingDKGRequests(ctx sdk.Context) []*types.DKGRequest
GetPendingDKGRequests gets the pending DKG requests
func (Keeper) GetSigningRequest ¶
GetSigningRequest returns the withdrawal request by the given sequence
func (Keeper) GetSigningRequestByTxHash ¶
GetSigningRequestByTxHash returns the signing request by the given hash
func (Keeper) GetSigningRequestSequence ¶
GetSigningRequestSequence returns the signing request sequence
func (Keeper) GetVaultByAssetTypeAndVersion ¶
func (k Keeper) GetVaultByAssetTypeAndVersion(ctx sdk.Context, assetType types.AssetType, version uint64) *types.Vault
GetVaultByAssetTypeAndVersion gets the vault by the given asset type and version
func (Keeper) GetVaultVersionByAddress ¶
GetVaultVersionByAddress gets the vault version of the given address
func (Keeper) GetWithdrawRequest ¶
GetWithdrawRequest gets the withdrawal request by the given sequence
func (Keeper) GetWithdrawRequestSequence ¶
GetWithdrawRequestSequence gets the withdrawal request sequence
func (Keeper) GetWithdrawRequestsByAddress ¶
func (k Keeper) GetWithdrawRequestsByAddress(ctx sdk.Context, address string) []*types.WithdrawRequest
GetWithdrawRequestsByAddress gets the withdrawal requests by the given address
func (Keeper) GetWithdrawRequestsByTxHash ¶
func (k Keeper) GetWithdrawRequestsByTxHash(ctx sdk.Context, txHash string) []*types.WithdrawRequest
GetWithdrawRequestsByTxHash gets the withdrawal requests by the given tx hash
func (Keeper) HandleBtcWithdrawal ¶
func (k Keeper) HandleBtcWithdrawal(ctx sdk.Context, sender string, amount sdk.Coin) (*types.WithdrawRequest, error)
HandleBtcWithdrawal handles the given btc withdrawal request Btc withdrawal request will be dispatched to the batch withdrawal queue which is handled periodically
func (Keeper) HandleRunesWithdrawal ¶
func (k Keeper) HandleRunesWithdrawal(ctx sdk.Context, sender string, amount sdk.Coin) (*types.WithdrawRequest, error)
HandleRunesWithdrawal handles the given runes withdrawal request Runes withdrawal will generate a signing request immediately
func (Keeper) HandleWithdrawal ¶
func (k Keeper) HandleWithdrawal(ctx sdk.Context, sender string, amount sdk.Coin) (*types.WithdrawRequest, error)
HandleWithdrawal handles the given withdrawal request
func (Keeper) HasDKGCompletionRequest ¶
HasDKGCompletionRequest returns true if the given completion request exists, false otherwise
func (Keeper) HasSigningRequest ¶
HasSigningRequest returns true if the given signing request exists, false otherwise
func (Keeper) HasSigningRequestByTxHash ¶
HasSigningRequestByTxHash returns true if the given withdrawal request exists, false otherwise
func (Keeper) IncreaseVaultVersion ¶
IncreaseVaultVersion increases the vault version by 1
func (Keeper) IncreaseWithdrawRequestSequence ¶
IncreaseWithdrawRequestSequence increases the withdrawal request sequence by 1
func (Keeper) IncrementSigningRequestSequence ¶
IncrementSigningRequestSequence increments the signing request sequence and returns the new sequence
func (Keeper) InitiateDKG ¶
func (k Keeper) InitiateDKG(ctx sdk.Context, participants []*types.DKGParticipant, threshold uint32, vaultTypes []types.AssetType, enableTransfer bool, targetUtxoNum uint32) (*types.DKGRequest, error)
InitiateDKG initiates the DKG request by the specified params
func (Keeper) InsertBlockHeaders ¶
func (Keeper) IsTrustedBtcRelayer ¶
IsTrustedBtcRelayer returns true if the given address is a trusted btc relayer, false otherwise
func (Keeper) IsTrustedFeeProvider ¶
IsTrustedFeeProvider returns true if the given address is a trusted fee provider, false otherwise
func (Keeper) IsTrustedNonBtcRelayer ¶
IsTrustedNonBtcRelayer returns true if the given address is a trusted non-btc relayer, false otherwise
func (Keeper) IterateBlockHeaders ¶
func (k Keeper) IterateBlockHeaders(ctx sdk.Context, process func(header types.BlockHeader) (stop bool))
IterateBlockHeaders iterates through all block headers
func (Keeper) IterateBtcWithdrawRequestQueue ¶
func (k Keeper) IterateBtcWithdrawRequestQueue(ctx sdk.Context, cb func(req *types.WithdrawRequest) (stop bool))
IterateBtcWithdrawRequestQueue iterates through the btc withdrawal request queue
func (Keeper) IterateDKGCompletionRequests ¶
func (k Keeper) IterateDKGCompletionRequests(ctx sdk.Context, id uint64, cb func(req *types.DKGCompletionRequest) (stop bool))
IterateDKGCompletionRequests iterates through all DKG completion requests by the given id
func (Keeper) IterateDKGRequests ¶
IterateDKGRequests iterates through all DKG requests
func (Keeper) IterateSigningRequests ¶
func (k Keeper) IterateSigningRequests(ctx sdk.Context, cb func(signingRequest *types.SigningRequest) (stop bool))
IterateSigningRequests iterates through all signing requests
func (Keeper) IterateWithdrawRequests ¶
func (k Keeper) IterateWithdrawRequests(ctx sdk.Context, cb func(req *types.WithdrawRequest) (stop bool))
IterateWithdrawRequests iterates through all withdrawal requests
func (Keeper) IterateWithdrawRequestsByTxHash ¶
func (k Keeper) IterateWithdrawRequestsByTxHash(ctx sdk.Context, txHash string, cb func(req *types.WithdrawRequest) (stop bool))
IterateWithdrawRequestsByTxHash iterates through all withdrawal requests by the given tx hash
func (Keeper) MaxReorgDepth ¶
MaxReorgDepth gets the allowed maximum reorg depth
func (Keeper) Mint ¶
func (k Keeper) Mint(ctx sdk.Context, sender string, tx *btcutil.Tx, prevTx *btcutil.Tx, height uint64) (types.AssetType, btcutil.Address, error)
Mint performs the minting operation of the voucher token
func (Keeper) NewRunesSigningRequest ¶
func (k Keeper) NewRunesSigningRequest(ctx sdk.Context, sender string, amount sdk.Coin, feeRate int64, vault string, btcVault string) (*types.SigningRequest, error)
NewRunesSigningRequest creates the signing request for runes withdrawal
func (Keeper) NewWithdrawRequest ¶
func (k Keeper) NewWithdrawRequest(ctx sdk.Context, sender string, amount string) *types.WithdrawRequest
NewWithdrawRequest builds a new withdrawal request
func (Keeper) ProcessBitcoinDepositTransaction ¶
func (k Keeper) ProcessBitcoinDepositTransaction(ctx sdk.Context, msg *types.MsgSubmitDepositTransaction) (*chainhash.Hash, btcutil.Address, error)
ProcessBitcoinDepositTransaction handles the deposit transaction
func (Keeper) ProcessBitcoinWithdrawTransaction ¶
func (k Keeper) ProcessBitcoinWithdrawTransaction(ctx sdk.Context, msg *types.MsgSubmitWithdrawTransaction) (*chainhash.Hash, error)
ProcessBitcoinWithdrawTransaction handles the withdrawal transaction
func (Keeper) ProtocolDepositFeeEnabled ¶
ProtocolDepositFeeEnabled returns true if the protocol fee is required for deposit, false otherwise
func (Keeper) ProtocolFeeCollector ¶
ProtocolFeeCollector gets the protocol fee collector
func (Keeper) ProtocolWithdrawFeeEnabled ¶
ProtocolWithdrawFeeEnabled returns true if the protocol fee is required for withdrawal, false otherwise
func (Keeper) QueryAllDKGRequests ¶
func (k Keeper) QueryAllDKGRequests(goCtx context.Context, req *types.QueryAllDKGRequestsRequest) (*types.QueryAllDKGRequestsResponse, error)
func (Keeper) QueryBlockHeaderByHash ¶
func (k Keeper) QueryBlockHeaderByHash(goCtx context.Context, req *types.QueryBlockHeaderByHashRequest) (*types.QueryBlockHeaderByHashResponse, error)
BlockHeaderByHash queries the block header by hash.
func (Keeper) QueryBlockHeaderByHeight ¶
func (k Keeper) QueryBlockHeaderByHeight(goCtx context.Context, req *types.QueryBlockHeaderByHeightRequest) (*types.QueryBlockHeaderByHeightResponse, error)
func (Keeper) QueryChainTip ¶
func (k Keeper) QueryChainTip(goCtx context.Context, req *types.QueryChainTipRequest) (*types.QueryChainTipResponse, error)
func (Keeper) QueryDKGCompletionRequests ¶
func (k Keeper) QueryDKGCompletionRequests(goCtx context.Context, req *types.QueryDKGCompletionRequestsRequest) (*types.QueryDKGCompletionRequestsResponse, error)
func (Keeper) QueryDKGRequest ¶
func (k Keeper) QueryDKGRequest(goCtx context.Context, req *types.QueryDKGRequestRequest) (*types.QueryDKGRequestResponse, error)
func (Keeper) QueryDKGRequests ¶
func (k Keeper) QueryDKGRequests(goCtx context.Context, req *types.QueryDKGRequestsRequest) (*types.QueryDKGRequestsResponse, error)
func (Keeper) QueryFeeRate ¶
func (k Keeper) QueryFeeRate(goCtx context.Context, req *types.QueryFeeRateRequest) (*types.QueryFeeRateResponse, error)
func (Keeper) QueryParams ¶
func (k Keeper) QueryParams(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) QueryPendingBtcWithdrawRequests ¶
func (k Keeper) QueryPendingBtcWithdrawRequests(goCtx context.Context, req *types.QueryPendingBtcWithdrawRequestsRequest) (*types.QueryPendingBtcWithdrawRequestsResponse, error)
func (Keeper) QuerySigningRequest ¶
func (k Keeper) QuerySigningRequest(goCtx context.Context, req *types.QuerySigningRequestRequest) (*types.QuerySigningRequestResponse, error)
func (Keeper) QuerySigningRequestByTxHash ¶
func (k Keeper) QuerySigningRequestByTxHash(goCtx context.Context, req *types.QuerySigningRequestByTxHashRequest) (*types.QuerySigningRequestByTxHashResponse, error)
func (Keeper) QuerySigningRequests ¶
func (k Keeper) QuerySigningRequests(goCtx context.Context, req *types.QuerySigningRequestsRequest) (*types.QuerySigningRequestsResponse, error)
func (Keeper) QuerySigningRequestsByAddress ¶
func (k Keeper) QuerySigningRequestsByAddress(goCtx context.Context, req *types.QuerySigningRequestsByAddressRequest) (*types.QuerySigningRequestsByAddressResponse, error)
func (Keeper) QueryUTXOCountAndBalancesByAddress ¶
func (k Keeper) QueryUTXOCountAndBalancesByAddress(goCtx context.Context, req *types.QueryUTXOCountAndBalancesByAddressRequest) (*types.QueryUTXOCountAndBalancesByAddressResponse, error)
func (Keeper) QueryUTXOs ¶
func (k Keeper) QueryUTXOs(goCtx context.Context, req *types.QueryUTXOsRequest) (*types.QueryUTXOsResponse, error)
func (Keeper) QueryUTXOsByAddress ¶
func (k Keeper) QueryUTXOsByAddress(goCtx context.Context, req *types.QueryUTXOsByAddressRequest) (*types.QueryUTXOsByAddressResponse, error)
func (Keeper) QueryWithdrawRequestsByAddress ¶
func (k Keeper) QueryWithdrawRequestsByAddress(goCtx context.Context, req *types.QueryWithdrawRequestsByAddressRequest) (*types.QueryWithdrawRequestsByAddressResponse, error)
func (Keeper) QueryWithdrawRequestsByTxHash ¶
func (k Keeper) QueryWithdrawRequestsByTxHash(goCtx context.Context, req *types.QueryWithdrawRequestsByTxHashRequest) (*types.QueryWithdrawRequestsByTxHashResponse, error)
func (Keeper) QueryWithdrawalNetworkFee ¶
func (k Keeper) QueryWithdrawalNetworkFee(goCtx context.Context, req *types.QueryWithdrawalNetworkFeeRequest) (*types.QueryWithdrawalNetworkFeeResponse, error)
func (Keeper) RemoveFromBtcWithdrawRequestQueue ¶
func (k Keeper) RemoveFromBtcWithdrawRequestQueue(ctx sdk.Context, req *types.WithdrawRequest)
RemoveFromBtcWithdrawRequestQueue removes the given btc withdrawal request from the pending queue
func (Keeper) RemoveSigningRequestStatus ¶
RemoveSigningRequestStatus removes the status store of the signing request
func (Keeper) SetBestBlockHeader ¶
func (k Keeper) SetBestBlockHeader(ctx sdk.Context, header *types.BlockHeader)
func (Keeper) SetBlockHeader ¶
func (k Keeper) SetBlockHeader(ctx sdk.Context, header *types.BlockHeader)
func (Keeper) SetBlockHeaders ¶
func (k Keeper) SetBlockHeaders(ctx sdk.Context, headers []*types.BlockHeader)
func (Keeper) SetDKGCompletionRequest ¶
func (k Keeper) SetDKGCompletionRequest(ctx sdk.Context, req *types.DKGCompletionRequest)
SetDKGCompletionRequest sets the given DKG completion request
func (Keeper) SetDKGRequest ¶
func (k Keeper) SetDKGRequest(ctx sdk.Context, req *types.DKGRequest)
SetDKGRequest sets the given DKG request
func (Keeper) SetDKGRequestID ¶
SetDKGRequestID sets the current DKG request ID
func (Keeper) SetFeeRate ¶
SetFeeRate sets the bitcoin network fee rate
func (Keeper) SetSigningRequest ¶
func (k Keeper) SetSigningRequest(ctx sdk.Context, signingRequest *types.SigningRequest)
SetSigningRequest sets the signing request
func (Keeper) SetSigningRequestStatus ¶
func (k Keeper) SetSigningRequestStatus(ctx sdk.Context, sequence uint64, status types.SigningStatus)
SetSigningRequestStatus sets the status store of the signing request
func (Keeper) SetVaultVersion ¶
SetVaultVersion sets the vault version
func (Keeper) SetWithdrawRequest ¶
func (k Keeper) SetWithdrawRequest(ctx sdk.Context, req *types.WithdrawRequest)
SetWithdrawRequest sets the given withdrawal request
func (Keeper) SetWithdrawRequestByTxHash ¶
func (k Keeper) SetWithdrawRequestByTxHash(ctx sdk.Context, req *types.WithdrawRequest)
SetWithdrawRequestByTxHash sets the given withdrawal request by tx hash
func (Keeper) TransferVault ¶
func (k Keeper) TransferVault(ctx sdk.Context, sourceVersion uint64, destVersion uint64, assetType types.AssetType, psbts []string, targetUtxoNum uint32) error
TransferVault performs the vault asset transfer from the source version to the destination version
func (Keeper) UpdateVaults ¶
UpdateVaults updates the asset vaults of the btc bridge Assume that vaults are validated and match vault types
func (Keeper) ValidateTransaction ¶
func (k Keeper) ValidateTransaction(ctx sdk.Context, txBytes string, prevTxBytes string, blockHash string, proof []string, confirmationDepth int32) (*btcutil.Tx, *btcutil.Tx, error)
ValidateTransaction validates the given transaction
func (Keeper) VaultTransferCompleted ¶
VaultTransferCompleted returns true if the asset transfer completed for the given vault, false otherwise
func (Keeper) VaultsTransferCompleted ¶
VaultsTransferCompleted returns true if all asset transfer completed for the given vault version, false otherwise
func (Keeper) WithdrawConfirmationDepth ¶
WithdrawConfirmationDepth gets the confirmation depth for withdrawal transactions
type UTXOIterator ¶
type UTXOIterator struct {
// contains filtered or unexported fields
}
UTXOIterator implements types.UTXOIterator The iterator iterates over utxos by address and amount
func NewUTXOIterator ¶
func NewUTXOIterator(ctx sdk.Context, keeper UTXOViewKeeper, addr string, iterator storetypes.Iterator, minUTXO *types.UTXO) *UTXOIterator
func (*UTXOIterator) Close ¶
func (i *UTXOIterator) Close() error
func (*UTXOIterator) GetMinimumUTXO ¶
func (i *UTXOIterator) GetMinimumUTXO() *types.UTXO
func (*UTXOIterator) GetUTXO ¶
func (i *UTXOIterator) GetUTXO() *types.UTXO
func (*UTXOIterator) Next ¶
func (i *UTXOIterator) Next()
func (*UTXOIterator) Valid ¶
func (i *UTXOIterator) Valid() bool
type UTXOKeeper ¶
type UTXOKeeper interface {
UTXOViewKeeper
LockUTXO(ctx sdk.Context, hash string, vout uint64) error
LockUTXOs(ctx sdk.Context, utxos []*types.UTXO) error
UnlockUTXO(ctx sdk.Context, hash string, vout uint64) error
UnlockUTXOs(ctx sdk.Context, utxos []*types.UTXO) error
SpendUTXO(ctx sdk.Context, hash string, vout uint64) error
SpendUTXOs(ctx sdk.Context, utxos []*types.UTXO) error
}
type UTXOViewKeeper ¶
type UTXOViewKeeper interface {
HasUTXO(ctx sdk.Context, hash string, vout uint64) bool
IsUTXOLocked(ctx sdk.Context, hash string, vout uint64) bool
GetUTXO(ctx sdk.Context, hash string, vout uint64) *types.UTXO
GetAllUTXOs(ctx sdk.Context) []*types.UTXO
GetUTXOsByAddr(ctx sdk.Context, addr string) []*types.UTXO
GetUTXOIteratorByAddr(ctx sdk.Context, addr string) types.UTXOIterator
GetUnlockedUTXOsByAddr(ctx sdk.Context, addr string) []*types.UTXO
GetTargetRunesUTXOs(ctx sdk.Context, addr string, runeId string, targetAmount uint128.Uint128, maxNum int) ([]*types.UTXO, []*types.RuneBalance)
IterateAllUTXOs(ctx sdk.Context, cb func(utxo *types.UTXO) (stop bool))
IterateUnlockedUTXOsByAddr(ctx sdk.Context, addr string, cb func(addr string, utxo *types.UTXO) (stop bool))
IterateUTXOsByTxHash(ctx sdk.Context, hash string, cb func(utxo *types.UTXO) (stop bool))
}