Skip to content

Commit 8cbb1ba

Browse files
committed
taprpc: TransferOutputAnchor to include the anchor pkscript
1 parent caa8e72 commit 8cbb1ba

File tree

7 files changed

+639
-610
lines changed

7 files changed

+639
-610
lines changed

rpcserver.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3589,6 +3589,7 @@ func marshalOutboundParcel(
35893589
MerkleRoot: out.Anchor.MerkleRoot[:],
35903590
TapscriptSibling: out.Anchor.TapscriptSibling,
35913591
NumPassiveAssets: out.Anchor.NumPassiveAssets,
3592+
PkScript: out.Anchor.PkScript,
35923593
}
35933594
scriptPubKey := out.ScriptKey.PubKey
35943595

tapfreighter/interface.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ type Anchor struct {
224224
// NumPassiveAssets is the number of passive assets in the commitment
225225
// for this anchor output.
226226
NumPassiveAssets uint32
227+
228+
// PkScript is the pkScript of the anchor output.
229+
PkScript []byte
227230
}
228231

229232
// OutputIdentifier is a key that can be used to uniquely identify a transfer

tapfreighter/parcel.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,7 @@ func outputAnchor(anchorTx *tapsend.AnchorTransaction, vOut *tappsbt.VOutput,
726726
MerkleRoot: merkleRoot[:],
727727
TapscriptSibling: preimageBytes,
728728
NumPassiveAssets: numPassiveAssets,
729+
PkScript: txOut.PkScript,
729730
}, nil
730731
}
731732

taprpc/assetwalletrpc/assetwallet.swagger.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,6 +1147,11 @@
11471147
"num_passive_assets": {
11481148
"type": "integer",
11491149
"format": "int64"
1150+
},
1151+
"pk_script": {
1152+
"type": "string",
1153+
"format": "byte",
1154+
"description": "pk_script is the pkscript of the anchor output."
11501155
}
11511156
}
11521157
}

taprpc/taprootassets.pb.go

Lines changed: 621 additions & 610 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

taprpc/taprootassets.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,9 @@ message TransferOutputAnchor {
779779
bytes tapscript_sibling = 6;
780780

781781
uint32 num_passive_assets = 7;
782+
783+
// pk_script is the pkscript of the anchor output.
784+
bytes pk_script = 8;
782785
}
783786

784787
enum OutputType {

taprpc/taprootassets.swagger.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2527,6 +2527,11 @@
25272527
"num_passive_assets": {
25282528
"type": "integer",
25292529
"format": "int64"
2530+
},
2531+
"pk_script": {
2532+
"type": "string",
2533+
"format": "byte",
2534+
"description": "pk_script is the pkscript of the anchor output."
25302535
}
25312536
}
25322537
},

0 commit comments

Comments
 (0)