0.0.36 • Published 4 years ago

@cuser/core v0.0.36

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

@cuser/core

Status

codecov npm npm-downloads

Class: ClientCorePubSub

Creates pubsub to listen changes on cuser network

Hierarchy

  • ClientCorePubSub

Index

Constructors

Methods

Constructors

constructor

+ new ClientCorePubSub(node: IPFSAPI | Promise<IPFSAPI>, opts: CuserClientPubSubOptions): ClientCorePubSub

Defined in pubsub.js:72

Parameters:

NameType
nodeIPFSAPI | Promise<IPFSAPI>
optsCuserClientPubSubOptions

Returns: ClientCorePubSub

Methods

broadcast

broadcast(payload: any): void

Defined in pubsub.js:101

Parameters:

NameTypeDescription
payloadany

Returns: void


subscribe

subscribe(subscriber: (payload: Object) => void): (Anonymous function)

Defined in pubsub.js:107

Parameters:

NameTypeDescription
subscriber(payload: Object) => void

Returns: (Anonymous function)

Class: CuserCore

Core logic to manage the dag tree and specify the dag format, this will wraps ipfs.dag in order to normalize the mainly used methods and allows future replacements.

Hierarchy

  • CuserCore

Index

Constructors

Methods

Constructors

constructor

+ new CuserCore(node: IPFSAPI | Promise<IPFSAPI>, opts: CuserCoreOptions): CuserCore

Defined in core.js:28

Parameters:

NameType
nodeIPFSAPI | Promise<IPFSAPI>
optsCuserCoreOptions

Returns: CuserCore

Methods

get

get(cid: string, opts: AbortOptions): Promise<any>

Defined in core.js:91

Parameters:

NameType
cidstring
optsAbortOptions

Returns: Promise<any>


peerId

peerId(): Promise<string>

Defined in core.js:119

Gets the node peerId

Returns: Promise<string>


publish

publish(cid: string, opts: AbortOptions): Promise<PublishResult>

Defined in core.js:56

Publish using ipns to link the current cid to a fixed entry

Parameters:

NameType
cidstring
optsAbortOptions

Returns: Promise<PublishResult>


pubsub

pubsub(opts: CuserClientPubSubOptions): ClientCorePubSub

Defined in core.js:128

Parameters:

NameType
optsCuserClientPubSubOptions

Returns: ClientCorePubSub


put

put(value: any, opts: AbortOptions & PutOptions): Promise<string>

Defined in core.js:75

Parameters:

NameType
valueany
optsAbortOptions & PutOptions

Returns: Promise<string>


resolve

resolve(cid: string | Promise<string>): Promise<string>

Defined in core.js:106

Resolve the linked dag cid

Parameters:

NameType
cidstring | Promise<string>

Returns: Promise<string>

References

0.0.30

4 years ago

0.0.31

4 years ago

0.0.32

4 years ago

0.0.33

4 years ago

0.0.34

4 years ago

0.0.35

4 years ago

0.0.36

4 years ago

0.0.29

4 years ago

0.0.25

4 years ago

0.0.26

4 years ago

0.0.27

4 years ago

0.0.16

4 years ago

0.0.17

4 years ago

0.0.18

4 years ago

0.0.12

4 years ago

0.0.8

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago