Why Nostr? What is Njump?
2023-03-29 07:54:21

nobu.maeda on Nostr: Coded with GPT-4 and asked it to do PSBT with BDK in Rust. Its not perfect. But I ask ...

Coded with GPT-4 and asked it to do PSBT with BDK in Rust. Its not perfect. But I ask it to fix things I see incorrect and it understood context and keep digging more into the BDK doc for solutions on its own. Mind is blown.

For example at first it called a method that didn’t exist. I told it that and it fixed it. Then I asked it I want the input amount and output amount to be different since it’s ‘partial’. It done that by just looping through UTXOs in the wallet until it reaches the desired input amount.

I asked if there’s something in the BDK that helps with coin selection. And it found the CoinSelection trait and updated the code to use ‘BranchAndBound’

I still haven’t tried to run it yet. But even if I treat this a pseudo code it’d still be amazing
Author Public Key
npub1w27whyf6860xztr5pqtdn8fywkwj82evemcvktc6cm5dl7vypgkqp9cuc8