new IdentityContext(user, client)
Construct a IdentityContext object.
Parameters:
Name | Type | Description |
---|---|---|
user |
User | The user identity instance |
client |
Client |
Returns:
The IdentityContext instance.
- Type
- IdentityContext
Methods
-
calculateTransactionId()
-
Create a new transaction ID value. The new transaction ID will be set both on this object and on the return value, which is a copy of this identity context. Calls to this function will not affect the transaction ID value on copies returned from previous calls.
Returns:
IdentityContext A copy of this identity context. -
serializeIdentity()
-
Get the protobuf serialized identity of this user
Returns:
serialized identity in bytes- Type
- Buffer
-
sign(payload)
-
Sign the bytes provided
Parameters:
Name Type Description payload
Buffer The payload bytes that require a signature Returns:
- The signature as promise bytes- Type
- Buffer
-
toString()
-
return a printable representation of this object