Bitcoin Forum
October 03, 2025, 04:34:05 PM *
News: Latest Bitcoin Core release: 29.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / subterfuge: cross-platform SLIP39 app on: September 21, 2022, 09:53:31 AM
When it comes to Shamir Secret Sharing, we all played with iancoleman website.

ilap who is the maintainer of slip39-js also maintains slip39-dart, to take advantage of his library, I implemented subterfuge, a cross-platform slip39 app using flutter to make it a bit more appealing to people you are share your secret with. It's free software and without ads.

sources: https://github.com/ethicnology/subterfuge

Subterfuge is cross-platform (Linux, Android, Web, iOS, Windows) and I've distributed it on:
- linux: https://snapcraft.io/subterfuge
- android: https://play.google.com/store/apps/details?id=org.ethicnology.subterfuge
- web:  https://ethicnology.github.io/subterfuge/#/

You can build the others platforms yourself: https://docs.flutter.dev/development/tools/sdk/release-notes/supported-platforms

The app can be used offline and does not require any permission.

PS: the web version needs a few seconds to load the app
2  Other / Bitcoin Wiki / Re: Request edit privileges here on: July 20, 2020, 10:14:57 AM
Hi, i request edit permissions to add a library and from code examples in this page https://en.bitcoin.it/wiki/API_reference_(JSON-RPC) to make RPC call for Deno (https://deno.land/) developers.

My username is ethicnology
3  Bitcoin / Development & Technical Discussion / Re: Accomplish an AnyOneCanPay transaction? on: March 23, 2019, 06:09:55 PM
Thank you so much for answering, you confirmed my doubts.

If you tried a signrawtransactionwithwallet --help. It will display :
3. "sighashtype"                    (string, optional, default=ALL) The signature hash type. Must be one of
       "ALL"
       "NONE"
       "SINGLE"
       "ALL|ANYONECANPAY"
       "NONE|ANYONECANPAY"
       "SINGLE|ANYONECANPAY"


That why I tried to achieve the AnyOneCanPay scenario using RPC commands, this is a bit sad that we can't make all the steps on Bitcoin core.
So now i have to find a library that implement this SigHash (JavaScript lib would be perfect).

I have few questions, what is the differences between NONE and NONE|ANYONECANPAY (same as SINGLE and SINGLE|ANYONECANPAY) ?

Does a NONE or a SINGLE without ANYONECANPAY could work if the Receiver use ALL|ANYONECANPAY ?

According to aliashraf (I thank him for explaining this to me):
- NONE is unsecure because miners could steal it.
- SINGLE is too expensive because it include the output.

When donator create his gift Tx, which amount does he has to put inside, global final amount or the amount that he want to gift ?

Is the scenario good ?
- Donator create Tx with SINGLE/NONE|ANYONECANPAY, send their Tx + signature (no broadcast) they send it to the receiver.
- Receiver build a new Tx which include donators inputs and signatures with ALL|ANYONECANPAY and he broadcast it.


4  Bitcoin / Development & Technical Discussion / Accomplish an AnyOneCanPay transaction? on: March 22, 2019, 09:18:31 PM
Hi the community !

I've made a post two month ago to understand how does an AnyOneCanPay transaction works. (here -> https://bitcointalk.org/index.php?topic=5108249.new#new)
I tried many times to accomplish an AnyOneCanPay transaction on the TestNet but i still have some problems and questions.


The scenario is :
- Donator create a rawTx of his donation
- Donator sign it with sigHash NONE|ANYONECANPAY
- Receiver create a rawTx with one of his input and the donator input
- Receiver sign it with sigHash ALL|ANYONECANPAY

I'm using RPC commands on Bitcoin Core 17.1, below an exemple of what i've tried :

