@misofm/platform 0.21.1 → 0.22.1

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/dist/index.d.ts CHANGED
@@ -10,6 +10,8 @@ export * from "./release-graph.ts";
10
10
  export * from "./publication.ts";
11
11
  export * from "./catalog.ts";
12
12
  export * from "./walrus-ids.ts";
13
+ export * from "./streaming.ts";
14
+ export * from "./walrus.ts";
13
15
  export * as read from "./read/index.ts";
14
16
  export * from "./credits.ts";
15
17
  export * from "./cover.ts";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA4BA,OAAO,EACL,IAAI,EACJ,YAAY,EACZ,gCAAgC,EAChC,uBAAuB,EACvB,UAAU,EACV,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,4BAA4B,EAC5B,WAAW,EACX,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAKhC,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAIxC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,YAAY,CAAC;AAG3B,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA4BA,OAAO,EACL,IAAI,EACJ,YAAY,EACZ,gCAAgC,EAChC,uBAAuB,EACvB,UAAU,EACV,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,4BAA4B,EAC5B,WAAW,EACX,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAK5B,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAIxC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,YAAY,CAAC;AAG3B,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC"}
package/dist/index.js CHANGED
@@ -35,6 +35,8 @@ export * from "./release-graph.js";
35
35
  export * from "./publication.js";
36
36
  export * from "./catalog.js";
37
37
  export * from "./walrus-ids.js";
38
+ export * from "./streaming.js";
39
+ export * from "./walrus.js";
38
40
  // High-level, JSON-safe platform projections used directly by clients and by
39
41
  // the thin HTTP read service. Namespaced because these composed view types are
40
42
  // intentionally distinct from the lower-level contract views above.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAEtC,2CAA2C;AAC3C,EAAE;AACF,6EAA6E;AAC7E,kEAAkE;AAClE,EAAE;AACF,iFAAiF;AACjF,sFAAsF;AACtF,gFAAgF;AAChF,8EAA8E;AAC9E,oEAAoE;AACpE,EAAE;AACF,6EAA6E;AAC7E,iF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FAAgF;AAChF,iFAAiF;AACjF,gFAAgF;AAEhF,kFAAkF;AAClF,2EAA2E;AAC3E,OAAO,EACL,IAAI,EACJ,YAAY,EACZ,gCAAgC,EAChC,uBAAuB,EACvB,UAAU,EACV,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAMrB,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAE5B,6EAA6E;AAC7E,+EAA+E;AAC/E,oEAAoE;AACpE,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAExC,yEAAyE;AACzE,kBAAkB;AAClB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,YAAY,CAAC;AAE3B,sEAAsE;AACtE,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { type WalrusNetwork } from "./walrus.ts";
