CryptoName is a personal name storage business card based on elastos side chain. It enables the user to store their public profile info within it. If you know the CryptoName you can access the info stored within. The CryptoName info is the public profile of the user.
The storage structure of CryptoName is like a Key/Value storage. The user can set a keyword as the Key, and at the same time input the value as its content.
So if others, including apps, want to access some info of the user, you can access them by using the keywords.
By default, the CryptoName has included "btc.address", "eth.address", "ela.address", usdt.address, "did", and "publickey" keywords. If you need more fields on CryptoName, you can ask the user to set it. We support 50 fields within the CryptoName.
The user can edit their "profile" on https://CryptoName.org, it's very simple.
If you want to help the user to set their CryptoName, you need to support a standard Web3 provider in your app, and it also needs to support the elastos side chain wallet.
Contract address:
ETH Ropsten Test Network: 0xefdb328c09b6e20314fe201a5dba74cf36ef8bdd
Elastos sidechain Network: 0xc4032babad2b76c39abec3c4e365611de78528ed
ABI file:
xxxxxxxxxx
<script type="text/javascript" src="https://cryptoname.org/js/domain_abi.js"></script>
JS file:
xxxxxxxxxx
https://cryptoname.org/js/crypton.js
Sample:
xxxxxxxxxx
<script type="text/javascript" src="https://cryptoname.org/js/crypton.js"></script>
<script>
var crypton = new Crypton(abiArray, contractAddress, web3);
</script>
npm install:
xxxxxxxxxx
npm install cryptoname
Sample:
xxxxxxxxxx
import { Crypton } from "cryptoname";
let nameObject = await Crypton.QueryName('songsjun');
let elaAddress = await Crypton.QueryKey('songsjun', 'ela.address');
xxxxxxxxxx
https://[Your Name].elastos.name/info.json
Example:
Http Get: https://ABCD.elastos.name/info.json
Response:
xxxxxxxxxx
{
"name": "abcd",
"btc.address": "17HH8xuwJxx6EY8CtyLbQoWAfAShj6Zopt",
"publickey": "029bad2e7ab4ff62c42bfba47499f8f89b2accaf08b678884438af04f826a0af8a",
"did": "ifTHxJhpnPxrsB9dYjPfCm1S3zQhYCY9YR",
"ela.address": "Ee7TUCnmVa7DrSpFTPC9o3U7hb2vUNoZfU",
"eth.address": "0x4AE4c8A713c4060A0B6Da8EB542742ec78bacC18"
}
xxxxxxxxxx
https://[Your Name].elastos.name/info.js
Example:
xxxxxxxxxx
<script type="text/javascript" src="https://ABCD.elastos.name/info.js"></script>
Below JS object will be imported to your window:
xxxxxxxxxx
var window.abcd_profile_info = {
"name": "abcd",
"btc.address": "17HH8xuwJxx6EY8CtyLbQoWAfAShj6Zopt",
"publickey": "029bad2e7ab4ff62c42bfba47499f8f89b2accaf08b678884438af04f826a0af8a",
"did": "ifTHxJhpnPxrsB9dYjPfCm1S3zQhYCY9YR",
"ela.address": "Ee7TUCnmVa7DrSpFTPC9o3U7hb2vUNoZfU",
"eth.address": "0x4AE4c8A713c4060A0B6Da8EB542742ec78bacC18"
}
xxxxxxxxxx
https://[Your Name].elastos.name/[Keyword]
Example:
Http Get: https://ABCD.elastos.name/ela.address
Response:
xxxxxxxxxx
Ee7TUCnmVa7DrSpFTPC9o3U7hb2vUNoZfU
https://ABCD.elastos.name/publickey
Response:
xxxxxxxxxx
029bad2e7ab4ff62c42bfba47499f8f89b2accaf08b678884438af04f826a0af8a
xxxxxxxxxx
npm install cryptoname
xxxxxxxxxx
import { Crypton } from "cryptoname";
let nameObject = await Crypton.QueryName('songsjun');
let elaAddress = await Crypton.QueryKey('songsjun', 'ela.address');
*The elephant wallet already supports CryptoName, you can send crypto assets to your friends by simply inserting their CryptoName in the address bar.