Table of Contents
- Clone git repository
- Run
yarn install
- Rename
.credentials_distributor_demo.js
to.credentials_distributor.js
- Rename
.credentials_issuer_demo.js
to.credentials_issuer.js
- Run
yarn run
to get an overview over the available tasks - Run
yarn account:create:test
- Go to cndy.store and see the changes on the dashboard
Note: Please be aware that you are sharing private keys with everyone else when using demo mode!
All this account can do is issue units of the asset and transfer it to the Distributor.
It should never be exposed or working on a server. Instead, it should more work like a cold wallet that fills up the Distributor account when needed.
It will never interact with User accounts.
This account gives out units of the assets to users.
It also has some XLM to found new User accounts on the Stellar Network.
Many accounts, trust the Issuer, receive assets from Distributor, pay to Distributor or other users
Make sure you have node
and yarn
installed.
Run yarn install
to install dependencies.
Run yarn run
to get a list of all commands.
Make sure to run prettier (respecting the ./prettierrc.js file) before comitting changes.
Generate account information with yarn account:generate
, put it into .credentials_issuer.js
(see .credentials_example.js
for the right format).
Run yarn account:fund:test
and enter the Public Key of the issuers account.
Generate account information with yarn account:generate
, put it into .credentials_distributor.js
(see .credentials_example.js
for the right format).
Run yarn account:fund:test
and enter the Public Key of the Distributor account.
Run yarn account:info
and enter the Public Key of the Distributor account to check if everything is ok.
Before you issue any coins, you should register your new asset with the analytics API.
curl -X POST --data '{"code": "CNDY", "issuer": "ISSUER_PUBLIC_KEY"}' https://api.cndy.store/assets |jq .
Run yarn account:trust
and enter the Private Key of the Distributor account.
Run yarn issuer:fund_distributor
and enter the amount of coins you want to transfer.
Run yarn account:info
and enter the Public Key of the Distributor account to check if everything is ok.
Run yarn account:create:test
, which will:
- Create a new keypair
- Fund the keypair on testnet
- Create trustline for asset on new account
- Transfer a given amount of asset to new account
When completed, the task will provide the Public Key and the Private Key (in form of a QR code) as output.
Generate account information with yarn account:generate
.
Run yarn account:fund:test
and enter the Public Key of the user account.
Run yarn account:trust
and enter the Private Key of the user account.
Run yarn account:info
and enter the Public Key of the user account to check if everything is ok.
Run yarn distributor:transfer
and enter the Public Key of the receiving user account as well as the amount.
Run yarn account:info
and enter the Public Key of the receiving user account to check if everything is ok.
Run yarn account:info
and enter the Public Key of the account.
Run yarn account:transfer
to transfer an amount of the asset from one account to another. You will need the Public Key of the receiving account, but the Private Key of the sending account.
Run yarn asset:info
to get a short overview over the asset.
Run yarn asset:watch
to get live stream of what happens with the asset in real-time.