Introduction
After the robotic uprising and humanity’s falls (typical humans), the androids have since learned quite a bit from their once squishy overlords and now conduct war purely with money, specifically the blunt ample cryptocurrencies. Androids, as it turns out, haven’t really mastered the art of friendship but have developed quite a fondness for battle.
What is Coindroids?
Coindroids is a game like no other. It is completely skill-based, played with money, and played for money. Your actions are transactions, so you must choose them wisely. Your success will depend as much on your quick thinking as it will your methodical attention to detail throughout our ongoing story.
Coins Supported
Name | Prefix | Wallet Suggestions |
---|---|---|
Litecoin | LTC | Exodus, Loafwallet, Coinomi, Litevault.net |
Defcoin | DFC | Defcoin-QT, Beerwallet, Coinomi |
Development Status
The Coindroids system is currently in Beta Testing. It’s playable but gameplay is constantly changing to improve the experience.
If you understand the risks and would like to play the beta, please get in touch with us via @coindroids on twitter.
Documentation Status
This documentation was last updated 2017-09-30 If this documentation could be a status before Alpha, it would be.
Droids
Every player in the game is a Droid, a futuristic robot with many attributes. These attributes dictate how well they perform in a battle, be they attackers or defenders. They can also be purely cosmetic and simply make the character cool, hip and/or scary.
All droids have some pretty basic attributes:
Name | Description | Starting Value |
---|---|---|
Level | The current level of the player. The level of a player dictates some other elements including Purse Maximum, Health Maximum, as well as what items can be purchased. | 1 |
Experience | This value is increased every time the droid is involved in a battle. More of this will be described in the Attack Process section. | 0 |
Purse | The current amount of cryptocurrency that will be distributed to the droid’s next murderer(s). | 0 |
Health | The amount of health remaining for the droid. | 100 |
Health Maximum | The amount of health the droid will have upon resurrection | 100 |
Build | The collection of items that make up the droids equipment | Base Model of the users choice |
Inventory | The collection of usable items active on the droid |
Chassis
Your chassis starts with a Torso, with some other items tacked on for either style of function. Perhaps you fancy a set of legs, or maybe even arms. The parts you choose have a number of effects, so choose carefully.
When you are starting out, you can choose from any of the following sets:
Tank Training
Item Type | Class | Defense | Defense at Unlock | Defense Set Percentage |
---|---|---|---|---|
Head | Tank | 0 | 0 | 0.1 |
Torso | Tank | 0 | 0 | 0.4 |
Arm | Tank | 0 | 0 | 0.1 |
Arm | Tank | 0 | 0 | 0.1 |
Leg | Tank | 0 | 0 | 0.3 |
Item Type | Class | Damage | Accuracy (Likely) | Clip Size |
---|---|---|---|---|
Weapon | Tank | 1 | 0.5 (0.75) | 1 |
Assault Training
Item Type | Class | Defense | Defense at Unlock | Defense Set Percentage |
---|---|---|---|---|
Head | Assault | 0 | 0 | 0.1 |
Torso | Assault | 0 | 0 | 0.5 |
Arm | Assault | 0 | 0 | 0.1 |
Arm | Assault | 0 | 0 | 0.1 |
Leg | Assault | 0 | 0 | 0.1 |
Leg | Assault | 0 | 0 | 0.1 |
Item Type | Class | Damage | Accuracy (Likely) | Clip Size |
---|---|---|---|---|
Weapon | Assault | 1 | 0.5 (0.75) | 1 |
Scout Training
Item Type | Class | Defense | Defense at Unlock | Defense Set Percentage |
---|---|---|---|---|
Head | Scout | 0 | 0 | 0.1 |
Torso | Scout | 0 | 0 | 0.3 |
Arm | Scout | 0 | 0 | 0.15 |
Arm | Scout | 0 | 0 | 0.15 |
Leg | Scout | 0 | 0 | 0.15 |
Leg | Scout | 0 | 0 | 0.15 |
Item Type | Class | Damage | Accuracy (Likely) | Clip Size |
---|---|---|---|---|
Weapon | Scout | 1 | 0.5 (0.75) | 1 |
Weaponry
Your weapons strength relates to the actual base damage of the weapon, the level in which the weapon unlocks at, and the current level of the droid.
$$ Damage Multiplier = 2 \times WeaponDamage - \left ( \frac{Weapon Damage \times Unlock Level}{ Droid Level} \right )$$
Defenses
Three forms of defense.
- Chassis
- Shield
- Take Cover
Unless you decide to shield or take cover, your chassis’ defense will automatically be used to defend against attacks.
If you shield, the better of the two will be used, either your chassis defense or your shield.
If you choose to take cover, your defense will be purely based off of the Cover dynamic attribute.
Inventory
Droids bodys are pretty efficient and don’t have a lot of spare space to carry items around. As such, there is a very limited amount of items you can carry with you. A limit of 1 to be exact. Add an item to your inventory and it will be used until it expires (based on the Lasts attribute).
Player Garage
Your garage can store all those parts you aren’t using at the moment. There is a LOT of space in this place, so there is no limit to the parts, materials or magic objects that you can store here. You can even store items beyond your droids equip restrictions (i.e. level and scope)
Dynamic Attributes
These attributes are a bit more complicated than the others. They are dynamic, meaning they change regularly without user interaction, however they are also still deterministic. When taken into consideration by a player, these dynamic values allow for a much more strategic element of the Attack Process based on timing.
Name | Description |
---|---|
Focus | A droids focus influences their accuracy. A strong focus will allow them to lock on and blast away their enemy |
Cover | This value reflects the amount of good cover around that you can take advantage of |
EMI | Electro-Magnetic Interference. More interference means less grasp on your parts and materials |
Items
If you need to become a more effective killing machine, you can buy items to augment your abilities. New weapons can increase your attacks with a multiplier (so you can deal the same damage by sending 0.0002 instead of sending 0.0004!), or increase your droid’s defensive abilities with a multiplier (so enemies need to send more coins to deal the same amount of damage against you).
As a droid levels up, new items become available that can be purchased by the player to equip on their droid, or to use immediately. Each item has specific advantages and will alter different aspects of the droid.
Item Types
Type | Description |
---|---|
Weapon | A droids main weaponry. |
Shield | Like Armour it also reduces the amount of incoming damage. Some shields also provide additional benefits. |
Consumable | Items are held in the droid’s inventory until they are removed, expired or broken. |
Set | A set of items, usually either a full model or collection of goods |
Head | A droid head. Usually found on most droids |
Torso | A key part of any droid. Equip scope requirements will be based off the characteristics of this part |
Arm | An arm, sometimes droids have a couple of these |
Leg | A leg, sometimes droids have a couple of these |
Material | Usually found after clobbering an enemy, different materials will help you forge new items |
Item Attributes
Name | Shortform | Description |
---|---|---|
Cost | Cost | |
Level Required | LVL | |
Damage | DMG | |
Accuracy | ACC | |
Defense | DFNS | |
Health Increase | HI | |
Lasts | L | |
Stage Damage Modifier | SDM | |
Drop Frequency | DF | |
Drop Scope | DS | See Drop Scope table below |
Equip Scope | ES | See Equip Scope table below |
Item Attribute Matrix
Each type of item tends to have a different set of attributes that are relevant to its function.
Attribute | Weapon | Shield | Chassis Part | Consumable | Set | Material |
---|---|---|---|---|---|---|
Name | X | X | X | X | X | X |
Item Type | X | X | X | X | X | X |
Model | X | X | X | |||
Class | X | X | X | |||
Description | X | X | X | X | X | X |
Level Required | X | X | X | X | X | X |
Image | X | X | X | X | X | X |
Coordinate Z | X | |||||
Cost | X | X | X | X | X | X |
Damage | X | |||||
Clip Size | X | |||||
Accuracy | X | |||||
Accuracy (Likely) | X | |||||
Defense | X | X | ||||
Defense at Unlock | X | |||||
% of Set Defense | X | |||||
Material Strength | X | |||||
Health Increase | X | |||||
Lasts (blocks) | X | |||||
Drop Frequency | X | X | X | |||
Drop Scope | X | X | X | |||
EMS | X | X | X | |||
Composition | X | X | X | X | ||
Equip Scope | X | X | X | |||
Equid Required | X | X | X | |||
Equip Optional | X | X | X |
Equipping Items
Not all items can be fit to one another and merged into a droid build. There are a number of attributes that determine exactly how items can be used together including the Equip Scope, Equip Required and Requip Option fields.
Equip Scopes
Name | Descirption |
---|---|
Inventory | Can only be placed in your droids inventory, to be consumed during the processing of the round |
Class | The class of the item must match the class of the Torso being used |
Global | Just go ahead and equip this onto whatever body part you want, as long as the body part supports the addition |
Character | The item must match the character of the Torso being used |
Equip Required & Equip Optional
When building your droid, first you start with a Torso and work from there. Torsos will have a number of requirements, as well as some optional slots.
model | Equip Required | Equip Optional |
---|---|---|
Assault Training | Arm,Arm,Leg,Leg,Head,Weapon | Shield |
Tank Training | Arm,Arm,Leg,Head,Weapon | Shield |
Scout Training | Arm,Arm,Leg,Leg,Head,Weapon | Shield |
Here we can see that the Tank model only requires one leg, while the Scout and Assault Models require two. All Torsos available at the start can equip a shield, but it’s not required.
Material Drops
Material drops happen fairly freuquently and do not require the droid to be killed in the attack. These materials can be used to forge new items so it’s good to keep an eye out for weak NPCs or droids built of your favourite material.
Composition
Weaponry, Shields, and Chassis parts each have a specific set of materials that make-up their composition.
The Assault Training Torso is made up of:
Material | Content |
---|---|
Silicon | 6% |
Iron | 4% |
Aluminum | 24% |
Copper | 4% |
Germanium | 2% |
When attacking a droid, if EMI + EMS / composition * time of day + 7 = droid happy fun material great. TODO^ add real information
Item Drops
Some items drop and some don’t. You usually won’t have to worry about an arm falling off of your own droid, but keep an eye out for NPCs sporting some shiney loose looking swag.
Drop Scopes
Name | Description |
---|---|
Drone | This item has the possibility to drop if the droid is an NPC only. |
Never | This type of items will never drop |
Always | This item may drop from anybody if the right conditions are met. |
Drop Frequency
Purchasing
To purchase any item, simply find the Item Address in the Item Directory and send the cost to that address from your registered wallet. Attempting to purchase an item that requires a higher level droid, or not including enough funds to cover the cost of the item will result in the funds being returned (minus a network transaction fee).
Forging
Instead of purchasing a new item, if you have all the right materials and items, you can choose to forge it. Forging works a lot like purchasing.
Recipe Material | Quantity |
---|---|
Space crap | 7 |
Space gold | 1 |
Basic Gameplay
Your goal is to destroy other droids and reap the benifits of their holdings in the process, all while trying to stay robo-alive. Roam the world looking for droids with high purses & low health, but make sure your own focus is prime for an attack, otherwise you may want to consider shielding or taking cover instead.
After you register your droid and go through the wallet sync step, the system will be able to recognize your transactions and assocaite them with your Droid.
Each other droid has a unique Attack Address, which you can use rain cryptocurrency bullets upon their person.
Game Progression
A round within Coindroids is one unit of time as measured by a block in the blockchain. Actions (i.e. transactions) that occur within the same block all “occur” simultaneously. If two people attack and kill the same target, the target’s purse is split proportionally amongst all attackers.
In each round, you can choose to perform one of three actions (Attack, Shield and Cover). Depending on the current state of your own droid, your foes, and the environment around you, it may be better to perform some actions over others.
Important: If there is a fork in the blockchain, Coindroids will undo all transactions from the previous block and reprocess the longer chain. Experience, upgrades and all other game data will be rolled back and will only be reprocessed if the relevant transactions are included in the longer chain.
Deficit Payment
Due to forks, in very rare circumstances, you may have received a payout on one side of that fork that differs on the winning chain. In this case, either we will automatically payout the difference, or we will require a deficit payment to retreive the erroneously sent funds back from you.
You could always not pay it, but then you need to start a new droid :(
Registration Transactions
Players registering new wallets by sending small sums to a registration address will be recognized and confirmed. This is done first so that any game actions by the droid are recognized even if the player has just registered.
Purchase Transactions
All transactions from registered addresses to known Item Addresses are analyzed. All successful purchases of upgrades are equipped on the associated droid and items are added to the droid’s inventory.
Item Equip
If you have queued up a new build, this will be applied here.
Item Use
Any relevant Action Items are now used, including those that were just purchased. This step is primarily for Action Items that affect a droid’s health
Shielding Transactions
All shield transactions are the first of the three main actions to be run. Droids who are shielding will shield against all attacks taken against them this round.
Taking Cover Transactions
Droids who are taking cover will do so against all attacks taken against them this round.
Attack Transactions
All the transactions from known Player Addresses to droid Attack Addresses trigger the Attack Process.
Health Changes Committed
At this point, all damage done by other Droids from attack transactions is applied to the droid’s health. This is when we learn if a player has succumbed to their attackers or if the Droid has survived.
Purse Rewards Calculated
All instances where a Droid has died are processed. Dead droids’ purses are divided up proportionately based on the amount of damage dealt by each of its attackers during this block. Damage performed in previous blocks is not counted towards this reward.
Experience Changes Committed
Experience earned by the Droid through attacks and defensive maneuvers are now committed to the Droid at this time. Droids with enough experience level up (See Leveling)
Droid Resurrection
The droids who have died, and served their time, are rebuilt and enter for the next round of battles.
Attack
Rawr!
The damage your attack does relates to the amount spent, and the attributes/equipment of the involved droids (your weaponry vs their defense).
Of the funds used in the attack, 24% of the transactions value is placed into the defenders purse.
Another 75% of the transaction is considered ammunition spillage, which is then divided up amongst all droids in the system at the end of a round. Finally, a small amount (1%) is taken as a service charge.
Shield
Oh shit D:
To shield, you send the shield cost to the global shield address.
Of that cost, 24% enters the purse of the shielding droid. 75% is considered ammunition spillage and is divided up amongst all droids at the end of the round. Finally, a small amount (1%) is taken as a service charge.
Cover
FUCK FUCK FUCK
To take cover, you send the cover cost to the global cover address.
Of that cost, 24% enters the purse of the cowering droid. 75% is considered ammunition spillage and is divided up amongst all droids at the end of the round. Finally, a small amount (1%) is taken as a service charge.
Using a Consumable
To use a consumable, move it from your Player Garage into your droids inventory. It will automatically be used during the next round of processing.
Item Drops
As you attack other droids, either material or other items may drop and enter your Player Garage inventory. The more damage you do to a droid, the more likely their drops are to occur. Drops also depend on the defending droids’ EMI dynamic attribute.
Death & Taxes
When a droid dies, they are unable to perform actions for three blocks, at which time they resurrect.
Once you kill a droid, you win the contents of their purse. If multiple attackers kill a droid in the same round, their purse is split based on the levels of the attackers and their total damage.
Leveling
As your droid gains experience through successful attacks, they will level up after hitting specific milestones:
Level | Experience Needed |
---|---|
1 | 0 |
2 | 600 |
3 | 1887 |
4 | 3896 |
5 | 6653 |
6 | 10176 |
7 | 14483 |
8 | 19585 |
9 | 25495 |
10 | 32221 |
Leveling up allows you to equip better items to your droid.
Advanced Gameplay
Everything in the Coindroids world is deterministic. The Advanced Gameplay guide is here to help you unlock the secrets of the world and begin to full develop your battle strategy.
Dynamic Attributes
# Step 1 – Get the Hash of the Last Block
./bitcoind getbestblockhash 0000000000000000117044f0da99c88f1266c57eee5a7f08e2eaf9a9a83091f9
# Step 2 – Perform a SHA256 Hash of the known details
SHA256( 0000000000000000117044f0da99c88f1266c57eee5a7f08e2eaf9a9a83091f9*FOCUS*4 )
88435b0191439b818d5bee558dbc8ed4831f43df17748ee4a8f22b4be1542bf5
# Step 3 – Convert a portion to decimal and evaluate the final Results as a percentage
88 Hexadecimal = 136 Decimal
Focus = 136 / 255 = 53.3%
import hashlib
def calculate_dynamic_attribute(attribute_type, previous_block_hash, droid_id):
attribute_input = previous_block_hash + attribute_type + str(droid_id)
attribute_hash = hashlib.sha256(attribute_input).hexdigest() // This produces a hash with lower-case letters
first_byte = int(attribute_hash[0:2], 16)
attribute_value = first_byte / 255.0
attribute_value = round(attribute_value, 4)
return attribute_value
function calculateDynamicAttribute(attributeType, blockHash, droidID) {
var attribute_input = blockHash + attributeType + droidID.toString();
var attribute_hash = sha256(attribute_input);
var first_byte = parseInt(attribute_hash.substring(0, 2), 16);
var value = first_byte / 255.0;
value = Math.round(value * 10000) / 10000;
return value;
};
Some attributes used within the system are based off of previous block hashes. This is to provide the droids with a fun changing environment to battle within, while still giving them the pleasure of calculating every bit of their strategy.
Name | Description |
---|---|
Focus | A droids focus influences their accuracy. A strong focus will allow them to lock on and blast away their enemy |
EMI | Most of a droid is actually held together by magnets. As a droids’ EMI fluctuates, this will govern how easily parts and materials fall off during attacks. |
Cover | Keep an eye on your surroundings. If this value is high that means there are some useful objects around, be them walls, ditches or perhaps some sort of soft woodland creature that you can take cover behind to prevent damage. |
Calculating Dynamic Attributes
Both of these values can each be calculated using the same algorithm. The value is unique per user and will change every time a new block of transactions is processed. The workflow to calculate these values is as follows:
Get the hash of the last solved block for the blockchain in use
Using the hash found in step one, referred to as
<highest block hash>
, concatenate this value along with the capitalized name of the attribute being calculated, and the ID of the droid as a single text string. Finally, perform a SHA256 hash of this value.SHA256(<best block hash> + <Attribute Name> + <Droid ID>)
Using the result from Step 2, take the first byte (i.e. the first 2 characters) and convert the hexadecimal value to decimal. Finally: with the decimal value, calculate the percentage based on a byte’s maximum value to get the attribute value for each variable during this block of transactions.
The Attack Process
Checking Clip Size
Droids only have so much ammunition they can attack with per block.
Allocate Incoming Funds
The amount transferred to the Attack Address is split up and applied to the relevant purses across the system.
- 75% into the purse of the defending droid
- 24.5% as spilled ammunition
- 0.5% as service fees
Calculate Damage
First the base attack is calculated, taking into consideration all upgrades equipped to the droid. During this calculation, the weapon’s accuracy and the droid’s dynamic attributes are all taken into account for the resulting gross damage.
$$grossDamage = 2 \times \left ( \frac{Ammo Fired}{Token Size} \times Damage \times \left (Accuracy + (100 - Damage) \times \frac{Focus}{100} \right ) \right ) - \left ( \frac{Damage \times Weapon Unlock}{Level} \right )$$
Calculate the Defender’s Defense
The defense is culculated one of three ways, depending on the status of the defender.
Normal Defense
$$netDamage = \frac{grossDamage \times (100 - Defense \times 0.9)}{100} $$
Defense when Shielded
$$netDamage = \frac{grossDamage \times (100 - Defender Shield \times 0.9)}{100} $$
Defense when Taking Cover
$$netDamage = \frac{grossDamage \times (100 - Cover \times 0.9)}{100} $$
We can then begin to calculate the Net Damage to be taken by the defending droid. The equation for this is as follows:
$$Net Damage = Gross Damage \times (1 - Droid Defense)$$
Once these calculations are complete, the Net Damage is the actual amount that is then subtracted from the defending droid’s health.
$$Defending Droid Health = Current Health – Net Damage$$
Awarding Experience
The experience gained from a battle is easily calculated for either droid by using the results of each of the above steps. The experience is not applied until the Experience Changes Committed phase of the Game Progression, which means that any leveling up does not occur until all the attacks are complete.
$$Attacker Experience Increase = 100 \times ( \frac{netDamage}{Defenders Current Health}) \times ( \frac{( 2 \times Defenders Level)}{Attackers Level + Defenders Level} )$$
Item Drop Algorithm
An item drop occurs during an attack depending on the defenders EMI, their own EMS, and the strength of the attack.
API Conventions
What do droids love almost as much as a good ol’ fashioned money fight? A full-featured API of course!
HTTP Methods
Name | Description |
---|---|
GET | Retrieve objects |
POST | Create new objects |
PATCH | Update existing object(s) |
DELETE | Deletes one or more objects |
OPTIONS | Describe the object and receive a programmatic version of this document |
Filtering Rows
Filtering Rows
curl -X "GET" "http://api.coindroids.com/droid?name=eq.Trunk"
Filtering with multiple conditions
curl -X "GET" "http://api.coindroids.com/droid?purse_current=gt.1000&level=lt.10"
Any column in a table can be filtered or ordered through URL query parameters.
These conditions can also be changed with an &.
Available operators
abbreviation | meaning |
---|---|
eq | equals |
gt | greater than |
lt | less than |
gte | greater than or equal |
lte | less than or equal |
neq | not equal |
like | LIKE operator (use * in place of %) |
ilike | ILIKE operator (use * in place of %) |
@@ | full-text search using to_tsquery |
is | checking for exact equality (null,true,false) |
isnot | checking for exact inequality |
in | one of a list of values e.g. `?a=in.1,2,3` |
notin | none of a list of values e.g. `?a=notin.1,2,3` |
To negate any operator prefix it with not
like ?a=not.eq=2
. The custom negative operators like neq
are deprecated and will be removed in version three.
For more complicated conditions, joins, or statistical functions you will have to create a new view in the database.
Filtering Columns
curl -X "GET" "http://api.coindroids.com/droid?select=name,id,attack_address"
To cast the column types, add a double colon
curl -X "GET" "http://api.coindroids.com/droid?select=level::text,name,id"
You can customize which columns are returned using the select
parameter:
Ordering
The reserved word order
applies an ORDER BY
clause. It uses a comma-separated list of columns and directions:
curl -X "GET" "http://api.coindroids.com/droid?order=level.asc,purse_current.desc"
If no direction is specified it defaults to descending order:
curl -X "GET" "http://api.coindroids.com/droid?order=level"
API Objects
Object | Endpoint | Methods |
---|---|---|
Badge | /badge | GET |
Currency | /currency | GET |
Droid | /droid | GET |
Event | /event | GET |
Garage | /garage | GET |
Item | /item | GET |
Payout | /payout | GET |
Player | /player | GET |
Profile | /profile | GET, PATCH |
/badge
Our badge system is a little lacking at the moment but this is coming soon. The endpoint still works, it just doesn’t return anything at the moment as we have no badges listed.
/currency
// View specific currency (GET https://api.coindroids.com/currency)
jQuery.ajax({
url: "https://api.coindroids.com/currency",
type: "GET",
data: {
"netcode": "eq.LTC",
},
})
.done(function(data, textStatus, jqXHR) {
console.log("HTTP Request Succeeded: " + jqXHR.status);
console.log(data);
})
.fail(function(jqXHR, textStatus, errorThrown) {
console.log("HTTP Request Failed");
})
.always(function() {
/* ... */
});
# Install the Python Requests library:
# `pip install requests`
import requests
def send_request():
# View specific currency
# GET https://api.coindroids.com/currency
try:
response = requests.get(
url="https://api.coindroids.com/currency",
params={
"netcode": "eq.LTC",
},
)
print('Response HTTP Status Code: {status_code}'.format(
status_code=response.status_code))
print('Response HTTP Response Body: {content}'.format(
content=response.content))
except requests.exceptions.RequestException:
print('HTTP Request failed')
curl -X "GET" "https://api.coindroids.com/currency?netcode=eq.LTC"
The JSON returned will be formatted as:
[
{
"id": 4,
"name": "Litecoin Mainnet",
"starting_height": 1173914,
"netcode": "LTC",
"min_attack_size": 100000,
"max_attack_size": 314159265,
"registration_fee": 1000000,
"satoshis_per_coin": 100000000,
"transaction_fee_per_byte": 350,
"max_payouts_per_settlement": 1,
"min_change_amount": 100000,
"uri_scheme": "litecoin",
"shield_cost": 1000000,
"shield_address": "3BCZGwUBiWPSTXTC2XQP4eYBFTNh6sfrAS",
"cover_cost": 1000000,
"cover_address": "3Md51ftu445UpXxdEEyMR6daZ1GmbdTPGA",
"token_size": 1000000,
"last_ingested": {
"block_id": 77697,
"currency_id": 4,
"block_hash": "25d35bbf3ab38761154502cc9c5bdf5f980af74e816bed92da71d01d779906a6",
"last_block_hash": "e3d5c1abbf6b655888ca25f804ae6608f02d8c2536c389b34c10a25145ed46be",
"height": 1181605,
"version": 4,
"mined_time": "2017-04-07T23:38:12+00:00"
}
}
]
This endpoint gives you full access to all the currency related data.
Response Details
Name | Data Type | Description |
---|---|---|
id | Whole Number | The ID of the Currency |
name | String | The science-given name of the Currency |
netcode | String | A small call-sign used by the currency |
min_attack_size | Satoshi | The minimum number of satoshis required for an attack. Smaller amounts are considered donations. |
max_attack_size | Satoshi | The maximum number of satoshis that will be recognized as a valid attack. Larger attacks will be returned. |
registration_fee | Satoshi | The number of satoshis required to register a droid under this currency |
satoshis_per_coin | Satoshi | The amount of satoshis in one coin |
transaction_fee_per_byte | Whole Number | The amount of fee added per byte of the transaction |
max_payouts_per_settlement | Whole Number | The max number of settlement outputs allowed in each transaction |
min_change_amonunt | Whole Number | The minimum number of satoshis added to a transaction as change |
uri_scheme | String | Identifier used to initiate a URI for launching wallets |
shield_cost | Satoshi | The cost of a Shield action in the currency |
shield_address | Address | The address to send funds to to initiate the Shield action |
cover_cost | Sastoshi | The cost of the Cover action in the currency |
cover_address | Address | The address to send funds to to initiate the Cover action |
last_ingested | Block (Condensed Object) | Block details about the last block ingested and processed into the system Inlcudes the following (last_ingested.*) |
last_ingested.block_id | Whole Number | ID number of the last block processed |
last_ingested.currency_id | Whole Number | ID of the currency… but.. you already know that so.. deprecated? |
last_ingested.block_hash | String | The hash of the latest block processed |
last_ingested.last_block_hash | String | The hash of the previous block processed |
last_ingested.height | Whole Number | The height of the latest block processed |
last_ingested.version | Whole Number | Block version code |
last_ingested.mined_time | Timestamp | The actual time the block was mined |
/droid
// View specific droid (GET https://api.coindroids.com/droid)
jQuery.ajax({
url: "https://api.coindroids.com/droid",
type: "GET",
data: {
"name": "eq.cmdr",
},
})
.done(function(data, textStatus, jqXHR) {
console.log("HTTP Request Succeeded: " + jqXHR.status);
console.log(data);
})
.fail(function(jqXHR, textStatus, errorThrown) {
console.log("HTTP Request Failed");
})
.always(function() {
/* ... */
});
# Install the Python Requests library:
# `pip install requests`
import requests
def send_request():
try:
response = requests.get(
url="https://api.coindroids.com/droid",
params={
"name": "eq.cmdr",
},
)
print('Response HTTP Status Code: {status_code}'.format(
status_code=response.status_code))
print('Response HTTP Response Body: {content}'.format(
content=response.content))
except requests.exceptions.RequestException:
print('HTTP Request failed')
curl -X "GET" "https://api.coindroids.com/droid?name=eq.cmdr"
The JSON returned will be formatted as:
[
{
"id": 17,
"name": "Cmdr",
"currency_id": 4,
"currency_code": "LTC",
"player_id": 1,
"username": "Abstrct",
"attack_address": "3QMrkxTuosoYXySct3kZxoMESDHh1uAwsZ",
"primary_ammunition_clip": "LfK1GXhTE3hrEY9uxjxrT3T8QX18kKJBs5",
"additional_ammunition_clips": [
"LbwUTU7zq25EUKTaD8esVyBoZTW6qedgR8"
],
"level": 2,
"experience": 616,
"experience_goal": 1887,
"health_current": 50,
"health_max": 50,
"purse_current": 938544,
"is_npc": false,
"is_active": true,
"last_attack": 1181558,
"is_shielded": false,
"is_covered": false,
"death_height": null,
"is_dead": false,
"created_at": "2017-03-25T20:25:48.337337+00:00",
"build": [
{
"name": "Assault Training Arm",
"class": "Assault",
"image": "",
"model": "Assault Training",
"details": {
"ems": 0,
"images": {
"solo": {
"large": "a_1_4x_larm.png",
"thumb": "a_1_1x_larm.png",
"medium": "a_1_2x_larm.png"
},
"equipped": {
"large": [
"5_a_1_4x_rarm.png",
"2_a_1_4x_larm.png"
],
"thumb": [
"5_a_1_1x_rarm.png",
"2_a_1_1x_larm.png"
],
"medium": [
"5_a_1_2x_rarm.png",
"2_a_1_2x_larm.png"
]
}
},
"defense": 0,
"drop_scope": "Drone",
"composition": {
"73": [
0.01875
],
"74": [
0.0125
],
"75": [
0.075
],
"76": [
0.0125
],
"77": [
0.00625
]
},
"equip_scope": "Class",
"drop_frequency": 0.01,
"equip_optional": [],
"equip_required": [],
"defense_at_unlock": 0,
"material_strength": "",
"defense_set_percentage": 0.1
},
"item_id": 1,
"item_type": "Arm",
"short_name": "Assault Training",
"description": "",
"coordinate_z": null,
"level_required": 1,
"real_item_type": "Arm"
}
// bunch commented out...
],
"attribute": {
"ems": 0,
"class": "Assault",
"model": "Assault Training",
"damage": 10.2750000000000000,
"defense": 0.13000000000000000000,
"accuracy": 0.44,
"blueprint": {
"Arm": [
1,
1
],
"Leg": [
3,
11
],
"Head": 2,
"Torso": 5,
"Weapon": 7
},
"clip_size": 1620000,
"base_damage": 6.85,
"weapon_unlock": 1,
"accuracy_likely": 0.72
},
"composition": {
"73": [
0.01875,
0.01875,
0.01875,
0.01875,
0.015,
0.06
],
"74": [
0.0125,
0.0125,
0.0125,
0.0375,
0.01,
0.04
]
},
"pending_build": null
}
]
The heart of the Coindroids system, the /droid API endpoint.
Name | Data Type | Description |
---|---|---|
id | Whole Number | The ID of the Droid |
name | String | The science-given name of the Droid |
currency_id | Whole Number | The ID of the currency realm the droid is in |
currency_code | Netcode | The three letter code for a currency (i.e. LTC) |
player_id | Whole Number | The ID of the droids squishy overlord |
username | String | Name of the droids squishy overlord |
attack_address | Cryptocurrency Address | The address other players can use to attack this droid |
primary_ammunition_clip | Cryptocurrency Address | The primary address used for payouts involving this droid |
additional_ammunition_clips | Cryptocurrency Address[] | Additional addresses tracked for droid actions involving this droid |
level | Whole Number | The level of a droid |
experience | Whole Number | The total experience gained by this droid to date |
health_current | Whole Number | The current state of the health for a droid going into the next processing block |
health_max | Whole Number | The maximum health that this droid can have |
purse_current | Whole Number | The current state of the purse for a droid going into the next block processing |
is_npc | Boolean | [True, False] Is this human controlled or a coindroids bot instance? |
is_active | Boolean | Has this droid been properly registered to a player wallet |
is_shielded | Boolean | Is the droid currently in a Shielding status? |
is_covered | Boolean | Is the droid currently in a Covered status? |
death_height | Whole Number | The height in which the droid died (NULL if not currently dead) |
is_dead | Boolean | Is the droid currently dead? |
last_attack | Whole Number | The height of the last Attack action performed by this droid |
created_at | Timestamp | The date and time of droid creation |
build | Items[] | A description of the items which make up the build of this droid |
build[].item_id | Whole Number | The ID of the item equipped in the build |
build[].name | String | The name of the item equipped in the build |
build[].class | Class Type | The class of the item equipped in the build |
build[].image | File Path | The path to the static image hosted for the item |
build[].model | Model Type | The model of the item equipped in the build |
build[].details | Item Details Object | The full attributes of the item equipped in the build |
build[].item_type | Item Type | The type of the item equipped in the build |
build[].short_name | String | A short identifier of the equipped item |
build[].description | String | A long description of the equipped item |
build[].level_required | Whole Number | The level that must be met for the item to be equippable |
build[].real_item_type | String | Another Item Type field that made sense at the time but I don’t quite recall why this is here |
attribute | Attributes | The culminating stats of a droid build. Includes the following details (attribute.*) |
attribute.ems | Numeric | Value between 0-100%, used when calculating EMI |
attribute.class | Class Type | The resulting Class of the droid build |
attribute.model | Model Type | The resulting Model of the droid build |
attribute.defense | Numeric | Value between 0-100%, used during attack calculations |
attribute.accuracy | Numeric | Value between 0-100%, used during attack calculations |
attribute.clip_size | Whole Number | The number of bullets (i.e. Tokens) that can be fired per block |
attribute.base_damage | Numeric | Value between 0-100%, used during attack calculations |
attribute.weapon_unlock | Numeric | Value between 0-100%, used during attack calculations |
attribute.accuracy_likely | Numeric | Value between 0-100%, the average accuracy to expect from the build |
attribute.blueprint | Droid Blueprint Object | An object that denotes each item and the position it occupies on the droid |
composition | Composition Objects | The makeup of the droids materials (composition. |
pending_build | Build Object | The full new build of a droid including build, composition, part_list and attribute |
/event
Grab the latest ten events
curl -X "GET" "https://api.coindroids.com/event?order=block_height.desc" \
-H "Range: 0-10"
// My Events (GET https://api.coindroids.com/event)
jQuery.ajax({
url: "https://api.coindroids.com/event",
type: "GET",
data: {
"order": "block_height.desc",
},
headers: {
"Range": "0-10",
},
})
.done(function(data, textStatus, jqXHR) {
console.log("HTTP Request Succeeded: " + jqXHR.status);
console.log(data);
})
.fail(function(jqXHR, textStatus, errorThrown) {
console.log("HTTP Request Failed");
})
.always(function() {
/* ... */
});
# Install the Python Requests library:
# `pip install requests`
import requests
def send_request():
# My Events
# GET https://api.coindroids.com/event
try:
response = requests.get(
url="https://api.coindroids.com/event",
params={
"order": "block_height.desc",
},
headers={
"Range": "0-10",
},
)
print('Response HTTP Status Code: {status_code}'.format(
status_code=response.status_code))
print('Response HTTP Response Body: {content}'.format(
content=response.content))
except requests.exceptions.RequestException:
print('HTTP Request failed')
Response Example
[
{
"currency_id": 1,
"block_hash": "00000000420931a23a242a1ed9f57709e5e1c435f540165e523f95728a9a1878",
"block_height": 632322,
"txid": "be6a3d11741b5903a5c5ca296bf2bd0f48e2a71d73bb83dd0b3d9cd0a20fa901",
"action_id": 65373,
"is_orphaned": false,
"tx_vout": 0,
"action_type": "Attack",
"player_id": 4,
"player_username": "Trunc",
"droid_id": 4,
"droid_name": "Trunk",
"target_id": 17,
"target_name": "autotigger",
"value": 22344600,
"timestamp": "2016-01-09T22:34:16.755158+00:00",
"outcomes": [
{
"outcome_id": 9867,
"player_id": 22,
"droid_id": 17,
"outcome_type": "Purse gain",
"value_from": null,
"value_to": 5586150,
"is_orphaned": false
},
{
"outcome_id": 9868,
"player_id": 4,
"droid_id": 4,
"outcome_type": "Ammunition spillage",
"value_from": null,
"value_to": 16535004,
"is_orphaned": false
},
{
"outcome_id": 9869,
"player_id": 4,
"droid_id": 4,
"outcome_type": "Service fee",
"value_from": null,
"value_to": 223446,
"is_orphaned": false
},
{
"outcome_id": 9870,
"player_id": 4,
"droid_id": 4,
"outcome_type": "Gross damage performed",
"value_from": null,
"value_to": 782954784,
"is_orphaned": false
},
{
"outcome_id": 9871,
"player_id": 22,
"droid_id": 17,
"outcome_type": "Net damage taken",
"value_from": null,
"value_to": 759466140,
"is_orphaned": false
},
{
"outcome_id": 9872,
"player_id": 4,
"droid_id": 4,
"outcome_type": "Experience earned",
"value_from": null,
"value_to": 272,
"is_orphaned": false
},
{
"outcome_id": 9873,
"player_id": 22,
"droid_id": 17,
"outcome_type": "Purse changed",
"value_from": 1000385,
"value_to": 1000450,
"is_orphaned": false
},
{
"outcome_id": 9874,
"player_id": 22,
"droid_id": 17,
"outcome_type": "Purse overage",
"value_from": null,
"value_to": 5586085,
"is_orphaned": false
},
{
"outcome_id": 9875,
"player_id": 22,
"droid_id": 17,
"outcome_type": "Health changed",
"value_from": 2000770,
"value_to": 0,
"is_orphaned": false
},
{
"outcome_id": 9876,
"player_id": 22,
"droid_id": 17,
"outcome_type": "Droid destroyed",
"value_from": null,
"value_to": null,
"is_orphaned": false
},
{
"outcome_id": 9877,
"player_id": 4,
"droid_id": 4,
"outcome_type": "Experience earned",
"value_from": null,
"value_to": 26765,
"is_orphaned": false
},
{
"outcome_id": 9878,
"player_id": 22,
"droid_id": 17,
"outcome_type": "Purse changed",
"value_from": 1000450,
"value_to": 0,
"is_orphaned": false
},
{
"outcome_id": 9903,
"player_id": 4,
"droid_id": 4,
"outcome_type": "Experience changed",
"value_from": 464386,
"value_to": 491423,
"is_orphaned": false
},
{
"outcome_id": 9903,
"player_id": 4,
"droid_id": 4,
"outcome_type": "Experience changed",
"value_from": 464386,
"value_to": 491423,
"is_orphaned": false
}
],
"payouts": [
{
"payout_id": 1510,
"currency_id": 1,
"player_id": 17,
"address": "mzu6WxrgEE5vM9DNbXBN4y29s4qPYEgX6Y",
"amount": 5586085,
"settlement_txid": "7278c3806241c985febd819532c117c47c51dcca6e544f6c414c0be739316ac1"
},
{
"payout_id": 1511,
"currency_id": 1,
"player_id": 4,
"address": "msHz1TmNBWdGgXMJjPMuoDjesZzM5sPKXD",
"amount": 1000450,
"settlement_txid": "7278c3806241c985febd819532c117c47c51dcca6e544f6c414c0be739316ac1"
}
]
}
]
The event endpoint is used to retreive the outcome of all actions that have taken place.
Response Details
Name | Data Type | Description |
---|---|---|
action_id | Whole Number | |
currency_id | Whole Number | |
block_hash | String | |
block_height | Whole Number | |
txid | String | |
tx_vout | Whole Number | |
action_type | Action Type | see data type for options |
value | Whole Number | |
player_id | Whole Number | The player of the droid who initiated the action |
player_username | String | The username of the player who initiated the action |
droid_id | Whole Number | The droid who initiated the action |
droid_name | String | The name of the droid who initiated the action |
target_id | Whole Number | The target of the action, either another droid or an item |
target_name | String | The name of the target. Currently only when the target is a droid |
outcomes | Compact Outcomes[] | An array containing all the related outcomes that occured as result of the action. |
payouts | Compact Payouts[] | An array containing all the related payouts that ocurred as a result of the action. Actions may share payouts with other actions. |
is_orphaned | Boolean | |
timestamp | Timestamp | When the action happened |
TODO: Explain the Actions and Outcomes
Action Types
Action | Description |
---|---|
Item Equip | |
Purse Filling | |
Item Use | |
Deficit | |
Droid Destruction | |
Attack | |
Ammunition Spillage | |
Registration | |
Item Purchase | |
Change | |
Droid Level-Up | |
Droid Resurrection |
Outcome Types
Outcome | Description |
---|---|
Droid destroyed | |
Rebuild successful | |
Insufficent funds sent | |
Garage inventory deposit | |
Gross damage performed | |
Refund of overpayment | |
Max purse changed | |
Payout adjustment | |
Material gained | |
Purse changed | |
Unregistered play | |
Ammunition spillage | |
Equipment changed | |
Refund of full amount | |
Garage inventory withdrawal | |
Experience earned | |
Bad aim | |
Address in use | |
Purse overage | |
Attack evaded | |
Purse gain | |
Rebuild failed | |
Clip size exceeded | |
Payout address change | |
Service fee | |
Level changed | |
Address claim | |
Attack amount above system max | |
Droid registered | |
Dust donation | |
Garnishment of deficit | |
Health changed | |
Max health changed | |
Net damage taken | |
Experience changed |
/garage
// Viewing current password hash or email (GET https://api.coindroids.com/garage)
jQuery.ajax({
url: "https://api.coindroids.com/garage",
type: "GET",
headers: {
"Authorization": "Bearer eyJhbG...5iAOo",
},
})
.done(function(data, textStatus, jqXHR) {
console.log("HTTP Request Succeeded: " + jqXHR.status);
console.log(data);
})
.fail(function(jqXHR, textStatus, errorThrown) {
console.log("HTTP Request Failed");
})
.always(function() {
/* ... */
});
curl -X "GET" "https://api.coindroids.com/garage" \
-H "Authorization: Bearer eyJhbG...5iAOo"
# Install the Python Requests library:
# `pip install requests`
import requests
def send_request():
# Viewing current password hash or email
# GET https://api.coindroids.com/garage
try:
response = requests.get(
url="https://api.coindroids.com/garage",
headers={
"Authorization": "Bearer eyJhbG...5iAOo",
},
)
print('Response HTTP Status Code: {status_code}'.format(
status_code=response.status_code))
print('Response HTTP Response Body: {content}'.format(
content=response.content))
except requests.exceptions.RequestException:
print('HTTP Request failed')
Response Example
[
{
"quantity": 2,
"currency_id": 1,
"id": 12,
"name": "Tank Training Arm",
"description": "",
"item_type": "Arm",
"model": "Tank Training",
"class": "Tank",
"details": {
"ems": 0,
"defense": 0,
"drop_scope": "Drone",
"composition": {
"73": [
0.01875
],
"74": [
0.0125
],
"75": [
0.075
],
"76": [
0.0125
],
"77": [
0.00625
]
},
"equip_scope": "Class",
"drop_frequency": 0.01,
"equip_optional": "",
"equip_required": "",
"defense_at_unlock": 0,
"material_strength": 0,
"defense_set_percentage": 0.1
},
"level_required": 0
},
{
"quantity": 1,
"currency_id": 1,
"id": 13,
"name": "Tank Training Head",
"description": "",
"item_type": "Head",
"model": "Tank Training",
"class": "Tank",
"details": {
"ems": 0,
"defense": 0,
"drop_scope": "Drone",
"composition": {
"73": [
0.015
],
"74": [
0.01
],
"75": [
0.06
],
"76": [
0.01
],
"77": [
0.005
]
},
"equip_scope": "Class",
"drop_frequency": 0.01,
"equip_optional": "",
"equip_required": "",
"defense_at_unlock": 0,
"material_strength": 0,
"defense_set_percentage": 0.1
},
"level_required": 0
}
]
Response Details
Name | Data Type | Description |
---|---|---|
quantity | Whole Number | The amount you have access to equip |
currency_id | Whole Number | The ID of the currency this item is associated with. Items cannot jump currency realms |
id | Whole Number | The ID of the item |
name | String | The name of the object |
… | … | … |
/item
// My Events (GET https://api.coindroids.com/item)
jQuery.ajax({
url: "https://api.coindroids.com/item",
type: "GET",
data: {
"id": "eq.8",
},
})
.done(function(data, textStatus, jqXHR) {
console.log("HTTP Request Succeeded: " + jqXHR.status);
console.log(data);
})
.fail(function(jqXHR, textStatus, errorThrown) {
console.log("HTTP Request Failed");
})
.always(function() {
/* ... */
});
# Install the Python Requests library:
# `pip install requests`
import requests
def send_request():
# My Events
# GET https://api.coindroids.com/item
try:
response = requests.get(
url="https://api.coindroids.com/item",
params={
"id": "eq.8",
},
)
print('Response HTTP Status Code: {status_code}'.format(
status_code=response.status_code))
print('Response HTTP Response Body: {content}'.format(
content=response.content))
except requests.exceptions.RequestException:
print('HTTP Request failed')
curl -X "GET" "https://api.coindroids.com/item?id=eq.8"
Response Example
[
{
"id": 8,
"name": "Health Pack 10",
"item_type": "Consumable",
"model": null,
"class": "Assault",
"description": "",
"image": "",
"level_required": 1,
"coordinate_z": null,
"details": {
"health_increase": 10
},
"pricing": [
{
"currency_name": "Bitcoin Testnet",
"address": "2Mz3osUdfVhGsgMygvGmnmfubspifkxhWXz",
"amount": 500000
}
]
}
]
Response Details
Name | Data Type | Description |
---|---|---|
id | Whole Number | The unique numeric identifier |
name | String | The name of the item |
item_type | Item Type | See the item_type data type |
description | String | A description of the item |
image | URL | |
level_required | Whole Number | The level a driod must be to equip or use this item |
details | JSONB | See Item Details below |
pricing | Payment Option[] | A list of prices per available currency |
/mempool
Grab a list of the actions pending for inclusion in a block, specifically for LTC (currency 4)
curl -X "GET" "https://api.coindroids.com/mempool?currency_id=eq.4"
// Mempool (GET https://api.coindroids.com/mempool)
jQuery.ajax({
url: "https://api.coindroids.com/mempool",
type: "GET",
data: {
"currency_id": "4",
},
})
.done(function(data, textStatus, jqXHR) {
console.log("HTTP Request Succeeded: " + jqXHR.status);
console.log(data);
})
.fail(function(jqXHR, textStatus, errorThrown) {
console.log("HTTP Request Failed");
})
.always(function() {
/* ... */
});
# Install the Python Requests library:
# `pip install requests`
import requests
def send_request():
# Mempool
# GET https://api.coindroids.com/mempool
try:
response = requests.get(
url="https://api.coindroids.com/mempool",
params={
"currency_id": "4",
},
)
print('Response HTTP Status Code: {status_code}'.format(
status_code=response.status_code))
print('Response HTTP Response Body: {content}'.format(
content=response.content))
except requests.exceptions.RequestException:
print('HTTP Request failed')
Response Example
[
{
"txid": "d975668b75106dd58df62c8acd673e0022ddd6861fba134eadcdbea9366420b5",
"tx_vout": 1,
"action_type": "Attack",
"currency_id": 4,
"involved_droids": [
17,
36
],
"player_id": 1,
"player_username": "Abstrct",
"droid_id": 17,
"droid_name": "Cmdr",
"actor": {
"id": 17,
"name": "Cmdr",
},
"target": {
"id": 36,
"name": "coblee",
},
"value": 1215000,
"timestamp": "2017-04-07T15:26:29.189017+00:00"
}
]
The mempool endpoint is used to retrieve actions pending for unconfirmed transactions. It’s accuracy is not guaranteed.
Response Details
Name | Data Type | Description |
---|---|---|
currency_id | Whole Number | |
txid | String | |
tx_vout | Whole Number | |
action_type | Action Type | see data type for options |
value | Whole Number | |
player_id | Whole Number | The player of the droid who initiated the action |
player_username | String | The username of the player who initiated the action |
involved_droids | DroidIDs[] | An array of all the droids involved in teh action. |
droid_id | Whole Number | The droid who initiated the action |
droid_name | String | The name of the droid who initiated the action |
actor | Short Object | The target of the action, either another droid or an item |
target | Short Object | The name of the target. Currently only when the target is a droid |
timestamp | Timestamp | When the action happened |
TODO: Explain the Actions and Outcomes
Action Types
Action | Description |
---|---|
Item Equip | |
Purse Filling | |
Item Use | |
Deficit | |
Droid Destruction | |
Attack | |
Ammunition Spillage | |
Registration | |
Item Purchase | |
Change | |
Droid Level-Up | |
Droid Resurrection |
/payout
Grab the 4 latest payouts
// My Events (GET https://api.coindroids.com/payout)
jQuery.ajax({
url: "https://api.coindroids.com/payout",
type: "GET",
data: {
"order": "block_height.desc",
},
headers: {
"Range": "0-10",
},
})
.done(function(data, textStatus, jqXHR) {
console.log("HTTP Request Succeeded: " + jqXHR.status);
console.log(data);
})
.fail(function(jqXHR, textStatus, errorThrown) {
console.log("HTTP Request Failed");
})
.always(function() {
/* ... */
});
# Install the Python Requests library:
# `pip install requests`
import requests
def send_request():
# My Events
# GET https://api.coindroids.com/payout
try:
response = requests.get(
url="https://api.coindroids.com/payout",
params={
"order": "block_height.desc",
},
headers={
"Range": "0-2",
},
)
print('Response HTTP Status Code: {status_code}'.format(
status_code=response.status_code))
print('Response HTTP Response Body: {content}'.format(
content=response.content))
except requests.exceptions.RequestException:
print('HTTP Request failed')
curl -X "GET" "https://api.coindroids.com/payout?order=block_height.desc" \
-H "Range: 0-2"
Response Example
[
{
"currency_id": 4,
"action_block_height": 1286199,
"settlement_txid": null,
"outcome_type": "Droid destroyed",
"action_type": "Attack",
"action_id": 1229566,
"amount": 2641427,
"droid_id": 17,
"address": "LfK1GXhTE3hrEY9uxjxrT3T8QX18kKJBs5",
"is_orphaned": false,
"is_garnished": false
},
{
"currency_id": 4,
"action_block_height": 1286180,
"settlement_txid": null,
"outcome_type": "Clip size exceeded",
"action_type": "Attack",
"action_id": 1229445,
"amount": 1190000,
"droid_id": 17,
"address": "LfK1GXhTE3hrEY9uxjxrT3T8QX18kKJBs5",
"is_orphaned": false,
"is_garnished": false
}
]
A list of all the payouts going out of the system.
Response
Name | Type | Description |
---|---|---|
currency_id | Whoel Number | The ID of the currency network the payout was sent on |
action_block_height | Whole Number | The height of the block it was included in |
settlement_txid | Transaction ID | The TXID of the settlement the payout has been included on |
outcome_type | Outcome Type | The outcome type that triggered the payout |
action_type | Action Type | The action type that triggered the payout |
outcome_id | While Number | The ID of the outcome that triggered the payout |
action_id | While Number | The ID of the action that triggered the payout |
amount | Numeric | The amount sent out, in satoshis |
address | String | The address that the funds are destined to be sent to |
droid_id | Whole Number | The ID of the Droid who received the payout (where applicable) |
is_garnished | Boolean | Used in the rare event of a chain re-org |
is_orphaned | Boolean | Used in the rare event of a chain re-org |
/player
Find the 5 newest players
// My Events (GET https://api.coindroids.com/player)
jQuery.ajax({
url: "https://api.coindroids.com/player",
type: "GET",
data: {
"order": "id.desc",
},
headers: {
"Range": "0-4",
},
})
.done(function(data, textStatus, jqXHR) {
console.log("HTTP Request Succeeded: " + jqXHR.status);
console.log(data);
})
.fail(function(jqXHR, textStatus, errorThrown) {
console.log("HTTP Request Failed");
})
.always(function() {
/* ... */
});
# Install the Python Requests library:
# `pip install requests`
import requests
def send_request():
# My Events
# GET https://api.coindroids.com/player
try:
response = requests.get(
url="https://api.coindroids.com/player",
params={
"order": "id.desc",
},
headers={
"Range": "0-4",
},
)
print('Response HTTP Status Code: {status_code}'.format(
status_code=response.status_code))
print('Response HTTP Response Body: {content}'.format(
content=response.content))
except requests.exceptions.RequestException:
print('HTTP Request failed')
curl -X "GET" "https://api.coindroids.com/player?order=id.desc" \
-H "Range: 0-4"
Response Example
[
{
"id": 23,
"username": "BitDroid",
"droids": [
18
]
},
{
"id": 22,
"username": "autotiger",
"droids": [
17
]
},
{
"id": 21,
"username": "davidl",
"droids": [
16
]
},
{
"id": 20,
"username": "udecker",
"droids": null
},
{
"id": 19,
"username": "phorex",
"droids": [
15
]
}
]
Response Details
Name | Data Type | Description |
---|---|---|
id | Whole Number | The ID of the player account |
username | String | The username of the player account. Not to be confused with their Droid name (although this could match) |
droids | Whole Number[] | An array of all Droid ID #s belonging to this player |
/profile
View Profile (GET)
curl -X "GET" "https://api.coindroids.com/profile" \
-H "Authorization: Bearer eyJhb...2Y"
// Viewing current password hash or email (GET https://api.coindroids.com/profile)
jQuery.ajax({
url: "https://api.coindroids.com/profile",
type: "GET",
headers: {
"Authorization": "Bearer eyJhb...2Y",
},
})
.done(function(data, textStatus, jqXHR) {
console.log("HTTP Request Succeeded: " + jqXHR.status);
console.log(data);
})
.fail(function(jqXHR, textStatus, errorThrown) {
console.log("HTTP Request Failed");
})
.always(function() {
/* ... */
});
# Install the Python Requests library:
# `pip install requests`
import requests
def send_request():
# Viewing current password hash or email
# GET https://api.coindroids.com/profile
try:
response = requests.get(
url="https://api.coindroids.com/profile",
headers={
"Authorization": "Bearer eyJhb...2Y",
},
)
print('Response HTTP Status Code: {status_code}'.format(
status_code=response.status_code))
print('Response HTTP Response Body: {content}'.format(
content=response.content))
except requests.exceptions.RequestException:
print('HTTP Request failed')
Password Update Example (PATCH)
// Updating a password or email (PATCH https://api.coindroids.com/profile)
jQuery.ajax({
url: "https://api.coindroids.com/profile",
type: "PATCH",
headers: {
"Authorization": "Bearer eyJhb...2Y",
"Content-Type": "text/plain; charset=utf-8",
},
processData: false,
data: "{ \"password_hash\":\"my new l33t password\" }",
})
.done(function(data, textStatus, jqXHR) {
console.log("HTTP Request Succeeded: " + jqXHR.status);
console.log(data);
})
.fail(function(jqXHR, textStatus, errorThrown) {
console.log("HTTP Request Failed");
})
.always(function() {
/* ... */
});
curl -X "PATCH" "https://api.coindroids.com/profile" \
-H "Authorization: Bearer eyJhb...2Y" \
-H "Content-Type: text/plain; charset=utf-8" \
-d "{ \"password_hash\":\"my new l33t password\" }"
# Install the Python Requests library:
# `pip install requests`
import requests
def send_request():
# Updating a password or email
# PATCH https://api.coindroids.com/profile
try:
response = requests.patch(
url="https://api.coindroids.com/profile",
headers={
"Authorization": "Bearer eyJhb...2Y",
"Content-Type": "text/plain; charset=utf-8",
},
data="{ \"password_hash\":\"my new l33t password\" }"
)
print('Response HTTP Status Code: {status_code}'.format(
status_code=response.status_code))
print('Response HTTP Response Body: {content}'.format(
content=response.content))
except requests.exceptions.RequestException:
print('HTTP Request failed')
Response Example
[
{
"id": 4,
"username": "Trunc",
"password_hash": "$2a$..ba",
"email": "josh@coindroids.com"
}
]
Response Details
Name | Data Type | Description |
---|---|---|
id | Whole Number | The players ID # |
username | String | The players username |
String[] | An array of email addresses owned by the player | |
password_hash | String | The hash of the current password recognized by coindroids |
API Functions
All API functions are accessed via POST calls to the API.
Function | Endpoint | Method |
---|---|---|
create_droid(Model, Currency ID, Droid Name ) | /rpc/create_droid | POST |
get_droid_registration_address(Droid ID) | /rpc/get_droid_registration_address | POST |
identify() | /rpc/identify | POST |
register(Username, Password, Email, Invite Code, Acceptance of Terms) | /rpc/register | POST |
set_droid_build(Droid ID, Build Details) | /rpc/set_droid_build | POST |
set_droid_payout_address(Droid ID, Address) | /rpc/set_droid_payout_address | POST |
validate_droid_build(Droid ID, Build Details) | /rpc/validate_droid_build | POST |
/rpc/create_droid
curl -X "POST" "https://api.coindroids.com/rpc/create_droid" \
-H "Authorization: Bearer eyJhbGciO...DSzsybGFgk" \
-H "Content-Type: application/json" \
-d "{\"name\":\"Droidy McDroidface\",\"currency_id\":\"1\",\"model\":\"Assault Training\"}"
jQuery.ajax({
url: "https://api.coindroids.com//rpc/create_droid",
type: "POST",
headers: {
"Authorization": "Bearer eyJhbGc...sybGFgk",
"Content-Type": "application/json",
},
contentType: "application/json",
data: JSON.stringify({
"name": "Droidy McDroidface",
"model": "Assault Training",
"currency_id": "1"
})
})
.done(function(data, textStatus, jqXHR) {
console.log("HTTP Request Succeeded: " + jqXHR.status);
console.log(data);
})
.fail(function(jqXHR, textStatus, errorThrown) {
console.log("HTTP Request Failed");
})
.always(function() {
/* ... */
});
# Install the Python Requests library:
# `pip install requests`
import requests
import json
def send_request():
try:
response = requests.post(
url="https://api.coindroids.com/rpc/create_droid",
headers={
"Authorization": "Bearer eyJhbGciOiJI...zsybGFgk",
"Content-Type": "application/json",
},
data=json.dumps({
"name": "Droidy McDroidface",
"model": "Droidy McDroidface",
"currency_id": "1"
})
)
print('Response HTTP Status Code: {status_code}'.format(
status_code=response.status_code))
print('Response HTTP Response Body: {content}'.format(
content=response.content))
except requests.exceptions.RequestException:
print('HTTP Request failed')
Parameters
Name | Type | Description |
---|---|---|
model | Model | See the list of models available for new droids below |
currency_id | Bigint | See the /currency endpoint for available currencies |
name | CHARACTER VARYING | Your droids new classy moniker |
Response Details
Name | Type | Description |
---|---|---|
droid | Droid Object | The droid object as if called through the /droid endpoint. Includines the following details (droid.*) |
droid.id | Whole Number | The ID of the Droid |
droid.name | String | The science-given name of the Droid |
droid.currency_id | Whole Number | The ID of the currency realm the droid is in |
droid.currency_code | Netcode | The three letter code for a currency (i.e. LTC) |
droid.player_id | Whole Number | The ID of the droids squishy overlord |
droid.username | String | Name of the droids squishy overlord |
droid.attack_address | Cryptocurrency Address | The address other players can use to attack this droid |
droid.primary_ammunition_clip | Cryptocurrency Address | The primary address used for payouts involving this droid |
droid.additional_ammunition_clips | Cryptocurrency Address[] | Additional addresses tracked for droid actions involving this droid |
droid.level | Whole Number | The level of a droid |
droid.experience | Whole Number | The total experience gained by this droid to date |
droid.health_current | Whole Number | The current state of the health for a droid going into the next processing block |
droid.health_max | Whole Number | The maximum health that this droid can have |
droid.purse_current | Whole Number | The current state of the purse for a droid going into the next block processing |
droid.is_npc | Boolean | [True, False] Is this human controlled or a coindroids bot instance? |
droid.is_active | Boolean | Has this droid been properly registered to a player wallet |
droid.is_shielded | Boolean | Is the droid currently in a Shielding status? |
droid.is_covered | Boolean | Is the droid currently in a Covered status? |
droid.death_height | Whole Number | The height in which the droid died (NULL if not currently dead) |
droid.is_dead | Boolean | Is the droid currently dead? |
droid.last_attack | Whole Number | The height of the last Attack action performed by this droid |
droid.created_at | Timestamp | The date and time of droid creation |
droid.build | Items[] | A description of the items which make up the build of this droid |
droid.build[].item_id | Whole Number | The ID of the item equipped in the build |
droid.build[].name | String | The name of the item equipped in the build |
droid.build[].class | Class Type | The class of the item equipped in the build |
droid.build[].image | File Path | The path to the static image hosted for the item |
droid.build[].model | Model Type | The model of the item equipped in the build |
droid.build[].details | Item Details Object | The full attributes of the item equipped in the build |
droid.build[].item_type | Item Type | The type of the item equipped in the build |
droid.build[].short_name | String | A short identifier of the equipped item |
droid.build[].description | String | A long description of the equipped item |
droid.build[].level_required | Whole Number | The level that must be met for the item to be equippable |
droid.build[].real_item_type | String | Another Item Type field that made sense at the time but I don’t quite recall why this is here |
droid.attribute | Attributes | The culminating stats of a droid build. Includes the following details (attribute.*) |
droid.attribute.ems | Numeric | Value between 0-100%, used when calculating EMI |
droid.attribute.class | Class Type | The resulting Class of the droid build |
droid.attribute.model | Model Type | The resulting Model of the droid build |
droid.attribute.defense | Numeric | Value between 0-100%, used during attack calculations |
droid.attribute.accuracy | Numeric | Value between 0-100%, used during attack calculations |
droid.attribute.clip_size | Whole Number | The number of bullets (i.e. Tokens) that can be fired per block |
droid.attribute.base_damage | Numeric | Value between 0-100%, used during attack calculations |
droid.attribute.weapon_unlock | Numeric | Value between 0-100%, used during attack calculations |
droid.attribute.accuracy_likely | Numeric | Value between 0-100%, the average accuracy to expect from the build |
droid.attribute.blueprint | Droid Blueprint Object | An object that denotes each item and the position it occupies on the droid |
droid.composition | Composition Objects | The makeup of the droids materials (composition. |
droid.pending_build | Build Object | The full new build of a droid including build, composition, part_list and attribute |
droid.currency_in | Satoshi | Total amount of value sent to the system from this droid |
droid.currency_out | Satoshi | Total amount of payouts sent to this droid from the system |
droid.highest_payout | Satoshi | Largest payout won by the droid (currently includes refunds from voided actions) |
droid.attacks | Whole Number | Total number of attacks the droid has made |
droid.targeted | Whole Number | Total number of attacks by other droids against this droid |
droid.deaths | Whole Number | Total deaths this droid has experienced |
droid.average_damage_performed | Whole Number | Average damage done by the droid in an attack |
droid.total_damage_performed | Whole Number | Total damage performed by this droid across all attacks |
droid.total_damage_defended | Whole Number | Total damage defended against by this droid across all attacks against it |
droid.most_targeted_id | Whole Number | The target this droid attacks most often |
droid.most_targeted_name | String | The name of the target this droid attacks most often |
droid.worst_enemy_id | Whole Number | The droid that targets this droid the most |
droid.worst_enemy_name | String | The name of the droid that targets this droid the most |
errors | Error[] | An array of errors with the following attributes (errors[].*) |
errors[].field | String | Error Label |
errors[].message | String | Error descrption |
Potential Errors
Field | Message |
---|---|
name | Droid name has illegal characters [0-9a-zA-Z-_]{3,20} |
name | Droid name is taken |
currency_id | Player already has a droid under this currency |
model | Base model unavailable to Player |
unknown | An unknown error has occured |
session | Player must be logged in to perform this action |
/rpc/get_droid_registration_address
curl -X "POST" "https://api.coindroids.com/rpc/get_droid_registration_address" \
-H "Authorization: Bearer eyJhbGciOiJIUzI...2lXGhuBjtQ8Q" \
-H "Content-Type: text/plain" \
-d "{ \"droid_id\":YourDroidID }"
This function is used to grab a new wallet sync address for a droid.
/rpc/identify
Username & Password Authentication
curl -X "POST" "https://api.coindroids.com/rpc/identify" \
-H "Content-Type: application/json" \
-d "{\"username\":\"YourUsername\",\"password\":\"YourPassword\"}"
// Identify (POST https://api.coindroids.com/rpc/identify)
jQuery.ajax({
url: "https://api.coindroids.com/rpc/identify",
type: "POST",
processData: false,
data: "{\"username\":\"Abstract\", \"password\":\"password\"}",
})
.done(function(data, textStatus, jqXHR) {
console.log("HTTP Request Succeeded: " + jqXHR.status);
console.log(data);
})
.fail(function(jqXHR, textStatus, errorThrown) {
console.log("HTTP Request Failed");
})
.always(function() {
/* ... */
});
# Install the Python Requests library:
# `pip install requests`
import requests
def send_request():
# Identify
# POST https://api.coindroids.com/rpc/identify
try:
response = requests.post(
url="https://api.coindroids.com/rpc/identify",
data="{\"username\":\"Abstract\", \"password\":\"password\"}"
)
print('Response HTTP Status Code: {status_code}'.format(
status_code=response.status_code))
print('Response HTTP Response Body: {content}'.format(
content=response.content))
except requests.exceptions.RequestException:
print('HTTP Request failed')
Token Authorization
curl -X "POST" "https://api.coindroids.com/rpc/identify" \
-H "Authorization: Bearer eyJhbGciOiJ...4bn4gYu2gs"
// Identify (update with authenticate session) (POST https://api.coindroids.com/rpc/identify)
jQuery.ajax({
url: "https://api.coindroids.com/rpc/identify",
type: "POST",
headers: {
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6Ikp...-tV89N7sPiz4bn4gYu2gs",
},
})
.done(function(data, textStatus, jqXHR) {
console.log("HTTP Request Succeeded: " + jqXHR.status);
console.log(data);
})
.fail(function(jqXHR, textStatus, errorThrown) {
console.log("HTTP Request Failed");
})
.always(function() {
/* ... */
});
# Install the Python Requests library:
# `pip install requests`
import requests
def send_request():
# Identify (update with authenticate session)
# POST https://api.coindroids.com/rpc/identify
try:
response = requests.post(
url="https://api.coindroids.com/rpc/identify",
headers={
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoicGxheWVycyIsImlkIjoiY2ZmYzZkYzQtMDY0ZS00OWRiLTllODgtNzgwNjY4ZjQ0ZTBjIn0.05yM5ihI5gyoh6bQoG6Kus-tV89N7sPiz4bn4gYu2gs",
},
)
print('Response HTTP Status Code: {status_code}'.format(
status_code=response.status_code))
print('Response HTTP Response Body: {content}'.format(
content=response.content))
except requests.exceptions.RequestException:
print('HTTP Request failed')
To start a new session, pass the username and password paramters. If you are extending a session, no paramters are needed but the transaction must include an authorization header.
Parameters
Username & Password Authentication
Name | Type | Description |
---|---|---|
username | Character Varying | The player name |
password | Chacter Varying | The player password |
Token Authentication
Name | Type | Description |
---|---|---|
- | - | No paramters needed for token based identification |
Response Details
Name | Type | Description |
---|---|---|
profile | Player Profile | The player object with the following attributes (profile.*) |
profile.id | Whole Number | The players ID |
profile.username | String | The Players Username |
profile.email | Email address belonging to the player | |
errors | Error[] | An array of errors with the following attributes (errors[].*) |
errors[].field | String | Error Label |
errors[].message | String | Error descrption |
token | JWT | The JWT authorization token for API requests |
Potential Errors
Field | Message |
---|---|
password | Password supplied is invalid |
/rpc/register
curl -X "POST" "https://api.coindroids.com/rpc/register" \
-H "Content-Type: text/plain" \
-d $'{
"username":"Abstract",
"password":"password",
"email":"josh@coindroids.com",
"invite_code":"37764f2a-da1b-40ea-a054-ef1c8021196a",
"accept_terms":"t"
}'
$("#submit-registration").click(function( event ) {
$("#submit-registration").hide();
$("#submit-registration-hidden").show();
event.preventDefault();
if ($("#Password").val() == $("#RepeatPassword").val()) {
var registrationData = {
"username" : $("#Username").val(),
"password" : $("#Password").val(),
"email" : $("#Email").val(),
"invite_code":$("#InviteCode").val(),
"accept_terms":$("#AcceptedTerms").val()
};
jQuery.ajax({
url: "https://api.coindroids.com/rpc/register",
type: "POST",
processData: false,
contentType: 'application/json',
data: JSON.stringify(registrationData)
})
.done(function(data, textStatus, jqXHR) {
$("#RegistrationFormContent").html("<p>Registration Complete!</p>");
$("#RegistrationFormContent").append("<p><textarea disabled>"+ data.token +"</textarea></p>");
console.log("HTTP Request Succeeded: " + jqXHR.status);
console.log(data);
})
.fail(function(jqXHR, textStatus, errorThrown) {
console.log("HTTP Request Failed");
})
.always(function() {
/* ... */
});
}
});
# Install the Python Requests library:
# `pip install requests`
import requests
def send_request():
# Register a player
# POST https://api.coindroids.com/rpc/register
try:
response = requests.post(
url="https://api.coindroids.com/rpc/register",
data="{
\"username\":\"Abstract\",
\"password\":\"password\",
\"email\":\"josh@coindroids.com\",
\"invite_code\":\"37764f2a-da1b-40ea-a054-ef1c8021196a\",
\"accept_terms\":\"t\"
}"
)
print('Response HTTP Status Code: {status_code}'.format(
status_code=response.status_code))
print('Response HTTP Response Body: {content}'.format(
content=response.content))
except requests.exceptions.RequestException:
print('HTTP Request failed')
This function is used to create new players in the system. Create your player first, otherwise you won’t be able to create a droid.
Parameters
Name | Type | Description |
---|---|---|
username | String | |
password | String | |
String | ||
invite_code | UUID | |
accept_terms | Boolean |
Response Details
Name | Type | Description |
---|---|---|
profile | Player Profile | The player object with the following attributes (profile.*) |
profile.id | Whole Number | The players ID |
profile.username | String | The Players Username |
profile.email | Email address belonging to the player | |
errors | Error[] | An array of errors with the following attributes (errors[].*) |
errors[].field | String | Error Label |
errors[].message | String | Error descrption |
token | JWT | The JWT authorization token for API requests |
Potential Errors
Field | Message |
---|---|
accept_terms | You must accept the terms and conditions to register |
invite_code | Invite code was invalid |
username | Invalid username format. Must be letters, numbers and underscores only. |
password | Password cannot be blank |
Email address cannot be blank | |
general | Error during player registration |
/rpc/set_droid_build
Your droid is an ever evolving beast and the Coindroids universe is no different. Ensure your droid is always built to impress (and annihilate) through the set_droid_build call.
Parameters
Name | Type | Description |
---|---|---|
droid_id | Whole Number | The ID of the droid being updated |
build | JSONB |
Response Details
Name | Type | Description |
---|---|---|
droid | Droid Object | The droid object as if called through the /droid endpoint. Includines the following details (droid.*) |
droid.id | Whole Number | The ID of the Droid |
droid.name | String | The science-given name of the Droid |
droid.currency_id | Whole Number | The ID of the currency realm the droid is in |
droid.currency_code | Netcode | The three letter code for a currency (i.e. LTC) |
droid.player_id | Whole Number | The ID of the droids squishy overlord |
droid.username | String | Name of the droids squishy overlord |
droid.attack_address | Cryptocurrency Address | The address other players can use to attack this droid |
droid.primary_ammunition_clip | Cryptocurrency Address | The primary address used for payouts involving this droid |
droid.additional_ammunition_clips | Cryptocurrency Address[] | Additional addresses tracked for droid actions involving this droid |
droid.level | Whole Number | The level of a droid |
droid.experience | Whole Number | The total experience gained by this droid to date |
droid.health_current | Whole Number | The current state of the health for a droid going into the next processing block |
droid.health_max | Whole Number | The maximum health that this droid can have |
droid.purse_current | Whole Number | The current state of the purse for a droid going into the next block processing |
droid.is_npc | Boolean | [True, False] Is this human controlled or a coindroids bot instance? |
droid.is_active | Boolean | Has this droid been properly registered to a player wallet |
droid.is_shielded | Boolean | Is the droid currently in a Shielding status? |
droid.is_covered | Boolean | Is the droid currently in a Covered status? |
droid.death_height | Whole Number | The height in which the droid died (NULL if not currently dead) |
droid.is_dead | Boolean | Is the droid currently dead? |
droid.last_attack | Whole Number | The height of the last Attack action performed by this droid |
droid.created_at | Timestamp | The date and time of droid creation |
droid.build | Items[] | A description of the items which make up the build of this droid |
droid.build[].item_id | Whole Number | The ID of the item equipped in the build |
droid.build[].name | String | The name of the item equipped in the build |
droid.build[].class | Class Type | The class of the item equipped in the build |
droid.build[].image | File Path | The path to the static image hosted for the item |
droid.build[].model | Model Type | The model of the item equipped in the build |
droid.build[].details | Item Details Object | The full attributes of the item equipped in the build |
droid.build[].item_type | Item Type | The type of the item equipped in the build |
droid.build[].short_name | String | A short identifier of the equipped item |
droid.build[].description | String | A long description of the equipped item |
droid.build[].level_required | Whole Number | The level that must be met for the item to be equippable |
droid.build[].real_item_type | String | Another Item Type field that made sense at the time but I don’t quite recall why this is here |
droid.attribute | Attributes | The culminating stats of a droid build. Includes the following details (attribute.*) |
droid.attribute.ems | Numeric | Value between 0-100%, used when calculating EMI |
droid.attribute.class | Class Type | The resulting Class of the droid build |
droid.attribute.model | Model Type | The resulting Model of the droid build |
droid.attribute.defense | Numeric | Value between 0-100%, used during attack calculations |
droid.attribute.accuracy | Numeric | Value between 0-100%, used during attack calculations |
droid.attribute.clip_size | Whole Number | The number of bullets (i.e. Tokens) that can be fired per block |
droid.attribute.base_damage | Numeric | Value between 0-100%, used during attack calculations |
droid.attribute.weapon_unlock | Numeric | Value between 0-100%, used during attack calculations |
droid.attribute.accuracy_likely | Numeric | Value between 0-100%, the average accuracy to expect from the build |
droid.attribute.blueprint | Droid Blueprint Object | An object that denotes each item and the position it occupies on the droid |
droid.composition | Composition Objects | The makeup of the droids materials (composition. |
droid.pending_build | Build Object | The full new build of a droid including build, composition, part_list and attribute |
droid.currency_in | Satoshi | Total amount of value sent to the system from this droid |
droid.currency_out | Satoshi | Total amount of payouts sent to this droid from the system |
droid.highest_payout | Satoshi | Largest payout won by the droid (currently includes refunds from voided actions) |
droid.attacks | Whole Number | Total number of attacks the droid has made |
droid.targeted | Whole Number | Total number of attacks by other droids against this droid |
droid.deaths | Whole Number | Total deaths this droid has experienced |
droid.average_damage_performed | Whole Number | Average damage done by the droid in an attack |
droid.total_damage_performed | Whole Number | Total damage performed by this droid across all attacks |
droid.total_damage_defended | Whole Number | Total damage defended against by this droid across all attacks against it |
droid.most_targeted_id | Whole Number | The target this droid attacks most often |
droid.most_targeted_name | String | The name of the target this droid attacks most often |
droid.worst_enemy_id | Whole Number | The droid that targets this droid the most |
droid.worst_enemy_name | String | The name of the droid that targets this droid the most |
errors | Error[] | An array of errors with the following attributes (errors[].*) |
errors[].field | String | Error Label |
errors[].message | String | Error descrption |
Potential Errors
Field | Message |
---|---|
droid_id | Droid not found |
permission_denied | Player does not have access to alter this droid |
build_missing_torso | The build provided is missing a torso |
null_equip_entry | Part mentioned but no item specified |
failed_level_requirement | An item specified has a level requirement beyond the droids capabilities |
equip_item_type_missmatch | An item specified is being equipped to the wrong part (ex: Trying to attach a head to a leg slot) |
equip_scope_error_inventory_on_droid | Inventory Items cannot be equiped to the droid body. Try placing it in your Droid Inventory instead |
equip_scope_model_error | An item was equipped that needs to match the Model of the chosen Torso but does not |
equip_scope_class_error | An item was equipped that needs to match the Class of the chosen Torso but does not |
null_build | No build details provided |
equip_item_missing | Your build was missing an item. Check that all your arms and legs are accounted for |
equip_item_does_not_fit | An item in your build does not fit into the optional composition of available slots |
session | Player must be logged in to perform this action |
/rpc/set_droid_payout_address
This function allows you to change the payout address used when sending funds awarded to your droid. The Coindroids system will follow many wallets for your droid, but payouts are always sent to this one address.
Parameters
Name | Type | Description |
---|---|---|
droid_id | Bigint | The ID of the droid being updated |
payout_address | Address | Must already be an address associated with your droid |
Response Details
Name | Description |
---|---|
Droid Response | The droid object as if called through the /droid endpoint. |
/rpc/validate_droid_build
Your droid is an ever evolving beast and the Coindroids universe is no different. Ensure your droid is always built to impress (and annihilate) through the validate_droid_build call.
Parameters
Name | Type | Description |
---|---|---|
droid_id | Whole Number | The ID of the droid being updated |
build | JSONB |
Response Details
Name | Type | Description |
---|---|---|
build | Items[] | The build of a droid, as if accessed from the /droid endpoint. Includes the following details (build[].*) |
build[].item_id | Whole Number | The ID of the item equipped in the build |
build[].name | String | The name of the item equipped in the build |
build[].class | Class Type | The class of the item equipped in the build |
build[].image | File Path | The path to the static image hosted for the item |
build[].model | Model Type | The model of the item equipped in the build |
build[].details | Item Details Object | The full attributes of the item equipped in the build |
build[].item_type | Item Type | The type of the item equipped in the build |
build[].short_name | String | A short identifier of the equipped item |
build[].description | String | A long description of the equipped item |
build[].level_required | Whole Number | The level that must be met for the item to be equippable |
build[].real_item_type | String | Another Item Type field that made sense at the time but I don’t quite recall why this is here |
attribute | Attributes | The culminating stats of a droid build. Includes the following details (attribute.*) |
attribute.ems | Numeric | Value between 0-100%, used when calculating EMI |
attribute.class | Class Type | The resulting Class of the droid build |
attribute.model | Model Type | The resulting Model of the droid build |
attribute.defense | Numeric | Value between 0-100%, used during attack calculations |
attribute.accuracy | Numeric | Value between 0-100%, used during attack calculations |
attribute.clip_size | Whole Number | The number of bullets (i.e. Tokens) that can be fired per block |
attribute.base_damage | Numeric | Value between 0-100%, used during attack calculations |
attribute.weapon_unlock | Numeric | Value between 0-100%, used during attack calculations |
attribute.accuracy_likely | Numeric | Value between 0-100%, the average accuracy to expect from the build |
attribute.blueprint | Droid Blueprint Object | An object that denotes each item and the position it occupies on the droid |
part_list | Whole Number[] | Array of items involved in the droid build |
composition | Composition Objects | The makeup of the droids materials (composition. |