Skip to content

Commit 28110ab

Browse files
committed
update with new ark psbt fields
1 parent 8aeb354 commit 28110ab

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.24.6
55
replace github.com/btcsuite/btcd/btcec/v2 => github.com/btcsuite/btcd/btcec/v2 v2.3.3
66

77
require (
8-
github.com/arkade-os/arkd/pkg/ark-lib v0.7.2-0.20250930111159-7f278b58e00f
8+
github.com/arkade-os/arkd/pkg/ark-lib v0.7.2-0.20251002131351-3a7a7145b80f
99
github.com/btcsuite/btcd v0.24.3-0.20240921052913-67b8efd3ba53
1010
github.com/btcsuite/btcd/btcec/v2 v2.3.4
1111
github.com/btcsuite/btcd/btcutil v1.1.5

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmH
1717
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da/go.mod h1:eHEWzANqSiWQsof+nXEI9bUVUyV6F53Fp89EuCh2EAA=
1818
github.com/aead/siphash v1.0.1 h1:FwHfE/T45KPKYuuSAKyyvE+oPWcaQ+CUmFW0bPlM+kg=
1919
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
20-
github.com/arkade-os/arkd/pkg/ark-lib v0.7.2-0.20250930111159-7f278b58e00f h1:ydO6fi5O21pa24X+wjBSSu7tftyZoMPKGgMZGRh8kXk=
21-
github.com/arkade-os/arkd/pkg/ark-lib v0.7.2-0.20250930111159-7f278b58e00f/go.mod h1:WtND6j3BA5KcYWCCHkI5k5UZS2UU+GZHDwqMVn6SD2s=
20+
github.com/arkade-os/arkd/pkg/ark-lib v0.7.2-0.20251002131351-3a7a7145b80f h1:cQmC727D/UiTCewkK9bWTUApefcI5YfodRB0y7F5Fvk=
21+
github.com/arkade-os/arkd/pkg/ark-lib v0.7.2-0.20251002131351-3a7a7145b80f/go.mod h1:WtND6j3BA5KcYWCCHkI5k5UZS2UU+GZHDwqMVn6SD2s=
2222
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
2323
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so=
2424
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=

redemption/redeem.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,22 @@ func (r *CovenantlessRedeemBranch) NextRedeemTx() (string, error) {
113113
return "", err
114114
}
115115

116-
conditionWitness, err := txutils.GetConditionWitness(input)
116+
conditionWitnessFields, err := txutils.GetArkPsbtFields(
117+
tx,
118+
i,
119+
txutils.ConditionWitnessField,
120+
)
117121
if err != nil {
118122
return "", err
119123
}
120124

121125
args := make(map[string][]byte)
122-
if len(conditionWitness) > 0 {
126+
if len(conditionWitnessFields) > 0 {
123127
var conditionWitnessBytes bytes.Buffer
124-
if err := psbt.WriteTxWitness(&conditionWitnessBytes, conditionWitness); err != nil {
128+
if err := psbt.WriteTxWitness(&conditionWitnessBytes, conditionWitnessFields[0]); err != nil {
125129
return "", err
126130
}
127-
args[string(txutils.CONDITION_WITNESS_KEY_PREFIX)] = conditionWitnessBytes.Bytes()
131+
args[string(txutils.ArkFieldConditionWitness)] = conditionWitnessBytes.Bytes()
128132
}
129133

130134
for _, sig := range input.TaprootScriptSpendSig {

utils.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ func toIntentInputs(
351351
arkFields = append(arkFields, []*psbt.Unknown{
352352
{
353353
Value: taptree,
354-
Key: txutils.VTXO_TAPROOT_TREE_KEY,
354+
Key: txutils.ArkFieldTaprootTree,
355355
},
356356
})
357357
}
@@ -386,7 +386,7 @@ func toIntentInputs(
386386
arkFields = append(arkFields, []*psbt.Unknown{
387387
{
388388
Value: taptree,
389-
Key: txutils.VTXO_TAPROOT_TREE_KEY,
389+
Key: txutils.ArkFieldTaprootTree,
390390
},
391391
})
392392
}

0 commit comments

Comments
 (0)