Tags · KarpelesLab/outscript · GitHub
Skip to content

Tags: KarpelesLab/outscript

Tags

v0.3.35

Toggle v0.3.35's commit message
Release v0.3.35

v0.3.34

Toggle v0.3.34's commit message
v0.3.34: security hardening

Fix attacker-controlled-input panics (remote DoS) across BTC script/tx
parsing, address/Massa base58 decoding, Solana and EVM transaction
decoding, plus signing-correctness fixes (reject unsupported SIGHASH
flags, pre-EIP-155 v handling) and address/network-confusion guards.

v0.3.33

Toggle v0.3.33's commit message
add ResolveMultisigPubKey to match a multisig signature to its pubkey

Walks sig.Pubkeys and tries ECDSA verify with each one against the
given digest. Sets and returns the matched pubkey, or nil if none
verifies. Lets callers identify the actual signer in a P2SH-multisig
spend without re-implementing the verification loop.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

v0.3.32

Toggle v0.3.32's commit message
support P2TR key-path and script-path in ExtractBtcInputSig

Key-path: detect 1-element witness with a 64- or 65-byte Schnorr sig.
Script-path: detect witness ending in a BIP-341 control block; decode
the canonical single-sig leaf shape `<push32 xpk> OP_CHECKSIG`. Other
tapleaf shapes (multisig, CHECKSIGADD, conditionals, etc.) return nil.

New (*BtcTx).TaprootInputSighash recomputes the BIP-341 digest for a
parsed taproot signature, taking the prev_out script + amount of every
input (BIP-341 commits to all of them). Annex spends are not supported.

Refactors taprootSighashParts to share a keyless raw variant used by
both the signer and the new extractor path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

v0.3.31

Toggle v0.3.31's commit message
support P2SH-multisig in ExtractBtcInputSig and InputSighash

ExtractBtcInputSig now returns []*BtcInputSig (breaking change) so it
can surface every signature in a multisig spend. Detects the standard
OP_0 <sigs...> <redeemScript> scriptSig pattern and the
OP_M <pubkeys> OP_N OP_CHECKMULTISIG redeem template; attaches the
redeem script and full pubkey list to each returned signature.

InputSighash handles the new "p2sh-multisig" scheme using the legacy
SIGHASH_ALL path with the redeem script substituted into input n.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

v0.3.30

Toggle v0.3.30's commit message
add ExtractBtcInputSig and InputSighash for P2PKH/P2WPKH

Inverse of the existing signing path: parses scriptSig + witness for
P2PKH and P2WPKH inputs, returns r/s/sighash-flag/pubkey, and
recomputes the SIGHASH_ALL digest given the prev_out script and amount.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

v0.3.29

Toggle v0.3.29's commit message
v0.3.29: P2TR key-path signing (BIP-340/341), TaprootSigner interface

v0.3.28

Toggle v0.3.28's commit message
replace ModChain imports with KarpelesLab, update all dependencies

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

v0.3.27

Toggle v0.3.27's commit message
add P2TR support to GuessPubKeyAndHashByOutScript, fix GuessOut P2TR …

…length check

GuessPubKeyAndHashByOutScript now recognizes P2TR output scripts
(OP_1 PUSH32 <32-byte x-only pubkey>) and returns the 32-byte witness
program as the pubkey hash, enabling address indexing for taproot outputs.

Also fixes a bug in GuessOut where the P2TR script length was checked
against 32 instead of the correct 34.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

v0.3.26

Toggle v0.3.26's commit message
add comprehensive Solana support: v0 transactions, PDA, SPL tokens, p…

…riority fees, verification

- Fix NewSolanaTx to return error, validate account count (max 256)
- Add bounds checks in UnmarshalBinary for signature/account counts
- Add PDA computation (SolanaCreateProgramAddress, SolanaFindProgramAddress)
- Add instruction helpers: compute budget (priority fees), SPL token transfer,
  associated token account creation, durable nonce advance
- Add well-known program addresses (ComputeBudget, Token, ATA, sysvars)
- Add Verify() for Ed25519 signature verification on signed transactions
- Add versioned transaction (v0) support with address lookup tables:
  SolanaMessageV0, SolanaAddressTableLookup, NewSolanaTxV0
- Version-aware Sign/Verify/Marshal/Unmarshal dispatching

BREAKING: NewSolanaTx now returns (*SolanaTx, error) instead of *SolanaTx

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>