@fedify/fedify 1.5.0-dev.709 → 1.5.0-dev.714

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/fedify",
3
- "version": "1.5.0-dev.709+d405668c",
3
+ "version": "1.5.0-dev.714+56abdd05",
4
4
  "description": "An ActivityPub server framework",
5
5
  "keywords": [
6
6
  "ActivityPub",
@@ -96,13 +96,13 @@
96
96
  "dependencies": {
97
97
  "@hugoalh/http-header-link": "^1.0.2",
98
98
  "@logtape/logtape": "^0.8.2",
99
+ "@multiformats/base-x": "^4.0.1",
99
100
  "@opentelemetry/api": "^1.9.0",
100
101
  "@opentelemetry/semantic-conventions": "^1.27.0",
101
102
  "@phensley/language-tag": "^1.9.0",
102
103
  "asn1js": "^3.0.5",
103
104
  "json-canon": "^1.0.1",
104
105
  "jsonld": "^8.3.2",
105
- "multibase": "^4.0.6",
106
106
  "multicodec": "^3.2.1",
107
107
  "pkijs": "^3.2.4",
108
108
  "uri-template-router": "^0.0.16",
package/types/deno.d.ts CHANGED
@@ -40,7 +40,6 @@ declare namespace _default {
40
40
  "json-canon": string;
41
41
  jsonld: string;
42
42
  mock_fetch: string;
43
- multibase: string;
44
43
  multicodec: string;
45
44
  pkijs: string;
46
45
  "uri-template-router": string;
@@ -0,0 +1,15 @@
1
+ import type { BaseCode, BaseName, Codec, CodecFactory } from "./types";
2
+ /**
3
+ * Class to encode/decode in the supported Bases
4
+ */
5
+ export declare class Base {
6
+ name: BaseName;
7
+ private code;
8
+ private alphabet;
9
+ codeBuf: Uint8Array;
10
+ codec: Codec;
11
+ constructor(name: BaseName, code: BaseCode, factory: CodecFactory, alphabet: string);
12
+ encode(buf: Uint8Array): string;
13
+ decode(string: string): Uint8Array;
14
+ }
15
+ //# sourceMappingURL=base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/runtime/multibase/base.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvE;;GAEG;AACH,qBAAa,IAAI;IAKN,IAAI,EAAE,QAAQ;IACrB,OAAO,CAAC,IAAI;IAEZ,OAAO,CAAC,QAAQ;IAPX,OAAO,EAAE,UAAU,CAAC;IAC3B,KAAK,EAAE,KAAK,CAAC;gBAGJ,IAAI,EAAE,QAAQ,EACb,IAAI,EAAE,QAAQ,EACtB,OAAO,EAAE,YAAY,EACb,QAAQ,EAAE,MAAM;IAO1B,MAAM,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM;IAI/B,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU;CAQnC"}
@@ -0,0 +1,5 @@
1
+ import { Base } from "./base.js";
2
+ import type { BaseCode, BaseName } from "./types";
3
+ export declare const names: Record<BaseName, Base>;
4
+ export declare const codes: Record<BaseCode, Base>;
5
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/runtime/multibase/constants.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAgB,MAAM,SAAS,CAAC;AAsEhE,eAAO,MAAM,KAAK,wBAMjB,CAAC;AAEF,eAAO,MAAM,KAAK,wBAMjB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { BaseNameOrCode } from "./types";
2
+ import type { Base } from "./base.js";
3
+ /**
4
+ * Encode data with the specified base and add the multibase prefix.
5
+ *
6
+ * @throws {Error} Will throw if the encoding is not supported
7
+ */
8
+ export declare function encode(nameOrCode: BaseNameOrCode, buf: Uint8Array): Uint8Array;
9
+ /**
10
+ * Takes a Uint8Array or string encoded with multibase header, decodes it and
11
+ * returns the decoded buffer
12
+ *
13
+ * @throws {Error} Will throw if the encoding is not supported
14
+ */
15
+ export declare function decode(data: Uint8Array | string): Uint8Array;
16
+ /**
17
+ * Get encoding from data
18
+ *
19
+ * @param {string|Uint8Array} data
20
+ * @returns {Base}
21
+ * @throws {Error} Will throw if the encoding is not supported
22
+ */
23
+ export declare function encodingFromData(data: string | Uint8Array): Base;
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtime/multibase/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAsB,cAAc,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEtC;;;;GAIG;AACH,wBAAgB,MAAM,CACpB,UAAU,EAAE,cAAc,EAC1B,GAAG,EAAE,UAAU,GACd,UAAU,CAKZ;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,UAAU,CAgB5D;AA0BD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAMhE"}
@@ -0,0 +1,6 @@
1
+ import type { CodecFactory } from "./types";
2
+ /**
3
+ * RFC4648 Factory
4
+ */
5
+ export declare const rfc4648: (bitsPerChar: number) => CodecFactory;
6
+ //# sourceMappingURL=rfc4648.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rfc4648.d.ts","sourceRoot":"","sources":["../../../src/runtime/multibase/rfc4648.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AA0F5C;;GAEG;AACH,eAAO,MAAM,OAAO,gBAAiB,MAAM,KAAG,YAS7C,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const decodeText: (bytes: DataView | Uint8Array) => string;
2
+ export declare const encodeText: (text: string) => Uint8Array;
3
+ export declare function concat(arrs: Array<ArrayLike<number>>, length: number): Uint8Array;
4
+ //# sourceMappingURL=util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/runtime/multibase/util.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,UAAU,UAAW,QAAQ,GAAG,UAAU,KAAG,MAC/B,CAAC;AAG5B,eAAO,MAAM,UAAU,SAAU,MAAM,KAAG,UAChB,CAAC;AAE3B,wBAAgB,MAAM,CACpB,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAC9B,MAAM,EAAE,MAAM,GACb,UAAU,CAUZ"}