Files
nym/clients/credential
Bogdan-Ștefan Neacşu 1ad97adc7c Feature/sdk coconut (#3273)
* Replace expect with error

* Move PersistentStorage in separate file

* Add in-memory cred manager

* Make wasm and mobile build

* Unify wasm and mobile cred storage

* Network defaults has mainnet default

* Add network_details to SDK

* Move BandwidthController in its own crate

* Move out credential into lib crate

* Remove nyxd arg in credential binary

* Use acquire cred in sdk

* Add example file, in sandbox

* Mobile lock file

* Update changelog

* Clearer builder methods and more documentation for them

* Sign only amount, without denom

* Toggle credentials mode on when enabled
2023-04-11 16:17:35 +03:00
..
2023-04-11 16:17:35 +03:00
2023-04-11 16:17:35 +03:00

Credential binary

The credential binary is used to acquire coconut bandwidth credentials in exchange for nym tokens. Those credentials are stored in the client's data directory, so that they can be used as the client sees fit.

Warning

The credential binary is still experimental software. The infrastructure for using it is not yet deployed to mainnet and it's still in the process of being deployed to sandbox.

Building

From the project's root directory, run:

cargo build -p credential

which generates the credential binary in target/debug/credential.

Running

For example, you can get a credential worth 3 nym (3000000 unym) in a socks5 client that was already initialized like so:

./target/debug/credential --config-env-file envs/sandbox.env --client-home-directory  ~/.nym/socks5-clients/cred_client  --nyxd-url  https://sandbox-validator1.nymtech.net --mnemonic $MNEMONIC  --recovery-dir /tmp/recovery --amount 3000000

More information regarding how to run the binary can be found by running it with the --help argument.