Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dunes utxo splitter #15

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

niccololampa
Copy link

@niccololampa niccololampa commented Jul 24, 2024

Instructions

run node dunes.js wallet {splitutxo} {txid} {splits dune_ticker}

Example:
node dunes.js wallet splitutxo 6e4a523cc53f2994245760ecc76252d4fbf8559675ee5573a3400474b8c4c350 3 DOGE•TRIALRUN•ZNLCNOW

Wishes

  1. Need more guidance and understanding of the codebase to properly implement.
  2. Feedback on whether this is the right approach and guidance on the issues mentioned above. Just created the code based on my shallow understanding and assumptions. Don't even know the correct end result (not provided).

Issues

  1. [RESOLVED] Wrong .env url ORD provided at the start resulting in axios error when creating dunes

  2. Total Amount to be split and amount to be split is correct but when wallet is updated it is in correct.

For example here the split amounts are [33333334, 33333333, 33333333] but splits only have 100000 satoshis balance.

Screenshot 2024-07-24 at 9 11 48 PM

But when transferred and wallet is updated

{
  "privkey": "QRWvak5urTG2GEtJqyp9AGq63ei748KsNoaHWAyJB2NtbDJCFvNt",
  "address": "D75JSh6uMUKf7gPW2dH9Qb8MgnXFPB3C9c",
  "utxos": [
    {
      "txid": "21ddcade1305928665632d133cda883ca1e7f3a2bd0b873a6d58a2963fbdfede",
      "vout": 5,
      "script": "76a914153886530f5fd3a598cdd63c666b43afeca7718188ac",
      "satoshis": 4956500000
    },
    {
      "txid": "21ddcade1305928665632d133cda883ca1e7f3a2bd0b873a6d58a2963fbdfede",
      "vout": 4,
      "script": "76a914153886530f5fd3a598cdd63c666b43afeca7718188ac",
      "satoshis": 100000
    },
    {
      "txid": "21ddcade1305928665632d133cda883ca1e7f3a2bd0b873a6d58a2963fbdfede",
      "vout": 3,
      "script": "76a914153886530f5fd3a598cdd63c666b43afeca7718188ac",
      "satoshis": 100000
    },
    {
      "txid": "21ddcade1305928665632d133cda883ca1e7f3a2bd0b873a6d58a2963fbdfede",
      "vout": 2,
      "script": "76a914153886530f5fd3a598cdd63c666b43afeca7718188ac",
      "satoshis": 100000
    },
    {
      "txid": "21ddcade1305928665632d133cda883ca1e7f3a2bd0b873a6d58a2963fbdfede",
      "vout": 1,
      "script": "76a914153886530f5fd3a598cdd63c666b43afeca7718188ac",
      "satoshis": 100000
    }
  ]
  1. When creating a new split with the new txid after initial dune split resulting in no dunes. Can't still figure out how to get the proper vout to source the utxo with dune. Assumed the last transaction in the utxo array is the utxo vout for the dune.
    Screenshot 2024-07-24 at 10 36 59 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant