embedded

package
v0.0.7-alphanet Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2023 License: GPL-3.0 Imports: 22 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PillarActive   uint8 = 1
	PillarInActive uint8 = 2
)

Functions

This section is empty.

Types

type AcceleratorApi

type AcceleratorApi struct {
	// contains filtered or unexported fields
}

func NewAcceleratorApi

func NewAcceleratorApi(z zenon.Zenon) *AcceleratorApi

func (*AcceleratorApi) GetAll

func (a *AcceleratorApi) GetAll(pageIndex, pageSize uint32) (*ProjectList, error)

func (*AcceleratorApi) GetPhaseById

func (a *AcceleratorApi) GetPhaseById(id types.Hash) (*Phase, error)

func (*AcceleratorApi) GetPillarVotes

func (a *AcceleratorApi) GetPillarVotes(name string, hashes []types.Hash) ([]*definition.PillarVote, error)

func (*AcceleratorApi) GetProjectById

func (a *AcceleratorApi) GetProjectById(id types.Hash) (*Project, error)

func (*AcceleratorApi) GetVoteBreakdown

func (a *AcceleratorApi) GetVoteBreakdown(id types.Hash) (*definition.VoteBreakdown, error)

type BridgeApi

type BridgeApi struct {
	// contains filtered or unexported fields
}

func NewBridgeApi

func NewBridgeApi(z zenon.Zenon) *BridgeApi

func (*BridgeApi) GetAllNetworks

func (a *BridgeApi) GetAllNetworks(pageIndex, pageSize uint32) (*NetworkInfoList, error)

func (*BridgeApi) GetAllUnsignedWrapTokenRequests

func (a *BridgeApi) GetAllUnsignedWrapTokenRequests(pageIndex, pageSize uint32) (*WrapTokenRequestList, error)

func (*BridgeApi) GetAllUnwrapTokenRequests

func (a *BridgeApi) GetAllUnwrapTokenRequests(pageIndex, pageSize uint32) (*UnwrapTokenRequestList, error)

func (*BridgeApi) GetAllUnwrapTokenRequestsByToAddress

func (a *BridgeApi) GetAllUnwrapTokenRequestsByToAddress(toAddress string, pageIndex, pageSize uint32) (*UnwrapTokenRequestList, error)

func (*BridgeApi) GetAllWrapTokenRequests

func (a *BridgeApi) GetAllWrapTokenRequests(pageIndex, pageSize uint32) (*WrapTokenRequestList, error)

func (*BridgeApi) GetAllWrapTokenRequestsByToAddress

func (a *BridgeApi) GetAllWrapTokenRequestsByToAddress(toAddress string, pageIndex, pageSize uint32) (*WrapTokenRequestList, error)

func (*BridgeApi) GetAllWrapTokenRequestsByToAddressNetworkClassAndChainId

func (a *BridgeApi) GetAllWrapTokenRequestsByToAddressNetworkClassAndChainId(toAddress string, networkClass, chainId uint32, pageIndex, pageSize uint32) (*WrapTokenRequestList, error)

func (*BridgeApi) GetBridgeInfo

func (a *BridgeApi) GetBridgeInfo() (*definition.BridgeInfoVariable, error)

func (*BridgeApi) GetFeeTokenPair

func (a *BridgeApi) GetFeeTokenPair(zts types.ZenonTokenStandard) (*definition.ZtsFeesInfo, error)

func (*BridgeApi) GetNetworkInfo

func (a *BridgeApi) GetNetworkInfo(networkClass uint32, chainId uint32) (*definition.NetworkInfo, error)

func (*BridgeApi) GetOrchestratorInfo

func (a *BridgeApi) GetOrchestratorInfo() (*definition.OrchestratorInfo, error)

func (*BridgeApi) GetSecurityInfo

func (a *BridgeApi) GetSecurityInfo() (*definition.SecurityInfoVariable, error)

