IntersectMBO / IntersectMBO/cardano-transactions

cardano-tx add-output only supports base58 encoded addresses

Open
#13 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
25
Forks
7
PR merge metrics
No merged PRs in 30d

Description

I was trying to follow -> https://github.com/input-output-hk/cardano-transactions/wiki/How-to-submit-transaction-via-cardano-tx-CLI
To construct transaction on Shelley testnet using Shelley wallet, but cannot do this:

```
cardano-tx empty 42 \
| cardano-tx add-input 1 acb83e38e1d3c63129236673572389b0c6cdaa691d7d179dad52033fb8b0dc7a \
| cardano-tx add-output 1 009906685c73845c002b2ab77b35ee19f7386e28b5b606f6bdda9cac413c2aef9e9006816f92f27b74e69983176539e89165bd64034417603c0f4f2108584435c7 \
| cardano-tx add-output 9831859 00bf1b4a0be855e6904b8e0a3ad7a37ccfb617a4d15eb513d91c9836a7d3f9b89358f8781f43e7dcdf6f2cbbf0de73ae85f1a9c469298445ec940d327a0949fd88 \
| cardano-tx lock \
| cardano-tx sign-with $XPRV \
| cardano-tx serialize
```
:point_down:
```
cannot parse value `00bf1b4a0be855e6904b8e0a3ad7a37ccfb617a4d15eb513d91c9836a7d3f9bc8a9nnot pars3e 5v8aflu8e7 8`10f043e7dcdf69906685c73845c002fb2ab772b3cb5ebe19f738f06de28be5b6067f3ae85f61ba9dcd4692984a9ca45ec940c413c2aed327fa90e949fd98006881'

6Usagfe92f27:b 74ec69983a1r7dan65o-t39ex a8d9d-o165utpbutd 6L40344OVELACE1 76A03cDDRES0f4S
Add fa2 108n5844ew 3out5putc to7'
the
Utsagraensa:ction c.a
rdano-tx add-output LOVELACE ADDRESS
Add a new output to the transaction.
DeserialiseFailure 0 "end of input"
DeserialiseFailure 0 "end of input"
DeserialiseFailure 0 "end of input"
```

I suppose it is due to the fact that cardano-tx add-output only support `base58` encoded addresses:
```
$ cardano-tx add-output
An output is made of:
- A coin value in Lovelace (1 Ada = 1e6 Lovelace).
- A target address, base58-encoded.
```

Not sure if support for `base16` needs to be added, but probably for `bech32` as the Shelley addresses will be encoded like that in the wallet. :thinking:

Contributor guide

Open the contributing guide

Research direction

Start at the cardano-tx add-output CLI entry point and inspect how its ADDRESS argument is parsed. Reproduce the Shelley testnet command from the issue, then check the existing address-decoding behavior for base58 and the requested base16 or bech32 forms. Done means supported Shelley address input is accepted without the shown parse and deserialisation failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.