register

package
v0.0.0-...-7a4b066 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package register - location for smart contract registration structs.

Package register - location for smart contract registration structs.

Package register - location for smart contract registration structs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateGatewayInfo

func ValidateGatewayInfo(gwInfo *GatewayRegisteredInfo) bool

ValidateGatewayInfo check if a given gateway info is valid.

func ValidateProviderInfo

func ValidateProviderInfo(pvdInfo *ProviderRegisteredInfo) bool

ValidateGatewayInfo check if a given provider info is valid.

Types

type GatewayRegisteredInfo

type GatewayRegisteredInfo struct {
	// RootKey is the gateway's public key,
	// and can be used to derive the filecoin wallet address for payment.
	// It is a lower case 65 bytes hex string.
	RootKey string `json:"root_key"`

	// NodeID is derived from the address of the account which registers this gateway, it is set by the smart contract.
	// It is a lower case 32 bytes hex string.
	NodeID string `json:"node_id"`

	// MsgSigningKey is the message signing public key.
	// It is a lower case 65 bytes hex string.
	// This can be updated via smart contract.
	MsgSigningKey string `json:"msg_signing_key"`

	// MsgSigningKeyVer is the message signing public key version.
	// This can be updated via smart contract.
	MsgSigningKeyVer byte `json:"msg_signing_key_ver"`

	// RegionCode is the region code of this gateway.
	// It is a ISO 3166-1 alpha-2 string.
	RegionCode string `json:"region_code"`

	// NetworkAddr is the network address of this gateway.
	// It should be a valid libp2p address.
	NetworkAddr string `json:"network_addr"`

	// Deregistering indicates whether or not this gateway is in the middle of deregistering itself.
	// It is set by the smart contract.
	Deregistering bool `json:"deregistering"`

	// DeregisteringHeight is the height of the block which contains the deregistering transaction.
	// It is set by the smart contract.
	DeregisteringHeight uint64 `json:"deregistering_height"`
}

GatewayRegisteredInfo represents the state or the stored information of a registered gateway.

type ProviderRegisteredInfo

type ProviderRegisteredInfo struct {
	// RootKey is the provider's public key,
	// and can be used to derive the filecoin wallet address for payment.
	// It is a lower case 65 bytes hex string.
	RootKey string `json:"root_key"`

	// NodeID is derived from the address of the account which registers this provider, it is set by the smart contract.
	// It is a lower case 32 bytes hex string.
	NodeID string `json:"node_id"`

	// MsgSigningKey is the message signing public key.
	// It is a lower case 65 bytes hex string.
	// This can be updated via smart contract.
	MsgSigningKey string `json:"msg_signing_key"`

	// MsgSigningKeyVer is the message signing public key version.
	// This can be updated via smart contract.
	MsgSigningKeyVer byte `json:"msg_signing_key_ver"`

	// OfferSigningKey is the offer signing public key.
	// It is a lower case 65 bytes hex string.
	OfferSigningKey string `json:"offer_signing_key"`

	// RegionCode is the region code of this provider.
	// It is a ISO 3166-1 alpha-2 string.
	RegionCode string `json:"region_code"`

	// NetworkAddr is the network address of this provider.
	// It should be a valid libp2p address.
	NetworkAddr string `json:"network_addr"`

	// Deregistering indicates whether or not this provider is in the middle of deregistering itself.
	// It is set by the smart contract.
	Deregistering bool `json:"deregistering"`

	// DeregisteringHeight is the height of the block which contains the deregistering transaction.
	// It is set by the smart contract.
	DeregisteringHeight uint64 `json:"deregistering_height"`
}

ProviderRegisteredInfo represents the state or the stored information of a registered provider.

Jump to

Keyboard shortcuts

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