func (*BridgeApi) GetTimeChallengesInfo

func (a *BridgeApi) GetTimeChallengesInfo() (*TimeChallengesList, error)

func (*BridgeApi) GetUnwrapTokenRequestByHashAndLog

func (a *BridgeApi) GetUnwrapTokenRequestByHashAndLog(txHash types.Hash, logIndex uint32) (*UnwrapTokenRequest, error)

func (*BridgeApi) GetWrapTokenRequestById

func (a *BridgeApi) GetWrapTokenRequestById(id types.Hash) (*WrapTokenRequest, error)

type ConsensusCache

type ConsensusCache interface {
	Get() (weights map[string]*big.Int, currentStats *api.EpochStats)
}

func NewConsensusCache

func NewConsensusCache(z zenon.Zenon, testing bool) ConsensusCache

type FusionEntry

type FusionEntry struct {
	QsrAmount        *big.Int      `json:"qsrAmount"`
	Beneficiary      types.Address `json:"beneficiary"`
	ExpirationHeight uint64        `json:"expirationHeight"`
	Id               types.Hash    `json:"id"`
}

func (*FusionEntry) MarshalJSON

func (r *FusionEntry) MarshalJSON() ([]byte, error)

func (*FusionEntry) ToFusionEntryMarshal

func (r *FusionEntry) ToFusionEntryMarshal() *FusionEntryMarshal

func (*FusionEntry) UnmarshalJSON

func (r *FusionEntry) UnmarshalJSON(data []byte) error

type FusionEntryList

type FusionEntryList struct {
	QsrAmount *big.Int       `json:"qsrAmount"`
	Count     int            `json:"count"`
	Fusions   []*FusionEntry `json:"list"`
}

func (*FusionEntryList) MarshalJSON

func (r *FusionEntryList) MarshalJSON() ([]byte, error)

func (*FusionEntryList) ToFusionEntryListMarshal

func (r *FusionEntryList) ToFusionEntryListMarshal() *FusionEntryListMarshal

func (*FusionEntryList) UnmarshalJSON

func (r *FusionEntryList) UnmarshalJSON(data []byte) error

type FusionEntryListMarshal

type FusionEntryListMarshal struct {
	QsrAmount string         `json:"qsrAmount"`
	Count     int            `json:"count"`
	Fusions   []*FusionEntry `json:"list"`
}

type FusionEntryMarshal

type FusionEntryMarshal struct {
	QsrAmount        string        `json:"qsrAmount"`
	Beneficiary      types.Address `json:"beneficiary"`
	ExpirationHeight uint64        `json:"expirationHeight"`
	Id               types.Hash    `json:"id"`
}

type GetDelegatedPillarResponse

type GetDelegatedPillarResponse struct {
	Name       string   `json:"name"`
	NodeStatus uint8    `json:"status"`
	Balance    *big.Int `json:"weight"`
}

User delegation

func (*GetDelegatedPillarResponse) MarshalJSON

func (g *GetDelegatedPillarResponse) MarshalJSON() ([]byte, error)

func (*GetDelegatedPillarResponse) ToGetDelegatedPillarResponse

func (g *GetDelegatedPillarResponse) ToGetDelegatedPillarResponse() *GetDelegatedPillarResponseMarshal

func (*GetDelegatedPillarResponse) UnmarshalJSON

func (g *GetDelegatedPillarResponse) UnmarshalJSON(data []byte) error

type GetDelegatedPillarResponseMarshal

type GetDelegatedPillarResponseMarshal struct {
	Name       string `json:"name"`
	NodeStatus uint8  `json:"status"`
	Balance    string `json:"weight"`
}

type GetRequiredParam

type GetRequiredParam struct {
	SelfAddr  types.Address  `json:"address"`
	BlockType uint64         `json:"blockType"`
	ToAddr    *types.Address `json:"toAddress"`
	Data      []byte         `json:"data"`
}

type GetRequiredResult

type GetRequiredResult struct {
	AvailablePlasma    uint64 `json:"availablePlasma"`
	BasePlasma         uint64 `json:"basePlasma"`
	RequiredDifficulty uint64 `json:"requiredDifficulty"`
}

type HtlcApi

type HtlcApi struct {
	// contains filtered or unexported fields
}

func NewHtlcApi

func NewHtlcApi(z zenon.Zenon) *HtlcApi

func (*HtlcApi) GetById

func (a *HtlcApi) GetById(id types.Hash) (*definition.HtlcInfo, error)

func (*HtlcApi) GetProxyUnlockStatus

func (a *HtlcApi) GetProxyUnlockStatus(address types.Address) (bool, error)

type LiquidityApi

type LiquidityApi struct {
	// contains filtered or unexported fields
}

func NewLiquidityApi

func NewLiquidityApi(z zenon.Zenon) *LiquidityApi

func (*LiquidityApi) GetFrontierRewardByPage

func (a *LiquidityApi) GetFrontierRewardByPage(address types.Address, pageIndex, pageSize uint32) (*RewardHistoryList, error)

func (*LiquidityApi) GetLiquidityInfo

func (a *LiquidityApi) GetLiquidityInfo() (*definition.LiquidityInfo, error)

func (*LiquidityApi) GetLiquidityStakeEntriesByAddress

func (a *LiquidityApi) GetLiquidityStakeEntriesByAddress(address types.Address, pageIndex, pageSize uint32) (*LiquidityStakeList, error)

func (*LiquidityApi) GetSecurityInfo

func (a *LiquidityApi) GetSecurityInfo() (*definition.SecurityInfoVariable, error)

func (*LiquidityApi) GetTimeChallengesInfo

func (a *LiquidityApi) GetTimeChallengesInfo() (*TimeChallengesList, error)

func (*LiquidityApi) GetUncollectedReward

func (a *LiquidityApi) GetUncollectedReward(address types.Address) (*definition.RewardDeposit, error)

type LiquidityStakeList

type LiquidityStakeList struct {
	TotalAmount         *big.Int                          `json:"totalAmount"`
	TotalWeightedAmount *big.Int                          `json:"totalWeightedAmount"`
	Count               int                               `json:"count"`
	Entries             []*definition.LiquidityStakeEntry `json:"list"`
}

func (*LiquidityStakeList) MarshalJSON

func (stake *LiquidityStakeList) MarshalJSON() ([]byte, error)

func (*LiquidityStakeList) ToLiquidityStakeListMarshal

func (stake *LiquidityStakeList) ToLiquidityStakeListMarshal() *LiquidityStakeListMarshal

func (*LiquidityStakeList) UnmarshalJSON

func (stake *LiquidityStakeList) UnmarshalJSON(data []byte) error

type LiquidityStakeListMarshal

type LiquidityStakeListMarshal struct {
	TotalAmount         string                            `json:"totalAmount"`
	TotalWeightedAmount string                            `json:"totalWeightedAmount"`
	Count               int                               `json:"count"`
	Entries             []*definition.LiquidityStakeEntry `json:"list"`
}

type NetworkInfoList

type NetworkInfoList struct {
	Count int                       `json:"count"`
	List  []*definition.NetworkInfo `json:"list"`
}

type Phase

type Phase struct {
	Phase *definition.Phase         `json:"phase"`
	Votes *definition.VoteBreakdown `json:"votes"`
}

type PillarApi

type PillarApi struct {
	// contains filtered or unexported fields
}

func NewPillarApi

func NewPillarApi(z zenon.Zenon, testing bool) *PillarApi

func (*PillarApi) CheckNameAvailability

func (a *PillarApi) CheckNameAvailability(name string) (bool, error)

func (*PillarApi) GetAll

func (a *PillarApi) GetAll(pageIndex, pageSize uint32) (*PillarInfoList, error)

