Class: Orbit
Orbit DB instance
Constructors
constructor
• new Orbit(ipfs
, identityManager
)
Create instance of OrbitDB
Parameters
Name | Type | Description |
---|---|---|
ipfs | IPFS | IPFS instance |
identityManager | IdentityManager | Identity manager instance |
Defined in
Properties
identity
• identity: Identity
Defined in
instance
• instance: OrbitDB
Defined in
ipfs
• ipfs: IPFS
Defined in
Methods
generateStoreAddress
▸ generateStoreAddress(identity?
, name
, type
): Promise
<string
>
Deterministic store address generation to provide store locations prior to thier creation
Parameters
Name | Type | Default value |
---|---|---|
identity | null | Identity | null |
name | string | undefined |
type | DbType | undefined |
Returns
Promise
<string
>
Defined in
getDatabase
▸ getDatabase<T
>(type
, nameOrAddress
, identity?
): Promise
<T
>
Opens a connection to a store
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
type | DbType |
nameOrAddress | string |
identity? | Identity |
Returns
Promise
<T
>
Defined in
getOrbitInstance
▸ getOrbitInstance(): Promise
<OrbitDB
>
Returns the current instance of OrbitDb
Returns
Promise
<OrbitDB
>
Defined in
initialize
▸ initialize(): Promise
<void
>
Initialize the OrbitDB instance, this is asynchrounous and therefore requires a way to wait till initilization is complete
Returns
Promise
<void
>
Defined in
convertDBTypeEnumToType
▸ Static
convertDBTypeEnumToType(type
): string
Converts the enum to the actual type used by OrbitDb
Parameters
Name | Type |
---|---|
type | DbType |
Returns
string