11//!
2- //! An implementation of ELIP0XXX as defined in
3- //! <https://github.com/ElementsProject/ELIPs/blob/main/elip-0XXX .mediawiki>
2+ //! An implementation of ELIP0101 as defined in
3+ //! <https://github.com/ElementsProject/ELIPs/blob/main/elip-0101 .mediawiki>
44//!
5- //! ELIP0XXX defines how to encode the extra data for LiquiDEX in a PSET.
5+ //! ELIP0101 defines how to encode the extra data for LiquiDEX in a PSET.
66//!
77
88use crate :: pset:: {
@@ -13,13 +13,13 @@ use crate::pset::{
1313 Input , Output ,
1414} ;
1515
16- /// Input Asset Blinding Factor keytype as defined in ELIP0XXX
16+ /// Input Asset Blinding Factor keytype as defined in ELIP0101
1717pub const PSBT_ELEMENTS_LIQUIDEX_IN_ABF : u8 = 0x00u8 ;
1818
19- /// Output Asset Blinding Factor keytype as defined in ELIP0XXX
19+ /// Output Asset Blinding Factor keytype as defined in ELIP0101
2020pub const PSBT_ELEMENTS_LIQUIDEX_OUT_ABF : u8 = 0x00u8 ;
2121
22- /// Prefix for PSET LiquiDEX extension as defined in ELIP0XXX
22+ /// Prefix for PSET LiquiDEX extension as defined in ELIP0101
2323pub const PSET_LIQUIDEX_PREFIX : & [ u8 ] = b"pset_liquidex" ;
2424
2525fn prop_key ( keytype : u8 ) -> ProprietaryKey {
@@ -30,7 +30,7 @@ fn prop_key(keytype: u8) -> ProprietaryKey {
3030 }
3131}
3232
33- /// ELIP0XXX LiquiDEX extensions
33+ /// ELIP0101 LiquiDEX extensions
3434impl Input {
3535 /// Set Asset Blinding Factor
3636 pub fn set_abf ( & mut self , abf : AssetBlindingFactor ) {
@@ -47,7 +47,7 @@ impl Input {
4747 }
4848}
4949
50- /// ELIP0XXX LiquiDEX extensions
50+ /// ELIP0101 LiquiDEX extensions
5151impl Output {
5252 /// Set Asset Blinding Factor
5353 pub fn set_abf ( & mut self , abf : AssetBlindingFactor ) {
@@ -71,7 +71,7 @@ mod test {
7171 use crate :: hex:: { FromHex , ToHex } ;
7272
7373 // b'\xfc\rpset_liquidex'
74- const ELIP0XXX_IDENTIFIER : & str = "fc0d707365745f6c69717569646578" ;
74+ const ELIP0101_IDENTIFIER : & str = "fc0d707365745f6c69717569646578" ;
7575
7676 #[ test]
7777 fn prop_key_serialize ( ) {
@@ -84,7 +84,7 @@ mod test {
8484 format!( "0d{}00" , PSET_LIQUIDEX_PREFIX . to_hex( ) )
8585 ) ;
8686
87- assert ! ( vec. to_hex( ) . starts_with( & ELIP0XXX_IDENTIFIER [ 2 ..] ) ) ; // cut proprietary prefix "fc"
87+ assert ! ( vec. to_hex( ) . starts_with( & ELIP0101_IDENTIFIER [ 2 ..] ) ) ; // cut proprietary prefix "fc"
8888 }
8989
9090 #[ test]
@@ -99,15 +99,15 @@ mod test {
9999 input. set_abf ( abf) ;
100100 assert_eq ! ( input. get_abf( ) . unwrap( ) . unwrap( ) , abf) ;
101101 let input_hex = serialize_hex ( & input) ;
102- assert ! ( input_hex. contains( ELIP0XXX_IDENTIFIER ) ) ;
102+ assert ! ( input_hex. contains( ELIP0101_IDENTIFIER ) ) ;
103103 assert ! ( input_hex. contains( abf_hex) ) ;
104104
105105 let mut output = Output :: default ( ) ;
106106 assert ! ( output. get_abf( ) . is_none( ) ) ;
107107 output. set_abf ( abf) ;
108108 assert_eq ! ( output. get_abf( ) . unwrap( ) . unwrap( ) , abf) ;
109109 let output_hex = serialize_hex ( & output) ;
110- assert ! ( output_hex. contains( ELIP0XXX_IDENTIFIER ) ) ;
110+ assert ! ( output_hex. contains( ELIP0101_IDENTIFIER ) ) ;
111111 assert ! ( output_hex. contains( abf_hex) ) ;
112112 }
113113}
0 commit comments