2
+ export * from "@misofm/streaming";
3
+ /** The master playlist URL for a track's transcode Quilt on a network's aggregator. */
4
+ export declare function streamUrl(network: WalrusNetwork, quiltId: string): string;
5
+ //# sourceMappingURL=streaming.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["../src/streaming.ts"],"names":[],"mappings":"AASA,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAEtE,cAAc,mBAAmB,CAAC;AAElC,uFAAuF;AACvF,wBAAgB,SAAS,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEzE"}
@@ -0,0 +1,14 @@
1
+ // Copyright (c) Miso Labs, Inc.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ /**
4
+ * Streaming transcodes as the platform sees them: the `miso-hls/v1` contract
5
+ * from `@misofm/streaming`, plus where a client reads a track's items from.
6
+ */
7
+ import { MASTER_PLAYLIST, quiltItemUrl } from "@misofm/streaming";
8
+ import { walrusAggregatorUrl } from "./walrus.js";
9
+ export * from "@misofm/streaming";
10
+ /** The master playlist URL for a track's transcode Quilt on a network's aggregator. */
11
+ export function streamUrl(network, quiltId) {
12
+ return quiltItemUrl(walrusAggregatorUrl(network), quiltId, MASTER_PLAYLIST);
13
+ }
14
+ //# sourceMappingURL=streaming.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"streaming.js","sourceRoot":"","sources":["../src/streaming.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAEtC;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAsB,MAAM,aAAa,CAAC;AAEtE,cAAc,mBAAmB,CAAC;AAElC,uFAAuF;AACvF,MAAM,UAAU,SAAS,CAAC,OAAsB,EAAE,OAAe;IAC/D,OAAO,YAAY,CAAC,mBAAmB,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC;AAC9E,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Walrus facts the platform depends on that no contract module should know:
3
+ * the shard configuration ids are derived against, how long Miso stores
4
+ * published blobs, and where clients read them from.
5
+ */
6
+ /**
7
+ * Shard count of the Walrus committees Miso publishes to. Blob and Quilt ids
8
+ * depend on it, so `put` and `prepare` derive ids against this constant
9
+ * offline, and `store` must assert the live committee still reports it
10
+ * before uploading. Testnet and mainnet both run 1000 shards.
11
+ */
12
+ export declare const WALRUS_N_SHARDS = 1000;
13
+ /**
14
+ * Initial storage duration for every blob Miso publishes. A mainnet Walrus
15
+ * epoch is two weeks, so four epochs is eight weeks; blobs are shared and
16
+ * permanent, so anyone can extend them. Not a release.json field: publication
17
+ * policy is the platform's, not the release owner's.
18
+ */
19
+ export declare const WALRUS_STORAGE_EPOCHS = 4;
20
+ /**
21
+ * Published blobs are permanent (not deletable) and wrapped as shared blob
22
+ * objects, so anyone, not only the publisher, can fund an extension when the
23
+ * storage period nears its end.
24
+ */
25
+ export declare const WALRUS_BLOBS_DELETABLE = false;
26
+ export declare const WALRUS_BLOBS_SHARED = true;
27
+ export type WalrusNetwork = "testnet" | "mainnet";
28
+ /**
29
+ * Where clients read published blobs and Quilt items. A Miso CDN
30
+ * (`cdn.miso.fm`) will front this later; the URL shape stays the same.
31
+ */
32
+ export declare function walrusAggregatorUrl(network: WalrusNetwork): string;
33
+ /**
34
+ * Miso's private Walrus publisher for a network, the storage counterpart of
35
+ * the Onara gas sponsors. Reachable only from the Fly organization network
36
+ * (WireGuard or a machine inside it); it pays SUI and WAL from its own wallet.
37
+ */
38
+ export declare function walrusPublisherUrl(network: WalrusNetwork): string;
39
+ /** Query string every Miso upload sends to the publisher: permanent, shared, four epochs. */
40
+ export declare function walrusPublishQuery(): string;
41
+ //# sourceMappingURL=walrus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"walrus.d.ts","sourceRoot":"","sources":["../src/walrus.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,eAAe,OAAO,CAAC;AAEpC;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,QAAQ,CAAC;AAC5C,eAAO,MAAM,mBAAmB,OAAO,CAAC;AAExC,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,CAAC;AAElD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,CAElE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,CAEjE;AAED,6FAA6F;AAC7F,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C"}
package/dist/walrus.js ADDED
@@ -0,0 +1,48 @@
1
+ // Copyright (c) Miso Labs, Inc.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ /**
4
+ * Walrus facts the platform depends on that no contract module should know:
5
+ * the shard configuration ids are derived against, how long Miso stores
6
+ * published blobs, and where clients read them from.
7
+ */
8
+ /**
9
+ * Shard count of the Walrus committees Miso publishes to. Blob and Quilt ids
10
+ * depend on it, so `put` and `prepare` derive ids against this constant
11
+ * offline, and `store` must assert the live committee still reports it
12
+ * before uploading. Testnet and mainnet both run 1000 shards.
13
+ */
14
+ export const WALRUS_N_SHARDS = 1000;
15
+ /**
16
+ * Initial storage duration for every blob Miso publishes. A mainnet Walrus
17
+ * epoch is two weeks, so four epochs is eight weeks; blobs are shared and
18
+ * permanent, so anyone can extend them. Not a release.json field: publication
19
+ * policy is the platform's, not the release owner's.
20
+ */
21
+ export const WALRUS_STORAGE_EPOCHS = 4;
22
+ /**
23
+ * Published blobs are permanent (not deletable) and wrapped as shared blob
24
+ * objects, so anyone, not only the publisher, can fund an extension when the
25
+ * storage period nears its end.
26
+ */
27
+ export const WALRUS_BLOBS_DELETABLE = false;
28
+ export const WALRUS_BLOBS_SHARED = true;
29
+ /**
30
+ * Where clients read published blobs and Quilt items. A Miso CDN
31
+ * (`cdn.miso.fm`) will front this later; the URL shape stays the same.
32
+ */
33
+ export function walrusAggregatorUrl(network) {
34
+ return `https://aggregator.${network}.walrus.mirai.cloud`;
35
+ }
36
+ /**
37
+ * Miso's private Walrus publisher for a network, the storage counterpart of
38
+ * the Onara gas sponsors. Reachable only from the Fly organization network
39
+ * (WireGuard or a machine inside it); it pays SUI and WAL from its own wallet.
40
+ */
41
+ export function walrusPublisherUrl(network) {
42
+ return `http://walrus-publisher-${network}.flycast`;
43
+ }
44
+ /** Query string every Miso upload sends to the publisher: permanent, shared, four epochs. */
45
+ export function walrusPublishQuery() {
46
+ return `epochs=${WALRUS_STORAGE_EPOCHS}&permanent=true&share=true`;
47
+ }
48
+ //# sourceMappingURL=walrus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"walrus.js","sourceRoot":"","sources":["../src/walrus.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAEtC;;;;GAIG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC;AAEpC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAEvC;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,CAAC;AAC5C,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC;AAIxC;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAsB;IACxD,OAAO,sBAAsB,OAAO,qBAAqB,CAAC;AAC5D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAAsB;IACvD,OAAO,2BAA2B,OAAO,UAAU,CAAC;AACtD,CAAC;AAED,6FAA6F;AAC7F,MAAM,UAAU,kBAAkB;IAChC,OAAO,UAAU,qBAAqB,4BAA4B,CAAC;AACrE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@misofm/platform",
3
- "version": "0.21.1",
3
+ "version": "0.22.1",
4
4
  "packageManager": "bun@1.4.0",
