π‘Using Oxen Name System (ONS)
Last updated
Last updated
The following steps can be used to register and update ONS mappings in the CLI wallet. Note that you can access a detailed description of each command within the app, using βhelp <command_name>β.
Purchasing an ONS record in the CLI wallet uses the ons_buy_mapping
command. All arguments for the ons_buy_mapping
command are optional except for the <name>
and <value>
that the name maps to.
ons_buy_mapping [index=<N1>[,<N2>,β¦]] [<priority>] [owner=<value>] [backup_owner=<value>] <name> <value>
Example: Buy an ONS record that maps βKeeJefβ to a Session ID: 053 β¦ 254. The wallet buying is the owner of the record:
Example: Buy an ONS record that maps βKeeJefβ to a Session ID: 053 β¦ 254. The wallet buying the mapping is the owner of the record, but specifies a backup owner who will also be authorised to update the record:
Example: Buy an ONS record that maps βKeeJefβ to a Session ID: 053β¦254. You buy on behalf of another wallet T6UD8...ppir and specify another backup wallet:
Updating an ONS record in the CLI wallet uses the ons_update_mapping
command. All arguments for the ons_update_mapping
command are optional except the name of the record to update, and at least one field of the record to update (owner, backup_owner, or value). The [signature] argument is for deferring updates to the record, and is explained in detail in the next section.
ons_update_mapping [owner=<value>] [backup_owner=<value>] [value=<ons_value>] [signature=<hex_signature>] <name>
Example: Updating the owner of the record (essentially transferring ownership β after changing ownership, you will no longer be authorised to update the record):
Note: At this time you can only update Session ID mappings, you cannot yet add a wallet address mapping to your name β this will require additional changes which will be implemented at a later date.
Example: Update all fields of the mapping.
In this scenario, you have an ONS record that you wish to update, and youβre able to coordinate with the wallet owning the record. The wallet that owns the record can execute this command to generate a signature.
ons_make_update_mapping_signature [owner=<value>] [backup_owner=<value>] [value=<ons_value>] <name>
Example: User transfers ownership of a record to another person T6TEJβ¦t3x with the value 058cβ¦c08. The original owner generates a signature.
The generated signature:
On the wallet to execute, the arguments must match the arguments specified in the ons_make_update_mapping_signature
with the added signature argument: