How to create pset with issuance

Open
#1,091 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Domain
cli

Research direction

Reproduce the reported command sequence with the e1 CLI, especially walletcreatefundedpsbt and its issuance inputs. Trace how the command checks available funds for the requested asset, token, and fee, then determine whether the sequence succeeds or which balance or parameter causes the error.

Written by the indexing model from the issue text.

Description

GUI

Hello,

I'm trying to use the CLI to create a pset (v2 format) in order to issue a new asset. For simplicity, I'm going for a fully unblinded pset. These are my steps:

$ e1 sendtoaddress ${issuer_unconf_addr_1} 1
$ e1 generatetoaddress 1 $(e1 getnewaddress)

# fund the issuer and retrie ${issuer_utxp_txid} and ${issuer_utxo_vout}

$ e1 calculateasset ${issuer_utxo_txid} ${issuer_utxo_vout} 0000000000000000000000000000000000000000000000000000000000000000 false

# retrieve ${issued_asset} and ${issued_token}

$ e1 walletcreatefundedpsbt '[{"txid": "${issuer_utxo_txid}", "vout": ${issuer_utxo_vout}, "asset_entropy": "0000000000000000000000000000000000000000000000000000000000000000", "issuance_amount": 1000, "issuance_tokens": 1, "blind_reissuance": false}]' '[{"${issuer_unconf_addr_1}": 0.00001, "asset": "${issued_asset}"}, {"${issuer_unconf_addr_2}": 0.00000001, "asset": "${issued_token}"}]'

This always produces the error:

error code: -4
error message:
Insufficient funds

Can someone help me figuring out what's wrong with this?

Dominant language
C++
Stars
1.2k
Forks
418
Avg merge
1d 23h
Merged PRs (30d)
15

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ElementsProject/elements

All issues in ElementsProject/elements

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.