func (*PillarApi) GetByName

func (a *PillarApi) GetByName(name string) (*PillarInfo, error)

func (*PillarApi) GetByOwner

func (a *PillarApi) GetByOwner(stakeAddress types.Address) ([]*PillarInfo, error)

func (*PillarApi) GetDelegatedPillar

func (a *PillarApi) GetDelegatedPillar(addr types.Address) (*GetDelegatedPillarResponse, error)

func (*PillarApi) GetDepositedQsr

func (a *PillarApi) GetDepositedQsr(address types.Address) (string, error)

func (*PillarApi) GetFrontierRewardByPage

func (a *PillarApi) GetFrontierRewardByPage(address types.Address, pageIndex, pageSize uint32) (*RewardHistoryList, error)

func (*PillarApi) GetPillarEpochHistory

func (a *PillarApi) GetPillarEpochHistory(pillarName string, pageIndex, pageSize uint32) (*PillarEpochHistoryList, error)

func (*PillarApi) GetPillarsHistoryByEpoch

func (a *PillarApi) GetPillarsHistoryByEpoch(epoch uint64, pageIndex, pageSize uint32) (*PillarEpochHistoryList, error)

func (*PillarApi) GetQsrRegistrationCost

func (a *PillarApi) GetQsrRegistrationCost() (string, error)

func (*PillarApi) GetUncollectedReward

func (a *PillarApi) GetUncollectedReward(address types.Address) (*definition.RewardDeposit, error)

type PillarEpochHistoryList

type PillarEpochHistoryList struct {
	Count int64                            `json:"count"`
	List  []*definition.PillarEpochHistory `json:"list"`
}

type PillarInfo

type PillarInfo struct {
	Name string `json:"name"`
	Rank int    `json:"rank"`
	Type uint8  `json:"type"`

	StakeAddress          types.Address `json:"ownerAddress"`
	BlockProducingAddress types.Address `json:"producerAddress"`
	RewardWithdrawAddress types.Address `json:"withdrawAddress"`

	CanBeRevoked   bool  `json:"isRevocable"`
	RevokeCooldown int64 `json:"revokeCooldown"`
	RevokeTime     int64 `json:"revokeTimestamp"`

	GiveMomentumRewardPercentage uint8 `json:"giveMomentumRewardPercentage"`
	GiveDelegateRewardPercentage uint8 `json:"giveDelegateRewardPercentage"`

	CurrentStats *PillarStats `json:"currentStats"`
	Weight       *big.Int     `json:"weight"`
}

Pillar details

func (*PillarInfo) MarshalJSON

func (p *PillarInfo) MarshalJSON() ([]byte, error)

func (*PillarInfo) ToPillarInfoMarshal

func (p *PillarInfo) ToPillarInfoMarshal() *PillarInfoMarshal

func (*PillarInfo) UnmarshalJSON

func (p *PillarInfo) UnmarshalJSON(data []byte) error

type PillarInfoByWeight

type PillarInfoByWeight []*PillarInfo

func (PillarInfoByWeight) Len

func (a PillarInfoByWeight) Len() int

func (PillarInfoByWeight) Less

func (a PillarInfoByWeight) Less(i, j int) bool

func (PillarInfoByWeight) Swap

func (a PillarInfoByWeight) Swap(i, j int)

type PillarInfoList

type PillarInfoList struct {
	Count uint32        `json:"count"`
	List  []*PillarInfo `json:"list"`
}

type PillarInfoMarshal

