PackageManager class
Basic package manager for iden3 communication protocol
PackageManager implements IPackageManager interface
Signature:
export declare class PackageManager implements IPackageManager
Implements: IPackageManager
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)() | Creates an instance of PackageManager. |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
packers | Map<MediaType, IPacker> |
Methods
Method | Modifiers | Description |
---|---|---|
getMediaType(envelope) | gets media type from an envelope | |
pack(mediaType, payload, params) | packs payload with a packer that is assigned to media type forwards packer params to implementation | |
registerPackers(packers) | registers new packer in the manager | |
unpack(envelope) | unpacks packed envelope to basic protocol message and returns media type of the envelope | |
unpackWithType(mediaType, envelope) | unpacks an envelope with a known media type |