Magic.Token (magic v0.1.0) View Source

Provides methods to interact with the DID Token.

Link to this section Summary

Link to this section Functions

Link to this function

construct_issuer_with_public_address(public_address)

View Source

Description:

Method parse public_address and extract issuer

Arguments:

public_address: Cryptographic public address of the Magic User.

Returns:

issuer info

Description:

Method Decodes a DID Token from a Base64 string into
a tuple of its individual components: proof and claim.
This method allows you decode the DID Token
and inspect the token

Arguments:

did_token: A DID Token generated by a Magic user on the client-side.

Returns:

A map containing proof, claim and message or raise an error

Description:

Method parse did_token and extract issuer

Arguments:

did_token: A DID Token generated by a Magic user on the client-side.

Returns:

issuer info
Link to this function

get_public_address(did_token)

View Source

Description:

Method parse did_token and extract  cryptographic public_address

Arguments:

did_token: A DID Token generated by a Magic user on the client-side.

Returns:

cryptographic public address of the Magic User
who generated the supplied DID Token.

Description:

Method validate did_token

Arguments:

did_token: A DID Token generated by a Magic user on the client-side.

Returns:

true or raise an error