Commit Graph

8 Commits

Author SHA1 Message Date
c67961869b 927: Add gettx command and have send command return the tx hash. (#78)
All checks were successful
Lint / lint (18.x) (push) Successful in 1m8s
Tests / cli_tests (18.x) (push) Successful in 8m48s
To support cerc-io/stack-orchestrator#927, add a new token command `gettx` to inspect a previous transaction, and adjust the output of `send` to include the tx details.

For example:

```
❯ laconic registry tokens send --address laconic1yqpc7cyfetpgmqtkk0ukevugeaau9p0cwmjlsu --type alnt --quantity 1000
{
  "tx": {
    "hash": "977152CBE474613E1BBAFEF286F12134829FAF3C9E7C8349149DE3E687B816FC",
    "height": 343369,
    "index": 0,
    "code": 0,
    "log": "",
    "sender": "laconic14wc07wa3r7rppru43g9jxkzhqnhmvfm4dgey6s",
    "recipient": "laconic1yqpc7cyfetpgmqtkk0ukevugeaau9p0cwmjlsu",
    "amount": "1000alnt"
  },
  "accounts": [
    {
      "address": "laconic14wc07wa3r7rppru43g9jxkzhqnhmvfm4dgey6s",
      "pubKey": "AvOh0Hdjj5/YKMTPEm/oLgvpg4gIP1vB4d1NhBMq6/+B",
      "number": 3,
      "sequence": 91,
      "balance": [
        {
          "type": "alnt",
          "quantity": 1.2899999999709944e+22
        }
      ]
    },
    {
      "address": "laconic1yqpc7cyfetpgmqtkk0ukevugeaau9p0cwmjlsu",
      "pubKey": "A7XYVHLemQYUjXe6VnSDlcyzLnpdJ8CE8zvDiZtgxqnT",
      "number": 1,
      "sequence": 1,
      "balance": [
        {
          "type": "alnt",
          "quantity": 1.289999999991e+22
        }
      ]
    }
  ]
}
```

```
❯ laconic registry tokens gettx --hash 977152CBE474613E1BBAFEF286F12134829FAF3C9E7C8349149DE3E687B816FC
{
  "hash": "977152CBE474613E1BBAFEF286F12134829FAF3C9E7C8349149DE3E687B816FC",
  "height": 343369,
  "index": 0,
  "code": 0,
  "log": "",
  "sender": "laconic14wc07wa3r7rppru43g9jxkzhqnhmvfm4dgey6s",
  "recipient": "laconic1yqpc7cyfetpgmqtkk0ukevugeaau9p0cwmjlsu",
  "amount": "1000alnt",
  "raw": "0A91010A8E010A1C2F636F736D6F732E62616E6B2E763162657461312E4D736753656E64126E0A2E6C61636F6E696331347763303777613372377270707275343367396A786B7A68716E686D76666D34646765793673122E6C61636F6E6963317971706337637966657470676D71746B6B30756B657675676561617539703063776D6A6C73751A0C0A04616C6E7412043130303012680A500A460A1F2F636F736D6F732E63727970746F2E736563703235366B312E5075624B657912230A2102F3A1D077638F9FD828C4CF126FE82E0BE98388083F5BC1E1DD4D84132AEBFF8112040A020801185A12140A0E0A04616C6E7412063430303030301080B5181A4088DF7BA4B63EA68E185AB2887C9EC29EBC4158874BC037816B8494AD36D3B2433B5223CECC336D4624BB7FEF4DBB4A8B5F4707ACD8E55443312009E9473DF821"
}
```

Reviewed-on: #78
Reviewed-by: David Boreham <dboreham@noreply.git.vdb.to>
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2024-08-20 03:19:48 +00:00
30654bb0ef Add a command to list authorities (#74)
All checks were successful
Lint / lint (18.x) (push) Successful in 1m9s
Publish npm package to gitea / npm_publish (18.x) (release) Successful in 1m38s
Tests / cli_tests (18.x) (push) Successful in 8m45s
Part of [Create a public laconicd testnet](https://www.notion.so/Create-a-public-laconicd-testnet-896a11bdd8094eff8f1b49c0be0ca3b8)

Co-authored-by: IshaVenikar <ishavenikar7@gmail.com>
Reviewed-on: #74
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
2024-08-05 10:22:07 +00:00
70e63c74f1 Replace photon with alnt token denom (#73)
All checks were successful
Lint / lint (18.x) (push) Successful in 1m7s
Publish npm package to gitea / npm_publish (18.x) (release) Successful in 1m14s
Tests / cli_tests (18.x) (push) Successful in 8m52s
Part of [laconicd testnet validator enrollment](https://www.notion.so/laconicd-testnet-validator-enrollment-6fc1d3cafcc64fef8c5ed3affa27c675)

Co-authored-by: IshaVenikar <ishavenikar7@gmail.com>
Reviewed-on: #73
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
2024-07-30 13:24:46 +00:00
aa2117e472 Upgrade registry-sdk package version (#70)
All checks were successful
Lint / lint (18.x) (pull_request) Successful in 1m7s
Tests / cli_tests (18.x) (pull_request) Successful in 8m27s
Part of [laconicd testnet validator enrollment](https://www.notion.so/laconicd-testnet-validator-enrollment-6fc1d3cafcc64fef8c5ed3affa27c675)

- Resolves cerc-io/testnet-laconicd-stack#4 (comment)

Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Reviewed-on: #70
Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
Co-committed-by: Nabarun <nabarun@deepstacksoft.com>
2024-07-22 06:18:02 +00:00
9c992ebe71 Rename cns to registry in CLI (#57)
Part of https://www.notion.so/Create-laconic-registry-SDK-d3a636d4aba44f7cbba3bd99b7146811

Co-authored-by: neeraj <neeraj.rtly@gmail.com>
Reviewed-on: #57
Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
Co-committed-by: Nabarun <nabarun@deepstacksoft.com>
2024-03-19 04:42:42 +00:00
a33445aa4d Use registry-sdk in CLI (#56)
Part of https://www.notion.so/Create-laconic-registry-SDK-d3a636d4aba44f7cbba3bd99b7146811

- Use user key as transaction private key in record publish cmd

Co-authored-by: neeraj <neeraj.rtly@gmail.com>
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Reviewed-on: #56
Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
Co-committed-by: Nabarun <nabarun@deepstacksoft.com>
2024-03-18 13:58:52 +00:00
c3f8d53f09 Setup linter and add it to CI (#54)
All checks were successful
Lint / lint (18.x) (push) Successful in 1m13s
Tests / cli_tests (18.x) (push) Successful in 7m17s
- Setup eslint with husky for precommit lint
- Fix existing lint errors
- Setup linter CI

Reviewed-on: #54
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
2024-01-29 05:21:34 +00:00
b01201ca50 Add CLI tests and setup CI (#53)
All checks were successful
Tests / cli_tests (18.x) (push) Successful in 7m42s
Part of #52

- Add tests for the CLI following demo steps present in the README
- Setup CI to run the CLI tests

Reviewed-on: #53
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
2024-01-29 04:46:32 +00:00