Skip to content

Safe Principal methods #323

@Kamirus

Description

@Kamirus

Given recent forum feedback and our internal messages/requests there seems to be the need for safe Principal methods that don't trap.

Current methods that trap:

  • Principal.fromText(t : Text) : Principal
  • Principal.fromBlob(b : Blob) : Principal

Add safe alternatives that validate the input and return ?Principal.

Current workaround is to use principal-ext mops package which offers a safe fromText method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions