Identity interface
Identity represents an entity capable of signing a message. This is a simple "private key" interface that must be capable of returning the associated "public key" for verification. In many cases, the Identity will just be a private key, but callers can use any setup that suits their needs. The interface is currently modeled after libp2p-crypto
keys. It is meant to be implemented by external libraries, though in practice, implementations are provided by the @textile/crypto
library.
If using in your own application, see the PrivateKey class.
Signature:
export interface Identity
Properties
Property | Type | Description |
---|---|---|
public | Public | Get the public key associated with this identity. This can be any object that satisfies the Public interface. |
Methods
Method | Description |
---|---|
sign(data) | Sign the message using this identity and return the signature. |