@waku/interfaces 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/message.d.ts +1 -0
- package/dist/protocols.d.ts +8 -0
- package/dist/protocols.js +8 -0
- package/dist/protocols.js.map +1 -1
- package/package.json +2 -2
- package/src/message.ts +1 -0
- package/src/protocols.ts +9 -0
package/CHANGELOG.md
CHANGED
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The file is maintained by [Release Please](https://github.com/googleapis/release-please) based on [Conventional Commits](https://www.conventionalcommits.org) specification,
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
+
## [0.0.13](https://github.com/waku-org/js-waku/compare/interfaces-v0.0.12...interfaces-v0.0.13) (2023-05-18)
|
9
|
+
|
10
|
+
|
11
|
+
### Features
|
12
|
+
|
13
|
+
* Add 1MB restriction to LightPush and Relay ([#1351](https://github.com/waku-org/js-waku/issues/1351)) ([72f97d4](https://github.com/waku-org/js-waku/commit/72f97d4545512f92936b1a9b50fa0b53f8603f9d))
|
14
|
+
* Expose `meta` on `IDecodedMessage` ([5724bb2](https://github.com/waku-org/js-waku/commit/5724bb2b21367e4e397acbc5530b3a2bf315194e))
|
15
|
+
|
8
16
|
## [0.0.12](https://github.com/waku-org/js-waku/compare/interfaces-v0.0.11...interfaces-v0.0.12) (2023-05-09)
|
9
17
|
|
10
18
|
|
package/dist/message.d.ts
CHANGED
@@ -61,6 +61,7 @@ export interface IDecodedMessage {
|
|
61
61
|
timestamp: Date | undefined;
|
62
62
|
rateLimitProof: IRateLimitProof | undefined;
|
63
63
|
ephemeral: boolean | undefined;
|
64
|
+
meta: Uint8Array | undefined;
|
64
65
|
}
|
65
66
|
export interface IDecoder<T extends IDecodedMessage> {
|
66
67
|
contentTopic: string;
|
package/dist/protocols.d.ts
CHANGED
@@ -53,6 +53,14 @@ export type ProtocolOptions = {
|
|
53
53
|
peerId?: PeerId;
|
54
54
|
};
|
55
55
|
export type Callback<T extends IDecodedMessage> = (msg: T) => void | Promise<void>;
|
56
|
+
export declare enum SendError {
|
57
|
+
GENERIC_FAIL = "Generic error",
|
58
|
+
ENCODE_FAILED = "Failed to encode",
|
59
|
+
DECODE_FAILED = "Failed to decode",
|
60
|
+
SIZE_TOO_BIG = "Size is too big",
|
61
|
+
NO_RPC_RESPONSE = "No RPC response"
|
62
|
+
}
|
56
63
|
export interface SendResult {
|
64
|
+
error?: SendError;
|
57
65
|
recipients: PeerId[];
|
58
66
|
}
|
package/dist/protocols.js
CHANGED
@@ -5,4 +5,12 @@ export var Protocols;
|
|
5
5
|
Protocols["LightPush"] = "lightpush";
|
6
6
|
Protocols["Filter"] = "filter";
|
7
7
|
})(Protocols || (Protocols = {}));
|
8
|
+
export var SendError;
|
9
|
+
(function (SendError) {
|
10
|
+
SendError["GENERIC_FAIL"] = "Generic error";
|
11
|
+
SendError["ENCODE_FAILED"] = "Failed to encode";
|
12
|
+
SendError["DECODE_FAILED"] = "Failed to decode";
|
13
|
+
SendError["SIZE_TOO_BIG"] = "Size is too big";
|
14
|
+
SendError["NO_RPC_RESPONSE"] = "No RPC response";
|
15
|
+
})(SendError || (SendError = {}));
|
8
16
|
//# sourceMappingURL=protocols.js.map
|
package/dist/protocols.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"protocols.js","sourceRoot":"","sources":["../src/protocols.ts"],"names":[],"mappings":"AAMA,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,4BAAe,CAAA;IACf,oCAAuB,CAAA;IACvB,8BAAiB,CAAA;AACnB,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB"}
|
1
|
+
{"version":3,"file":"protocols.js","sourceRoot":"","sources":["../src/protocols.ts"],"names":[],"mappings":"AAMA,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,4BAAe,CAAA;IACf,oCAAuB,CAAA;IACvB,8BAAiB,CAAA;AACnB,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB;AAqDD,MAAM,CAAN,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,2CAA8B,CAAA;IAC9B,+CAAkC,CAAA;IAClC,+CAAkC,CAAA;IAClC,6CAAgC,CAAA;IAChC,gDAAmC,CAAA;AACrC,CAAC,EANW,SAAS,KAAT,SAAS,QAMpB"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@waku/interfaces",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.13",
|
4
4
|
"description": "Definition of Waku interfaces",
|
5
5
|
"types": "./dist/index.d.ts",
|
6
6
|
"module": "./dist/index.js",
|
@@ -67,7 +67,7 @@
|
|
67
67
|
"eslint-plugin-prettier": "^4.2.1",
|
68
68
|
"npm-run-all": "^4.1.5",
|
69
69
|
"prettier": "^2.8.8",
|
70
|
-
"typescript": "^
|
70
|
+
"typescript": "^5.0.4"
|
71
71
|
},
|
72
72
|
"typedoc": {
|
73
73
|
"entryPoint": "./src/index.ts"
|
package/src/message.ts
CHANGED
package/src/protocols.ts
CHANGED
@@ -62,6 +62,15 @@ export type Callback<T extends IDecodedMessage> = (
|
|
62
62
|
msg: T
|
63
63
|
) => void | Promise<void>;
|
64
64
|
|
65
|
+
export enum SendError {
|
66
|
+
GENERIC_FAIL = "Generic error",
|
67
|
+
ENCODE_FAILED = "Failed to encode",
|
68
|
+
DECODE_FAILED = "Failed to decode",
|
69
|
+
SIZE_TOO_BIG = "Size is too big",
|
70
|
+
NO_RPC_RESPONSE = "No RPC response",
|
71
|
+
}
|
72
|
+
|
65
73
|
export interface SendResult {
|
74
|
+
error?: SendError;
|
66
75
|
recipients: PeerId[];
|
67
76
|
}
|