space-data-module-sdk 0.6.0 → 0.7.0
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/README.md +15 -2
- package/package.json +6 -2
- package/schemas/orbpro/BaseTypes.fbs +7 -0
- package/schemas/orbpro/CatalogQueryBase.fbs +8 -0
- package/schemas/orbpro/CatalogQueryRequest.fbs +14 -0
- package/schemas/orbpro/CatalogQueryResult.fbs +17 -0
- package/schemas/orbpro/EntityMetadata.fbs +53 -0
- package/schemas/orbpro/EntityStandardsLink.fbs +18 -0
- package/schemas/orbpro/Plugin.fbs +8 -0
- package/schemas/orbpro/Propagator.fbs +89 -0
- package/schemas/orbpro/StandardsRecordIndex.fbs +15 -0
- package/src/browser.js +1 -0
- package/src/generated/orbpro/entity/entity-kind.js +15 -0
- package/src/generated/orbpro/entity/entity-kind.ts +15 -0
- package/src/generated/orbpro/entity/entity-metadata.js +322 -0
- package/src/generated/orbpro/entity/entity-metadata.ts +426 -0
- package/src/generated/orbpro/entity/entity-standards-link.js +143 -0
- package/src/generated/orbpro/entity/entity-standards-link.ts +183 -0
- package/src/generated/orbpro/entity/standards-record-index.js +115 -0
- package/src/generated/orbpro/entity/standards-record-index.ts +147 -0
- package/src/generated/orbpro/entity.js +10 -0
- package/src/generated/orbpro/entity.ts +5 -0
- package/src/generated/orbpro/plugin/raw-data-payload.js +79 -0
- package/src/generated/orbpro/plugin/raw-data-payload.ts +92 -0
- package/src/generated/orbpro/plugin.js +4 -0
- package/src/generated/orbpro/plugin.ts +5 -0
- package/src/generated/orbpro/propagator/propagator-describe-sources-batch-request.js +79 -0
- package/src/generated/orbpro/propagator/propagator-describe-sources-batch-request.ts +95 -0
- package/src/generated/orbpro/propagator/propagator-describe-sources-batch-result.js +70 -0
- package/src/generated/orbpro/propagator/propagator-describe-sources-batch-result.ts +78 -0
- package/src/generated/orbpro/propagator/propagator-sample-trajectory-states-request.js +97 -0
- package/src/generated/orbpro/propagator/propagator-sample-trajectory-states-request.ts +117 -0
- package/src/generated/orbpro/propagator/propagator-sample-trajectory-states-result.js +140 -0
- package/src/generated/orbpro/propagator/propagator-sample-trajectory-states-result.ts +175 -0
- package/src/generated/orbpro/propagator/propagator-source-description.js +208 -0
- package/src/generated/orbpro/propagator/propagator-source-description.ts +257 -0
- package/src/generated/orbpro/propagator/propagator-source-kind.js +8 -0
- package/src/generated/orbpro/propagator/propagator-source-kind.ts +8 -0
- package/src/generated/orbpro/propagator/reference-frame.js +12 -0
- package/src/generated/orbpro/propagator/reference-frame.ts +12 -0
- package/src/generated/orbpro/propagator/state-flags.js +13 -0
- package/src/generated/orbpro/propagator/state-flags.ts +13 -0
- package/src/generated/orbpro/propagator/state-vector.js +55 -0
- package/src/generated/orbpro/propagator/state-vector.ts +61 -0
- package/src/generated/orbpro/propagator.js +20 -0
- package/src/generated/orbpro/propagator.ts +13 -0
- package/src/generated/orbpro/query/catalog-query-kind.js +10 -0
- package/src/generated/orbpro/query/catalog-query-kind.ts +10 -0
- package/src/generated/orbpro/query/catalog-query-request.js +89 -0
- package/src/generated/orbpro/query/catalog-query-request.ts +105 -0
- package/src/generated/orbpro/query/catalog-query-result.js +145 -0
- package/src/generated/orbpro/query/catalog-query-result.ts +179 -0
- package/src/generated/orbpro/query.js +8 -0
- package/src/generated/orbpro/query.ts +4 -0
- package/src/generated/orbpro/vec3.js +39 -0
- package/src/generated/orbpro/vec3.ts +40 -0
- package/src/host/abi.js +158 -0
- package/src/host/browserEdgeShims.js +17 -4
- package/src/host/browserHost.js +260 -48
- package/src/host/isomorphicLoader.js +3 -2
- package/src/host/nodeHost.js +168 -71
- package/src/index.d.ts +287 -3
- package/src/index.js +1 -0
- package/src/licensing/index.d.ts +20 -0
- package/src/licensing/index.js +11 -0
- package/src/licensing/records.js +858 -0
- package/src/runtime-host/index.js +34 -0
- package/src/testing/browserModuleHarness.js +16 -3
- package/src/testing/index.d.ts +1 -0
- package/src/testing/index.js +5 -4
package/src/index.d.ts
CHANGED
|
@@ -409,6 +409,18 @@ export interface RuntimeHost {
|
|
|
409
409
|
rows: FlatSqlRuntimeStore;
|
|
410
410
|
regions: RuntimeRegionStore;
|
|
411
411
|
moduleRegistry: RuntimeModuleRegistry;
|
|
412
|
+
listCapabilities(): string[];
|
|
413
|
+
listSupportedCapabilities(): string[];
|
|
414
|
+
listOperations(): string[];
|
|
415
|
+
hasCapability(capability: string): boolean;
|
|
416
|
+
getCapability(capability: string): Record<string, (...args: any[]) => unknown> | null;
|
|
417
|
+
registerCapability(
|
|
418
|
+
capability: string,
|
|
419
|
+
adapter: Record<string, (...args: any[]) => unknown>,
|
|
420
|
+
): Record<string, (...args: any[]) => unknown>;
|
|
421
|
+
unregisterCapability(capability: string): boolean;
|
|
422
|
+
invokeCapability(operation: string, params?: Record<string, any>): Promise<unknown>;
|
|
423
|
+
invoke(operation: string, params?: Record<string, any>): Promise<unknown>;
|
|
412
424
|
}
|
|
413
425
|
|
|
414
426
|
export function createFlatBufferStreamIngestor(options?: {
|
|
@@ -1117,13 +1129,21 @@ export interface BrowserEdgeShims {
|
|
|
1117
1129
|
now(): number;
|
|
1118
1130
|
timeOrigin: number;
|
|
1119
1131
|
};
|
|
1132
|
+
network?: Record<string, (...args: any[]) => unknown> | null;
|
|
1133
|
+
ipfs?: Record<string, (...args: any[]) => unknown> | null;
|
|
1134
|
+
walletSign?: Record<string, (...args: any[]) => unknown> | null;
|
|
1135
|
+
protocolHandle?: Record<string, (...args: any[]) => unknown> | null;
|
|
1136
|
+
protocolDial?: Record<string, (...args: any[]) => unknown> | null;
|
|
1120
1137
|
filesystem?: BrowserFilesystemShim;
|
|
1138
|
+
filesystemRoot?: string;
|
|
1139
|
+
capabilityAdapters?: Record<string, Record<string, (...args: any[]) => unknown>>;
|
|
1121
1140
|
}
|
|
1122
1141
|
|
|
1123
1142
|
export interface BrowserHostOptions {
|
|
1124
1143
|
capabilities?: string[];
|
|
1125
1144
|
edgeShims?: BrowserEdgeShims;
|
|
1126
1145
|
contextStore?: Map<string, Map<string, unknown>>;
|
|
1146
|
+
wasmWallet?: unknown;
|
|
1127
1147
|
fetch?: (...args: any[]) => Promise<any>;
|
|
1128
1148
|
WebSocket?: any;
|
|
1129
1149
|
crypto?: any;
|
|
@@ -1133,6 +1153,12 @@ export interface BrowserHostOptions {
|
|
|
1133
1153
|
};
|
|
1134
1154
|
filesystem?: BrowserFilesystemShim;
|
|
1135
1155
|
filesystemRoot?: string;
|
|
1156
|
+
network?: Record<string, (...args: any[]) => unknown> | null;
|
|
1157
|
+
ipfs?: Record<string, (...args: any[]) => unknown> | null;
|
|
1158
|
+
walletSign?: Record<string, (...args: any[]) => unknown> | null;
|
|
1159
|
+
protocolHandle?: Record<string, (...args: any[]) => unknown> | null;
|
|
1160
|
+
protocolDial?: Record<string, (...args: any[]) => unknown> | null;
|
|
1161
|
+
capabilityAdapters?: Record<string, Record<string, (...args: any[]) => unknown>>;
|
|
1136
1162
|
}
|
|
1137
1163
|
|
|
1138
1164
|
export interface NodeHostOptions {
|
|
@@ -1156,6 +1182,40 @@ export interface NodeHostOptions {
|
|
|
1156
1182
|
contextStore?: NodeHostContextStore;
|
|
1157
1183
|
fetch?: (...args: any[]) => Promise<any>;
|
|
1158
1184
|
WebSocket?: any;
|
|
1185
|
+
filesystem?: {
|
|
1186
|
+
resolvePath(path: string): string;
|
|
1187
|
+
readFile(
|
|
1188
|
+
path: string,
|
|
1189
|
+
options?: { encoding?: string | null },
|
|
1190
|
+
): Promise<string | Uint8Array>;
|
|
1191
|
+
writeFile(
|
|
1192
|
+
path: string,
|
|
1193
|
+
value: Uint8Array | ArrayBuffer | ArrayBufferView | string,
|
|
1194
|
+
options?: { encoding?: string | null },
|
|
1195
|
+
): Promise<{ path: string }>;
|
|
1196
|
+
appendFile(
|
|
1197
|
+
path: string,
|
|
1198
|
+
value: Uint8Array | ArrayBuffer | ArrayBufferView | string,
|
|
1199
|
+
options?: { encoding?: string | null },
|
|
1200
|
+
): Promise<{ path: string }>;
|
|
1201
|
+
deleteFile(path: string): Promise<{ path: string }>;
|
|
1202
|
+
mkdir(
|
|
1203
|
+
path: string,
|
|
1204
|
+
options?: { recursive?: boolean },
|
|
1205
|
+
): Promise<{ path: string }>;
|
|
1206
|
+
readdir(path?: string): Promise<NodeHostFilesystemEntry[]>;
|
|
1207
|
+
stat(path: string): Promise<NodeHostFilesystemStat>;
|
|
1208
|
+
rename(
|
|
1209
|
+
fromPath: string,
|
|
1210
|
+
toPath: string,
|
|
1211
|
+
): Promise<{ from: string; to: string }>;
|
|
1212
|
+
} | null;
|
|
1213
|
+
network?: Record<string, (...args: any[]) => unknown> | null;
|
|
1214
|
+
ipfs?: Record<string, (...args: any[]) => unknown> | null;
|
|
1215
|
+
walletSign?: Record<string, (...args: any[]) => unknown> | null;
|
|
1216
|
+
protocolHandle?: Record<string, (...args: any[]) => unknown> | null;
|
|
1217
|
+
protocolDial?: Record<string, (...args: any[]) => unknown> | null;
|
|
1218
|
+
capabilityAdapters?: Record<string, Record<string, (...args: any[]) => unknown>>;
|
|
1159
1219
|
}
|
|
1160
1220
|
|
|
1161
1221
|
export class HostCapabilityError extends Error {
|
|
@@ -1468,16 +1528,51 @@ export class BrowserHost {
|
|
|
1468
1528
|
crypto: {
|
|
1469
1529
|
sha256(data: Uint8Array | ArrayBuffer | ArrayBufferView | string): Promise<Uint8Array>;
|
|
1470
1530
|
sha512(data: Uint8Array | ArrayBuffer | ArrayBufferView | string): Promise<Uint8Array>;
|
|
1531
|
+
hkdf(options: {
|
|
1532
|
+
ikm: Uint8Array | ArrayBuffer | ArrayBufferView | number[];
|
|
1533
|
+
salt: Uint8Array | ArrayBuffer | ArrayBufferView | number[];
|
|
1534
|
+
info?: Uint8Array | ArrayBuffer | ArrayBufferView | number[];
|
|
1535
|
+
length: number;
|
|
1536
|
+
}): Promise<Uint8Array>;
|
|
1471
1537
|
aesGcmEncrypt(options: {
|
|
1472
1538
|
key: Uint8Array | ArrayBuffer | ArrayBufferView;
|
|
1473
1539
|
plaintext: Uint8Array | ArrayBuffer | ArrayBufferView;
|
|
1474
1540
|
iv?: Uint8Array | ArrayBuffer | ArrayBufferView;
|
|
1475
|
-
|
|
1541
|
+
aad?: Uint8Array | ArrayBuffer | ArrayBufferView | number[] | null;
|
|
1542
|
+
}): Promise<{
|
|
1543
|
+
ciphertext: Uint8Array;
|
|
1544
|
+
tag: Uint8Array;
|
|
1545
|
+
iv: Uint8Array | ArrayBuffer | ArrayBufferView;
|
|
1546
|
+
}>;
|
|
1476
1547
|
aesGcmDecrypt(options: {
|
|
1477
1548
|
key: Uint8Array | ArrayBuffer | ArrayBufferView;
|
|
1478
1549
|
ciphertext: Uint8Array | ArrayBuffer | ArrayBufferView;
|
|
1550
|
+
tag: Uint8Array | ArrayBuffer | ArrayBufferView;
|
|
1479
1551
|
iv: Uint8Array | ArrayBuffer | ArrayBufferView;
|
|
1552
|
+
aad?: Uint8Array | ArrayBuffer | ArrayBufferView | number[] | null;
|
|
1480
1553
|
}): Promise<Uint8Array>;
|
|
1554
|
+
generateX25519Keypair(): Promise<X25519Keypair>;
|
|
1555
|
+
x25519PublicKey(
|
|
1556
|
+
privateKey: Uint8Array | ArrayBuffer | ArrayBufferView | number[],
|
|
1557
|
+
): Promise<Uint8Array>;
|
|
1558
|
+
x25519SharedSecret(
|
|
1559
|
+
privateKey: Uint8Array | ArrayBuffer | ArrayBufferView | number[],
|
|
1560
|
+
publicKey: Uint8Array | ArrayBuffer | ArrayBufferView | number[],
|
|
1561
|
+
): Promise<Uint8Array>;
|
|
1562
|
+
ed25519: {
|
|
1563
|
+
publicKeyFromSeed(
|
|
1564
|
+
seed: Uint8Array | ArrayBuffer | ArrayBufferView | number[],
|
|
1565
|
+
): Promise<Uint8Array>;
|
|
1566
|
+
sign(
|
|
1567
|
+
message: Uint8Array | ArrayBuffer | ArrayBufferView | number[],
|
|
1568
|
+
seed: Uint8Array | ArrayBuffer | ArrayBufferView | number[],
|
|
1569
|
+
): Promise<Uint8Array>;
|
|
1570
|
+
verify(
|
|
1571
|
+
message: Uint8Array | ArrayBuffer | ArrayBufferView | number[],
|
|
1572
|
+
signature: Uint8Array | ArrayBuffer | ArrayBufferView | number[],
|
|
1573
|
+
publicKey: Uint8Array | ArrayBuffer | ArrayBufferView | number[],
|
|
1574
|
+
): Promise<boolean>;
|
|
1575
|
+
};
|
|
1481
1576
|
};
|
|
1482
1577
|
filesystem: BrowserFilesystemShim;
|
|
1483
1578
|
constructor(options?: BrowserHostOptions);
|
|
@@ -1576,6 +1671,7 @@ export interface BrowserModuleHarness {
|
|
|
1576
1671
|
host: BrowserHost;
|
|
1577
1672
|
bridge: HostcallBridge | null;
|
|
1578
1673
|
wasi: BrowserWasiShim;
|
|
1674
|
+
callHost(operation: string, params?: Record<string, any>): Promise<unknown>;
|
|
1579
1675
|
invokeRaw(
|
|
1580
1676
|
requestBytes: Uint8Array | ArrayBuffer | ArrayBufferView,
|
|
1581
1677
|
): Promise<Uint8Array>;
|
|
@@ -1594,7 +1690,7 @@ export interface BrowserModuleHarness {
|
|
|
1594
1690
|
export function detectArtifactProfile(wasmModule: WebAssembly.Module): string;
|
|
1595
1691
|
export function createBrowserModuleHarness(options?: {
|
|
1596
1692
|
wasmSource: Uint8Array | ArrayBuffer | string | WebAssembly.Module | unknown;
|
|
1597
|
-
host?: BrowserHost
|
|
1693
|
+
host?: BrowserHost | RuntimeHost | Record<string, unknown>;
|
|
1598
1694
|
hostOptions?: BrowserHostOptions;
|
|
1599
1695
|
args?: string[];
|
|
1600
1696
|
env?: Record<string, string>;
|
|
@@ -1665,7 +1761,7 @@ export function createModuleFlatBufferStreamPump(options: {
|
|
|
1665
1761
|
}): ModuleFlatBufferStreamPump;
|
|
1666
1762
|
export function loadModule(options?: {
|
|
1667
1763
|
wasmSource: Uint8Array | ArrayBuffer | string | WebAssembly.Module | unknown;
|
|
1668
|
-
host?: BrowserHost
|
|
1764
|
+
host?: BrowserHost | RuntimeHost | Record<string, unknown>;
|
|
1669
1765
|
hostOptions?: BrowserHostOptions;
|
|
1670
1766
|
args?: string[];
|
|
1671
1767
|
env?: Record<string, string | undefined>;
|
|
@@ -1687,6 +1783,194 @@ export function inspectModule(source: Uint8Array | ArrayBuffer | WebAssembly.Mod
|
|
|
1687
1783
|
imports: WebAssembly.ModuleImportDescriptor[];
|
|
1688
1784
|
}>;
|
|
1689
1785
|
|
|
1786
|
+
// --- Licensing ---
|
|
1787
|
+
|
|
1788
|
+
export class LicensingProtocolError extends Error {
|
|
1789
|
+
code: string;
|
|
1790
|
+
constructor(code: string, message: string);
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
export interface LicensingChallengeMessage {
|
|
1794
|
+
messageType: string;
|
|
1795
|
+
role: string;
|
|
1796
|
+
reqId: string;
|
|
1797
|
+
moduleId: string;
|
|
1798
|
+
moduleVersion?: string;
|
|
1799
|
+
requesterPeerId?: string;
|
|
1800
|
+
requesterXpub?: string;
|
|
1801
|
+
requesterSigningPublicKey?: Uint8Array;
|
|
1802
|
+
requesterEphemeralPublicKey?: Uint8Array;
|
|
1803
|
+
requestedDomain?: string;
|
|
1804
|
+
requestedTimeoutMs?: number;
|
|
1805
|
+
requestedAtMs?: number;
|
|
1806
|
+
challengeNonce?: Uint8Array;
|
|
1807
|
+
expiresAtMs?: number;
|
|
1808
|
+
providerPeerId?: string;
|
|
1809
|
+
errorCode?: string;
|
|
1810
|
+
errorMessage?: string;
|
|
1811
|
+
rawBytes: Uint8Array;
|
|
1812
|
+
}
|
|
1813
|
+
|
|
1814
|
+
export interface LicensingProofMessage {
|
|
1815
|
+
messageType: string;
|
|
1816
|
+
reqId: string;
|
|
1817
|
+
moduleId: string;
|
|
1818
|
+
moduleVersion?: string;
|
|
1819
|
+
requesterPeerId?: string;
|
|
1820
|
+
requesterXpub?: string;
|
|
1821
|
+
requestedDomain?: string;
|
|
1822
|
+
requestedTimeoutMs: number;
|
|
1823
|
+
requesterEphemeralPublicKey: Uint8Array;
|
|
1824
|
+
challengeNonce: Uint8Array;
|
|
1825
|
+
challengeExpiresAtMs: number;
|
|
1826
|
+
providerPeerId?: string;
|
|
1827
|
+
signature: Uint8Array;
|
|
1828
|
+
requesterSigningPublicKey: Uint8Array;
|
|
1829
|
+
timestampMs: number;
|
|
1830
|
+
rejectionCode?: string;
|
|
1831
|
+
rejectionMessage?: string;
|
|
1832
|
+
rawBytes: Uint8Array;
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
export interface LicensingGrantModuleDescriptor {
|
|
1836
|
+
cid: string;
|
|
1837
|
+
contentHash: Uint8Array;
|
|
1838
|
+
sizeBytes: number;
|
|
1839
|
+
moduleId: string;
|
|
1840
|
+
moduleVersion?: string;
|
|
1841
|
+
requiredScope?: string;
|
|
1842
|
+
keyId?: string;
|
|
1843
|
+
allowedDomains: string[];
|
|
1844
|
+
maxGrantTimeoutMs: number;
|
|
1845
|
+
encrypted: boolean;
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
export interface LicensingWrappedContentKeyHeader {
|
|
1849
|
+
version: number;
|
|
1850
|
+
keyExchange: string;
|
|
1851
|
+
symmetric: string;
|
|
1852
|
+
keyDerivation: string;
|
|
1853
|
+
ephemeralPublicKey: Uint8Array;
|
|
1854
|
+
nonceStart: Uint8Array;
|
|
1855
|
+
recipientKeyId: Uint8Array;
|
|
1856
|
+
context?: string;
|
|
1857
|
+
schemaHash: Uint8Array;
|
|
1858
|
+
rootType?: string;
|
|
1859
|
+
timestamp?: number;
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
export interface LicensingWrappedContentKey {
|
|
1863
|
+
wrappingAlgorithm: string;
|
|
1864
|
+
contentKeyId?: string;
|
|
1865
|
+
contentKeyRole?: string;
|
|
1866
|
+
contentKeyAlgorithm?: string;
|
|
1867
|
+
contentKeyEncoding?: string;
|
|
1868
|
+
keyBytes: Uint8Array;
|
|
1869
|
+
contentKeyVersion?: number;
|
|
1870
|
+
recipientKeyId?: string;
|
|
1871
|
+
requesterEphemeralPublicKey: Uint8Array;
|
|
1872
|
+
providerEphemeralPublicKey: Uint8Array;
|
|
1873
|
+
hkdfSalt: Uint8Array;
|
|
1874
|
+
iv: Uint8Array;
|
|
1875
|
+
ciphertext: Uint8Array;
|
|
1876
|
+
tag: Uint8Array;
|
|
1877
|
+
expiresAtMs: number;
|
|
1878
|
+
recipientPublicKey: Uint8Array;
|
|
1879
|
+
ephemeralPublicKey: Uint8Array;
|
|
1880
|
+
nonce: Uint8Array;
|
|
1881
|
+
header: LicensingWrappedContentKeyHeader;
|
|
1882
|
+
encryptedPayload: Uint8Array;
|
|
1883
|
+
recipientKeyIdBytes: Uint8Array;
|
|
1884
|
+
schemaHash: Uint8Array;
|
|
1885
|
+
keyMaterialRootType?: string;
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
export interface LicensingGrantMessage {
|
|
1889
|
+
messageType: string;
|
|
1890
|
+
reqId: string;
|
|
1891
|
+
moduleId: string;
|
|
1892
|
+
moduleVersion?: string;
|
|
1893
|
+
requesterPeerId?: string;
|
|
1894
|
+
requesterXpub?: string;
|
|
1895
|
+
requestedDomain?: string;
|
|
1896
|
+
requestedTimeoutMs: number;
|
|
1897
|
+
grantedDomain?: string;
|
|
1898
|
+
grantedTimeoutMs: number;
|
|
1899
|
+
expiresAtMs: number;
|
|
1900
|
+
requiredScope?: string;
|
|
1901
|
+
grantStatus?: string;
|
|
1902
|
+
denialReason?: string;
|
|
1903
|
+
capabilityToken: Uint8Array;
|
|
1904
|
+
grantVerifierPublicKey: Uint8Array;
|
|
1905
|
+
providerSignature: Uint8Array;
|
|
1906
|
+
moduleDescriptor: LicensingGrantModuleDescriptor | null;
|
|
1907
|
+
wrappedContentKey: LicensingWrappedContentKey | null;
|
|
1908
|
+
rawBytes: Uint8Array;
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
export function encodeLicensingChallengeRequest(options: {
|
|
1912
|
+
reqId: string;
|
|
1913
|
+
moduleId: string;
|
|
1914
|
+
moduleVersion?: string;
|
|
1915
|
+
requesterPeerId: string;
|
|
1916
|
+
requesterXpub?: string;
|
|
1917
|
+
requesterSigningPublicKey: Uint8Array;
|
|
1918
|
+
requesterEphemeralPublicKey: Uint8Array;
|
|
1919
|
+
requesterDomain: string;
|
|
1920
|
+
requestedTimeoutMs: number;
|
|
1921
|
+
requestedAtMs: number;
|
|
1922
|
+
providerPeerId: string;
|
|
1923
|
+
}): Uint8Array;
|
|
1924
|
+
|
|
1925
|
+
export function decodeLicensingChallengeMessage(
|
|
1926
|
+
bytes: Uint8Array | ArrayBuffer | ArrayBufferView,
|
|
1927
|
+
): LicensingChallengeMessage;
|
|
1928
|
+
|
|
1929
|
+
export function encodeLicensingProof(options: {
|
|
1930
|
+
reqId: string;
|
|
1931
|
+
moduleId: string;
|
|
1932
|
+
moduleVersion?: string;
|
|
1933
|
+
requesterPeerId: string;
|
|
1934
|
+
requesterXpub?: string;
|
|
1935
|
+
requesterDomain: string;
|
|
1936
|
+
requestedTimeoutMs: number;
|
|
1937
|
+
requesterEphemeralPublicKey: Uint8Array;
|
|
1938
|
+
challengeNonce: Uint8Array;
|
|
1939
|
+
challengeExpiresAtMs: number;
|
|
1940
|
+
providerPeerId: string;
|
|
1941
|
+
signature: Uint8Array;
|
|
1942
|
+
requesterSigningPublicKey: Uint8Array;
|
|
1943
|
+
timestampMs: number;
|
|
1944
|
+
}): Uint8Array;
|
|
1945
|
+
|
|
1946
|
+
export function decodeLicensingProofMessage(
|
|
1947
|
+
bytes: Uint8Array | ArrayBuffer | ArrayBufferView,
|
|
1948
|
+
): LicensingProofMessage;
|
|
1949
|
+
|
|
1950
|
+
export function decodeLicensingGrant(
|
|
1951
|
+
bytes: Uint8Array | ArrayBuffer | ArrayBufferView,
|
|
1952
|
+
): LicensingGrantMessage;
|
|
1953
|
+
|
|
1954
|
+
export function validateLicensingGrant(
|
|
1955
|
+
grant: LicensingGrantMessage,
|
|
1956
|
+
options?: {
|
|
1957
|
+
reqId?: string;
|
|
1958
|
+
moduleId?: string;
|
|
1959
|
+
moduleVersion?: string;
|
|
1960
|
+
expectedDomain?: string;
|
|
1961
|
+
requestedTimeoutMs?: number;
|
|
1962
|
+
grantVerifierPublicKeyLength?: number;
|
|
1963
|
+
},
|
|
1964
|
+
): LicensingGrantMessage;
|
|
1965
|
+
|
|
1966
|
+
export function extractGrantModuleDescriptor(
|
|
1967
|
+
grant: LicensingGrantMessage,
|
|
1968
|
+
): LicensingGrantModuleDescriptor;
|
|
1969
|
+
|
|
1970
|
+
export function extractWrappedContentKey(
|
|
1971
|
+
grant: LicensingGrantMessage,
|
|
1972
|
+
): LicensingWrappedContentKey;
|
|
1973
|
+
|
|
1690
1974
|
// --- Runtime constants ---
|
|
1691
1975
|
|
|
1692
1976
|
export const DefaultManifestExports: {
|
package/src/index.js
CHANGED
|
@@ -2,6 +2,7 @@ export * from "./manifest/index.js";
|
|
|
2
2
|
export * from "./compliance/index.js";
|
|
3
3
|
export * from "./auth/index.js";
|
|
4
4
|
export * from "./transport/index.js";
|
|
5
|
+
export * from "./licensing/index.js";
|
|
5
6
|
export * from "./compiler/index.js";
|
|
6
7
|
export * from "./bundle/index.js";
|
|
7
8
|
export * from "./capabilities.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export { LicensingProtocolError } from "../index.js";
|
|
2
|
+
export {
|
|
3
|
+
decodeLicensingChallengeMessage,
|
|
4
|
+
decodeLicensingGrant,
|
|
5
|
+
decodeLicensingProofMessage,
|
|
6
|
+
encodeLicensingChallengeRequest,
|
|
7
|
+
encodeLicensingProof,
|
|
8
|
+
extractGrantModuleDescriptor,
|
|
9
|
+
extractWrappedContentKey,
|
|
10
|
+
validateLicensingGrant,
|
|
11
|
+
} from "../index.js";
|
|
12
|
+
|
|
13
|
+
export type {
|
|
14
|
+
LicensingChallengeMessage,
|
|
15
|
+
LicensingGrantMessage,
|
|
16
|
+
LicensingGrantModuleDescriptor,
|
|
17
|
+
LicensingProofMessage,
|
|
18
|
+
LicensingWrappedContentKey,
|
|
19
|
+
LicensingWrappedContentKeyHeader,
|
|
20
|
+
} from "../index.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export {
|
|
2
|
+
LicensingProtocolError,
|
|
3
|
+
decodeLicensingChallengeMessage,
|
|
4
|
+
decodeLicensingGrant,
|
|
5
|
+
decodeLicensingProofMessage,
|
|
6
|
+
encodeLicensingChallengeRequest,
|
|
7
|
+
encodeLicensingProof,
|
|
8
|
+
extractGrantModuleDescriptor,
|
|
9
|
+
extractWrappedContentKey,
|
|
10
|
+
validateLicensingGrant,
|
|
11
|
+
} from "./records.js";
|