Skip to content

Commit

Permalink
rename unsigned session to unsigned proof (#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanKung authored Aug 10, 2023
1 parent 911535d commit 58ba921
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
//! ```js
//! // prepare auth & send to metamask for sign
//! let sessionBuilder = SessionSkBuilder.new(account, 'eip191')
//! let unsignedSession = sessionBuilder.unsigned_session()
//! let unsignedSession = sessionBuilder.unsigned_proof()
//! const { signed } = await sendMessage(
//! 'sign-message',
//! {
Expand Down Expand Up @@ -185,7 +185,7 @@ impl SessionSkBuilder {
}

/// Construct unsigned_info string for signing.
pub fn unsigned_session(&self) -> String {
pub fn unsigned_proof(&self) -> String {
pack_session(self.sk.address().into(), self.ts_ms, self.ttl_ms)
}

Expand Down Expand Up @@ -297,7 +297,7 @@ impl SessionSk {

let mut builder = SessionSkBuilder::new(account_entity, account_type);

let sig = key.sign(&builder.unsigned_session());
let sig = key.sign(&builder.unsigned_proof());
builder = builder.set_session_sig(sig.to_vec());

builder.build()
Expand Down

0 comments on commit 58ba921

Please sign in to comment.