JSLib Reference Manual / Exports / SB384
Class: SB384#
Hierarchy#
SB384↳
Channel
Table of contents#
Constructors#
Properties#
Accessors#
Constructors#
constructor#
• new SB384(key?)
Basic (core) capability object in SB.
Note that all the getters below will throw an exception if the corresponding information is not ready.
Like most SB classes, SB384 follows the “ready template” design
pattern: the object is immediately available upon creation,
but isn’t “ready” until it says it’s ready. See Channel Class_
example below. Also see Design Note [4]_.
https://snackabra.io/jslib.html#dn-004-the-ready-pattern
Parameters#
Name |
Type |
Description |
|---|---|---|
|
|
a jwk with which to create identity; if not provided, it will ‘mint’ (generate) them randomly, in other words it will default to creating a new identity (“384”). |
Properties#
ready#
• ready: Promise<SB384>
sb384Ready#
• sb384Ready: Promise<SB384>
Accessors#
_id#
• get _id(): string
Returns#
string
exportable_privateKey#
• get exportable_privateKey(): JsonWebKey
Returns#
JsonWebKey
exportable_pubKey#
• get exportable_pubKey(): JsonWebKey
Returns#
JsonWebKey
ownerChannelId#
• get ownerChannelId(): string
Returns#
string
privateKey#
• get privateKey(): CryptoKey
Returns#
CryptoKey
readyFlag#
• get readyFlag(): boolean
Returns#
boolean