5
5
  "description": "Complete client SDK for the Miso platform on Sui \u2014 high-level reads, pressings, listings, records, and work publishing.",
6
6
  "license": "Apache-2.0",
@@ -89,6 +89,14 @@
89
89
  "types": "./dist/recording-extensions.d.ts",
90
90
  "default": "./dist/recording-extensions.js"
91
91
  },
92
+ "./streaming": {
93
+ "types": "./dist/streaming.d.ts",
94
+ "default": "./dist/streaming.js"
95
+ },
96
+ "./walrus": {
97
+ "types": "./dist/walrus.d.ts",
98
+ "default": "./dist/walrus.js"
99
+ },
92
100
  "./read": {
93
101
  "types": "./dist/read/index.d.ts",
94
102
  "default": "./dist/read/index.js"
@@ -125,7 +133,8 @@
125
133
  "prepare": "rm -rf dist && tsc -p tsconfig.build.json --noCheck"
126
134
  },
127
135
  "dependencies": {
128
- "@misofm/protocol": "0.15.0",
136
+ "@misofm/streaming": "0.1.0",
137
+ "@misofm/protocol": "0.16.0",
129
138
  "@mysten/bcs": "^2.1.1"
130
139
  },
131
140
  "devDependencies": {
package/src/index.ts CHANGED
@@ -50,6 +50,8 @@ export * from "./release-graph.ts";
50
50
  export * from "./publication.ts";
51
51
  export * from "./catalog.ts";
52
52
  export * from "./walrus-ids.ts";
53
+ export * from "./streaming.ts";
54
+ export * from "./walrus.ts";
53
55
 
54
56
  // High-level, JSON-safe platform projections used directly by clients and by
55
57
  // the thin HTTP read service. Namespaced because these composed view types are
@@ -0,0 +1,17 @@
1
+ // Copyright (c) Miso Labs, Inc.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ /**
5
+ * Streaming transcodes as the platform sees them: the `miso-hls/v1` contract
6
+ * from `@misofm/streaming`, plus where a client reads a track's items from.
7
+ */
8
+
9
+ import { MASTER_PLAYLIST, quiltItemUrl } from "@misofm/streaming";
10
+ import { walrusAggregatorUrl, type WalrusNetwork } from "./walrus.ts";
11
+
12
+ export * from "@misofm/streaming";
13
+
14
+ /** The master playlist URL for a track's transcode Quilt on a network's aggregator. */
15
+ export function streamUrl(network: WalrusNetwork, quiltId: string): string {
16
+ return quiltItemUrl(walrusAggregatorUrl(network), quiltId, MASTER_PLAYLIST);
17
+ }
package/src/walrus.ts ADDED
@@ -0,0 +1,56 @@
1
+ // Copyright (c) Miso Labs, Inc.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ /**
5
+ * Walrus facts the platform depends on that no contract module should know:
6
+ * the shard configuration ids are derived against, how long Miso stores
7
+ * published blobs, and where clients read them from.
8
+ */
9
+
10
+ /**
11
+ * Shard count of the Walrus committees Miso publishes to. Blob and Quilt ids
12
+ * depend on it, so `put` and `prepare` derive ids against this constant
13
+ * offline, and `store` must assert the live committee still reports it
14
+ * before uploading. Testnet and mainnet both run 1000 shards.
15
+ */
16
+ export const WALRUS_N_SHARDS = 1000;
17
+
18
+ /**
19
+ * Initial storage duration for every blob Miso publishes. A mainnet Walrus
20
+ * epoch is two weeks, so four epochs is eight weeks; blobs are shared and
21
+ * permanent, so anyone can extend them. Not a release.json field: publication
22
+ * policy is the platform's, not the release owner's.
23
+ */
24
+ export const WALRUS_STORAGE_EPOCHS = 4;
25
+
26
+ /**
27
+ * Published blobs are permanent (not deletable) and wrapped as shared blob
28
+ * objects, so anyone, not only the publisher, can fund an extension when the
29
+ * storage period nears its end.
30
+ */
31
+ export const WALRUS_BLOBS_DELETABLE = false;
32
+ export const WALRUS_BLOBS_SHARED = true;
33
+
34
+ export type WalrusNetwork = "testnet" | "mainnet";
35
+
36
+ /**
37
+ * Where clients read published blobs and Quilt items. A Miso CDN
38
+ * (`cdn.miso.fm`) will front this later; the URL shape stays the same.
39
+ */
40
+ export function walrusAggregatorUrl(network: WalrusNetwork): string {
41
+ return `https://aggregator.${network}.walrus.mirai.cloud`;
42
+ }
43
+
44
+ /**
45
+ * Miso's private Walrus publisher for a network, the storage counterpart of
46
+ * the Onara gas sponsors. Reachable only from the Fly organization network
47
+ * (WireGuard or a machine inside it); it pays SUI and WAL from its own wallet.
48
+ */
49
+ export function walrusPublisherUrl(network: WalrusNetwork): string {
50
+ return `http://walrus-publisher-${network}.flycast`;
51
+ }
52
+
53
+ /** Query string every Miso upload sends to the publisher: permanent, shared, four epochs. */
54
+ export function walrusPublishQuery(): string {
55
+ return `epochs=${WALRUS_STORAGE_EPOCHS}&permanent=true&share=true`;
56
+ }