We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bffba5a + 570071a commit 961a255Copy full SHA for 961a255
src/rest.rs
@@ -355,6 +355,8 @@ impl TxOutValue {
355
"v0_p2wsh"
356
} else if is_v1_p2tr(script) {
357
"v1_p2tr"
358
+ } else if is_anchor(script) {
359
+ "anchor"
360
} else if script.is_provably_unspendable() {
361
"provably_unspendable"
362
} else if is_bare_multisig(script) {
@@ -405,6 +407,15 @@ fn is_bare_multisig(script: &Script) -> bool {
405
407
&& script[0] <= script[len - 2]
406
408
}
409
410
+fn is_anchor(script: &Script) -> bool {
411
+ let len = script.len();
412
+ len == 4
413
+ && script[0] == opcodes::all::OP_PUSHNUM_1.into_u8()
414
+ && script[1] == opcodes::all::OP_PUSHBYTES_2.into_u8()
415
+ && script[2] == 0x4e
416
+ && script[3] == 0x73
417
+}
418
+
419
#[derive(Serialize)]
420
struct UtxoValue {
421
txid: Txid,
0 commit comments