Interface AliasApi

Alias API

The Alias API

Aliases are Data Containers with ownership. They can carry up to 1KB of arbitrary data which can be updated and are also transferable. Aliases are very powerful and be used for a various applications:

interface AliasApi {
    buyAlias: ((args: BuyAliasArgs) => Promise<TransactionId | UnsignedTransaction>);
    buyTopLevelDomain: ((args: BuyTopLevelDomainArgs) => Promise<TransactionId | UnsignedTransaction>);
    getAliasById: ((aliasId: string) => Promise<Alias>);
    getAliasByName: ((aliasName: string, tld?: string) => Promise<Alias>);
    getAliases: ((args: GetAliasesArgs) => Promise<AliasList>);
    getAliasesOnSale: ((args: GetAliasesOnSaleArgs) => Promise<AliasList>);
    getTopLevelDomains: ((args: GetTopLevelDomainsArgs) => Promise<TopLevelDomainList>);
    searchAliasesByName: ((args: SearchAliasesByNameArgs) => Promise<AliasList>);
    sellAlias: ((args: SellAliasArgs) => Promise<TransactionId | UnsignedTransaction>);
    setAlias: ((args: SetAliasArgs) => Promise<TransactionId | UnsignedTransaction>);
}

Properties

buyAlias: ((args: BuyAliasArgs) => Promise<TransactionId | UnsignedTransaction>)

Buys an Alias

Type declaration

buyTopLevelDomain: ((args: BuyTopLevelDomainArgs) => Promise<TransactionId | UnsignedTransaction>)

Buys a Top Level Domain (TLD)

Type declaration

getAliasById: ((aliasId: string) => Promise<Alias>)

Get alias by its id, i.e. get basic account info for given alias name

Type declaration

    • (aliasId): Promise<Alias>
    • Parameters

      • aliasId: string

        The alias id

      Returns Promise<Alias>

      The Alias object

getAliasByName: ((aliasName: string, tld?: string) => Promise<Alias>)

Get alias by name, i.e. get basic account info for given alias name

Type declaration

    • (aliasName, tld?): Promise<Alias>
    • Parameters

      • aliasName: string

        The alias name

      • Optionaltld: string

        optional Top Level Domain. If not given, the default domain 'signum' is being used

      Returns Promise<Alias>

      The Alias object

getAliases: ((args: GetAliasesArgs) => Promise<AliasList>)

Gets the aliases

Type declaration

    • (args): Promise<AliasList>
    • Parameters

      • args: GetAliasesArgs

      Returns Promise<AliasList>

      A list of aliases according the matches

getAliasesOnSale: ((args: GetAliasesOnSaleArgs) => Promise<AliasList>)

Get all aliases, which are on sale.

Type declaration

getTopLevelDomains: ((args: GetTopLevelDomainsArgs) => Promise<TopLevelDomainList>)

Gets all registered Top Level Domains

Type declaration

    • (args): Promise<TopLevelDomainList>
    • Parameters

      Returns Promise<TopLevelDomainList>

searchAliasesByName: ((args: SearchAliasesByNameArgs) => Promise<AliasList>)

Searches for aliases by their name or part of the name

Type declaration

sellAlias: ((args: SellAliasArgs) => Promise<TransactionId | UnsignedTransaction>)

Sells an Alias. Sales can be public if no recipient is defined, i.e. everybody can buy it, or only per account in case the recipient is given.

Type declaration

setAlias: ((args: SetAliasArgs) => Promise<TransactionId | UnsignedTransaction>)

Sets or Updates an Alias

Type declaration