Class: RevocationBitmap
identity_wasm.RevocationBitmap
A compressed bitmap for managing credential revocation.
Table of contents
Constructors
Methods
Constructors
constructor
• new RevocationBitmap()
Creates a new RevocationBitmap instance.
Methods
toJSON
▸ toJSON(): Object
- Return copy of self without private attributes.
Returns
Object
toString
▸ toString(): string
Return stringified version of self.
Returns
string
type
▸ Static
type(): string
The name of the service type.
Returns
string
isRevoked
▸ isRevoked(index
): boolean
Returns true
if the credential at the given index
is revoked.
Parameters
Name | Type |
---|---|
index | number |
Returns
boolean
revoke
▸ revoke(index
): boolean
Mark the given index as revoked.
Returns true if the index was absent from the set.
Parameters
Name | Type |
---|---|
index | number |
Returns
boolean
unrevoke
▸ unrevoke(index
): boolean
Mark the index as not revoked.
Returns true if the index was present in the set.
Parameters
Name | Type |
---|---|
index | number |
Returns
boolean
len
▸ len(): number
Returns the number of revoked credentials.
Returns
number
toService
▸ toService(serviceId
): Service
Return a Service
with:
- the service's id set to
serviceId
, - of type
RevocationBitmap2022
, - and with the bitmap embedded in a data url in the service's endpoint.
Parameters
Name | Type |
---|---|
serviceId | DIDUrl |
Returns
fromEndpoint
▸ Static
fromEndpoint(service
): RevocationBitmap
Try to construct a RevocationBitmap from a service if it is a valid Revocation Bitmap Service.
Parameters
Name | Type |
---|---|
service | Service |