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, ValueError
is raised.
node_name
:
str
– the node name to be parsed
Tuple[str, int]
– tuple (name, generation)
Converts the node name to the compact form, omitting generation 0.
node_name
:
str | None
– the node name in compact or full form
str | None
– the node name in the compact form
Converts the node name to the full form, containing generation.
node_name
:
str | None
– the node name in compact or full form
str | None
– the node name in the full form
Shortcut function to resolve a node name and get the node URI.
name
:
str
– the node name
naming_server
:
str
– (optional) a naming server to be used
str | None
– the node URI, or None
if the name does not exist
Generic naming server error.
name
:
str
– API method name
message
:
str
– error message
Naming server returned an error response.
str
–
Error code.
name
:
str
– request name
response
:
Mapping[str, Any]
– server response
Naming server connection error.
message
:
str
– error message
Naming API interface.
server
:
str
– (optional) the naming server URL
Generic naming API call.
method
:
str
– name of the method to be called
params
:
Sequence[Any]
– parameters of the call
schema
:
Any
– (optional) JSON schema to validate the return value
Any
– the return value, if any
Register or update the name. See Architecture Overview for the detailed description of the algorithm.
name
: str
– the name to be registered/updated. Required.
generation
: int
– the name generation to be registered/updated. Required.
updating_key
: bytes
– the public key for verifying signatures of further updates of the name. May be None
– the current key is preserved in this case.
node_uri
: str
– URI of the REST API endpoint of the node to which the name is assigned. May be None
– the current URI is preserved in this case.
signing_key
: bytes
– the public key of the name owner. May be None
– the current key is preserved in this case.
valid_from
: Timestamp
– the moment in time the owner's key is valid from. May be None
, if signing_key
is also None
.
previous_digest
: bytes
– 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 None
, if the name was never registered before.
signature
: bytes
– the signature, if required, None
otherwise.
str
– identifier of the operation that was created
Get current status of the operation.
operation_id
: str
types.OperationStatusInfo
– the operation status or None
, if the operation ID is unknown
Get current information about the given generation of the name.
name
: str
generation
: int
types.RegisteredNameInfo
– the information or None
, if the name/generation is not found
Get past information about the given generation of the name.
name
: str
generation
: int
at
: Timestamp
– the moment in time the information is related to
types.RegisteredNameInfo
– the information or None
, if the name/generation did not exist at the given moment
Check if the given name is available for registration.
name
: str
generation
: int
bool
– True
, if the name is free, False
otherwise
Find a name that is close to the given name.
name
: str
types.RegisteredNameInfo
– information about the name or None
, if no name found that is close enough
Get the whole history of signing keys for the given name.
name
: str
generation
: int
List[types.SigningKeyInfo]
Get the list of all registered names at the given moment. The list is returned in pages, one per call.
at
: Timestamp
– the moment in time the information is related to
page
: int
– number of the page to be returned (starting from 0)
size
: int
– size of the page
List[types.RegisteredNameInfo]
Get the list of all names registered after the given moment. The list is returned in pages, one per call.
at
: Timestamp
– the moment in time the information is related to
page
: int
– number of the page to be returned (starting from 0)
size
: int
– size of the page
List[types.RegisteredNameInfo]
Field Name | Type | Description |
---|---|---|
operation_id |
str
|
|
name |
str
|
the name that was created or updated by the operation |
generation |
int
|
the generation of the name that was created or updated by the operation |
status |
types.OperationStatus
|
the current status of the operation |
added |
Timestamp
|
when the operation was added |
completed |
Timestamp
|
when the operation was completed |
error_code |
str
|
the error code, if the operation have been failed |
error_message |
str
|
the human-readable error description, if the operation have been failed |
Field Name | Type | Description |
---|---|---|
name |
str
|
|
generation |
int
|
|
updating_key |
bytes
|
the public key for verifying signatures of further updates of the name |
node_uri |
str
|
URI of the REST API endpoint of the node to which the name is assigned. May be absent. |
created |
Timestamp
|
when the name was created |
signing_key |
bytes
|
the public key of the name owner. May be None . |
valid_from |
Timestamp
|
the moment in time the owner's key is valid from. May be absent, if signing_key is also absent.
|
digest |
bytes
|
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 |
bytes
|
the public key |
valid_from |
Timestamp
|
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 |