You can test token emission inside private Cellframe network.
Download configs for private network: https://gitlab.demlabs.net/cellframe/cellframe-doc/-/blob/master/cfg/cellframe-node-private-network.zip
You can see chain name in chain config, located in etc/network/private/chain-gdb.cfg in name parameter
For running it extract cellframe-node folder content to <node_settings_path>
<node_settings_path> - usually "C:\Users\Public\Documents\cellframe-node" under Windows. Path is gotten from "Common Documents" registry variable (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Common Documents)
<node_settings_path> - "/opt/" under Linux
cellframe-node-tool cert create test_cert sig_dil
If operation is succesfull, output is empty.
Certificate file is created in <node_settings_path>\var\lib\ca folder
cellframe-node-cli wallet new -w test01
wallet 'test01' (type=sig_dil) successfully create
cellframe-node-cli wallet info -w test01 -net private
wallet: test01
addr: rTDbDdeStfpodpLUeXUMuDdUUpHQhRHqrbgmytHtvrhQ1Fcjwb4kMyiBaw4rdvCyScwcyXa4uT14QNYaziaCipTcPjoDUgH1WhVP5KGj
network: private
If you have more then one network, wallet will be created in every network with different addresses.
cellframe-node-cli token_decl -net private -chain gdb -token TICK_TEST -total_supply 5000 -signs_total 1 -signs_emission 1 -decimals 18 -certs test_cert
datum 0x3D14EB2774CB4BFEC43FBD793169639909A754A819BA39C44F215A3EE1982385 with token TICK_TEST is placed in datum pool
If you see message "Need master node role or higher for network private to process this command", you need change '''node-role=master''' in <node_settings_path>\etc\network\private.cfg
cellframe-node-cli mempool_proc -net private -chain gdb -datum 0x3D14EB2774CB4BFEC43FBD793169639909A754A819BA39C44F215A3EE1982385
hash 0x3D14EB2774CB4BFEC43FBD793169639909A754A819BA39C44F215A3EE1982385: type_id=DATUM_TOKEN_DECL ts_create=Tue Oct 26 10:03:22 2021
data_size=3411
Datum processed well. Removed datum from mempool.
cellframe-node-cli token_emit -net private -chain_emission zero -chain_base_tx zero -addr rTDbDdeStfpodpLUeXUMuDdUUpHQhRHqrbgmytHtvrhQ1Fcjwb4kMyiBaw4rdvCyScwcyXa4uT14QNYaziaCipTcPjoDUgH1WhVP5KGj -token TICK_TEST -certs test_cert -emission_value 12345
datum emission 0x982058B7696D4DC2D77469807C640E7E6D7B4C9E471B06EED65E4CC88DA98E47 is placed in datum pool
datum tx 0x33933F05CCF0184BC3526D13FE9284C71ABCB6AB9EE94C05F7E93323A712FD6C is placed in datum pool
cellframe-node-cli mempool_proc -net private -chain zero -datum 0x982058B7696D4DC2D77469807C640E7E6D7B4C9E471B06EED65E4CC88DA98E47
hash 0x982058B7696D4DC2D77469807C640E7E6D7B4C9E471B06EED65E4CC88DA98E47: type_id=DATUM_TOKEN_EMISSION ts_create=Tue Sep 28 07:52:29 2021
data_size=3470
Datum processed well. Removed datum from mempool.
cellframe-node-cli mempool_proc -net private -chain zero -datum 0x33933F05CCF0184BC3526D13FE9284C71ABCB6AB9EE94C05F7E93323A712FD6C
hash 0x33933F05CCF0184BC3526D13FE9284C71ABCB6AB9EE94C05F7E93323A712FD6C: type_id=DATUM_TX ts_create=Tue Sep 28 07:52:29 2021
data_size=3672
Datum processed well. Removed datum from mempool
cellframe-node-cli wallet info -w test01 -net private
wallet: test01
addr: rTDbDdeStfpodpLUeXUMuDdUUpHQhRHqrbgmytHtvrhQ1Fcjwb4kMyiBaw4rdvCyScwcyXa4uT14QNYaziaCipTcPjoDUgH1WhVP5KGj
network: private
balance:
0.000012345 (12345) TICK_TEST
If you don't see balance, please, restart cellframe-node
/opt/cellframe-node/bin/cellframe-node-tool
if you execute it without parameters, you can read help information.
/opt/cellframe-node/bin/cellframe-node-tool cert create <cert name> <key type> [<key length>] - file with private key. You can sign something using it. (example: when you create token, you can confirm, that token is your own)
Example: sudo /opt/cellframe-node/bin/cellframe-node-tool cert create testw sig_dil
* Create new key wallet and generate signatures with same names plus index
cellframe-node-tool wallet create <wallet name> <signature type> [<signature type 2>[...<signature type N>]]
cellframe-node-tool wallet create wallet-dil sig_dil
cellframe-node-tool wallet create wallet-bliss sig_bliss
cellframe-node-tool wallet create wallet-picnic sig_picnic
* Create new key wallet from existent certificates in the system
cellframe-node-tool wallet create_from <network name> <wallet name> <wallet ca1> [<wallet ca2> [...<wallet caN>]]
* Create new key file with randomly produced key stored in
cellframe-node-tool cert create <cert name> <key type> [<key length>]
cellframe-node-tool cert create test_cert sig_dil
* Dump cert data stored in <file path>
cellframe-node-tool cert dump <cert name>
cellframe-node-tool cert dump test_cert
Certificate name: test_cert
Signature type: sig_dil
Private key size: 16
Public key size: 16
Metadata section count: 0
Certificates signatures chain size: 0
* Sign some data with cert
cellframe-node-tool cert sign <cert name> <data file path> <sign file output> [<sign data length>] [<sign data offset>]
* Create pkey from <cert name> and store it on <pkey path>
cellframe-node-tool cert create_pkey <cert name> <pkey path>
* Export only public key from <cert name> and stores it
cellframe-node-tool cert create_cert_pkey <cert name> <new cert name>
cellframe-node-tool cert create_cert_pkey test_cert cert_test_pkey
cellframe-node-tool cert dump cert_test_pkey
Certificate name: cert_test_pkey
Signature type: sig_dil
Private key size: 0
Public key size: 16
Metadata section count: 0
Certificates signatures chain size: 0
* Add metadata item to <cert name>
cellframe-node-tool cert add_metadata <cert name> <key:type:length:value>
Verify certificate creation:
ls <node_settings_path>/cellframe-node/var/lib/ca/
Add signature in token in mempool
<node_settings_path>/cellframe-node/bin/cellframe-node-cli token_decl_sign -net <net name> -chain <chain name> -datum <datum_hash> -certs <certs list>
-net - network name. It can be your own network or Cellframe networks (Backbone, core-t, kelvin-testnet, kelvpn-minkowski, mileena, subzero)
-chain - zero chain - for token declaration (plasma - for transactions)
-datum - hash id for token (example: datum 0x8949B08BE850CC75928BA2CEV7D1C7ECAA720B9BA971872BADB7FD8772DC834E)
-certs - certificate name
Recommend remove test database before executing commands. Database is placed in <node_settings_path>\var\lib\global_db
cellframe-node-cli wallet new -w <wallet_name>
cellframe-node-cli wallet new -w test01
wallet 'test01' (type=sig_dil) successfully created
You can find file with new created wallet in <node_settings_path>\var\lib\wallet
cellframe-node-cli wallet new -w <wallet_name> -sign sig_dil -net private
cellframe-node-cli wallet new -w test_wallet -sign sig_dil -net private
wallet 'test_wallet' (type=sig_dil) successfully created
new address rTDbDdeStfpodpLUe8u9LZBDuLPpgnCDLKwAPFJ8cLfb21arr5dQUypk1r4ajWmUsFsB6abx5KeAGLh7e48SAPUzHoNkLSWMUPdkDGns
cellframe-node-cli wallet info -w <wallet_name> -net private
cellframe-node-cli wallet info -w test_wallet -net private
wallet: test_wallet
addr: rTDbDdeStfpodpLUe8u9LZBDuLPpgnCDLKwAPFJ8cLfb21arr5dQUypk1r4ajWmUsFsB6abx5KeAGLh7e48SAPUzHoNkLSWMUPdkDGns
network: private
balance: 0
cellframe-node-cli wallet info -addr
cellframe-node-cli wallet info -addr rTDbDdeStfpodpLUe8u9LZBDuLPpgnCDLKwAPFJ8cLfb21arr5dQUypk1r4ajWmUsFsB6abx5KeAGLh7e48SAPUzHoNkLSWMUPdkDGns
addr: rTDbDdeStfpodpLUe8u9LZBDuLPpgnCDLKwAPFJ8cLfb21arr5dQUypk1r4ajWmUsFsB6abx5KeAGLh7e48SAPUzHoNkLSWMUPdkDGns
network: private
balance: 0
cellframe-node-tool cert create <certificate_name> sig_dil
cellframe-node-tool cert create test_cert sig_dil
You don't see output, but can find new certificate in <node_settings_path>\var\lib\ca in test_cert.dcert file
cellframe-node-cli token_decl -net private -chain gdb -token <token_name> -total_supply 5000000 -signs_total 1 -signs_emission 1 -certs <certificate_name>
cellframe-node-cli token_decl -net private -chain zero -token TICK_TEST -total_supply 5000 -signs_total 1 -signs_emission 1 -certs test_cert
datum 0x38B15CD9FBA77AD831E12D9B5573BEF3FC6C7C01FBF83C45AAA4E0FDCD3CC5E5 with token TICK_TEST is placed in datum pool
cellframe-node-cli token_emit -net private -chain_emission gdb -chain_base_tx gdb -addr <wallet_name> -token <token_name> -certs <certificate_name> -emission_value
cellframe-node-cli token_emit -net private -chain_emission zero -chain_base_tx zero -token TICK01 -certs test_cert -emission_value 12345 -addr rTDbDdeStfpodpLUczrqLQ8AgujbTaMCeyVCcrCAwdqLopg8bSvopyVSJgjw4WjuNcJynrnEtHc3PTqk692P6TXj2z1gn3bMr3j4vg68
datum emission 0x94E72A0A07AB283F929D6FE63985A57D87E21C6888854E9CA38BF80A4E51A796 is placed in datum pool
datum tx 0x035F27C9D7548492CA8424660653845EB0CB296AC7D230F839D3B07AAB5BE834 is placed in datum pool
cellframe-node-cli mempool_list -net <network_name> -chain <chain_name>
cellframe-node-cli mempool_list -net kelvin-testnet
kelvin-testnet.zerochain: Found 1 records :
hash 0x29A4EE2C7A6881C758D1A3D62ADDF778976F47F8D1D442355ACDF4D60F6E6EBB: type_id=DATUM_TOKEN_DECL data_size=3411 data_hash=0xF10B17CAC4E18EFBF62564BBC7ECD7A6E76B44F2D2E36A9B6C8641669168CF76 ts_create=Thu Sep 30 08:35:46 2021
==Datum Token Declaration
ticker: TICK01
size: 3411
type: SIMPLE
sign_total: 5000
sign_valid: 123
total_supply: 5000
kelvin-testnet.plasma: Not found records
cellframe-node-cli mempool_proc -net <network_name> -chain <chain_name> -datum
cellframe-node-cli mempool_proc -net private -chain zero -datum 0x94E72A0A07AB283F929D6FE63985A57D87E21C6888854E9CA38BF80A4E51A796
hash 0x94E72A0A07AB283F929D6FE63985A57D87E21C6888854E9CA38BF80A4E51A796: type_id=DATUM_TOKEN_EMISSION ts_create=Mon Sep 27 09:05:13 2021
data_size=3470
Datum processed well. Removed datum from mempool.