Main Moera naming server.
Moera developers' naming server.
Parse a node name and return its name and generation parts.
If the node name does not include a generation, generation 0 is returned. If name syntax is invalid, Error
is thrown.
nodeName
:
string
– the node name to be parsed
[string, number]
– array [name, generation]
Converts the node name to the compact form, omitting generation 0.
nodeName
:
string | null
– the node name in compact or full form
string | null
– the node name in the compact form
Converts the node name to the full form, containing generation.
nodeName
:
string | null
– the node name in compact or full form
string | null
– the node name in the full form
Shortcut function to resolve a node name and get the node URI.
name
:
string
– the node name
namingServer
:
string
– (optional) a naming server to be used
Promise<string | null>
– the node URI, or null
if the name does not exist
Validates a data structure against the given JSON schema. In the process of validation, additional fields in the input that are absent in the schema are deleted.
schemaName
:
string
– the schema name (same as the validated structure name)
data
:
any
– the data structure being validated
{ valid: boolean; errors?: { message?: string }[] | null }
– result of the validation and error messages
Generic naming server error.
name
:
string
– API method name
message
:
string
– error message
Naming server connection error.
string
–
Error code.
message
:
string
– error message
result
:
ErrorResult
– server response
Naming server connection error.
message
:
string
– error message
Naming API interface.
server
:
string
– (optional) the naming server URL
Register or update the name. See Architecture Overview for the detailed description of the algorithm.
name
: string
– the name to be registered/updated. Required.
generation
: number
– the name generation to be registered/updated. Required.
updatingKey
: string
– the public key for verifying signatures of further updates of the name. May be null
– the current key is preserved in this case.
nodeUri
: string
– URI of the REST API endpoint of the node to which the name is assigned. May be null
– the current URI is preserved in this case.
signingKey
: string
– the public key of the name owner. May be null
– the current key is preserved in this case.
validFrom
: number
– the moment in time the owner's key is valid from. May be null
, if signingKey
is also null
.
previousDigest
: string
– the unique identifier as reported by a naming server of the current state of the name. Used to detect the situations when the name was changed by someone else between sending the request and processing it. May be null
, if the name was never registered before.
signature
: string
– the signature, if required, null
otherwise.
Promise<string>
– identifier of the operation that was created
Get current status of the operation.
operationId
: string
Promise<OperationStatusInfo>
– the operation status or null
, if the operation ID is unknown
Get current information about the given generation of the name.
name
: string
generation
: number
Promise<RegisteredNameInfo>
– the information or null
, if the name/generation is not found
Get past information about the given generation of the name.
name
: string
generation
: number
at
: number
– the moment in time the information is related to
Promise<RegisteredNameInfo>
– the information or null
, if the name/generation did not exist at the given moment
Check if the given name is available for registration.
name
: string
generation
: number
Promise<boolean>
– true
, if the name is free, false
otherwise
Find a name that is close to the given name.
name
: string
Promise<RegisteredNameInfo>
– information about the name or null
, if no name found that is close enough
Get the whole history of signing keys for the given name.
name
: string
generation
: number
Promise<SigningKeyInfo[]>
Get the list of all registered names at the given moment. The list is returned in pages, one per call.
at
: number
– the moment in time the information is related to
page
: number
– number of the page to be returned (starting from 0)
size
: number
– size of the page
Promise<RegisteredNameInfo[]>
Get the list of all names registered after the given moment. The list is returned in pages, one per call.
at
: number
– the moment in time the information is related to
page
: number
– number of the page to be returned (starting from 0)
size
: number
– size of the page
Promise<RegisteredNameInfo[]>
Field Name | Type | Description |
---|---|---|
operationId |
string
|
|
name |
string
|
the name that was created or updated by the operation |
generation |
number
|
the generation of the name that was created or updated by the operation |
status |
OperationStatus
|
the current status of the operation |
added |
number
|
when the operation was added |
completed |
number
|
when the operation was completed |
errorCode |
string
|
the error code, if the operation have been failed |
errorMessage |
string
|
the human-readable error description, if the operation have been failed |
Field Name | Type | Description |
---|---|---|
name |
string
|
|
generation |
number
|
|
updatingKey |
string
|
the public key for verifying signatures of further updates of the name |
nodeUri |
string
|
URI of the REST API endpoint of the node to which the name is assigned. May be absent. |
created |
number
|
when the name was created |
signingKey |
string
|
the public key of the name owner. May be null . |
validFrom |
number
|
the moment in time the owner's key is valid from. May be absent, if signingKey is also absent.
|
digest |
string
|
a unique identifier of the current state of the name. May be transaction ID of the latest transaction with this name in the blockchain, or a cryptographic digest of the current state. |
Field Name | Type | Description |
---|---|---|
key |
string
|
the public key |
validFrom |
number
|
the moment in time the key is valid from |
Enums are string literals. Every particular enum type is a set of allowed values you can choose from.
This enum is used to designate the operation status both by the naming server and by the node.
Value | Description |
---|---|
"WAITING" |
operation is waiting to be sent to the naming server |
"ADDED" |
operation was accepted by the naming server |
"STARTED" |
the naming server started to proceed the operation |
"SUCCEEDED" |
operation completed successfully |
"FAILED" |
operation failed |
"UNKNOWN" |
operation status is unknown |