DocsFirst payment with the CLI

DocsStart4 of 33 · 1 min read

First payment with the CLI

Deposit, pay and read the ledger from a terminal, with a keypair file as the wallet.

The liora command comes with the SDK:

bash
npm install --install-links ./liora-contract-0.2.1.tgz ./liora-sdk-0.2.2.tgz

It needs Node 22 and a Solana keypair file with some SOL. Every command below takes --keypair payer.json and --api with the API's origin. They are left out here to keep the lines short.

  1. See your keys

    bash
    liora keys
    state  unlocked
    wallet  CzjFSHbXGRVVZfDKmyAT1mA9m63nSfBvrHPyyv9hxo9E
    metaAddress  liora:1:8a1e363a240d7bc035e9096033e3c62416fc2d908af0fef86fda3749b5f7b4207efbb943ccea5a63ba9ce3bd7be6933035207143aa5de55d251abd3dbd7f1306

    The CLI signs the unlock message with the keypair and derives the keys. The meta-address is what you give to people who will pay you.

  2. Deposit

    bash
    liora deposit 2000000000
    state  confirmed
    kind  deposit
    signature  3ie4yhgXrpBv7L6xyEUoJZkxhddrtfPGQdNZ1LxDT7fTfjhWnkTUrQzpX31VE58o2PGYQxJ6cNLTMhGyZeZBcj1W

    Amounts are lamports: this is 2 SOL. liora balance shows it once the scan finds the note.

  3. Pay

    bash
    liora pay mira 250000000
    state  confirmed
    kind  pay
    signature  3cceS4ApB8kPaxRWvmFdD36uq5Ayo3GupH4bcJZQpiBJDHDih65F6dpgs382S7qeE565Ej4FsbmFfGirVz4pvwE
    receipt
      stealthAddress  c62735922c1c7bfba7eb3e194be987e1806672432231448785bbfc864296cba0
      ephemeralKey  648fc85b4b27f7b42a8e29c3788d0c8f3595ef654a24a7868da8684821bc4895
      viewTag  11
      …
      proofVerified  true

    The recipient is a handle or a meta-address. The receipt is what the public sees.

  4. Read the ledger

    bash
    liora ledger

    Every payment, as anyone can read it. Yours is in the list, and nothing in it says it is yours or who it went to.

The output above is from fixture mode (--mode fixture), against a fixture server. CLI lists every command and option.