The NEVERDIE API is designed to allow developers to create their own DApps that utilize NDC,TPT and other NEVERDIE ERC-20 tokens through simple & elegant function calls.
If you would like provide feedback on current and future implementations or need any further assitance we encourage you to visit our DISCORD
Getting Started
In order to make use of this API you have to create a partner account and obtain a partner API key. You can sign up for a developer account at https://dev.neverdie.io
IMPORTANT! Please make sure you have an Ether Address already setup that supports ERC-20 Tokens prior to registering. We will be sending you test tokens. We reccomend using one of the following to create your wallet address. My Ether Wallet, MetaMask, Parity.
Once you create your developer account you will have the ability to create an App. This will generate Ropsten and Kovan API Keys automatically.
You will have to fill out some basic info about your App. Once completed your new app will show up on the dashboard with Ropsten and Kovan API Keys.
Deploying
When you're ready to go live simply click on the drop down of your app and select Submit For Approval. This will put your app into a submission state. The NEVERDIE team will review it and once approved you will be granted a Main Network API Key to go live.
=
Token Addresses
In most cases you will need to define the token addresses for your app to create functionality. We highly reccomend storing these values in an easily editable object since the test addresses differ from the live addresses.
Ropsten Tokens
Master Token
Fund Token w/Yield
Fund Token no Yield
Game Token
Inventory
Symbol
Name
Contract Address
Decimals
View
NDC
NEVERDIE Coin
0xEe7ACd6b0FB65eeBC11cF733fdC606619CF633D4
18
TPT
Teleport Token
0x8A01Bc6A9358388588247127fF7BE21B281B36d4
18
RD
ROCK Dollar
0x92CC3307a955671a739489EcD6ba3e75c956CbA9
2
RT
Respect Token
0x8bBcc7fD9B8A1742CD6Ac9B67E08F771325BE117
2
LS
Lost Soul
0x3954284771B04Bfe37F8bD782B012651864a45a4
2
DS
Dragon Scale
0xce982e22d4b3A3A83827b154A8eD2807f6cE1E26
2
CE
Cats Eye
0x97599b7c036Ca58032539046C83c4C5161b19bB4
2
AN
Antler
0xbFeC3239f0520E09b42E659b50427f5A8d05c8a4
2
AT
Antidote
0x8D0fFD44837591A946EFD56335Ded9c39F03aF4a
2
CO
Code
0xA3f6F82e9e6A6867a3689b4E4CAb3673386bc03a
2
VRG
VR Gold
0x9e4B513153E0Ca99D755D6C33218d3C26ed457D5
18
VRS
VR Silver
0x5752ef1EbBD2a4EdDaB1D667Af06Ea0e0D0BFEb5
18
SKL
Skill
0xD22d680d1fa045A07E8d335C1Bb815EbFC4D4e5E
18
KRM
Karma
0x3847677DD011fdE33F4C3b503A70b1BBA9702f7b
18
HP
Hitpoint
0xa1cbaFeEA6B7b1c14C340Da1E06F4aD6ef066943
18
LV
Love
0xcb9634a1e95c3cf4917314bc634916a6b7faae9f
2
XPER
Experience
0x822afedd7d48ed1056247747c8ed6df7f02b50fc
2
STR
Strength
0xfa4d3c48d99f85a45b3e2e6a52000bce92deed6d
2
DEF
Defence
0x1b2e979a3b4d5b4fe87be53710ee44a348f3a145
2
INT
Intelligence
0xc113a21aee26b821683608d3fc358a908e3ac3c0
2
DEX
Dexterity
0xb3334871f98668ec25c834caf2cac09d606eb846
2
CHA
Charisma
0xe99d9ef829315b94aa2a1ac9119a473d5a186ab4
2
WIS
Wisdom
0xbe0f2f81d60eacdc662289906edb1d7e49923f0e
2
EGO
Ego
0xfc5cd11c455003af7471cea1c38e1e5f6f9471b8
2
PER
Perception
0xbe5d4ad86370645df844aba7393522b5b25d8ff9
2
LUCK
Luck
0x6fef8454040d15c7d38c09608e25b83103c8067c
2
TLP
Telepathy
0x34522f54ea47ddc2f399a8b7908da4e29ac1dca0
2
TLK
Telekenisis
0xcb7b9629af526d120d2178863f3e6f6a7dfb4fdf
2
STA
Stamina
0x0cc72bea1904a08a1bd85e73eb0eacbbc763ce5a
2
NARC
Narcissism
0x143ad9b3ff9501b9338bb43499bc4cb8c0515f13
2
EMP
Empathy
0x102b98d700512c32c708c9dc75e2e237930b87c9
2
MAG
Magic
0x90fee05047ac2697afb5b2930926f78c77537ca3
2
TLNT
Talent
0xb82b6b8b04eb11bd1b0661399403045fdd9e3578
2
FOOD
Food
0x789b47bebb396e2aa62224909777d53035925ee1
2
WTR
Water
0x85499e92b192f6254393d9c9ce3590f7df55a069
2
HYGL
Holy Grail
0x9bbff9a256de371ebb55dd0667bb20e5f789a55c
2
ARK
Ark of The Covenant
0x818b970e607a3569a1ddc0c2ad0553cabb1180db
2
Kovan Tokens
Master Token
Fund Token w/Yield
Fund Token no Yield
Game Token
Inventory
Symbol
Name
Contract Address
Decimals
View
NDC
NEVERDIE Coin
0x822afEdd7d48eD1056247747C8eD6df7f02B50fC
18
TPT
Teleport Token
0xc39235340B852B8AAE2D74704ebFcfa7962D6D2E
18
RD
ROCK Dollar
0x1F4A2e9dB90E0c4BfC234798fC0C62aD0ee7381c
2
RT
Respect Token
0xA1cA28BCF4404198eb11d0377F200ca0d578c1CC
2
LS
Lost Soul
0xb15E6357A88F48283afebbe9129eb56CD6aF70eB
2
DS
Dragon Scale
0xC9fCa8Bf77bBE3f9AfeB83D9391b2145a67aC361
2
CE
Cats Eye
0x5c9f1B349Af542660e396b8D2beAE4411c4b8829
2
AN
Antler
0x601eB8420C1FcCBdb506Dd2AAE09c3b1613dF485
2
AT
Antidote
0x62895114Df25a0dcd01c18814097A42b0F1690f0
2
CO
Code
0x28d1538e39a9E34800F2533f4e1b8753C7BE7F32
2
VRG
VR Gold
0xCcc251C22b03ba989A3B7598387F4A0235d9CBE0
18
VRS
VR Silver
0x6E430eF86dBcbe5B5A0F021DA7c054d6bA48b452
18
SKL
Skill
0x7c89469798E01578C448A2E3e4A16C45C318B97d
18
KRM
Karma
0x310a9ed2c3bab37171c9d915a7211dda25232cf4
18
HP
Hitpoint
0x15153C61B83915303355aBcDa3Bc88013EDe4e54
18
LV
Love
0x4Ac6DBE7D58Df341DAc47d9516748e04dB8F65af
2
XPER
Experience
0x5D0db74e4D5AEb4b962584986166C6E0A8d7B29e
2
STR
Strength
0x5882af2e1d3c1be5c8ad4e4984e2665ffd287f7e
2
DEF
Defense
0x6a5e61b6b5b939d2d9327e96da18e7070093d393
2
INT
Intelligence
0x76d0d432939b783b9c44eee46b34e53d0adc19b4
2
DEX
Dexterity
0x6883a72e9d4135bfdaf4335792350b44f2e5f304
2
CHA
Charsima
0x2b3589dca3e42b0bf8654b31632833fa4f7f3d35
2
WIS
Wisdom
0x06df5e726596f395bce4367daf852f5249e59ea2
2
EGO
Ego
0xc55f6fa5502d03eadeb0ac63e61cc92a1d911426
2
PER
Perception
0x88f5558cebc96dbd6e68e5bd2dfa0d845368f86f
2
LUCK
Luck
0x5145a7190e282de4b938719211e76b3b92f19df9
2
TLP
Telepathy
0x4399ae3da276c50ddfbdd60e2eefe7d691614479
2
TLK
Telekenisis
0x6d45c48ccc82c742f9fca4605144363a9aa6e32c
2
STA
Stamina
0xd7e07c5577e37ef14ac9cc06992d27b94b353e03
2
NARC
Narcissism
0x73839118780296db8ca7565b75fcfab6243a603b
2
EMP
Empathy
0xb39273bafdab142e7cd07f312351024de7db0a52
2
MAG
Magic
0xf56bb848ef0a5c3ec7e33169ace1f743aa463952
2
TLNT
Talent
0xa56627cda39d0971c62731bef6e7f4417cd1fc60
2
FOOD
Food
0x996c14b99ce836fc39e199c371a454df1e329e12
2
WTR
Water
0x5780b8fec25ea376914475f04b9fa149731270d3
2
HYGL
Holy Grail
0x33720bc7e28a482a0001869c908663af507d7bd2
2
ARK
Ark of the Covenant
0x0822b6c4c16f92ecc75202d4612fe4a5644ed311
2
Main Network Tokens
Master Token
Fund Token w/Yield
Fund Token no Yield
Game Token
Inventory
Symbol
Name
Contract Address
Decimals
View
NDC
NEVERDIE Coin
0xa54ddc7b3cce7fc8b1e3fa0256d0db80d2c10970
18
TPT
Teleport Token
0xc596bd09d652827b0106292d3e378d5938df4b12
18
RD
ROCK Dollar
0xff001a425ddd085500db2365454c7b581fdd4cd0
2
RT
Respect Token
0x9fd9310d0c5a6961663b57ce15afa7207795a9bb
2
LS
Lost Soul
0x5a263050f6bfa6ccd262de9f5451c65e5831c817
2
DS
Dragon Scale
0x106734655a3c75b92c154a7f827c4ab7d9111854
2
CE
Cats Eye
0x83ddf6b7c18745b3774410dd144956eb707bf30c
2
AN
Antler
0x63a2f26ea2d2024c412ceee60d24813ca11b9829
2
AT
Antidote
0xe4d5ecdd6cd4511376f3e49593188053cd194cfa
2
CO
Code
0x6d9fda41cfbb0faa614bb597c4a02af336fe8dd0
2
VRG
VR Gold
0xb6f09f221d7a93390235d427c72fffc4f3856a9f
18
VRS
VR Silver
0x2498aa67cd08ac321085734a8570137ec2001731
18
SKL
Skill
0xa7bd9d58d22d5e35ec4a08083141e0340ea2ca93
18
KRM
Karma
0x310a9ed2c3bab37171c9d915a7211dda25232cf4
18
HP
Hitpoint
0x90c32dad1cd18a4182bc215aba0e61a4ffe7919b
18
LV
Love
0x2ad921a8ec68bffc134cc0ee8ff760bc5864a99a
2
XPER
Experience
0xd28525ad63f337c86843d720dae921228e44f0ac
2
STR
Strength
0x6efa7c3d995572b5fb1c4cee780f2b101ef635f5
2
DEF
Def
0x1b4AF26ddDdA3f8BCefcf1E0A4621a8067357CaD
2
INT
Intelligence
0x13ac8d5640f573c6584b724135055e49455d2626
2
DEX
Dexterity
0xe7d9742fb323f0493de454478049b9619b1711a6
2
CHA
Charisma
0x5918a69edb169c2fa02ab2ae7ba3d16fd9b22415
2
WIS
Wisdom
0xdd147cf0cb55cce0eb02db09753e6a21f90b432c
2
EGO
Ego
0xbf7768951b9372807b7e5a0accc03be187b99dad
2
PER
Perception
0xd7ce991ceeb89bd8bb160a463843238bfb183881
2
LUCK
Luck
0xca1c217a2200b60dbd52e33c7cb1758db2b30a0e
2
TLP
Telepathy
0xec9353c85e8fcdb190c14fa0817a64339b8b747a
2
TLK
Telekenisis
0xd3747fd12be66531de15f4aafd4ae56e777b9722
2
STA
Stamina
0xbf6a2fa04860f0b2f9e7d5a76d841ccbabaffb8f
2
NARC
Narcissism
0xe443f2ddb12e4a27f7c0dc646a1341d22b80c8bc
2
EMP
Empathy
0x45f9292d36789519faf8272033b077081741a87b
2
MAG
Magic
0x6da2b0b95659f89c2332953fa84bc97633eb73ae
2
TLNT
Talent
0x54850a93cae932c261f6023b6596b8ed3ef8a75b
2
FOOD
Food
0x5b37bc4912893dd71b6d6c41b824d333ed298fea
2
WTR
Water
0xf64b2060c3e6d7601a5d57c68db754c4889a6b6f
2
HYGL
Holy Grail
0x5afd408eb4076d28be3cc38d9e753a24117e8c47
2
ARK
Ark of the Covenant
0xb5a6053ec99821396efae3694446cc9bcce061e2
2
Token Faucet
Inside the developer portal you have the ability to request test tokens for your development.
You can request 1 of each token per day. If you require more tokens please contact us directly through the developer portal.
IMPORTANT! The wallet address you request tokens to be sent to can read and send ERC-20 Tokens
Endpoints
Testnet
We've setup 2 endpoints that will enable you to test your calls through the Ropsten or Kovan networks
Ropsten https://ropsten.neverdie.com/v1
Kovan https://kovan.neverdie.com/v1
Main Network
This endpoint will be used when you app has been approved and deployed.
https://api.neverdie.com/v1
JWT Token Expiration
Once you have validated the user credentials successfully, you will receive a JWT token that will allow you to make authenticated calls as the user to the API. It is important to keep in mind that these tokens have an expiration as shown in the table below.
Network
Expiration
Leeway*
Ropsten
5 minutes
30 seconds
Kovan
5 minutes
30 seconds
Mainnet
30 minutes
60 seconds
* seconds before a token is considered valid
If a token has expired and you make a request to the API, a 401 header will be returned in the response.
You can also retreive the expiration configuration by making a GET request.
As a registered developer you can add apps that will generate network keys and a secret. With this information you can generate a signing key and include it in the request headers. This will allow you to make authenticated calls without the need to provide user credentials.
Here are some examples on how to generate a valid signature.
Important Note! All actions are stored in db per network for example if you create an account in Ropsten that account wont be available on Kovan
Authorization
You can authorize your user accounts by including a signing key in the request headers and performing a request with the following JSON encoded values.
Method: POST
JSON Object:username: String,password: String
secure_login: String If set to true a fingerprint check will be executed on the device accessing the account
Note: The username parameter can contain either the email or the nickname of the user
You will receive a payload with the following data
token: String A JWT that you will have to include in the headers of your requests to authenticate future API calls.
created: Timestamp A timestamp indicating when the account was created
When an account has Two Factor Authentication enabled the token key will not be present. This means you will need to present a 2fa screen for the user to verify his 2fa code.
You can authorize your user accounts by enabling social login. Since the social provider wil take care of authenticating users the data you provide to this method will create a new user account the first time you provide this data.
You will need to perform a request with the following url encoded parameters.
Method: POST
username: String, fullname: String, partner_key: String and fid: String
secure_login: String If set to true a fingerprint check will be executed on the device accessing the account
Using this method you can validate if the provided code is valid or not. You will have to perform a POST request with the following url encoded parameters and include a signing key in the request headers.
With this method you can enable the abilty for users to add and track custom tokens for their wallets. You will need to perform a request with the following parameters.
You will receive a payload with the following data
status: String A string indicating if the transaction is successful or an error ocurred.
eth_balance_usd: Numeric ETH balance in USD unformatted
eth_balance_usd_formatted: String Formatted ETH balance in USD
eth_balance: Bignumber The eth balance minust gas costs, fee and amount.
tx: String Transaction receipt
Response payload example
{eth_balance:400500883000000000,eth_balance_usd:133.51497936571,eth_balance_usd_formatted:"133.51"message:"transaction sent successfully",status:"success",tx:"0xf65498fa7c688089bb1e80c2ee3b1c52912c8c5a66d93a3a1dc5279ffaf9253c"}
Get Transaction Receipt
Get information about a transaction by including a signing key in the request headers and performing a POST request with the following parameters.
Get information about a specific block number by including a signing key in the request headers and performing a POST request with the following parameters.
Method: POST
block_identifier: String (optional) defaults to "latest"
Executes a new message call immediately without creating a transaction on the block chain by including a signing key in the request headers and performing a POST request with the following parameters.
Method: POST
to: String
from: String
data: Hex String
block_identifier: String (optional) defaults to "latest"
Retreive logs for a particular contract address by including a signing key in the request headers and performing a POST request with the following parameters.
Method: POST
new_entries:String
to: String
address: String
from_block: (optional) defaults to "earliest"
to_block: (optional) defaults to "latest"
topics: Array
Topics are order-dependent. A transaction with a log with topics [A, B] will be matched by the following topic filters:
[] "anything"
[A] "A in first position (and anything after)"
[null, B] "anything in first position AND B in second position (and anything after)"
[A, B] "A in first position AND B in second position (and anything after)"
[[A, B], [A, B]] "(A OR B) in first position AND (A OR B) in second position (and anything after)"
let crypto = require('crypto');
let SHA256 = require("crypto-js/sha256");
let CryptoJS = require("crypto-js");
window.createSignature = function(){
secret = "1D4jpxYyEpBLVVg2nJl3AWDPNzv525m71VX1RMYj"
let n = new Date().toISOString().replace(/\..+/, '')
let path = "eth"
let message = 'GET /'+path+' '+n;
let hash = CryptoJS.HmacSHA256(message , secret)
let wordArray = CryptoJS.enc.Utf8.parse(hash)
let signature = CryptoJS.enc.Base64.stringify(wordArray)
return signature
}
let dev_key = "GjqlQYlNMX1qp1g1o2059q47wZVqg0PG33OZgVGJ"
let signature = createSignature()
let token = "DEV "+dev_key+'.'+signature
let timestamp = new Date().toISOString().replace(/\..+/, '')
Connect To WS Endpoint
connection = new WebSocket('wss://ws-ropsten.neverdie.com/eth/'+btoa(token)+'/'+timestamp);
OnMessage Event
You will receive a response telling you if you connected successfuly or not.
You can find more about which subscriptions are supported on the official geth wiki
OnMessage Event
You will receive a data object
Browser Based Example
<html>
<body>
<div id="log"></div>
</body>
<script src="http://code.jquery.com/jquery.min.js"></script>
<script type="text/javascript" src="sigbundle-ropsten.js"></script>
<script type="text/javascript">
var connection
$(function () {
log = document.getElementById('log');
// if user is running mozilla then use it's built-in WebSocket
window.WebSocket = window.WebSocket || window.MozWebSocket;
let dev_key = "GjqlQYlNMX1qp1g1o2059q47wZVqg0PG33OZgVGJ"
let signature = createSignature()
let token = "DEV "+dev_key+'.'+signature
let timestamp = new Date().toISOString().replace(/\..+/, '')
connection = new WebSocket('wss://ws-ropsten.neverdie.com/eth/'+btoa(token)+'/'+timestamp)
connection.onerror = function (error) {
log.innerHTML = '
an error occurred when sending-receiving data
' + log.innerHTML;
};
connection.onmessage = function (message) {
// try to decode json (I assume that each message from server is json)
try {
log.innerHTML = '
Social Authorization
You can authorize your user accounts by enabling social login. Since the social provider wil take care of authenticating users the data you provide to this method will create a new user account the first time you provide this data.
You will need to perform a request with the following url encoded parameters.
Method: POST
username: String
,fullname: String
,partner_key: String
andfid: String
secure_login: String
If set to true a fingerprint check will be executed on the device accessing the accountNote: Currently only Facebook is supported.
Curl example
Response
You will receive a payload with the following data
token: String
A JWT that you will have to include in the headers of your requests to authenticate future API calls.created: Timestamp
A timestamp indicating when the account was createdResponse payload example