mirror of https://github.com/status-im/js-waku.git
feat!: export user functions from package root
`createEncoder`, `createDecoder` and `DecodedMessage` are function/types useful to the user so they should have easy access to it. We still export `Decoder` and `Encoder` but in a path so it cam be re-used by `@waku/message-encryption`.
This commit is contained in:
parent
ad15f861c3
commit
e8efd5e962
|
@ -4,6 +4,12 @@ export { DefaultUserAgent } from "./lib/waku.js";
|
|||
export * as proto_message from "./proto/message.js";
|
||||
export * as proto_topic_only_message from "./proto/topic_only_message.js";
|
||||
|
||||
export {
|
||||
createEncoder,
|
||||
createDecoder,
|
||||
DecodedMessage,
|
||||
} from "./lib/waku_message/version_0.js";
|
||||
|
||||
export * as waku from "./lib/waku.js";
|
||||
export { WakuNode } from "./lib/waku.js";
|
||||
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils";
|
||||
import { createDecoder, createEncoder, DecodedMessage } from "@waku/core";
|
||||
import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer";
|
||||
import {
|
||||
createDecoder,
|
||||
createEncoder,
|
||||
DecodedMessage,
|
||||
} from "@waku/core/lib/waku_message/version_0";
|
||||
import { createLightNode } from "@waku/create";
|
||||
import { Protocols, WakuLight } from "@waku/interfaces";
|
||||
import {
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils";
|
||||
import { createDecoder, createEncoder } from "@waku/core";
|
||||
import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer";
|
||||
import {
|
||||
createDecoder,
|
||||
createEncoder,
|
||||
} from "@waku/core/lib/waku_message/version_0";
|
||||
import { createLightNode } from "@waku/create";
|
||||
import type { DecodedMessage, WakuLight } from "@waku/interfaces";
|
||||
import { Protocols } from "@waku/interfaces";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils";
|
||||
import { createEncoder } from "@waku/core";
|
||||
import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer";
|
||||
import { createEncoder } from "@waku/core/lib/waku_message/version_0";
|
||||
import { createLightNode } from "@waku/create";
|
||||
import type { WakuLight } from "@waku/interfaces";
|
||||
import { Protocols } from "@waku/interfaces";
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
import { PeerId } from "@libp2p/interface-peer-id";
|
||||
import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils";
|
||||
import { DefaultPubSubTopic } from "@waku/core";
|
||||
import { createDecoder, createEncoder, DecodedMessage } from "@waku/core";
|
||||
import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer";
|
||||
import {
|
||||
createDecoder,
|
||||
createEncoder,
|
||||
DecodedMessage,
|
||||
} from "@waku/core/lib/waku_message/version_0";
|
||||
import { createPrivacyNode } from "@waku/create";
|
||||
import type { WakuPrivacy } from "@waku/interfaces";
|
||||
import { Protocols } from "@waku/interfaces";
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils";
|
||||
import { createCursor, PageDirection } from "@waku/core";
|
||||
import { createDecoder, createEncoder } from "@waku/core";
|
||||
import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer";
|
||||
import {
|
||||
createDecoder,
|
||||
createEncoder,
|
||||
} from "@waku/core/lib/waku_message/version_0";
|
||||
import { createLightNode } from "@waku/create";
|
||||
import { DecodedMessage, Message, WakuLight } from "@waku/interfaces";
|
||||
import { Protocols } from "@waku/interfaces";
|
||||
|
|
Loading…
Reference in New Issue