11//!
2- //! An implementation of ELIP0101 as defined in
3- //! <https://github.com/ElementsProject/ELIPs/blob/main/elip-0101 .mediawiki>
2+ //! An implementation of ELIP0102 as defined in
3+ //! <https://github.com/ElementsProject/ELIPs/blob/main/elip-0102 .mediawiki>
44//!
5- //! ELIP0101 defines how to encode the extra data for LiquiDEX in a PSET.
5+ //! ELIP0102 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 ELIP0101
16+ /// Input Asset Blinding Factor keytype as defined in ELIP0102
1717pub const PSBT_ELEMENTS_LIQUIDEX_IN_ABF : u8 = 0x00u8 ;
1818
19- /// Output Asset Blinding Factor keytype as defined in ELIP0101
19+ /// Output Asset Blinding Factor keytype as defined in ELIP0102
2020pub const PSBT_ELEMENTS_LIQUIDEX_OUT_ABF : u8 = 0x00u8 ;
2121
22- /// Prefix for PSET LiquiDEX extension as defined in ELIP0101
22+ /// Prefix for PSET LiquiDEX extension as defined in ELIP0102
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- /// ELIP0101 LiquiDEX extensions
33+ /// ELIP0102 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- /// ELIP0101 LiquiDEX extensions
50+ /// ELIP0102 LiquiDEX extensions
5151impl Output {
5252 /// Set Asset Blinding Factor
5353 pub fn set_abf ( & mut self , abf : AssetBlindingFactor ) {
@@ -72,7 +72,7 @@ mod test {
7272 use crate :: hex:: { FromHex , ToHex } ;
7373
7474 // b'\xfc\rpset_liquidex'
75- const ELIP0101_IDENTIFIER : & str = "fc0d707365745f6c69717569646578" ;
75+ const ELIP0102_IDENTIFIER : & str = "fc0d707365745f6c69717569646578" ;
7676
7777 #[ test]
7878 fn prop_key_serialize ( ) {
@@ -85,7 +85,7 @@ mod test {
8585 format!( "0d{}00" , PSET_LIQUIDEX_PREFIX . to_hex( ) )
8686 ) ;
8787
88- assert ! ( vec. to_hex( ) . starts_with( & ELIP0101_IDENTIFIER [ 2 ..] ) ) ; // cut proprietary prefix "fc"
88+ assert ! ( vec. to_hex( ) . starts_with( & ELIP0102_IDENTIFIER [ 2 ..] ) ) ; // cut proprietary prefix "fc"
8989 }
9090
9191 #[ test]
@@ -100,15 +100,15 @@ mod test {
100100 input. set_abf ( abf) ;
101101 assert_eq ! ( input. get_abf( ) . unwrap( ) . unwrap( ) , abf) ;
102102 let input_hex = serialize_hex ( & input) ;
103- assert ! ( input_hex. contains( ELIP0101_IDENTIFIER ) ) ;
103+ assert ! ( input_hex. contains( ELIP0102_IDENTIFIER ) ) ;
104104 assert ! ( input_hex. contains( abf_hex) ) ;
105105
106106 let mut output = Output :: default ( ) ;
107107 assert ! ( output. get_abf( ) . is_none( ) ) ;
108108 output. set_abf ( abf) ;
109109 assert_eq ! ( output. get_abf( ) . unwrap( ) . unwrap( ) , abf) ;
110110 let output_hex = serialize_hex ( & output) ;
111- assert ! ( output_hex. contains( ELIP0101_IDENTIFIER ) ) ;
111+ assert ! ( output_hex. contains( ELIP0102_IDENTIFIER ) ) ;
112112 assert ! ( output_hex. contains( abf_hex) ) ;
113113 }
114114
0 commit comments