Documentation ¶
Index ¶
- Variables
- func EnableONS(r action.Router) error
- type DeleteSub
- type DomainCreate
- type DomainPurchase
- type DomainSale
- type DomainSend
- type DomainUpdate
- type Ons
- type RenewDomain
- type RenewDomainTx
- func (r RenewDomainTx) ProcessCheck(ctx *action.Context, tx action.RawTx) (bool, action.Response)
- func (r RenewDomainTx) ProcessDeliver(ctx *action.Context, tx action.RawTx) (bool, action.Response)
- func (r RenewDomainTx) ProcessFee(ctx *action.Context, signedTx action.SignedTx, start action.Gas, ...) (bool, action.Response)
- func (r RenewDomainTx) Validate(ctx *action.Context, signedTx action.SignedTx) (bool, error)
Constants ¶
This section is empty.
Variables ¶
var (
ErrInvalidDomain = errors.New("invalid domain name")
)
Functions ¶
Types ¶
type DeleteSub ¶ added in v0.14.0
DeleteSub
This transaction deletes the specific sub domain if sub domain name is passed. It deletes all the subdomains if a parent domain name is passed.
type DomainCreate ¶
type DomainCreate struct { Owner action.Address `json:"owner"` Beneficiary action.Address `json:"account"` Name ons.Name `json:"name"` Uri string `json:"uri"` BuyingPrice action.Amount `json:"buyingPrice"` }
DomainCreate This transaction is used to create a domain or sub-domain. This transaction is supposed to be sent by creator of an
original domain or the owner of the parent of the sub-domain. The Beneficiary Address can be a valid Oneledger Address, which will receive funds in any currency sent to this domain. The domain name has to be of the type domain.ol or sub.domain.ol, always terminating in the .ol top level domain. The URI can be a valid RFC-3986 compliant string of characters, which is expected to be used as a meta resource location.
The BuyingPrice which must be in OLT, for domain is the sum of the creation price and the domain per block fees.
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() kv.Pairs
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 ons.Name `json:"name"` Buyer action.Address `json:"buyer"` Account action.Address `json:"account"` Offering action.Amount `json:"offering"` }
DomainPurchase
This transaction lets any buyer purchase a domain which is on sale or has expired.
For on sale domains the Offering should be more than the sale price and for expired domains the offering should be more than the base domain price.
The expiry height is reset based on the extra OLT offered.
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() kv.Pairs
func (DomainPurchase) Type ¶
func (dp DomainPurchase) Type() action.Type
func (*DomainPurchase) Unmarshal ¶
func (dp *DomainPurchase) Unmarshal(data []byte) error
type DomainSale ¶
type DomainSale struct { Name ons.Name `json:"name"` 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() kv.Pairs
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"` Name ons.Name `json:"name"` 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() kv.Pairs
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"` Beneficiary action.Address `json:"beneficiary"` Name ons.Name `json:"name"` Active bool `json:"active"` Uri string `json:"uri"` }
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() kv.Pairs
func (DomainUpdate) Type ¶
func (du DomainUpdate) Type() action.Type
func (*DomainUpdate) Unmarshal ¶
func (du *DomainUpdate) Unmarshal(data []byte) error
type RenewDomain ¶ added in v0.14.0
type RenewDomain struct { //Owner of sub Domain Owner action.Address `json:"owner"` //Name of New Sub domain Name ons.Name `json:"name"` //Amount Added to extend duration of subscription BuyingPrice action.Amount `json:"buyingPrice"` }
RenewDomain
This transaction is used to renew
func (RenewDomain) Marshal ¶ added in v0.14.0
func (r RenewDomain) Marshal() ([]byte, error)
func (RenewDomain) OnsName ¶ added in v0.14.0
func (r RenewDomain) OnsName() string
func (RenewDomain) Signers ¶ added in v0.14.0
func (r RenewDomain) Signers() []action.Address
func (RenewDomain) Tags ¶ added in v0.14.0
func (r RenewDomain) Tags() kv.Pairs
func (RenewDomain) Type ¶ added in v0.14.0
func (r RenewDomain) Type() action.Type
func (*RenewDomain) Unmarshal ¶ added in v0.14.0
func (r *RenewDomain) Unmarshal(data []byte) error
type RenewDomainTx ¶ added in v0.14.0
type RenewDomainTx struct { }