Documentation ¶
Index ¶
- Constants
- type CovenantParamsType
- type CreateStakingRequestPayload
- type CreateUnstakingRequestPayload
- type DelegationState
- type Error
- type ErrorCode
- type FinalityProviderDescription
- type FinalityProviderDetails
- type FinalityProviders
- type GlobalParams
- type GmpPayload
- type StakingPsbt
- type StakingTxType
- type UnstakingPsbt
- type VaultPayload
- type VersionedGlobalParams
Constants ¶
View Source
const UninitializedStatusCode = 0
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CovenantParamsType ¶
var CovenantParams CovenantParamsType
func GetCovenantParamsVar ¶
func GetCovenantParamsVar() CovenantParamsType
type CreateStakingRequestPayload ¶
type CreateStakingRequestPayload struct { Nework string `json:"network"` StakerAddress string `json:"staker_address"` //Btc Staker's address StakerPubkey string `json:"staker_pubkey"` PublicKeyHex string `json:"public_key_hex"` DstChainId string `json:"dst_chain_id"` //UPDATE: New field DstSmartContractAddress string `json:"dst_smart_contract_address"` DstUserAddress string `json:"dst_user_address"` StakingAmount uint64 `json:"staking_amount"` MintingAmount uint64 `json:"minting_amount"` ServicePubkey string `json:"service_pubkey"` FeeRate string `json:"fee_rate"` //Expected fee rate }
type DelegationState ¶
type DelegationState string
const ( Active DelegationState = "active" UnbondingRequested DelegationState = "unbonding_requested" Unbonding DelegationState = "unbonding" Unbonded DelegationState = "unbonded" Withdrawn DelegationState = "withdrawn" )
func FromStringToDelegationState ¶
func FromStringToDelegationState(s string) (DelegationState, error)
func (DelegationState) ToString ¶
func (s DelegationState) ToString() string
type Error ¶
Error represents an error with an HTTP status code and an application-specific error code.
func NewError ¶
NewError creates a new Error with the provided status code, error code, and underlying error. If the status code is not provided (0), it defaults to http.StatusInternalServerError(500). If the error code is empty, it defaults to INTERNAL_SERVICE_ERROR.
func NewInternalServiceError ¶
type FinalityProviderDetails ¶
type FinalityProviderDetails struct { Description FinalityProviderDescription `json:"description"` Commission string `json:"commission"` BtcPk string `json:"btc_pk"` }
func NewFinalityProviders ¶
func NewFinalityProviders(filePath string) ([]FinalityProviderDetails, error)
type FinalityProviders ¶
type FinalityProviders struct {
FinalityProviders []FinalityProviderDetails `json:"finality_providers"`
}
type GlobalParams ¶
type GlobalParams = parser.GlobalParams
func NewGlobalParams ¶
func NewGlobalParams(filePath string) (*GlobalParams, error)
type GmpPayload ¶
type StakingPsbt ¶
type StakingPsbt struct {
Psbt string `json:"psbt"`
}
type StakingTxType ¶
type StakingTxType string
const ( ActiveTxType StakingTxType = "active" UnbondingTxType StakingTxType = "unbonding" )
func StakingTxTypeFromString ¶
func StakingTxTypeFromString(s string) (StakingTxType, error)
func (StakingTxType) ToString ¶
func (s StakingTxType) ToString() string
type UnstakingPsbt ¶
type UnstakingPsbt struct {
Psbt string `json:"psbt"`
}
type VaultPayload ¶
type VaultPayload struct {
StakerPubkey string `json:"stakerPubkey"` // 32 bytes
}
type VersionedGlobalParams ¶
type VersionedGlobalParams = parser.VersionedGlobalParams
Click to show internal directories.
Click to hide internal directories.