//listunspent of the donator
    "txid": "29803ad827ddd94c442c561b1d3bf3d0f60571d6518e4941698e5778b25e1991",
    "vout": 0,
    "address": "2N2CiqHX6zkk2L2ehppCfDPnZqpdSZDgGCQ",
    "label": "",
    "redeemScript": "0014e7edde28efdc0f40ef2c5608fe9adc49d10e7ee5",
    "scriptPubKey": "a914623ff66fb88ff802fe1b8eaff666ba52307eecb087",
    "amount": 0.10100000,
    "confirmations": 3,
    "spendable": true,
    "solvable": true,
    "safe": true


//Donator create a rawTx with the gifted amount
Code:
createrawtransaction '[{"txid":"29803ad827ddd94c442c561b1d3bf3d0f60571d6518e4941698e5778b25e1991","vout":0}]' '[{"2MzFJHqvQtSAr35VWfbMz3sWDQBg28qgQPy":0.1}]'

//Hex result :
020000000191195eb278578e6941498e51d67105f6d0f33b1d1b562c444cd9dd27d83a802900000 00000ffffffff01809698000000000017a9144ccc78e595a15f13a1a94c1cbe7b77de6f9c83b187 00000000

//Donator sign his rawTax with the sigHash "NONE|ANYONECANPAY"
Code:
signrawtransactionwithwallet "020000000191195eb278578e6941498e51d67105f6d0f33b1d1b562c444cd9dd27d83a80290000000000ffffffff01809698000000000017a9144ccc78e595a15f13a1a94c1cbe7b77de6f9c83b18700000000" '[{"txid":"29803ad827ddd94c442c561b1d3bf3d0f60571d6518e4941698e5778b25e1991","vout":0,"scriptPubKey":"a914623ff66fb88ff802fe1b8eaff666ba52307eecb087","redeemScript":"0014e7edde28efdc0f40ef2c5608fe9adc49d10e7ee5","amount":0.101}]'  "NONE|ANYONECANPAY"

//Hex result :
0200000000010191195eb278578e6941498e51d67105f6d0f33b1d1b562c444cd9dd27d83a80290 000000017160014e7edde28efdc0f40ef2c5608fe9adc49d10e7ee5ffffffff0180969800000000 0017a9144ccc78e595a15f13a1a94c1cbe7b77de6f9c83b18702473044022022fa9caf5c716c268 64bd474fd867cc8bf161244387b22a84f5b48e6608b53c70220209e9e1d47aa8a95d890824b1c41 0e340db523c8958f3657fb8a414998e90b20822102fa5aec9fe43bba4f70deb4e53acede24e5e62 1425f4b00575fce601874e8658300000000


_____________________________________________________________________
//listunspent of the Receiver
    "txid": "776be22ffbdda86283b247f99f7b2c6f7f53185cb8bc570bc65c6e6bb7ed8558",
    "vout": 1,
    "address": "2NDXeZ7hbSzbSiV6sMfUEMBjjwbRKH85BDd",
    "label": "",
    "redeemScript": "0014df7bcc159ade813e6bd6290d97ed0bc8987dc084",
    "scriptPubKey": "a914de7dad83bb2d6e9638d347dcb3c53fe238773c9387",
    "amount": 0.01000000,
    "confirmations": 5,
    "spendable": true,
    "solvable": true,
    "safe": true


//Receiver create a rawTx and put donator input inside
Code:
createrawtransaction '[{"txid":"29803ad827ddd94c442c561b1d3bf3d0f60571d6518e4941698e5778b25e1991","vout":0}, 
{"txid":"776be22ffbdda86283b247f99f7b2c6f7f53185cb8bc570bc65c6e6bb7ed8558","vout":1}]' '[{"2MzFJHqvQtSAr35VWfbMz3sWDQBg28qgQPy":0.1085}]'

//Hex result :
020000000291195eb278578e6941498e51d67105f6d0f33b1d1b562c444cd9dd27d83a802900000 00000ffffffff5885edb76b6e5cc60b57bcb85c18537f6f2c7b9ff947b28362a8ddfb2fe26b7701 00000000ffffffff01d08ea5000000000017a9144ccc78e595a15f13a1a94c1cbe7b77de6f9c83b 18700000000

//Receiver sign his rawTx with the sigHash "ALL|ANYONECANPAY"
Code:
signrawtransactionwithwallet "020000000291195eb278578e6941498e51d67105f6d0f33b1d1b562c444cd9dd27d83a80290000000000ffffffff5885edb76b6e5cc60b57bcb85c18537f6f2c7b9ff947b28362a8ddfb2fe26b770100000000ffffffff01d08ea5000000000017a9144ccc78e595a15f13a1a94c1cbe7b77de6f9c83b18700000000" '["txid":"29803ad827ddd94c442c561b1d3bf3d0f60571d6518e4941698e5778b25e1991","vout":0,"scriptPubKey":"a914623ff66fb88ff802fe1b8eaff666ba52307eecb087","redeemScript":"0014e7edde28efdc0f40ef2c5608fe9adc49d10e7ee5","amount":0.101}, {"txid":"776be22ffbdda86283b247f99f7b2c6f7f53185cb8bc570bc65c6e6bb7ed8558","vout":1, "scriptPubKey":"a914de7dad83bb2d6e9638d347dcb3c53fe238773c9387","redeemScript":"0014df7bcc159ade813e6bd6290d97ed0bc8987dc084","amount":0.01}]' "ALL|ANYONECANPAY"

// Final result
 "hex": "0200000000010291195eb278578e6941498e51d67105f6d0f33b1d1b562c444cd9dd27d83a80290 000000000ffffffff5885edb76b6e5cc60b57bcb85c18537f6f2c7b9ff947b28362a8ddfb2fe26b 770100000017160014df7bcc159ade813e6bd6290d97ed0bc8987dc084ffffffff01d08ea500000 0000017a9144ccc78e595a15f13a1a94c1cbe7b77de6f9c83b18700024730440220303e8c46356c 8b8b630cf0850e895d731c8e29196d01d344c9bd4f3d2fff6d4d02201c3d0df25f8d1cd2786488c 22ab404f236c05fdc2839328eedc2d5f54508278a812103794ac3861b38ab72a9c3fab8fc4adf0a f0c8ddb910d8ae9ac947d9529f6f447200000000",
  "complete": false,
  "errors": [
    {
      "txid": "29803ad827ddd94c442c561b1d3bf3d0f60571d6518e4941698e5778b25e1991",
      "vout": 0,
      "witness": [
      ],
      "scriptSig": "",
      "sequence": 4294967295,
      "error": "Unable to sign input, invalid stack size (possibly missing key)"
    }


It doesn't work, and it's normal. The donator signature is missing from the final Tx. Actually, i have no idea of where i have to put the scriptSig inside the Receiver Tx (there is no argument in signrawtransactionwithwallet that let you put a scriptSig).

I probably missing something or misunderstanding how to process, if someone got the knowledge around AnyOneCanPay Tx, some help would be apprecied Wink
5  Bitcoin / Development & Technical Discussion / Re: Purpose of anyone can pay transaction on: February 11, 2019, 07:40:15 PM
Hi guys, I'm the "friend".
Thanks all for answers!

Sorry for my shitty english

I'm working on my own project "CoinFunding" the purpose is to use Bitcoin "smart-contract" to make a crowdfunding.
When i heard about AnyOneCanPay argument in Bitcoin Mastering chapter 6, i started to investigate.
I really want to manage AnyOneCanPay transactions to build a good User Experience around Crowdfunding on Bitcoin.

I want to promote Bitcoin with a free crowdfunding software without taxes (except fees) or government pressure.


So:

1 - Donors build rawTx and sign it with the amount they want to give and "NONE | ANYONECANPAY"
2 - Receiver collect all inputs from donors and build his own rawTx with "ALL | ANYONECANPAY"
If all inputs stay valid Receiver can broadcast his Tx?
Donors has to precise the good address?

OR

1 - Receiver create a rawTx and sign it with the amount that he want and the "ALL | ANYONECANPAY"
2 - Donors create their rawTx with the same address and amount they sign it with "NONE | ANYONECANPAY"
3 - Once amount is reach Receiver can Broadcast his Tx
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!