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 psbt fields functionality #70

Open
wants to merge 53 commits into
base: sachin--psbt-use-deriv-and-xpub
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
f479ccb
first draft adaptor signatures
SachinMeier Oct 22, 2022
2ccff2e
fmt
SachinMeier Oct 22, 2022
40372d5
fix typo
SachinMeier Oct 22, 2022
4baa1f2
simplify code & add extract_sig from adaptor
SachinMeier Oct 22, 2022
a04f43e
make code consistent across sign & adaptor sign
SachinMeier Oct 22, 2022
47d2a01
temp: try to fix R+T not even bug
SachinMeier Oct 27, 2022
05f5edd
temp fix adaptors
SachinMeier Jan 28, 2023
ab82799
Merge branch 'master' into sachin--adaptor-signatures
SachinMeier Jan 28, 2023
b7d5739
fix schnorr adaptor signatures
SachinMeier Jan 30, 2023
ce1f869
finish adaptor signatures!
SachinMeier Jan 31, 2023
6a4e775
add comments, make tests realistic by force even tweak
SachinMeier Jan 31, 2023
8bccf20
fmt
SachinMeier Jan 31, 2023
f4dc730
do not assume even tweak
SachinMeier Feb 1, 2023
932687b
do not assume tweak is even in tests
SachinMeier Feb 1, 2023
92ae2b4
add key-only taproot script creation
SachinMeier Feb 1, 2023
f9054d2
add Taproot.build_control_block and merkle tree handling
SachinMeier Feb 4, 2023
7f34d80
improve create_p2tr signature
SachinMeier Feb 4, 2023
ad34bf6
finish bip341 sighash & tx signing
SachinMeier Feb 5, 2023
02a7fbd
add scriptpath spend, op_checksigadd, scripts for examples
SachinMeier Feb 6, 2023
11fe186
add tx hex to taproot multi-spend ex
SachinMeier Feb 6, 2023
8792568
cleanup
SachinMeier Feb 6, 2023
406e73f
rm tapscript.ex
SachinMeier Feb 6, 2023
a65df93
Merge branch 'sachin--adaptor-signatures' into sachin--add-key-only-t…
SachinMeier Feb 6, 2023
17e28df
add full DLC example
SachinMeier Feb 9, 2023
0d18d7a
syntax
SachinMeier Feb 9, 2023
45ea0b3
add spec for function
SachinMeier Feb 12, 2023
bbce5db
add add-field funcs
SachinMeier Feb 22, 2023
2062395
add specs and global add-field funcs
SachinMeier Feb 22, 2023
181e4e8
refactor for code efficiency
SachinMeier Feb 23, 2023
4446588
finalize add-fields funcs for psbt
SachinMeier Feb 23, 2023
3a68d8d
fix merge
SachinMeier Feb 24, 2023
289e49c
lint
SachinMeier Feb 24, 2023
5bed706
Merge branch 'sachin--adaptor-signatures' into sachin--add-key-only-t…
SachinMeier Feb 24, 2023
e5f6fe2
Merge branch 'sachin--psbt-use-deriv-and-xpub' into sachin--add-psbt-…
SachinMeier Feb 24, 2023
e659a67
lint
SachinMeier Feb 24, 2023
0d34fbf
fmt
SachinMeier Feb 24, 2023
a8c6bca
fmt
SachinMeier Feb 24, 2023
9bd20fa
lint
SachinMeier Feb 24, 2023
e133c5c
fix aliases
SachinMeier Feb 24, 2023
3a48dbd
lint
SachinMeier Feb 24, 2023
73b7500
lint
SachinMeier Feb 24, 2023
aa87871
fmt
SachinMeier Feb 24, 2023
e2cf4a0
Merge pull request #11 from SachinMeier/sachin--psbt-use-deriv-and-xpub
SachinMeier Feb 24, 2023
2043883
Merge pull request #12 from SachinMeier/sachin--adaptor-signatures
SachinMeier Feb 24, 2023
74e4e84
temp: fix script vs binary
SachinMeier Feb 24, 2023
fa7df7f
lint
SachinMeier Feb 24, 2023
d81cd49
Merge branch 'master' into sachin--add-key-only-taproot-script-creation
SachinMeier Feb 24, 2023
3294369
Merge pull request #13 from SachinMeier/sachin--add-key-only-taproot-…
SachinMeier Feb 24, 2023
6187739
all PSBT pubkeys -> Point structs
SachinMeier Feb 25, 2023
2331e3e
fix credo lint
SachinMeier Mar 2, 2023
4d8aa17
lint
SachinMeier Mar 3, 2023
7514a9e
fix duplicate code
SachinMeier Mar 3, 2023
18d15b3
lint
SachinMeier Mar 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/lightning_network/invoice.ex
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ defmodule Bitcoinex.LightningNetwork.Invoice do

# TODO if destination exist from tagged field, we dun need to recover but to verify it with signature
# but that require convert lg sig before using secp256k1 to verify it
# TODO refactor too nested
# TODO refactor to nested
case Bitcoinex.Secp256k1.Ecdsa.ecdsa_recover_compact(hash, signature, recoveryId) do
{:ok, pubkey} ->
if is_nil(destination) or destination == pubkey do
Expand Down
3 changes: 3 additions & 0 deletions lib/opcode.ex
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ defmodule Bitcoinex.Opcode do
op_codeseparator: 0xAB,
op_checksig: 0xAC,
op_checksigverify: 0xAD,
# disabled in tapscript
op_checkmultisig: 0xAE,
# disabled in tapscript
op_checkmultisigverify: 0xAF,
op_nop1: 0xB0,
op_nop2: 0xB1,
Expand All @@ -240,6 +242,7 @@ defmodule Bitcoinex.Opcode do
op_nop8: 0xB7,
op_nop9: 0xB8,
op_nop10: 0xB9,
op_checksigadd: 0xBA,
op_smallinteger: 0xFA,
op_pubkeys: 0xFB,
op_pubkeyhash: 0xFD,
Expand Down
Loading