Skip to content

Commit 4c7020f

Browse files
authored
Merge pull request #226 from LeoComandini/2025-03-elip101-102
elip102: rename from elip101
2 parents 899b294 + f9f2f5f commit 4c7020f

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/pset/elip101.rs renamed to src/pset/elip102.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
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
88
use 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
1717
pub 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
2020
pub 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
2323
pub const PSET_LIQUIDEX_PREFIX: &[u8] = b"pset_liquidex";
2424

2525
fn 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
3434
impl 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
5151
impl 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

src/pset/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ mod map;
3030
pub mod raw;
3131
pub mod serialize;
3232
pub mod elip100;
33-
pub mod elip101;
33+
pub mod elip102;
3434

3535
#[cfg(feature = "base64")]
3636
mod str;

0 commit comments

Comments
 (0)