Document of AOSIO Development

As we know, AOS was developed based on EOSIO, so all the EOSIO documents and usage, are worked for AOS. Developers can refer to https://developers.eos.io/ for more information and details.

1. Basic

1.1 Install AOSIO

Clone source code of the aosio/aos repository.

1.2 Install CDT

Clone source code of the aosio.cdt repository.

1.3 Create development wallet

1.3.1 Create a wallet:

claos wallet create — to-console

1.3.2 Open the wallet

Wallets are closed by default when starting a kaosd instance, to begin, run the following:

1.3.3 Unlock it

The kaosd wallet(s) have been opened, but is still locked. Moments ago you were provided a password, you’re going to need that now.

1.3.4 Import keys into your wallet

Generate a private key, claos has a helper function for this, just run the following.

1.4 Start kaosd and nodaos

1.4.1 Start kaosd

kaosd &

1.4.2 Start nodaos

nodaos -e -p aosio \

1.4.3 Check the installation

Check that nodaos is producing blocks

1.5 Create test accounts

Using aosio to create two test accounts, alice and bob.

1.6 Compile contracts

For example, if your contract code file is hello.cpp, then compile your code to wasm as fellows:

1.7 Deploy contracts

For example, you try deploy your hello contract into alice account, as fellows:

1.8 Execute the contract

claos push action alice hi ‘[“bob”]’ -p alice@active

1.9 Add inline actions

In order for the inline actions to be available, add the aosio.code permission to the contract’s account’s active permission.

2. Advanced

Besides EOSIO related features, AOSIO provide multiple intrinsics that developers can use to make powerful cryptographic DAPPs.

2.1 assert_cipher_equal_prove

This intrinsic provide cipher equality prove. It checkes if cipher_balance equal provided eq_para and public key.

2.2 assert_cipher_valid_prove

This intrinsic provide cipher valid prove, it verify account’s public key and bulletproofs.

2.3 assert_cipher_ecdsa_signature

This intrinsic provide verifying ECDSA signature.

2.4 assert_cipher_encrypt

This intrinsic provide verify cipher encrypt function. It checkes if ciphertext matches encrypt(pubkey, value, random).

2.5 cipher_add

This intrinsic provide cipher add function.

2.6 get_permission_key

This intrinsic get account’s related public key.

2.7 prove_bulletproof

This intrinsic generate a bulletproof for a value.

2.8 assert_verify_bulletproof

This intrinsic verify proof, if proof verified succeed, it pass, otherwise, it panic.

2.9 pedersen_commit

This intrinsic generate pedersen commit.

Makes Encryption Assets Safer