To Get Identity: getIdentity
We can get an identity stored on the SDK using getIdentity()
function.
Get an Identity
Future<IdentityEntity> getIdentity(
{required String genesisDid,
String? privateKey
});
The getIdentity()
function gets an IdentityEntity
from an identifier. It returns an identity as a PrivateIdentityEntity
or IdentityEntity
(in case privateKey
is omitted or invalid for that identifier).
did
is the unique ID of the identity and genesisDid
is the did
of the first profile of the identity, it is the unique ID of the identity for which profile nonce is 0.
Note: It is worth noting that
did
is a Decentralized Identifier associated with an identity and enables verifiable identities. Adid
could be a person, thing, organization, or even an abstract entity. The controller of thedid
can prove that it is the real owner of the identity without the need of seeking permissions/approvals from any centralized authority.
A did
is expressed in the following format (as per w3.org standards):
did: did method: did method-specific identifier
privateKey
is the key that is used to access sensitive information related to an identity. This key is also used to generate proofs using the credentials associated with that identity.
New Polygon ID Documentation Website Available!
We've released a new version of our documention. Head to devs.polygonid.com to check it out.