https://github.com/web3space/api
API for ethnamed protocol
https://github.com/web3space/api
api nodejs npm
Last synced: about 1 month ago
JSON representation
API for ethnamed protocol
- Host: GitHub
- URL: https://github.com/web3space/api
- Owner: web3space
- Created: 2018-04-23T15:41:28.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-04T03:13:22.000Z (almost 8 years ago)
- Last Synced: 2025-02-15T11:48:42.997Z (over 1 year ago)
- Topics: api, nodejs, npm
- Language: LiveScript
- Homepage: https://ethnamed.io
- Size: 365 KB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Ethnamed Registry API
[Website](http://ethnamed.io) | [Discuss](https://t.me/ethnamed) | [Demo](http://wallet.ethnamed.io)
#### Use API
```
npm i ethnamed
```
### INIT (Backend, Frontend)
```Javascript
var web3 = if window ? window.web3 : require('web3');
var ethnamed = require('ethnamed')(window.web3);
var showResult = function(err, result) {
console.log(err, result);
}
```
#### CHECK NAME
```Javascript
ethnamed.verifyRecord("some@email.com", showResult); // yourname == yourname.ethnamed.io
```
#### REGISTER NAME
You can set of update record by yourself once you get the
```Javascript
var request = {
amountEthers: 0.01, //=> Please checkout the pricing table on ethnamed.io
name: "some@email.com", //=> It could be a different domain like microsoft.com, ethername.io, ...
record: '0x123...' //=> Verification Record with Standard ETH_ADDRESS,BTC_ADDRESS,...
};
// 1. In case when you use custom domain please send this request only when you put the meta tag in to the head of your website `yourname.domain.io`
//
// 2. In case you use nickname.ethnamed.io you can just do nothing for verification
ethnamed.setupRecord(request, showResult);
```
#### TRANSFER OWNERSHIP
Assign another owner when you sell the domain name
```Javascript
ethnamed.transferOwnership("some@email.com", '0x123...', showResult);
```
#### SEND TO (PAYPAL like functionality in crypto)
You can send funds to NON-existent address and let withdraw it when user registers it
```Javascript
var request = {
amountEthers: 0.01, //=> Please checkout the pricing table on ethnamed.io
name: "some@email.com", //=> It could be a different domain like microsoft.com, ethername.io, ...
};
ethnamed.sendTo(request, showResult);
```
-----------------
ethnamed.io