Skip to content

archethic-foundation/ledger-cli-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ALCA: Archethic Ledger CLI App

Instructions to Run

  • Clone this Repositoy
  • Inside the directory run npm install
  • Run npm link
  • From Terminal use it as ledger_cli (about | getAppVersion | getPublicKey | getArchAddress | sendTxn)

Usage Example

  • ledger_cli getArchAddress
  • ledger_cli sendTxn --amount 47.00 --receiver 0200E49887E794D068C79D0D779F16D3B9D879EC007BE8FA4959CCE3450BE6DB859D

Additional Info

  • For address_index please check file named config.json in YOUR_HOME_PATH/.alca/config.json

If any Error

  • Archethic version > +1.3.3

  • Make sure that archethic/lib/transaction_builder have following functions

  • setPreviousSignatureAndPreviousPublicKey(prevSign, prevPubKey) {
      if (typeof(prevSign) == "string") {
        if (!isHex(prevSign)) {
          throw "'previous Signature' must be in hexadecimal form if it's string"
        }
      }
      if (typeof(prevPubKey) == "string") {
        if (!isHex(prevPubKey)) {
          throw "'previous Public Key' must be in hexadecimal form if it's string"
        }
      }
      
      this.previousPublicKey = hexToUint8Array(prevPubKey);
      this.previousSignature = hexToUint8Array(prevSign);
      return this
    }
  • setAddress(addr) {
      if (typeof(addr) !== "string" && !(addr instanceof Uint8Array)) {
        throw "'addr' must be a string or Uint8Array"
      }
    
      if (typeof(addr) == "string") {
        if (!isHex(addr)) {
          throw "'addr' must be in hexadecimal form if it's string"
        }
        addr = hexToUint8Array(addr)
      }
      this.address = addr;
      return this
    }

About

CLI to test the Ledger BOLOS Application for Archethic Public Blockchain

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published