Documentation
¶
Index ¶
- Constants
- type ExistingStake
- type StakingInput
- type TokenAccount
- type TxInput
- func (input *TxInput) GetDriver() xc.Driver
- func (input *TxInput) GetFeeLimit() (xc.AmountBlockchain, xc.ContractAddress)
- func (input *TxInput) GetPrioritizationFee() uint64
- func (input *TxInput) IndependentOf(other xc.TxInput) (independent bool)
- func (input *TxInput) SafeFromDoubleSend(others ...xc.TxInput) (safe bool)
- func (input *TxInput) SetGasFeePriority(other xc.GasFeePriority) error
- func (input *TxInput) SetUnix(unix int64)
- type UnstakingInput
- type WithdrawInput
Constants ¶
View Source
const SafetyTimeoutMargin = (5 * time.Minute)
Solana recent-block-hash timeout margin
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExistingStake ¶
type ExistingStake struct { ActivationEpoch xc.AmountBlockchain `json:"activation_epoch"` DeactivationEpoch xc.AmountBlockchain `json:"deactivation_epoch"` // The total activating-or-activated amount AmountActive xc.AmountBlockchain `json:"amount_active"` // unlocked/inactive amount AmountInactive xc.AmountBlockchain `json:"amount_inactive"` // ValidatorVoteAccount solana.PublicKey `json:"validator_vote_account"` StakeAccount solana.PublicKey `json:"stake_account"` }
type StakingInput ¶
type StakingInput struct { TxInput ValidatorVoteAccount solana.PublicKey `json:"validator_vote_account"` // The new staking account to create StakingKey solana.PrivateKey `json:"staking_key"` }
func (*StakingInput) GetVariant ¶
func (*StakingInput) GetVariant() xc.TxVariantInputType
func (*StakingInput) Staking ¶
func (*StakingInput) Staking()
type TokenAccount ¶
type TokenAccount struct { Account solana.PublicKey `json:"account,omitempty"` Balance xc.AmountBlockchain `json:"balance,omitempty"` }
type TxInput ¶
type TxInput struct { xc.TxInputEnvelope RecentBlockHash solana.Hash `json:"recent_block_hash,omitempty"` ToIsATA bool `json:"to_is_ata,omitempty"` TokenProgram solana.PublicKey `json:"token_program"` ShouldCreateATA bool `json:"should_create_ata,omitempty"` SourceTokenAccounts []*TokenAccount `json:"source_token_accounts,omitempty"` PrioritizationFee xc.AmountBlockchain `json:"prioritization_fee,omitempty"` Timestamp int64 `json:"timestamp,omitempty"` }
TxInput for Solana
func (*TxInput) GetFeeLimit ¶
func (input *TxInput) GetFeeLimit() (xc.AmountBlockchain, xc.ContractAddress)
func (*TxInput) GetPrioritizationFee ¶
Returns the microlamports to set the compute budget unit price. It will not go about the max price amount for safety concerns.
func (*TxInput) IndependentOf ¶
func (*TxInput) SafeFromDoubleSend ¶
func (*TxInput) SetGasFeePriority ¶
func (input *TxInput) SetGasFeePriority(other xc.GasFeePriority) error
type UnstakingInput ¶
type UnstakingInput struct { TxInput // The new staking account to create in the event of a split occuring StakingKey solana.PrivateKey `json:"staking_key"` EligibleStakes []*ExistingStake `json:"eligible_stakes"` }
func (*UnstakingInput) GetVariant ¶
func (*UnstakingInput) GetVariant() xc.TxVariantInputType
func (*UnstakingInput) Unstaking ¶
func (*UnstakingInput) Unstaking()
type WithdrawInput ¶
type WithdrawInput struct { TxInput EligibleStakes []*ExistingStake `json:"eligible_stakes"` }
func (*WithdrawInput) GetVariant ¶
func (*WithdrawInput) GetVariant() xc.TxVariantInputType
func (*WithdrawInput) Withdrawing ¶
func (*WithdrawInput) Withdrawing()
Click to show internal directories.
Click to hide internal directories.