eos-abi
Javascript Libraries for create eos abi schema
API
initial abi def
const customTypes = {};const abi = customTypes;
abi.createActionData(struct, value)
create an ActionData
object
- struct the action data def
- value the action data
Run actionData.toBytes()
to get the action data in bytes
format
abi.createSchema(struct)
create a Schema
object
- struct the schema abi def
Run
schema.normalize(data)
to format data by abi def
Use
;const abi = ;const actionData = abi;const schema = abi;const data = schema;console;
The result is
account: 'eosio' time: '2018-04-11T04:00:00' key: 'EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV' action: name: 'eosio' data: '000000005087a9020568656c6c6f'
Support Types
- bytes
- int8
- int16
- int32
- int64
- name
- public_key
- string
- time
- uint8
- uint16
- uint32
- uint64
- uint128