type PillarInfoMarshal struct {
	Name string `json:"name"`
	Rank int    `json:"rank"`
	Type uint8  `json:"type"`

	StakeAddress          types.Address `json:"ownerAddress"`
	BlockProducingAddress types.Address `json:"producerAddress"`
	RewardWithdrawAddress types.Address `json:"withdrawAddress"`

	CanBeRevoked   bool  `json:"isRevocable"`
	RevokeCooldown int64 `json:"revokeCooldown"`
	RevokeTime     int64 `json:"revokeTimestamp"`

	GiveMomentumRewardPercentage uint8 `json:"giveMomentumRewardPercentage"`
	GiveDelegateRewardPercentage uint8 `json:"giveDelegateRewardPercentage"`

	CurrentStats *PillarStats `json:"currentStats"`
	Weight       string       `json:"weight"`
}

type PillarStats

type PillarStats struct {
	ProducedMomentums uint64 `json:"producedMomentums"`
	ExpectedMomentums uint64 `json:"expectedMomentums"`
}

type PlasmaApi

type PlasmaApi struct {
	// contains filtered or unexported fields
}

func NewPlasmaApi

func NewPlasmaApi(z zenon.Zenon) *PlasmaApi

func (*PlasmaApi) Get

func (a *PlasmaApi) Get(address types.Address) (*PlasmaInfo, error)

func (*PlasmaApi) GetEntriesByAddress

func (a *PlasmaApi) GetEntriesByAddress(address types.Address, pageIndex, pageSize uint32) (*FusionEntryList, error)

func (*PlasmaApi) GetRequiredPoWForAccountBlock

func (a *PlasmaApi) GetRequiredPoWForAccountBlock(param GetRequiredParam) (*GetRequiredResult, error)

type PlasmaInfo

type PlasmaInfo struct {
	CurrentPlasma uint64   `json:"currentPlasma"`
	MaxPlasma     uint64   `json:"maxPlasma"`
	QsrAmount     *big.Int `json:"qsrAmount"`
}

func (*PlasmaInfo) MarshalJSON

func (r *PlasmaInfo) MarshalJSON() ([]byte, error)

func (*PlasmaInfo) ToPlasmaInfoMarshal

func (r *PlasmaInfo) ToPlasmaInfoMarshal() *PlasmaInfoMarshal

func (*PlasmaInfo) UnmarshalJSON

func (r *PlasmaInfo) UnmarshalJSON(data []byte) error

type PlasmaInfoMarshal

type PlasmaInfoMarshal struct {
	CurrentPlasma uint64 `json:"currentPlasma"`
	MaxPlasma     uint64 `json:"maxPlasma"`
	QsrAmount     string `json:"qsrAmount"`
}

type Project

type Project struct {
	Id                  types.Hash                `json:"id"`
	Owner               types.Address             `json:"owner"`
	Name                string                    `json:"name"`
	Description         string                    `json:"description"`
	Url                 string                    `json:"url"`
	ZnnFundsNeeded      *big.Int                  `json:"znnFundsNeeded"`
	QsrFundsNeeded      *big.Int                  `json:"qsrFundsNeeded"`
	CreationTimestamp   int64                     `json:"creationTimestamp"`
	LastUpdateTimestamp int64                     `json:"lastUpdateTimestamp"`
	Status              uint8                     `json:"status"`
	PhaseIds            []types.Hash              `json:"phaseIds"`
	Votes               *definition.VoteBreakdown `json:"votes"`
	Phases              []*Phase                  `json:"phases"`
}

func (*Project) MarshalJSON

func (p *Project) MarshalJSON() ([]byte, error)

func (*Project) ToProjectMarshal

func (p *Project) ToProjectMarshal() *ProjectMarshal

func (*Project) UnmarshalJSON

func (p *Project) UnmarshalJSON(data []byte) error

type ProjectList

type ProjectList struct {
	Count int        `json:"count"`
	List  []*Project `json:"list"`
}

type ProjectMarshal

type ProjectMarshal struct {
	Id                  types.Hash                `json:"id"`
	Owner               types.Address             `json:"owner"`
	Name                string                    `json:"name"`
	Description         string                    `json:"description"`
	Url                 string                    `json:"url"`
	ZnnFundsNeeded      string                    `json:"znnFundsNeeded"`
	QsrFundsNeeded      string                    `json:"qsrFundsNeeded"`
	CreationTimestamp   int64                     `json:"creationTimestamp"`
	LastUpdateTimestamp int64                     `json:"lastUpdateTimestamp"`
	Status              uint8                     `json:"status"`
	PhaseIds            []types.Hash              `json:"phaseIds"`
	Votes               *definition.VoteBreakdown `json:"votes"`
	Phases              []*Phase                  `json:"phases"`
}

type RewardHistoryEntry

type RewardHistoryEntry struct {
	Epoch int64    `json:"epoch"`
	Znn   *big.Int `json:"znnAmount"`
	Qsr   *big.Int `json:"qsrAmount"`
}

func (*RewardHistoryEntry) MarshalJSON

func (r *RewardHistoryEntry) MarshalJSON() ([]byte, error)

func (*RewardHistoryEntry) ToRewardDepositMarshal

func (r *RewardHistoryEntry) ToRewardDepositMarshal() *RewardHistoryEntryMarshal

func (*RewardHistoryEntry) UnmarshalJSON

func (r *RewardHistoryEntry) UnmarshalJSON(data []byte) error

type RewardHistoryEntryMarshal

type RewardHistoryEntryMarshal struct {
	Epoch int64  `json:"epoch"`
	Znn   string `json:"znnAmount"`
	Qsr   string `json:"qsrAmount"`
}

type RewardHistoryList

type RewardHistoryList struct {
	Count int64                 `json:"count"`
	List  []*RewardHistoryEntry `json:"list"`
}

type SentinelApi

type SentinelApi struct {
	// contains filtered or unexported fields
}

func NewSentinelApi

func NewSentinelApi(z zenon.Zenon) *SentinelApi

func (*SentinelApi) GetAllActive

func (api *SentinelApi) GetAllActive(pageIndex, pageSize uint32) (*SentinelInfoList, error)

func (*SentinelApi) GetByOwner

func (api *SentinelApi) GetByOwner(owner types.Address) (*SentinelInfo, error)

func (*SentinelApi) GetDepositedQsr

func (api *SentinelApi) GetDepositedQsr(address types.Address) (string, error)

func (*SentinelApi) GetFrontierRewardByPage

func (api *SentinelApi) GetFrontierRewardByPage(address types.Address, pageIndex, pageSize uint32) (*RewardHistoryList, error)

func (*SentinelApi) GetUncollectedReward

func (api *SentinelApi) GetUncollectedReward(address types.Address) (*definition.RewardDeposit, error)

type SentinelInfo

type SentinelInfo struct {
	Owner                 types.Address `json:"owner"`
	RegistrationTimestamp int64         `json:"registrationTimestamp"`
	CanBeRevoked          bool          `json:"isRevocable"`
	RevokeCooldown        int64         `json:"revokeCooldown"`
	Active                bool          `json:"active"`
}

type SentinelInfoList

type SentinelInfoList struct {
	Count int             `json:"count"`
	List  []*SentinelInfo `json:"list"`
}

type SortFusionEntryByHeight

type SortFusionEntryByHeight []*definition.FusionInfo

func (SortFusionEntryByHeight) Len

func (a SortFusionEntryByHeight) Len() int

func (SortFusionEntryByHeight) Less

func (a SortFusionEntryByHeight) Less(i, j int) bool

func (SortFusionEntryByHeight) Swap

func (a SortFusionEntryByHeight) Swap(i, j int)

type SporkApi

type SporkApi struct {
	// contains filtered or unexported fields
}

func NewSporkApi

func NewSporkApi(z zenon.Zenon) *SporkApi

func (*SporkApi) GetAll

func (a *SporkApi) GetAll(pageIndex, pageSize uint32) (*SporkList, error)

type SporkList

type SporkList struct {
	Count uint32              `json:"count"`
	List  []*definition.Spork `json:"list"`
}

