 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildGenesisArgs ¶
type BuildGenesisArgs struct {
	AvaxAssetID   ids.ID                    `json:"avaxAssetID"`
	NetworkID     json.Uint32               `json:"networkID"`
	UTXOs         []UTXO                    `json:"utxos"`
	Validators    []PermissionlessValidator `json:"validators"`
	Chains        []Chain                   `json:"chains"`
	Time          json.Uint64               `json:"time"`
	InitialSupply json.Uint64               `json:"initialSupply"`
	Message       string                    `json:"message"`
	Encoding      formatting.Encoding       `json:"encoding"`
}
    BuildGenesisArgs are the arguments used to create the genesis data of the Platform Chain. [NetworkID] is the ID of the network [UTXOs] are the UTXOs on the Platform Chain that exist at genesis. [Validators] are the validators of the primary network at genesis. [Chains] are the chains that exist at genesis. [Time] is the Platform Chain's time at network genesis.
type BuildGenesisReply ¶
type BuildGenesisReply struct {
	Bytes    string              `json:"bytes"`
	Encoding formatting.Encoding `json:"encoding"`
}
    BuildGenesisReply is the reply from BuildGenesis
type Chain ¶
type Chain struct {
	GenesisData string   `json:"genesisData"`
	VMID        ids.ID   `json:"vmID"`
	FxIDs       []ids.ID `json:"fxIDs"`
	Name        string   `json:"name"`
	SubnetID    ids.ID   `json:"subnetID"`
}
    Chain defines a chain that exists at the network's genesis. [GenesisData] is the initial state of the chain. [VMID] is the ID of the VM this chain runs. [FxIDs] are the IDs of the Fxs the chain supports. [Name] is a human-readable, non-unique name for the chain. [SubnetID] is the ID of the subnet that validates the chain
type Owner ¶
type Owner struct {
	Locktime  json.Uint64 `json:"locktime"`
	Threshold json.Uint32 `json:"threshold"`
	Addresses []string    `json:"addresses"`
}
    Owner is the repr. of a reward owner sent over APIs.
type PermissionedValidator ¶ added in v1.8.0
type PermissionedValidator struct {
	Staker
	// The owner the staking reward, if applicable, will go to
	Connected bool `json:"connected"`
}
    PermissionedValidator is the repr. of a permissioned validator sent over APIs.
type PermissionlessValidator ¶ added in v1.8.0
type PermissionlessValidator struct {
	Staker
	// Deprecated: RewardOwner has been replaced by ValidationRewardOwner and
	//             DelegationRewardOwner.
	RewardOwner *Owner `json:"rewardOwner,omitempty"`
	// The owner of the rewards from the validation period, if applicable.
	ValidationRewardOwner *Owner `json:"validationRewardOwner,omitempty"`
	// The owner of the rewards from delegations during the validation period,
	// if applicable.
	DelegationRewardOwner *Owner        `json:"delegationRewardOwner,omitempty"`
	PotentialReward       *json.Uint64  `json:"potentialReward,omitempty"`
	DelegationFee         json.Float32  `json:"delegationFee"`
	ExactDelegationFee    *json.Uint32  `json:"exactDelegationFee,omitempty"`
	Uptime                *json.Float32 `json:"uptime,omitempty"`
	Connected             bool          `json:"connected"`
	Staked                []UTXO        `json:"staked,omitempty"`
	// The delegators delegating to this validator
	Delegators []PrimaryDelegator `json:"delegators"`
}
    PermissionlessValidator is the repr. of a permissionless validator sent over APIs.
type PrimaryDelegator ¶
type PrimaryDelegator struct {
	Staker
	RewardOwner     *Owner       `json:"rewardOwner,omitempty"`
	PotentialReward *json.Uint64 `json:"potentialReward,omitempty"`
}
    PrimaryDelegator is the repr. of a primary network delegator sent over APIs.
type Staker ¶
type Staker struct {
	TxID        ids.ID       `json:"txID"`
	StartTime   json.Uint64  `json:"startTime"`
	EndTime     json.Uint64  `json:"endTime"`
	Weight      *json.Uint64 `json:"weight,omitempty"`
	StakeAmount *json.Uint64 `json:"stakeAmount,omitempty"`
	NodeID      ids.NodeID   `json:"nodeID"`
}
    APIStaker is the representation of a staker sent via APIs. [TxID] is the txID of the transaction that added this staker. [Amount] is the amount of tokens being staked. [StartTime] is the Unix time when they start staking [Endtime] is the Unix time repr. of when they are done staking [NodeID] is the node ID of the staker
type StaticClient ¶
type StaticClient interface {
	BuildGenesis(
		ctx context.Context,
		args *BuildGenesisArgs,
		options ...rpc.Option,
	) (*BuildGenesisReply, error)
}
    StaticClient for interacting with the platformvm static api
func NewStaticClient ¶
func NewStaticClient(uri string) StaticClient
NewClient returns a platformvm client for interacting with the platformvm static api
type StaticService ¶
type StaticService struct{}
    StaticService defines the static API methods exposed by the platform VM
func (*StaticService) BuildGenesis ¶
func (ss *StaticService) BuildGenesis(_ *http.Request, args *BuildGenesisArgs, reply *BuildGenesisReply) error
BuildGenesis build the genesis state of the Platform Chain (and thereby the Avalanche network.)