tokyo-input
v1.0.0
Published
Tokyo Project, Validate the user input schema
Downloads
1
Readme
Types
Time : Human readable string without time zone considered (UTC). Only support MM/DD/YYYY HH:mm
format by moment.js. See details
- eg) 01/21/2018 09:30
Account : 20 Bytes Ethereum account starting with '0x'
- eg) 0x5a0b54d5dc17e0aadc383d2db43b0a0d3e029c4c
Input Schema
{
token : {
token_type : {
is_minime : Boolean,
token_option : { // only required for MiniMe
burnable : Boolean,
pausable : Boolean,
vesting : Boolean,
}
},
token_name : String,
token_symbol : String,
decimal : Number,
},
sale : {
max_cap : Number, // decimal considered
min_cap : Number, // decimal considered
start_time : Time,
end_time : Time,
rate: {
is_static: Boolean,
base_rate: Number,
bonus: { // only required for dynamic bonus
use_time_bonus : Boolean,
use_amount_bonus : Boolean,
time_bonuses : [ { bonus_time_stage: Time, bonus_ratio: Number } ],
amount_bonuses : [ { bonus_amount_stage: Number, bonus_ratio: Number } ]
}
},
distribution: {
token : [ { account: String | Account, ratio : Number } ], // index 0 for { account: 'crowdsale', ratio: 0.80 }
ether : [ { account: Account, ratio : Number } ]
},
valid_purchase: {
max_purchase_limit : Number, // ( 0 for no limit )
min_purchase_limit : Number // ( 0 for no limit )
},
kyc: {
kyc_for_mainsale : Boolean,
kyc_for_presale : Boolean
},
new_token_owner : Account,
multisig : {
multisig_use : Boolean,
num_multisig : Number,
multisig_owner : [ Account ]
}
},
locker : {
use_locker : Boolean,
num_locker : Number,
locker_options : [
{
no_vesting : Boolean, // just lock tokens
vesting : [ { vesting_stage: Time, vesting_amount: Number } ],
distribution: [ { account: String, ratio: Number } ]
}
]
}
}