type StakeApi

type StakeApi struct {
	// contains filtered or unexported fields
}

func NewStakeApi

func NewStakeApi(z zenon.Zenon) *StakeApi

func (*StakeApi) GetEntriesByAddress

func (a *StakeApi) GetEntriesByAddress(address types.Address, pageIndex, pageSize uint32) (*StakeList, error)

func (*StakeApi) GetFrontierRewardByPage

func (a *StakeApi) GetFrontierRewardByPage(address types.Address, pageIndex, pageSize uint32) (*RewardHistoryList, error)

func (*StakeApi) GetUncollectedReward

func (a *StakeApi) GetUncollectedReward(address types.Address) (*definition.RewardDeposit, error)

type StakeEntry

type StakeEntry struct {
	Amount              *big.Int      `json:"amount"`
	WeightedAmount      *big.Int      `json:"weightedAmount"`
	StartTimestamp      int64         `json:"startTimestamp"`
	ExpirationTimestamp int64         `json:"expirationTimestamp"`
	Address             types.Address `json:"address"`
	Id                  types.Hash    `json:"id"`
}

func (*StakeEntry) MarshalJSON

func (s *StakeEntry) MarshalJSON() ([]byte, error)

func (*StakeEntry) ToStakeEntryMarshal

func (s *StakeEntry) ToStakeEntryMarshal() *StakeEntryMarshal

func (*StakeEntry) UnmarshalJSON

func (s *StakeEntry) UnmarshalJSON(data []byte) error

type StakeEntryMarshal

type StakeEntryMarshal struct {
	Amount              string        `json:"amount"`
	WeightedAmount      string        `json:"weightedAmount"`
	StartTimestamp      int64         `json:"startTimestamp"`
	ExpirationTimestamp int64         `json:"expirationTimestamp"`
	Address             types.Address `json:"address"`
	Id                  types.Hash    `json:"id"`
}

type StakeList

type StakeList struct {
	TotalAmount         *big.Int      `json:"totalAmount"`
	TotalWeightedAmount *big.Int      `json:"totalWeightedAmount"`
	Count               int           `json:"count"`
	Entries             []*StakeEntry `json:"list"`
}

func (*StakeList) MarshalJSON

func (s *StakeList) MarshalJSON() ([]byte, error)

func (*StakeList) ToStakeEntryMarshal

func (s *StakeList) ToStakeEntryMarshal() *StakeListMarshal

func (*StakeList) UnmarshalJSON

func (s *StakeList) UnmarshalJSON(data []byte) error

type StakeListMarshal

type StakeListMarshal struct {
	TotalAmount         string        `json:"totalAmount"`
	TotalWeightedAmount string        `json:"totalWeightedAmount"`
	Count               int           `json:"count"`
	Entries             []*StakeEntry `json:"list"`
}

type SwapApi

type SwapApi struct {
	// contains filtered or unexported fields
}

func NewSwapApi

func NewSwapApi(z zenon.Zenon) *SwapApi

func (*SwapApi) GetAssets

func (p *SwapApi) GetAssets() (map[types.Hash]*SwapAssetEntrySimple, error)

func (*SwapApi) GetAssetsByKeyIdHash

func (p *SwapApi) GetAssetsByKeyIdHash(keyIdHash types.Hash) (*SwapAssetEntry, error)

func (*SwapApi) GetLegacyPillars

func (p *SwapApi) GetLegacyPillars() ([]*SwapLegacyPillarEntry, error)

type SwapAssetEntry

type SwapAssetEntry struct {
	KeyIdHash string   `json:"keyIdHash"`
	Znn       *big.Int `json:"znn"`
	Qsr       *big.Int `json:"qsr"`
}

func (*SwapAssetEntry) MarshalJSON

func (s *SwapAssetEntry) MarshalJSON() ([]byte, error)

