embedded

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcceleratorApi

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

func NewAcceleratorApi

func NewAcceleratorApi(c client.Client) AcceleratorApi

func (AcceleratorApi) AddPhase

func (a AcceleratorApi) AddPhase(id types.Hash, name string, description string, url string, znnNeeded *big.Int, qsrNeeded *big.Int) (*nom.AccountBlock, error)

func (AcceleratorApi) CreateProject

func (a AcceleratorApi) CreateProject(name string, description string, url string, znnNeeded *big.Int, qsrNeeded *big.Int) (*nom.AccountBlock, error)

ContractMethods

func (AcceleratorApi) Donate

func (a AcceleratorApi) Donate(amount *big.Int, zts types.ZenonTokenStandard) (*nom.AccountBlock, error)

func (AcceleratorApi) GetAll

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

RPC

func (AcceleratorApi) GetPhaseById

func (a AcceleratorApi) GetPhaseById(id types.Hash) (*embedded.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) (*embedded.Project, error)

func (AcceleratorApi) GetVoteBreakdown

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

func (AcceleratorApi) UpdatePhase

func (a AcceleratorApi) UpdatePhase(id types.Hash, name string, description string, url string, znnNeeded *big.Int, qsrNeeded *big.Int) (*nom.AccountBlock, error)

func (AcceleratorApi) VoteByName

func (a AcceleratorApi) VoteByName(id types.Hash, pillarName string, vote uint8) (*nom.AccountBlock, error)

func (AcceleratorApi) VoteByProdAddress

func (a AcceleratorApi) VoteByProdAddress(id types.Hash, vote uint8) (*nom.AccountBlock, error)

type HtlcApi

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

func NewHtlcApi

func NewHtlcApi(c client.Client) HtlcApi

func (HtlcApi) AllowProxyUnlock

func (s HtlcApi) AllowProxyUnlock() (*nom.AccountBlock, error)

func (HtlcApi) Create

func (s HtlcApi) Create(
	zts types.ZenonTokenStandard,
	amount *big.Int,
	hashLocked types.Address,
	expirationTime int64,
	hashType uint8,
	keyMaxSize uint8,
	hashLock []byte) (*nom.AccountBlock, error)

func (HtlcApi) DenyProxyUnlock

func (s HtlcApi) DenyProxyUnlock() (*nom.AccountBlock, error)

func (HtlcApi) GetById

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

func (HtlcApi) GetProxyUnlockStatus

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

func (HtlcApi) Reclaim

func (s HtlcApi) Reclaim(id types.Hash) (*nom.AccountBlock, error)

func (HtlcApi) Unlock

func (s HtlcApi) Unlock(id types.Hash) (*nom.AccountBlock, error)

type PillarApi

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

func NewPillarApi

func NewPillarApi(c client.Client) PillarApi

func (PillarApi) CheckNameAvailability

func (p PillarApi) CheckNameAvailability(name string) (bool, error)

func (PillarApi) CollectReward

func (p PillarApi) CollectReward() (*nom.AccountBlock, error)

Common contract methods

func (PillarApi) Delegate

func (p PillarApi) Delegate(name string) (*nom.AccountBlock, error)

func (PillarApi) DepositQsr

func (p PillarApi) DepositQsr(amount *big.Int) (*nom.AccountBlock, error)

func (PillarApi) GetAll

func (p PillarApi) GetAll(pageIndex, pageSize uint32) (*embedded.PillarInfoList, error)

func (PillarApi) GetByName

func (p PillarApi) GetByName(name string) (*embedded.PillarInfo, error)

func (PillarApi) GetByOwner

func (p PillarApi) GetByOwner(address types.Address) ([]embedded.PillarInfo, error)

func (PillarApi) GetDelegatedPillar

func (p PillarApi) GetDelegatedPillar(address types.Address) (*embedded.GetDelegatedPillarResponse, error)

func (PillarApi) GetDepositedQsr

func (p PillarApi) GetDepositedQsr(address types.Address) (*big.Int, error)

Common RPC

func (PillarApi) GetFrontierRewardByPage

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

func (PillarApi) GetPillarEpochHistory

func (p PillarApi) GetPillarEpochHistory(name string, pageIndex, pageSize uint32) (*embedded.PillarEpochHistoryList, error)

func (PillarApi) GetPillarsHistoryByEpoch

func (p PillarApi) GetPillarsHistoryByEpoch(epoch uint64, pageIndex, pageSize uint32) (*embedded.PillarEpochHistoryList, error)

func (PillarApi) GetQsrRegistrationCost

func (p PillarApi) GetQsrRegistrationCost() (*big.Int, error)

RPC

func (PillarApi) GetUncollectedReward

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

func (PillarApi) Register

func (p PillarApi) Register(name string, producerAddress types.Address, rewardAddress types.Address, giveBlockRewardPercentage uint8, giveDelegateRewardPercentage uint8) (*nom.AccountBlock, error)

Contract methods

func (PillarApi) RegisterLegacy

func (p PillarApi) RegisterLegacy(name string, producerAddress types.Address, rewardAddress types.Address, publicKey string, signature string, giveBlockRewardPercentage uint8, giveDelegateRewardPercentage uint8) (*nom.AccountBlock, error)

func (PillarApi) Revoke

func (p PillarApi) Revoke(name string) (*nom.AccountBlock, error)

func (PillarApi) Undelegate

func (p PillarApi) Undelegate() (*nom.AccountBlock, error)

func (PillarApi) UpdatePillar

func (p PillarApi) UpdatePillar(name string, producerAddress types.Address, rewardAddress types.Address, giveBlockRewardPercentage uint8, giveDelegateRewardPercentage uint8) (*nom.AccountBlock, error)

func (PillarApi) WithdrawQsr

func (p PillarApi) WithdrawQsr() (*nom.AccountBlock, error)

type PlasmaApi

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

func NewPlasmaApi

func NewPlasmaApi(c client.Client) PlasmaApi

func (PlasmaApi) Cancel

func (p PlasmaApi) Cancel(id types.Hash) (*nom.AccountBlock, error)

func (PlasmaApi) Fuse

func (p PlasmaApi) Fuse(beneficiary types.Address, amount *big.Int) (*nom.AccountBlock, error)

Contract methods

func (PlasmaApi) Get

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

func (PlasmaApi) GetEntriesByAddress

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

func (PlasmaApi) GetRequiredPoWForAccountBlock

func (p PlasmaApi) GetRequiredPoWForAccountBlock(param *embedded.GetRequiredParam) (*embedded.GetRequiredResult, error)

type SentinelApi

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

func NewSentinelApi

func NewSentinelApi(c client.Client) SentinelApi

func (SentinelApi) CollectReward

func (s SentinelApi) CollectReward() (*nom.AccountBlock, error)

Common contract methods

func (SentinelApi) DepositQsr

func (s SentinelApi) DepositQsr(amount *big.Int) (*nom.AccountBlock, error)

func (SentinelApi) GetAllActive

func (s SentinelApi) GetAllActive(pageIndex, pageSize uint32) (*embedded.SentinelInfoList, error)

RPC

func (SentinelApi) GetByOwner

func (s SentinelApi) GetByOwner(address types.Address) (*embedded.SentinelInfo, error)

func (SentinelApi) GetDepositedQsr

func (s SentinelApi) GetDepositedQsr(address types.Address) (*big.Int, error)

Common RPC

func (SentinelApi) GetFrontierRewardByPage

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

func (SentinelApi) GetUncollectedReward

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

func (SentinelApi) Register

func (s SentinelApi) Register() (*nom.AccountBlock, error)

Contract methods

func (SentinelApi) Revoke

func (s SentinelApi) Revoke() (*nom.AccountBlock, error)

func (SentinelApi) WithdrawQsr

func (s SentinelApi) WithdrawQsr() (*nom.AccountBlock, error)

type SporkApi

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

func NewSporkApi

func NewSporkApi(c client.Client) SporkApi

func (SporkApi) Activate

func (s SporkApi) Activate(id types.Hash) (*nom.AccountBlock, error)

func (SporkApi) Create

func (s SporkApi) Create(name string, description string) (*nom.AccountBlock, error)

Contract methods

func (SporkApi) GetAll

func (s SporkApi) GetAll(pageIndex, pageSize uint32) (*embedded.SporkList, error)

type StakeApi

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

func NewStakeApi

func NewStakeApi(c client.Client) StakeApi

func (StakeApi) Cancel

func (s StakeApi) Cancel(id types.Hash) (*nom.AccountBlock, error)

func (StakeApi) CollectReward

func (s StakeApi) CollectReward() (*nom.AccountBlock, error)

Common contract methods

func (StakeApi) GetEntriesByAddress

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

RPC

func (StakeApi) GetFrontierRewardByPage

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

func (StakeApi) GetUncollectedReward

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

Common RPC

func (StakeApi) Stake

func (s StakeApi) Stake(durationInSec int64, amount *big.Int) (*nom.AccountBlock, error)

Contract methods

type SwapApi

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

func NewSwapApi

func NewSwapApi(c client.Client) SwapApi

func (SwapApi) GetAssets

func (s SwapApi) GetAssets() (map[types.Hash]embedded.SwapAssetEntrySimple, error)

func (SwapApi) GetAssetsByKeyIdHash

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

RPC

func (SwapApi) GetLegacyPillars

func (s SwapApi) GetLegacyPillars() ([]embedded.SwapLegacyPillarEntry, error)

func (SwapApi) RetrieveAssets

func (s SwapApi) RetrieveAssets(pubKey string, signature string) (*nom.AccountBlock, error)

Contract methods

type TokenApi

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

func NewTokenApi

func NewTokenApi(client client.Client) TokenApi

func (*TokenApi) BurnToken

func (t *TokenApi) BurnToken(zts types.ZenonTokenStandard, amount *big.Int) (*nom.AccountBlock, error)

func (*TokenApi) GetAll

func (t *TokenApi) GetAll(pageIndex, pageSize uint32) (*embedded.TokenList, error)

RPC

func (*TokenApi) GetByOwner

func (t *TokenApi) GetByOwner(address types.Address, pageIndex, pageSize uint32) (*embedded.TokenList, error)

func (*TokenApi) GetByZts

func (t *TokenApi) GetByZts(zts types.ZenonTokenStandard) (*api.Token, error)

func (*TokenApi) IssueToken

func (t *TokenApi) IssueToken(
	tokenName string,
	tokenSymbol string,
	tokenDomain string,
	totalSupply *big.Int,
	maxSupply *big.Int,
	decimals uint8,
	mintable bool,
	burnable bool,
	utility bool) (*nom.AccountBlock, error)

Contract methods

func (*TokenApi) MintToken

func (t *TokenApi) MintToken(zts types.ZenonTokenStandard, amount *big.Int, receiveAddress types.Address) (*nom.AccountBlock, error)

func (*TokenApi) UpdateToken

func (t *TokenApi) UpdateToken(zts types.ZenonTokenStandard, owner types.Address, mintable bool, burnable bool) (*nom.AccountBlock, error)

Jump to

Keyboard shortcuts

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