package
0.0.0-20211208090927-9733d9dc3959
Repository: https://github.com/linbeier/authsysibc.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

TODO

The scaffolding tool creates a module with countless todos. These todos are placed in places in which you much delete them and fill them with what the module you are building needs.

APP

types: every single file authority should have several items including file hash, owner, authority: type fileauth struct { Hash string json:"hash" Owner sdk.AccAddress json:"owner" Origin sdk.AccAddress json:"origin" Auth string json:"auth" } authority set is implement by letters, 'r' for read, 'w' for write, 't' for transfer, they are combined in a certain sequnce. For example, 'rwt' represents the account have read, write and transfer authorities.

Once you have created your module and you are ready to integrate it into your app then you can follow the readme that is generated in the scaffolding of the app.

USAGE

first

make install

make sure they are installed correctly

appd/appcli

init appd

appd init testnode --chain-id testchain

config client

appcli config chain-id testchain
appcli config output json
appcli config indent true
appcli config trust-node true

We'll use the "test" keyring backend which save keys unencrypted in the configuration directory of your project. NEVER use in production

appcli config keyring-backend test

create users

appcli keys add alice
appcli keys add bob

add both accounts and coins to genesis file

appd add-genesis-account $(appcli keys show alice -a) 100000token,1000000000stake
appd add-genesis-account $(appcli keys show bob -a) 100000token,1000000000stake

The "nscli config" command saves configuration for the "nscli" command but not for "nsd" so we have to declare the keyring-backend with a flag here

appd gentx --name alice --keyring-backend test

After you have generated a genesis transaction, you will have to input the genTx into the genesis file, so that your nameservice chain is aware of the validators.

appd collect-gentxs

make sure your genesis file is correct

appd validate-genesis

start your chain

appd start

First, check whether accounts have correct funds

appcli query account $(appcli keys show alice -a)
appcli query account $(appcli keys show bob -a)

declare your file authority first

appcli tx fileauthservice setfile [filename] [filehash] [authority] --from [account]