Skip to content

Commit 627ecb5

Browse files
add Principal.fromBlob (#331)
1 parent 57c3bb7 commit 627ecb5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Principal.mo

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ module {
1515
/// Conversion.
1616
public let toBlob : (p : Principal) -> Blob = Prim.blobOfPrincipal;
1717

18+
/// Conversion.
19+
public let fromBlob : (b : Blob) -> Principal = Prim.principalOfBlob;
20+
1821
/// Conversion.
1922
public func toText(p : Principal) : Text = debug_show(p);
2023

0 commit comments

Comments
 (0)