Skip to content
Snippets Groups Projects
Select Git revision
  • 415088fcbbb427410c2989dee81046635686efd3
  • dev default protected
  • vainamoinen197-transactiondocument-replace-vec-fields-by-smallvec-2
  • dvermd/200-keypairs-dewif
  • elois/wot
  • jawaka/155-dbex-add-dump-fork-tree-command
  • elois/195-bcdbwriteop
  • elois/deps-crypto
  • elois/gva-monetary-mass
  • elois/191-sled
  • elois/195
  • ji_emme/gva-humantimefield
  • 184-gva-rename-commontime-field-to-blockchaintime
  • ji_emme/182-gva-implement-block-meta-data
  • ji_emme/rml14
  • hugo/151-ws2pv2-sync
  • ji_emme/181-gva-implement-identity-request
  • ji_emme/89-implement-client-api-gva-graphql-verification-api
  • logo
  • test-juniper-from-schema
  • elois/exemple-gva-global-context
  • v0.2.0-a4 protected
  • v0.2.0-a2 protected
  • v0.2.0-a protected
  • v0.1.1-a1 protected
  • documents/v0.10.0-b1 protected
  • crypto/v0.4.0-b1 protected
  • crypto/v0.3.0-b3 protected
  • crypto/v0.3.0-b2 protected
  • crypto/v0.3.0-b1 protected
  • wot/v0.8.0-a0.9 protected
  • wot/v0.8.0-a0.8 protected
  • 0.1.0-a0.1 protected
  • v0.0.1-a0.12 protected
  • v0.0.1-a0.11 protected
  • v0.0.1-a0.10 protected
  • v0.0.1-a0.9 protected
  • v0.0.1-a0.8 protected
  • v0.0.1-a0.7 protected
  • v0.0.1-a0.6 protected
  • v0.0.1-a0.5 protected
41 results

controller

gcli

CLI client for Duniter-V2S.

Using

Download from release or build with cargo build.

Usage

If using a different runtime, update the metadata for the client to compile:

subxt metadata -f bytes > res/metadata.scale

Send 10 ĞD from Alice to Ferdie:

cargo run -- --url ws://localhost:9944 --secret //Alice account transfer 1000 5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL

List certifications and session keys that will expire within one month:

cargo run -- --url wss://gdev.p2p.legal:443/ws smith expire --blocks 432000

For more examples see in the example file.

Log level

You can adjust the log level:

export RUST_LOG=gcli=info

Runtime metadata

To update runtime metadata:

subxt metadata -f bytes > res/metadata.scale

Smith

You want to rotate keys and go online to start forging blocks.

Smith nodes must not expose a public RPC API. Then you can either use SSH directly, or make an SSH bridge by adding this to your local .bashrc:

alias duniter-rpc='ssh -L 9944:localhost:9944 duniter@gdev.example.tld'

Now the command duniter-rpc will open an SSH session and a bridge to your RPC API.

When your node is ready to forge blocks, rotate keys and go online:

gcli --secret "my secret phrase" smith update-keys
gcli --secret "my secret phrase" smith go-online

Keys

Secret and/or public keys can always be passed using --secret and --address. If needed, stdin will be prompted for secret key. An error will occur if secret and address are both given but do not match.

Secret key format can be changed using --secret-format with the following values:

  • substrate: a Substrate secret address (optionally followed by a derivation path), or BIP39 mnemonic
  • seed: a 32-bytes seed in hexadecimal (Duniter v1 compatible)

TODO

  • implement config formatter
  • add link/unlink account commands
  • migrate all xt to submit_call_and_look_event
  • add transfer with unit (ĞD, UD...)
  • [ ]