func (*SwapAssetEntry) ToSwapAssetEntryMarshal

func (s *SwapAssetEntry) ToSwapAssetEntryMarshal() *SwapAssetEntryMarshal

func (*SwapAssetEntry) UnmarshalJSON

func (s *SwapAssetEntry) UnmarshalJSON(data []byte) error

type SwapAssetEntryMarshal

type SwapAssetEntryMarshal struct {
	KeyIdHash string `json:"keyIdHash"`
	Znn       string `json:"znn"`
	Qsr       string `json:"qsr"`
}

type SwapAssetEntrySimple

type SwapAssetEntrySimple struct {
	Znn *big.Int `json:"znn"`
	Qsr *big.Int `json:"qsr"`
}

func (*SwapAssetEntrySimple) MarshalJSON

func (s *SwapAssetEntrySimple) MarshalJSON() ([]byte, error)

func (*SwapAssetEntrySimple) ToSwapAssetEntrySimpleMarshal

func (s *SwapAssetEntrySimple) ToSwapAssetEntrySimpleMarshal() *SwapAssetEntrySimpleMarshal

func (*SwapAssetEntrySimple) UnmarshalJSON

func (s *SwapAssetEntrySimple) UnmarshalJSON(data []byte) error

type SwapAssetEntrySimpleMarshal

type SwapAssetEntrySimpleMarshal struct {
	Znn string `json:"znn"`
	Qsr string `json:"qsr"`
}

type SwapLegacyPillarEntry

type SwapLegacyPillarEntry struct {
	KeyIdHash  string `json:"keyIdHash"`
	NumPillars int    `json:"numPillars"`
}

type TimeChallengesList

type TimeChallengesList struct {
	Count int                             `json:"count"`
	List  []*definition.TimeChallengeInfo `json:"list"`
}

type TokenAPI

type TokenAPI struct {
	// contains filtered or unexported fields
}

func NewTokenApi

func NewTokenApi(z zenon.Zenon) *TokenAPI

func (*TokenAPI) GetAll

func (a *TokenAPI) GetAll(pageIndex, pageSize uint32) (*TokenList, error)

func (*TokenAPI) GetByOwner

func (a *TokenAPI) GetByOwner(owner types.Address, pageIndex, pageSize uint32) (*TokenList, error)

func (*TokenAPI) GetByZts

func (a *TokenAPI) GetByZts(zts types.ZenonTokenStandard) (*api.Token, error)

type TokenList

type TokenList struct {
	Count int          `json:"count"`
	List  []*api.Token `json:"list"`
}

type UnwrapTokenRequest

type UnwrapTokenRequest struct {
	*definition.UnwrapTokenRequest
	TokenInfo    *api.Token `json:"token"`
	RedeemableIn uint64     `json:"redeemableIn"`
}

func (*UnwrapTokenRequest) MarshalJSON

func (u *UnwrapTokenRequest) MarshalJSON() ([]byte, error)

func (*UnwrapTokenRequest) UnmarshalJSON

func (u *UnwrapTokenRequest) UnmarshalJSON(data []byte) error

type UnwrapTokenRequestList

type UnwrapTokenRequestList struct {
	Count int                   `json:"count"`
	List  []*UnwrapTokenRequest `json:"list"`
}

type WrapTokenRequest

type WrapTokenRequest struct {
	*definition.WrapTokenRequest
	TokenInfo               *api.Token `json:"token"`
	ConfirmationsToFinality uint64     `json:"confirmationsToFinality"`
}

func (*WrapTokenRequest) MarshalJSON

func (w *WrapTokenRequest) MarshalJSON() ([]byte, error)

func (*WrapTokenRequest) UnmarshalJSON

func (w *WrapTokenRequest) UnmarshalJSON(data []byte) error

type WrapTokenRequestList

type WrapTokenRequestList struct {
	Count int                 `json:"count"`
	List  []*WrapTokenRequest `json:"list"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL