namecoin-transaction
Create the three standard namecoin transactions.
Installation
npm install --save namecoin-transaction
Usage
newName(name, random, address)
Preorder a name
and transfer the ownership to address
. For example:
namecoinTransaction.newName('d/raid', '467e5b41d4bcb8c100', 'N2c1SDkTsPUiWsrtTxFUG32umhmKp3kdpo')
nameFirstUpdate(name, random, value, address)
Register the name
and associate value
with it. This must be done 12 blocks after newName
. Use the same name
and random
values here as in newName
. The ownership of the name is transferred to address
. For example:
namecoinTransaction.nameFirstUpdate('d/raid', '467e5b41d4bcb8c100', JSON.stringify({"ip":"212.232.51.96","email":"namecoin@mail.com","map":{"":"212.232.51.96","www":"212.232.51.96"}}), 'NDkrT5eEmMgfmZVxST6zqCQv62on4LNwYK')
nameUpdate(name, value, address)
Update the value
associated with a name
. The ownership of the name is transferred to address
. For example:
namecoinTransaction.nameUpdate('d/raid', JSON.stringify({"ip":"212.232.51.96","map":{"*":"212.232.51.96"},"email":"namecoin@mail.com"}), 'N7ykABB1KLSScMyinV7ZSapygpVKLMwTzL')