Skip to content

How do I use ANS while Sapphire doesn't support it?

Cristiano Martins edited this page May 12, 2018 · 9 revisions

Please note this functionality is currently in beta testing.

The only way to use ANS while Sapphire does not support it is through Lynx, using the command line. Or through a regular non-windows terminal.

The available operations are:

Register an ANS address

registerans "address" "username"

This command takes an existing address that you own and links it to the username you supply. It costs 50 ECC to perform this action. Note that you can not pay for someone else's ANS. You can obviously send them coins so they can buy it but you can not perform this action on their behalf.

Example: registerans ER1KyyBRvtxhVwdtjfp39ApzevpHLLUdER test

Possible error message:

there can only be 1 input for a payment for a service

We are looking into this and will fix it as soon as possible

You need to unlock the wallet before being able to register an ANS address:

walletpassphrase "password" "time to unlock for in seconds".

Example: walletpassphrase "password" 100

Lookup a given address to see if it's linked to a username

getansrecord "address" "PTR"

This command takes an existing address and returns a username if the given address is an ANS address.

Example: getansrecord ER1KyyBRvtxhVwdtjfp39ApzevpHLLUdER PTR

Find what address a given username belongs to if it does

getansrecord "username" "A"

This command takes a given username and returns an address if there is only one address with that username. Or multiple pairs of addresses and usernames (with their respective unique IDs) if there are multiple addresses with the same username. It also returns the expiration time of a given ANS address.

Example: getansrecord test A

Send ECC to ANS address

sendtoans "username" amount "code"

This command enables users to send ECC directly to a username (assuming it is linked to an address). The cost of this transaction is the same as any other transaction that does not use ANS. Users do not pay more for making transactions using ANS. The parameter code is the ID of the username.

Example: sendtoans test 1000 1