Documentation ¶
Index ¶
- Constants
- func NewAddressValidator(k Keeper) nexus.AddressValidator
- func NewMsgServerImpl(keeper types.BTCKeeper, s types.Signer, n types.Nexus, v types.Voter, ...) types.MsgServiceServer
- func NewQuerier(k types.BTCKeeper, s types.Signer, n types.Nexus) sdk.Querier
- func NewTssHandler(keeper types.BTCKeeper, signer types.Signer) tss.Handler
- func QueryConsolidationAddressByKeyID(ctx sdk.Context, k types.BTCKeeper, s types.Signer, keyID tss.KeyID) ([]byte, error)
- func QueryConsolidationAddressByKeyRole(ctx sdk.Context, k types.BTCKeeper, s types.Signer, keyRoleStr string) ([]byte, error)
- func QueryDepositAddress(ctx sdk.Context, k types.BTCKeeper, n types.Nexus, data []byte) ([]byte, error)
- func QueryDepositStatus(ctx sdk.Context, k types.BTCKeeper, outpointStr string) ([]byte, error)
- func QueryLatestTxByTxType(ctx sdk.Context, k types.BTCKeeper, txTypeStr string) ([]byte, error)
- func QueryMinOutputAmount(ctx sdk.Context, k types.BTCKeeper) []byte
- func QueryNextKeyID(ctx sdk.Context, s types.Signer, keyRoleStr string) ([]byte, error)
- func QuerySignedTx(ctx sdk.Context, k types.BTCKeeper, txHashHex string) ([]byte, error)
- type Keeper
- func (k Keeper) DeleteOutpointInfo(ctx sdk.Context, outPoint wire.OutPoint)
- func (k Keeper) DeletePendingOutPointInfo(ctx sdk.Context, key vote.PollKey)
- func (k Keeper) DeleteUnsignedTx(ctx sdk.Context, txType types.TxType)
- func (k Keeper) GetAddressInfo(ctx sdk.Context, encodedAddress string) (types.AddressInfo, bool)
- func (k Keeper) GetAnyoneCanSpendAddress(ctx sdk.Context) types.AddressInfo
- func (k Keeper) GetConfirmedOutpointInfoQueueForKey(ctx sdk.Context, keyID tss.KeyID) utils.KVQueue
- func (k Keeper) GetDepositAddress(ctx sdk.Context, recipient nexus.CrossChainAddress) (btcutil.Address, error)
- func (k Keeper) GetExternalKeyIDs(ctx sdk.Context) ([]tss.KeyID, bool)
- func (k Keeper) GetLatestSignedTxHash(ctx sdk.Context, txType types.TxType) (*chainhash.Hash, bool)
- func (k Keeper) GetMasterAddressExternalKeyLockDuration(ctx sdk.Context) time.Duration
- func (k Keeper) GetMasterAddressInternalKeyLockDuration(ctx sdk.Context) time.Duration
- func (k Keeper) GetMasterKeyRetentionPeriod(ctx sdk.Context) int64
- func (k Keeper) GetMaxInputCount(ctx sdk.Context) int64
- func (k Keeper) GetMaxSecondaryOutputAmount(ctx sdk.Context) btcutil.Amount
- func (k Keeper) GetMaxTxSize(ctx sdk.Context) int64
- func (k Keeper) GetMinOutputAmount(ctx sdk.Context) btcutil.Amount
- func (k Keeper) GetMinVoterCount(ctx sdk.Context) int64
- func (k Keeper) GetNetwork(ctx sdk.Context) types.Network
- func (k Keeper) GetOutPointInfo(ctx sdk.Context, outPoint wire.OutPoint) (types.OutPointInfo, types.OutPointState, bool)
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) GetPendingOutPointInfo(ctx sdk.Context, key vote.PollKey) (types.OutPointInfo, bool)
- func (k Keeper) GetRequiredConfirmationHeight(ctx sdk.Context) uint64
- func (k Keeper) GetRevoteLockingPeriod(ctx sdk.Context) int64
- func (k Keeper) GetSigCheckInterval(ctx sdk.Context) int64
- func (k Keeper) GetSignedTx(ctx sdk.Context, txHash chainhash.Hash) (types.SignedTx, bool)
- func (k Keeper) GetTransactionFeeRate(ctx sdk.Context) sdk.Dec
- func (k Keeper) GetUnconfirmedAmount(ctx sdk.Context, keyID tss.KeyID) btcutil.Amount
- func (k Keeper) GetUnsignedTx(ctx sdk.Context, txType types.TxType) (types.UnsignedTx, bool)
- func (k Keeper) GetVotingThreshold(ctx sdk.Context) utils.Threshold
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) SetAddressInfo(ctx sdk.Context, address types.AddressInfo)
- func (k Keeper) SetConfirmedOutpointInfo(ctx sdk.Context, keyID tss.KeyID, info types.OutPointInfo)
- func (k Keeper) SetDepositAddress(ctx sdk.Context, recipient nexus.CrossChainAddress, address btcutil.Address)
- func (k Keeper) SetExternalKeyIDs(ctx sdk.Context, keyIDs []tss.KeyID)
- func (k Keeper) SetLatestSignedTxHash(ctx sdk.Context, txType types.TxType, txHash chainhash.Hash)
- func (k Keeper) SetParams(ctx sdk.Context, p types.Params)
- func (k Keeper) SetPendingOutpointInfo(ctx sdk.Context, key vote.PollKey, info types.OutPointInfo)
- func (k Keeper) SetSignedTx(ctx sdk.Context, tx types.SignedTx)
- func (k Keeper) SetSpentOutpointInfo(ctx sdk.Context, info types.OutPointInfo)
- func (k Keeper) SetUnconfirmedAmount(ctx sdk.Context, keyID tss.KeyID, amount btcutil.Amount)
- func (k Keeper) SetUnsignedTx(ctx sdk.Context, tx types.UnsignedTx)
Constants ¶
const ( QDepositAddresses = "depositAddresses" QConsolidationAddressByKeyRole = "consolidationAddrByKeyRole" QConsolidationAddressByKeyID = "consolidationAddrByKeyID" QNextKeyID = "nextKeyID" QMinOutputAmount = "minOutputAmount" QLatestTxByTxType = "latestTxByKeyRole" QSignedTx = "signedTx" QDepositStatus = "depositStatus" )
Query paths
Variables ¶
This section is empty.
Functions ¶
func NewAddressValidator ¶ added in v0.9.0
func NewAddressValidator(k Keeper) nexus.AddressValidator
NewAddressValidator returns the callback for validating bitcoin addresses
func NewMsgServerImpl ¶
func NewMsgServerImpl(keeper types.BTCKeeper, s types.Signer, n types.Nexus, v types.Voter, snap types.Snapshotter) types.MsgServiceServer
NewMsgServerImpl returns an implementation of the bitcoin MsgServiceServer interface for the provided Keeper.
func NewQuerier ¶
NewQuerier returns a new querier for the Bitcoin module
func NewTssHandler ¶
NewTssHandler returns the handler for processing signatures delivered by the tss module
func QueryConsolidationAddressByKeyID ¶
func QueryConsolidationAddressByKeyID(ctx sdk.Context, k types.BTCKeeper, s types.Signer, keyID tss.KeyID) ([]byte, error)
QueryConsolidationAddressByKeyID returns the consolidation address of the given key ID
func QueryConsolidationAddressByKeyRole ¶
func QueryConsolidationAddressByKeyRole(ctx sdk.Context, k types.BTCKeeper, s types.Signer, keyRoleStr string) ([]byte, error)
QueryConsolidationAddressByKeyRole returns the current consolidation address of the given key role
func QueryDepositAddress ¶
func QueryDepositAddress(ctx sdk.Context, k types.BTCKeeper, n types.Nexus, data []byte) ([]byte, error)
QueryDepositAddress returns deposit address
func QueryDepositStatus ¶
QueryDepositStatus returns the status of the queried depoist
func QueryLatestTxByTxType ¶
QueryLatestTxByTxType returns the latest consolidation transaction of the given tx type
func QueryMinOutputAmount ¶
QueryMinOutputAmount returns the minimum amount allowed for any transaction output
func QueryNextKeyID ¶
QueryNextKeyID returns the next key ID of the given key role
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper provides access to all state changes regarding the Bitcoin module
func (Keeper) DeleteOutpointInfo ¶
DeleteOutpointInfo deletes a the given outpoint if known
func (Keeper) DeletePendingOutPointInfo ¶
DeletePendingOutPointInfo deletes the outpoint information associated with the given poll
func (Keeper) DeleteUnsignedTx ¶
DeleteUnsignedTx deletes the unsigned transaction for the given tx type
func (Keeper) GetAddressInfo ¶ added in v0.9.0
GetAddressInfo returns the address information for the given encoded address
func (Keeper) GetAnyoneCanSpendAddress ¶
func (k Keeper) GetAnyoneCanSpendAddress(ctx sdk.Context) types.AddressInfo
GetAnyoneCanSpendAddress retrieves the anyone-can-spend address
func (Keeper) GetConfirmedOutpointInfoQueueForKey ¶
GetConfirmedOutpointInfoQueueForKey retrieves the outpoint info queue for the given keyID
func (Keeper) GetDepositAddress ¶ added in v0.9.0
func (k Keeper) GetDepositAddress(ctx sdk.Context, recipient nexus.CrossChainAddress) (btcutil.Address, error)
GetDepositAddress returns the list of deposit addresses associated to the given recipient address
func (Keeper) GetExternalKeyIDs ¶
GetExternalKeyIDs retrieves the current list of external key IDs
func (Keeper) GetLatestSignedTxHash ¶
GetLatestSignedTxHash retrieves the tx hash of the most recent transaction signed of the given tx type
func (Keeper) GetMasterAddressExternalKeyLockDuration ¶
GetMasterAddressExternalKeyLockDuration returns the master address lock duration for external key(s) only to spend
func (Keeper) GetMasterAddressInternalKeyLockDuration ¶
GetMasterAddressInternalKeyLockDuration returns the master address lock duration for internal key(s) only to spend
func (Keeper) GetMasterKeyRetentionPeriod ¶
GetMasterKeyRetentionPeriod returns the prev master key cycle
func (Keeper) GetMaxInputCount ¶
GetMaxInputCount returns the max input count
func (Keeper) GetMaxSecondaryOutputAmount ¶
GetMaxSecondaryOutputAmount returns the max secondary output amount
func (Keeper) GetMaxTxSize ¶
GetMaxTxSize returns the max tx size allowed
func (Keeper) GetMinOutputAmount ¶
GetMinOutputAmount returns the minimum withdrawal threshold
func (Keeper) GetMinVoterCount ¶
GetMinVoterCount returns minimum voter count for voting
func (Keeper) GetNetwork ¶
GetNetwork returns the connected Bitcoin network (main, test, regtest)
func (Keeper) GetOutPointInfo ¶
func (k Keeper) GetOutPointInfo(ctx sdk.Context, outPoint wire.OutPoint) (types.OutPointInfo, types.OutPointState, bool)
GetOutPointInfo returns additional information for the given outpoint
func (Keeper) GetPendingOutPointInfo ¶
func (k Keeper) GetPendingOutPointInfo(ctx sdk.Context, key vote.PollKey) (types.OutPointInfo, bool)
GetPendingOutPointInfo returns outpoint information associated with the given poll
func (Keeper) GetRequiredConfirmationHeight ¶
GetRequiredConfirmationHeight returns the minimum number of confirmations a transaction must have on Bitcoin before axelar will accept it as confirmed.
func (Keeper) GetRevoteLockingPeriod ¶
GetRevoteLockingPeriod returns the lock period for revoting
func (Keeper) GetSigCheckInterval ¶
GetSigCheckInterval returns the block interval after which to check for completed signatures
func (Keeper) GetSignedTx ¶
GetSignedTx returns the signed transaction for outpoint consolidation
func (Keeper) GetTransactionFeeRate ¶
GetTransactionFeeRate returns the transaction fee rate for bitcoin
func (Keeper) GetUnconfirmedAmount ¶
GetUnconfirmedAmount retrieves the unconfirmed amount for the given key ID
func (Keeper) GetUnsignedTx ¶
GetUnsignedTx returns the unsigned transaction for the given tx type
func (Keeper) GetVotingThreshold ¶
GetVotingThreshold returns voting threshold
func (Keeper) SetAddressInfo ¶ added in v0.9.0
func (k Keeper) SetAddressInfo(ctx sdk.Context, address types.AddressInfo)
SetAddressInfo stores the given address information
func (Keeper) SetConfirmedOutpointInfo ¶
SetConfirmedOutpointInfo stores the given outpoint info as confirmed and push it into the queue of given keyID
func (Keeper) SetDepositAddress ¶ added in v0.9.0
func (k Keeper) SetDepositAddress(ctx sdk.Context, recipient nexus.CrossChainAddress, address btcutil.Address)
SetDepositAddress associates the specified recipient address with the given deposit address
func (Keeper) SetExternalKeyIDs ¶
SetExternalKeyIDs stores the given list of external key IDs
func (Keeper) SetLatestSignedTxHash ¶
SetLatestSignedTxHash stores the tx hash of the most recent transaction signed of the given tx type
func (Keeper) SetPendingOutpointInfo ¶
SetPendingOutpointInfo stores an unconfirmed outpoint. Since the information is not yet confirmed the outpoint info is not necessarily unique. Therefore we need to store by the poll that confirms/rejects it
func (Keeper) SetSignedTx ¶
SetSignedTx stores the signed transaction for outpoint consolidation
func (Keeper) SetSpentOutpointInfo ¶
func (k Keeper) SetSpentOutpointInfo(ctx sdk.Context, info types.OutPointInfo)
SetSpentOutpointInfo stores the given outpoint info as spent
func (Keeper) SetUnconfirmedAmount ¶
SetUnconfirmedAmount stores the unconfirmed amount for the given key ID
func (Keeper) SetUnsignedTx ¶
func (k Keeper) SetUnsignedTx(ctx sdk.Context, tx types.UnsignedTx)
SetUnsignedTx stores an unsigned transaction