ons

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2020 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	CREATE_PRICE = 100
)

Variables

View Source
var (
	ErrInvalidDomain = errors.New("invalid domain name")
)

Functions

func EnableONS

func EnableONS(r action.Router) error

Types

type DomainCreate

type DomainCreate struct {
	Owner   action.Address `json:"owner"`
	Account action.Address `json:"account"`
	Name    string         `json:"name"`
	Price   action.Amount  `json:"price"`
}

func (DomainCreate) Marshal

func (dc DomainCreate) Marshal() ([]byte, error)

func (DomainCreate) OnsName

func (dc DomainCreate) OnsName() string

func (DomainCreate) Signers

func (dc DomainCreate) Signers() []action.Address

func (DomainCreate) Tags

func (dc DomainCreate) Tags() common.KVPairs

func (DomainCreate) Type

func (dc DomainCreate) Type() action.Type

func (*DomainCreate) Unmarshal

func (dc *DomainCreate) Unmarshal(data []byte) error

type DomainPurchase

type DomainPurchase struct {
	Name     string         `json:"name"`
	Buyer    action.Address `json:"buyer"`
	Account  action.Address `json:"account"`
	Offering action.Amount  `json:"offering"`
}

func (DomainPurchase) Marshal

func (dp DomainPurchase) Marshal() ([]byte, error)

func (DomainPurchase) OnsName

func (dp DomainPurchase) OnsName() string

func (DomainPurchase) Signers

func (dp DomainPurchase) Signers() []action.Address

func (DomainPurchase) Tags

func (dp DomainPurchase) Tags() common.KVPairs

func (DomainPurchase) Type

func (dp DomainPurchase) Type() action.Type

func (*DomainPurchase) Unmarshal

func (dp *DomainPurchase) Unmarshal(data []byte) error

type DomainSale

type DomainSale struct {
	DomainName   string         `json:"domainName"`
	OwnerAddress action.Address `json:"ownerAddress"`
	Price        action.Amount  `json:"price"`
	CancelSale   bool           `json:"cancelSale"`
}

func (DomainSale) Marshal

func (s DomainSale) Marshal() ([]byte, error)

func (DomainSale) OnsName

func (s DomainSale) OnsName() string

func (DomainSale) Signers

func (s DomainSale) Signers() []action.Address

func (DomainSale) Tags

func (s DomainSale) Tags() common.KVPairs

func (DomainSale) Type

func (DomainSale) Type() action.Type

func (*DomainSale) Unmarshal

func (s *DomainSale) Unmarshal(data []byte) error

type DomainSend

type DomainSend struct {
	From       action.Address `json:"from"`
	DomainName string         `json:"domainName"`
	Amount     action.Amount  `json:"amount"`
}

DomainSend is a struct which encapsulates information required in a send to domain transaction. This is struct is serialized according to network strategy before sending over network.

func (DomainSend) Marshal

func (s DomainSend) Marshal() ([]byte, error)

func (DomainSend) OnsName

func (s DomainSend) OnsName() string

func (DomainSend) Signers

func (s DomainSend) Signers() []action.Address

Signers gives the list of addresses of the signers (useful for verification_

func (DomainSend) Tags

func (s DomainSend) Tags() common.KVPairs

func (DomainSend) Type

func (s DomainSend) Type() action.Type

Type method gives the transaction type of the

func (*DomainSend) Unmarshal

func (s *DomainSend) Unmarshal(data []byte) error

type DomainUpdate

type DomainUpdate struct {
	Owner   action.Address `json:"owner"`
	Account action.Address `json:"account"`
	Name    string         `json:"name"`
	Active  bool           `json:"active"`
}

func (DomainUpdate) Marshal

func (du DomainUpdate) Marshal() ([]byte, error)

func (DomainUpdate) OnsName

func (du DomainUpdate) OnsName() string

func (DomainUpdate) Signers

func (du DomainUpdate) Signers() []action.Address

func (DomainUpdate) Tags

func (du DomainUpdate) Tags() common.KVPairs

func (DomainUpdate) Type

func (du DomainUpdate) Type() action.Type

func (*DomainUpdate) Unmarshal

func (du *DomainUpdate) Unmarshal(data []byte) error

type Ons

type Ons interface {
	action.Msg
	OnsName() string
}

Jump to

Keyboard shortcuts

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