Skip to content

Commit e8c52be

Browse files
authored
Cleanup Identity (#1734)
* Cleanup Identity * changelogs, version bump
1 parent c74d240 commit e8c52be

File tree

6 files changed

+14
-15
lines changed

6 files changed

+14
-15
lines changed

bindings_node/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# @xmtp/node-bindings
22

3+
## 1.0.0-rc2
4+
5+
- Removed an optional `relying_party` field in the `Identifier` struct
6+
37
## 1.0.0-rc1
48

59
- Added `pausedForVersion` to groups for client enforcement

bindings_node/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@xmtp/node-bindings",
3-
"version": "1.0.0-rc1",
3+
"version": "1.0.0-rc2",
44
"repository": {
55
"type": "git",
66
"url": "git+https://git@github.com/xmtp/libxmtp.git",

bindings_node/src/identity.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use xmtp_id::associations::{ident, Identifier as XmtpIdentifier};
88
pub struct Identifier {
99
pub identifier: String,
1010
pub identifier_kind: IdentifierKind,
11-
pub relying_party: Option<String>,
1211
}
1312

1413
#[napi]
@@ -25,12 +24,10 @@ impl From<XmtpIdentifier> for Identifier {
2524
XmtpIdentifier::Ethereum(ident::Ethereum(addr)) => Self {
2625
identifier: addr,
2726
identifier_kind: IdentifierKind::Ethereum,
28-
relying_party: None,
2927
},
30-
XmtpIdentifier::Passkey(ident::Passkey { key, relying_party }) => Self {
28+
XmtpIdentifier::Passkey(ident::Passkey { key, .. }) => Self {
3129
identifier: hex::encode(key),
3230
identifier_kind: IdentifierKind::Passkey,
33-
relying_party,
3431
},
3532
}
3633
}
@@ -41,7 +38,7 @@ impl TryFrom<Identifier> for XmtpIdentifier {
4138
fn try_from(ident: Identifier) -> Result<Self, Self::Error> {
4239
let ident = match ident.identifier_kind {
4340
IdentifierKind::Ethereum => Self::eth(ident.identifier)?,
44-
IdentifierKind::Passkey => Self::passkey_str(&ident.identifier, ident.relying_party)?,
41+
IdentifierKind::Passkey => Self::passkey_str(&ident.identifier, None)?,
4542
};
4643
Ok(ident)
4744
}

bindings_wasm/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# @xmtp/wasm-bindings
22

3+
## 1.0.0-rc3
4+
5+
- Removed an optional `relying_party` field in the `Identifier` struct
6+
37
## 1.0.0-rc2
48

59
- Updated some WASM aliases to remove references to addresses

bindings_wasm/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@xmtp/wasm-bindings",
3-
"version": "1.0.0-rc2",
3+
"version": "1.0.0-rc3",
44
"type": "module",
55
"license": "MIT",
66
"description": "WASM bindings for the libXMTP rust library",

bindings_wasm/src/identity.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ pub struct Identifier {
88
pub identifier: String,
99
#[wasm_bindgen(js_name = identifierKind)]
1010
pub identifier_kind: IdentifierKind,
11-
#[wasm_bindgen(js_name = relyingParty)]
12-
pub relying_party: Option<String>,
1311
}
1412

1513
#[wasm_bindgen]
@@ -18,12 +16,10 @@ impl Identifier {
1816
pub fn new(
1917
identifier: String,
2018
#[wasm_bindgen(js_name = identifierKind)] identifier_kind: IdentifierKind,
21-
#[wasm_bindgen(js_name = relyingParty)] relying_party: Option<String>,
2219
) -> Self {
2320
Self {
2421
identifier,
2522
identifier_kind,
26-
relying_party,
2723
}
2824
}
2925
}
@@ -41,12 +37,10 @@ impl From<XmtpIdentifier> for Identifier {
4137
XmtpIdentifier::Ethereum(ident::Ethereum(addr)) => Self {
4238
identifier: addr,
4339
identifier_kind: IdentifierKind::Ethereum,
44-
relying_party: None,
4540
},
46-
XmtpIdentifier::Passkey(ident::Passkey { key, relying_party }) => Self {
41+
XmtpIdentifier::Passkey(ident::Passkey { key, .. }) => Self {
4742
identifier: hex::encode(key),
4843
identifier_kind: IdentifierKind::Passkey,
49-
relying_party,
5044
},
5145
}
5246
}
@@ -57,7 +51,7 @@ impl TryFrom<Identifier> for XmtpIdentifier {
5751
fn try_from(ident: Identifier) -> Result<Self, Self::Error> {
5852
let ident = match ident.identifier_kind {
5953
IdentifierKind::Ethereum => Self::eth(ident.identifier)?,
60-
IdentifierKind::Passkey => Self::passkey_str(&ident.identifier, ident.relying_party)?,
54+
IdentifierKind::Passkey => Self::passkey_str(&ident.identifier, None)?,
6155
};
6256
Ok(ident)
6357
}

0 commit comments

Comments
 (0)