Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterCodec(cdc *codec.Codec)
- type Account
- type Domain
- type MsgAddAccountCertificates
- type MsgDeleteAccount
- type MsgDeleteAccountCertificate
- type MsgDeleteDomain
- type MsgFlushDomain
- type MsgRegisterAccount
- type MsgRegisterDomain
- type MsgRenewAccount
- type MsgRenewDomain
- type MsgReplaceAccountTargets
- type MsgTransferAccount
- type MsgTransferDomain
Constants ¶
const ( ModuleName = "domain" DomainStoreKey = "domain" AccountStoreKey = "account" IndexStoreKey = ModuleName + "index" RouterKey = ModuleName QuerierRoute = ModuleName )
Module names
const (
// QueryDomain is the query route used to get a domain by its name
QueryDomain = "get"
)
Module Queries
Variables ¶
var ErrAccountDoesNotExist = sdkerrors.Register(ModuleName, 6, "account does not exist")
var ErrAccountExists = sdkerrors.Register(ModuleName, 12, "account already exists")
var ErrAccountExpired = sdkerrors.Register(ModuleName, 7, "account has expired")
var ErrCertificateDoesNotExist = sdkerrors.Register(ModuleName, 15, "certificate does not exist")
var ErrCertificateExists = sdkerrors.Register(ModuleName, 14, "certificate already exists")
var ErrDomainAlreadyExists = sdkerrors.Register(ModuleName, 2, "domain already exists")
var ErrDomainDoesNotExist = sdkerrors.Register(ModuleName, 5, "domain does not exist")
var ErrDomainExpired = sdkerrors.Register(ModuleName, 11, "domain has expired")
var ErrInvalidAccountName = sdkerrors.Register(ModuleName, 9, "invalid account name")
var ErrInvalidBlockchainTarget = sdkerrors.Register(ModuleName, 10, "blockchain target provided is not valid")
var ErrInvalidDomainName = sdkerrors.Register(ModuleName, 1, "domain name provided is invalid")
var ErrInvalidOwner = sdkerrors.Register(ModuleName, 8, "invalid owner")
var ErrInvalidRegisterDomainRequest = sdkerrors.Register(ModuleName, 4, "register domain request is not valid")
var ErrInvalidRequest = sdkerrors.Register(ModuleName, 13, "malformed request")
var ModuleCdc = codec.New()
Functions ¶
func RegisterCodec ¶
Types ¶
type Account ¶
type Account struct { // Domain references the domain this account belongs to Domain string // Name is the name of the account Name string // Owner is the address that owns the account Owner sdk.AccAddress // ValidUntil defines a unix timestamp of the expiration of the account ValidUntil int64 // Targets is the list of blockchain addresses this account belongs to Targets []iovns.BlockchainAddress // Certificates contains the list of certificates to identify the account owner Certificates [][]byte // Broker can be empty // it identifies an entity that facilitated the transaction of the account Broker sdk.AccAddress }
Account defines an account that belongs to a domain
type Domain ¶
type Domain struct { // Name is the name of the domain Name string // Admin is the owner of the domain Admin sdk.AccAddress // ValidUntil is a unix timestamp that defines for how long the domain is valid ValidUntil int64 // HasSuperuser checks if the domain is owned by a super user or not HasSuperuser bool // AccountRenew defines the duration of each created or renewed account // under the domain AccountRenew time.Duration // Broker TODO needs comment Broker sdk.AccAddress }
Domain defines a domain
type MsgAddAccountCertificates ¶
type MsgAddAccountCertificates struct { Domain string Name string Owner sdk.AccAddress NewCertificate []byte }
func (*MsgAddAccountCertificates) GetSignBytes ¶
func (m *MsgAddAccountCertificates) GetSignBytes() []byte
func (*MsgAddAccountCertificates) GetSigners ¶
func (m *MsgAddAccountCertificates) GetSigners() []sdk.AccAddress
func (*MsgAddAccountCertificates) Route ¶
func (m *MsgAddAccountCertificates) Route() string
func (*MsgAddAccountCertificates) Type ¶
func (m *MsgAddAccountCertificates) Type() string
func (*MsgAddAccountCertificates) ValidateBasic ¶
func (m *MsgAddAccountCertificates) ValidateBasic() error
type MsgDeleteAccount ¶
type MsgDeleteAccount struct { Domain string Name string Owner sdk.AccAddress }
func (*MsgDeleteAccount) GetSignBytes ¶
func (m *MsgDeleteAccount) GetSignBytes() []byte
GetSignBytes returns an ordered json of the request
func (*MsgDeleteAccount) GetSigners ¶
func (m *MsgDeleteAccount) GetSigners() []sdk.AccAddress
GetSigners returns the list of address that should list the request in this case the admin of the domain
func (*MsgDeleteAccount) Route ¶
func (m *MsgDeleteAccount) Route() string
Route returns the name of the module
func (*MsgDeleteAccount) ValidateBasic ¶
func (m *MsgDeleteAccount) ValidateBasic() error
ValidateBasic does stateless checks on the request
type MsgDeleteAccountCertificate ¶
type MsgDeleteAccountCertificate struct { Domain string Name string DeleteCertificate []byte Owner sdk.AccAddress }
func (*MsgDeleteAccountCertificate) GetSignBytes ¶
func (m *MsgDeleteAccountCertificate) GetSignBytes() []byte
func (*MsgDeleteAccountCertificate) GetSigners ¶
func (m *MsgDeleteAccountCertificate) GetSigners() []sdk.AccAddress
func (*MsgDeleteAccountCertificate) Route ¶
func (m *MsgDeleteAccountCertificate) Route() string
func (*MsgDeleteAccountCertificate) Type ¶
func (m *MsgDeleteAccountCertificate) Type() string
func (*MsgDeleteAccountCertificate) ValidateBasic ¶
func (m *MsgDeleteAccountCertificate) ValidateBasic() error
type MsgDeleteDomain ¶
type MsgDeleteDomain struct { Domain string Owner sdk.AccAddress }
func (*MsgDeleteDomain) GetSignBytes ¶
func (m *MsgDeleteDomain) GetSignBytes() []byte
func (*MsgDeleteDomain) GetSigners ¶
func (m *MsgDeleteDomain) GetSigners() []sdk.AccAddress
func (*MsgDeleteDomain) Route ¶
func (m *MsgDeleteDomain) Route() string
func (*MsgDeleteDomain) Type ¶
func (m *MsgDeleteDomain) Type() string
func (*MsgDeleteDomain) ValidateBasic ¶
func (m *MsgDeleteDomain) ValidateBasic() error
type MsgFlushDomain ¶
type MsgFlushDomain struct { Domain string Owner sdk.AccAddress }
MsgFlushDomain is used to flush a domain
func (*MsgFlushDomain) GetSignBytes ¶
func (m *MsgFlushDomain) GetSignBytes() []byte
func (*MsgFlushDomain) GetSigners ¶
func (m *MsgFlushDomain) GetSigners() []sdk.AccAddress
func (*MsgFlushDomain) Route ¶
func (m *MsgFlushDomain) Route() string
func (*MsgFlushDomain) Type ¶
func (m *MsgFlushDomain) Type() string
func (*MsgFlushDomain) ValidateBasic ¶
func (m *MsgFlushDomain) ValidateBasic() error
type MsgRegisterAccount ¶
type MsgRegisterAccount struct { Domain string Name string Owner sdk.AccAddress Targets []iovns.BlockchainAddress Broker sdk.AccAddress }
func (*MsgRegisterAccount) GetSignBytes ¶
func (m *MsgRegisterAccount) GetSignBytes() []byte
GetSignBytes returns the expected signature
func (*MsgRegisterAccount) GetSigners ¶
func (m *MsgRegisterAccount) GetSigners() []sdk.AccAddress
GetSigners returns the expected signers of the request
func (*MsgRegisterAccount) Route ¶
func (m *MsgRegisterAccount) Route() string
Route returns the route key for the request
func (*MsgRegisterAccount) Type ¶
func (m *MsgRegisterAccount) Type() string
Type returns the type of the msg
func (*MsgRegisterAccount) ValidateBasic ¶
func (m *MsgRegisterAccount) ValidateBasic() error
ValidateBasic checks the request in a stateless way
type MsgRegisterDomain ¶
type MsgRegisterDomain struct { // Name is the name of the domain we want to register Name string `json:"domain" arg:"--domain" helper:"name of the domain"` // Admin is the address of the newly registered domain Admin sdk.AccAddress `json:"admin"` // HasSuperuser defines if the domain registered has an owner or not HasSuperuser bool `json:"has_superuser"` // Broker TODO document Broker sdk.AccAddress `json:"broker" arg:"--broker" helper:"the broker"` // AccountRenew defines the expiration time in seconds of each newly registered account. AccountRenew int64 `json:"account_renew" arg:"--account-renew" helper:"account's renewal time in seconds"` }
MsgRegisterDomain is the request used to register new domains
func (*MsgRegisterDomain) GetSignBytes ¶
func (m *MsgRegisterDomain) GetSignBytes() []byte
GetSignBytes returns an ordered json of the request
func (*MsgRegisterDomain) GetSigners ¶
func (m *MsgRegisterDomain) GetSigners() []sdk.AccAddress
GetSigners returns the list of address that should list the request in this case the admin of the domain
func (*MsgRegisterDomain) Route ¶
func (m *MsgRegisterDomain) Route() string
Route returns the name of the module
func (*MsgRegisterDomain) ValidateBasic ¶
func (m *MsgRegisterDomain) ValidateBasic() error
ValidateBasic does stateless checks on the request it checks if the domain name is valid
type MsgRenewAccount ¶
func (*MsgRenewAccount) GetSignBytes ¶
func (m *MsgRenewAccount) GetSignBytes() []byte
func (*MsgRenewAccount) GetSigners ¶
func (m *MsgRenewAccount) GetSigners() []sdk.AccAddress
func (*MsgRenewAccount) Route ¶
func (m *MsgRenewAccount) Route() string
func (*MsgRenewAccount) Type ¶
func (m *MsgRenewAccount) Type() string
func (*MsgRenewAccount) ValidateBasic ¶
func (m *MsgRenewAccount) ValidateBasic() error
type MsgRenewDomain ¶
type MsgRenewDomain struct { // Domain is the domain name to renew Domain string }
func (*MsgRenewDomain) GetSignBytes ¶
func (m *MsgRenewDomain) GetSignBytes() []byte
func (*MsgRenewDomain) GetSigners ¶
func (m *MsgRenewDomain) GetSigners() []sdk.AccAddress
func (*MsgRenewDomain) Route ¶
func (m *MsgRenewDomain) Route() string
func (*MsgRenewDomain) Type ¶
func (m *MsgRenewDomain) Type() string
func (*MsgRenewDomain) ValidateBasic ¶
func (m *MsgRenewDomain) ValidateBasic() error
type MsgReplaceAccountTargets ¶
type MsgReplaceAccountTargets struct { Domain string Name string NewTargets []iovns.BlockchainAddress Owner sdk.AccAddress }
func (*MsgReplaceAccountTargets) GetSignBytes ¶
func (m *MsgReplaceAccountTargets) GetSignBytes() []byte
func (*MsgReplaceAccountTargets) GetSigners ¶
func (m *MsgReplaceAccountTargets) GetSigners() []sdk.AccAddress
func (*MsgReplaceAccountTargets) Route ¶
func (m *MsgReplaceAccountTargets) Route() string
func (*MsgReplaceAccountTargets) Type ¶
func (m *MsgReplaceAccountTargets) Type() string
func (*MsgReplaceAccountTargets) ValidateBasic ¶
func (m *MsgReplaceAccountTargets) ValidateBasic() error
type MsgTransferAccount ¶
type MsgTransferAccount struct { Domain string Name string Owner sdk.AccAddress NewOwner sdk.AccAddress }
MsgTransferAccount is the message used to transfer accounts
func (*MsgTransferAccount) GetSignBytes ¶
func (m *MsgTransferAccount) GetSignBytes() []byte
GetSignBytes returns an ordered json of the request
func (*MsgTransferAccount) GetSigners ¶
func (m *MsgTransferAccount) GetSigners() []sdk.AccAddress
GetSigners returns the list of address that should list the request in this case the admin of the domain
func (*MsgTransferAccount) Route ¶
func (m *MsgTransferAccount) Route() string
Route returns the name of the module
func (*MsgTransferAccount) Type ¶
func (m *MsgTransferAccount) Type() string
Type returns the action
func (*MsgTransferAccount) ValidateBasic ¶
func (m *MsgTransferAccount) ValidateBasic() error
ValidateBasic does stateless checks on the request it checks if the domain name is valid
type MsgTransferDomain ¶
type MsgTransferDomain struct { Domain string Owner sdk.AccAddress NewAdmin sdk.AccAddress }
func (*MsgTransferDomain) GetSignBytes ¶
func (m *MsgTransferDomain) GetSignBytes() []byte
func (*MsgTransferDomain) GetSigners ¶
func (m *MsgTransferDomain) GetSigners() []sdk.AccAddress
func (*MsgTransferDomain) Route ¶
func (m *MsgTransferDomain) Route() string
func (*MsgTransferDomain) Type ¶
func (m *MsgTransferDomain) Type() string
func (*MsgTransferDomain) ValidateBasic ¶
func (m *MsgTransferDomain) ValidateBasic() error
Source Files ¶
- codec.go
- errors.go
- msg_add_account_certs.go
- msg_del_account_certs.go
- msg_delete_account.go
- msg_delete_domain.go
- msg_flush_domain.go
- msg_register_account.go
- msg_register_domain.go
- msg_renew_account.go
- msg_renew_domain.go
- msg_replace_account_targets.go
- msg_transfer_account.go
- msg_transfer_domain.go
- naming.go
- types.go