@livekit/rtc-node 0.12.0 → 0.12.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.
@@ -30,10 +30,7 @@ var ffi_client_exports = {};
30
30
  __export(ffi_client_exports, {
31
31
  FfiClient: () => FfiClient,
32
32
  FfiClientEvent: () => FfiClientEvent,
33
- FfiEvent: () => import_ffi_pb.FfiEvent,
34
33
  FfiHandle: () => import_native.FfiHandle,
35
- FfiRequest: () => import_ffi_pb.FfiRequest,
36
- FfiResponse: () => import_ffi_pb.FfiResponse,
37
34
  dispose: () => import_native.livekitDispose
38
35
  });
39
36
  module.exports = __toCommonJS(ffi_client_exports);
@@ -92,10 +89,7 @@ class FfiClient extends import_events.default {
92
89
  0 && (module.exports = {
93
90
  FfiClient,
94
91
  FfiClientEvent,
95
- FfiEvent,
96
92
  FfiHandle,
97
- FfiRequest,
98
- FfiResponse,
99
93
  dispose
100
94
  });
101
95
  //# sourceMappingURL=ffi_client.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ffi_client.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport type { MessageInitShape } from '@bufbuild/protobuf';\nimport { create, fromBinary, toBinary } from '@bufbuild/protobuf';\nimport type { TypedEventEmitter as TypedEmitter } from '@livekit/typed-emitter';\nimport EventEmitter from 'events';\nimport {\n FfiHandle,\n livekitCopyBuffer,\n livekitDispose,\n livekitFfiRequest,\n livekitInitialize,\n livekitRetrievePtr,\n} from './napi/native.js';\nimport {\n FfiEvent,\n FfiEventSchema,\n FfiRequest,\n FfiRequestSchema,\n FfiResponse,\n FfiResponseSchema,\n} from './proto/ffi_pb.js';\nimport { SDK_VERSION } from './version.js';\n\nexport { FfiHandle, FfiEvent, FfiResponse, FfiRequest, livekitDispose as dispose };\n\nexport type FfiClientCallbacks = {\n ffi_event: (event: FfiEvent) => void;\n};\n\nexport enum FfiClientEvent {\n FfiEvent = 'ffi_event',\n}\n\nexport class FfiClient extends (EventEmitter as new () => TypedEmitter<FfiClientCallbacks>) {\n static _client?: FfiClient;\n\n /** @internal */\n static get instance(): FfiClient {\n if (!FfiClient._client) FfiClient._client = new FfiClient();\n\n return FfiClient._client;\n }\n\n constructor() {\n super();\n this.setMaxListeners(0);\n\n livekitInitialize(\n (event_data: Uint8Array) => {\n const event = fromBinary(FfiEventSchema, event_data);\n this.emit(FfiClientEvent.FfiEvent, event);\n },\n true,\n SDK_VERSION,\n );\n }\n\n request<T>(req: MessageInitShape<typeof FfiRequestSchema>): T {\n const request = create(FfiRequestSchema, req);\n const req_data = toBinary(FfiRequestSchema, request);\n const res_data = livekitFfiRequest(req_data);\n return fromBinary(FfiResponseSchema, res_data).message.value as T;\n }\n\n copyBuffer(ptr: bigint, len: number): Uint8Array {\n return livekitCopyBuffer(ptr, len);\n }\n\n retrievePtr(data: Uint8Array): bigint {\n return livekitRetrievePtr(data);\n }\n\n async waitFor<T>(predicate: (ev: FfiEvent) => boolean): Promise<T> {\n return new Promise<T>((resolve) => {\n const listener = (ev: FfiEvent) => {\n if (predicate(ev)) {\n this.off(FfiClientEvent.FfiEvent, listener);\n resolve(ev.message.value as T);\n }\n };\n this.on(FfiClientEvent.FfiEvent, listener);\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,sBAA6C;AAE7C,oBAAyB;AACzB,oBAOO;AACP,oBAOO;AACP,qBAA4B;AAQrB,IAAK,iBAAL,kBAAKA,oBAAL;AACL,EAAAA,gBAAA,cAAW;AADD,SAAAA;AAAA,GAAA;AAIL,MAAM,kBAAmB,cAAAC,QAA4D;AAAA;AAAA,EAI1F,WAAW,WAAsB;AAC/B,QAAI,CAAC,UAAU,QAAS,WAAU,UAAU,IAAI,UAAU;AAE1D,WAAO,UAAU;AAAA,EACnB;AAAA,EAEA,cAAc;AACZ,UAAM;AACN,SAAK,gBAAgB,CAAC;AAEtB;AAAA,MACE,CAAC,eAA2B;AAC1B,cAAM,YAAQ,4BAAW,8BAAgB,UAAU;AACnD,aAAK,KAAK,4BAAyB,KAAK;AAAA,MAC1C;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EAEA,QAAW,KAAmD;AAC5D,UAAM,cAAU,wBAAO,gCAAkB,GAAG;AAC5C,UAAM,eAAW,0BAAS,gCAAkB,OAAO;AACnD,UAAM,eAAW,iCAAkB,QAAQ;AAC3C,eAAO,4BAAW,iCAAmB,QAAQ,EAAE,QAAQ;AAAA,EACzD;AAAA,EAEA,WAAW,KAAa,KAAyB;AAC/C,eAAO,iCAAkB,KAAK,GAAG;AAAA,EACnC;AAAA,EAEA,YAAY,MAA0B;AACpC,eAAO,kCAAmB,IAAI;AAAA,EAChC;AAAA,EAEA,MAAM,QAAW,WAAkD;AACjE,WAAO,IAAI,QAAW,CAAC,YAAY;AACjC,YAAM,WAAW,CAAC,OAAiB;AACjC,YAAI,UAAU,EAAE,GAAG;AACjB,eAAK,IAAI,4BAAyB,QAAQ;AAC1C,kBAAQ,GAAG,QAAQ,KAAU;AAAA,QAC/B;AAAA,MACF;AACA,WAAK,GAAG,4BAAyB,QAAQ;AAAA,IAC3C,CAAC;AAAA,EACH;AACF;","names":["FfiClientEvent","EventEmitter"]}
1
+ {"version":3,"sources":["../src/ffi_client.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport type { MessageInitShape } from '@bufbuild/protobuf';\nimport { create, fromBinary, toBinary } from '@bufbuild/protobuf';\nimport type { TypedEventEmitter as TypedEmitter } from '@livekit/typed-emitter';\nimport EventEmitter from 'events';\nimport {\n FfiHandle,\n livekitCopyBuffer,\n livekitDispose,\n livekitFfiRequest,\n livekitInitialize,\n livekitRetrievePtr,\n} from './napi/native.js';\nimport {\n type FfiEvent,\n FfiEventSchema,\n type FfiRequest,\n FfiRequestSchema,\n type FfiResponse,\n FfiResponseSchema,\n} from './proto/ffi_pb.js';\nimport { SDK_VERSION } from './version.js';\n\nexport { FfiHandle, type FfiEvent, type FfiResponse, type FfiRequest, livekitDispose as dispose };\n\nexport type FfiClientCallbacks = {\n ffi_event: (event: FfiEvent) => void;\n};\n\nexport enum FfiClientEvent {\n FfiEvent = 'ffi_event',\n}\n\nexport class FfiClient extends (EventEmitter as new () => TypedEmitter<FfiClientCallbacks>) {\n static _client?: FfiClient;\n\n /** @internal */\n static get instance(): FfiClient {\n if (!FfiClient._client) FfiClient._client = new FfiClient();\n\n return FfiClient._client;\n }\n\n constructor() {\n super();\n this.setMaxListeners(0);\n\n livekitInitialize(\n (event_data: Uint8Array) => {\n const event = fromBinary(FfiEventSchema, event_data);\n this.emit(FfiClientEvent.FfiEvent, event);\n },\n true,\n SDK_VERSION,\n );\n }\n\n request<T>(req: MessageInitShape<typeof FfiRequestSchema>): T {\n const request = create(FfiRequestSchema, req);\n const req_data = toBinary(FfiRequestSchema, request);\n const res_data = livekitFfiRequest(req_data);\n return fromBinary(FfiResponseSchema, res_data).message.value as T;\n }\n\n copyBuffer(ptr: bigint, len: number): Uint8Array {\n return livekitCopyBuffer(ptr, len);\n }\n\n retrievePtr(data: Uint8Array): bigint {\n return livekitRetrievePtr(data);\n }\n\n async waitFor<T>(predicate: (ev: FfiEvent) => boolean): Promise<T> {\n return new Promise<T>((resolve) => {\n const listener = (ev: FfiEvent) => {\n if (predicate(ev)) {\n this.off(FfiClientEvent.FfiEvent, listener);\n resolve(ev.message.value as T);\n }\n };\n this.on(FfiClientEvent.FfiEvent, listener);\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,sBAA6C;AAE7C,oBAAyB;AACzB,oBAOO;AACP,oBAOO;AACP,qBAA4B;AAQrB,IAAK,iBAAL,kBAAKA,oBAAL;AACL,EAAAA,gBAAA,cAAW;AADD,SAAAA;AAAA,GAAA;AAIL,MAAM,kBAAmB,cAAAC,QAA4D;AAAA;AAAA,EAI1F,WAAW,WAAsB;AAC/B,QAAI,CAAC,UAAU,QAAS,WAAU,UAAU,IAAI,UAAU;AAE1D,WAAO,UAAU;AAAA,EACnB;AAAA,EAEA,cAAc;AACZ,UAAM;AACN,SAAK,gBAAgB,CAAC;AAEtB;AAAA,MACE,CAAC,eAA2B;AAC1B,cAAM,YAAQ,4BAAW,8BAAgB,UAAU;AACnD,aAAK,KAAK,4BAAyB,KAAK;AAAA,MAC1C;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EAEA,QAAW,KAAmD;AAC5D,UAAM,cAAU,wBAAO,gCAAkB,GAAG;AAC5C,UAAM,eAAW,0BAAS,gCAAkB,OAAO;AACnD,UAAM,eAAW,iCAAkB,QAAQ;AAC3C,eAAO,4BAAW,iCAAmB,QAAQ,EAAE,QAAQ;AAAA,EACzD;AAAA,EAEA,WAAW,KAAa,KAAyB;AAC/C,eAAO,iCAAkB,KAAK,GAAG;AAAA,EACnC;AAAA,EAEA,YAAY,MAA0B;AACpC,eAAO,kCAAmB,IAAI;AAAA,EAChC;AAAA,EAEA,MAAM,QAAW,WAAkD;AACjE,WAAO,IAAI,QAAW,CAAC,YAAY;AACjC,YAAM,WAAW,CAAC,OAAiB;AACjC,YAAI,UAAU,EAAE,GAAG;AACjB,eAAK,IAAI,4BAAyB,QAAQ;AAC1C,kBAAQ,GAAG,QAAQ,KAAU;AAAA,QAC/B;AAAA,MACF;AACA,WAAK,GAAG,4BAAyB,QAAQ;AAAA,IAC3C,CAAC;AAAA,EACH;AACF;","names":["FfiClientEvent","EventEmitter"]}
@@ -1,8 +1,8 @@
1
1
  import type { MessageInitShape } from '@bufbuild/protobuf';
2
2
  import type { TypedEventEmitter as TypedEmitter } from '@livekit/typed-emitter';
3
3
  import { FfiHandle, livekitDispose } from './napi/native.js';
4
- import { FfiEvent, FfiRequest, FfiRequestSchema, FfiResponse } from './proto/ffi_pb.js';
5
- export { FfiHandle, FfiEvent, FfiResponse, FfiRequest, livekitDispose as dispose };
4
+ import { type FfiEvent, type FfiRequest, FfiRequestSchema, type FfiResponse } from './proto/ffi_pb.js';
5
+ export { FfiHandle, type FfiEvent, type FfiResponse, type FfiRequest, livekitDispose as dispose };
6
6
  export type FfiClientCallbacks = {
7
7
  ffi_event: (event: FfiEvent) => void;
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ffi_client.d.ts","sourceRoot":"","sources":["../src/ffi_client.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,KAAK,EAAE,iBAAiB,IAAI,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEhF,OAAO,EACL,SAAS,EAET,cAAc,EAIf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,QAAQ,EAER,UAAU,EACV,gBAAgB,EAChB,WAAW,EAEZ,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,cAAc,IAAI,OAAO,EAAE,CAAC;AAEnF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;CACtC,CAAC;AAEF,oBAAY,cAAc;IACxB,QAAQ,cAAc;CACvB;wCAEyD,YAAY,CAAC,kBAAkB,CAAC;AAA1F,qBAAa,SAAU,SAAQ,cAA4D;IACzF,MAAM,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAE3B,gBAAgB;IAChB,MAAM,KAAK,QAAQ,IAAI,SAAS,CAI/B;;IAgBD,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,gBAAgB,CAAC,OAAO,gBAAgB,CAAC,GAAG,CAAC;IAO7D,UAAU,CAAC,GAA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EAAE,UAAU,GAAG,MAAM;IAI/B,OAAO,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,QAAQ,KAAK,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC;CAWnE"}
@@ -9,11 +9,8 @@ import {
9
9
  livekitRetrievePtr
10
10
  } from "./napi/native.js";
11
11
  import {
12
- FfiEvent,
13
12
  FfiEventSchema,
14
- FfiRequest,
15
13
  FfiRequestSchema,
16
- FfiResponse,
17
14
  FfiResponseSchema
18
15
  } from "./proto/ffi_pb.js";
19
16
  import { SDK_VERSION } from "./version.js";
@@ -66,10 +63,7 @@ class FfiClient extends EventEmitter {
66
63
  export {
67
64
  FfiClient,
68
65
  FfiClientEvent,
69
- FfiEvent,
70
66
  FfiHandle,
71
- FfiRequest,
72
- FfiResponse,
73
67
  livekitDispose as dispose
74
68
  };
75
69
  //# sourceMappingURL=ffi_client.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ffi_client.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport type { MessageInitShape } from '@bufbuild/protobuf';\nimport { create, fromBinary, toBinary } from '@bufbuild/protobuf';\nimport type { TypedEventEmitter as TypedEmitter } from '@livekit/typed-emitter';\nimport EventEmitter from 'events';\nimport {\n FfiHandle,\n livekitCopyBuffer,\n livekitDispose,\n livekitFfiRequest,\n livekitInitialize,\n livekitRetrievePtr,\n} from './napi/native.js';\nimport {\n FfiEvent,\n FfiEventSchema,\n FfiRequest,\n FfiRequestSchema,\n FfiResponse,\n FfiResponseSchema,\n} from './proto/ffi_pb.js';\nimport { SDK_VERSION } from './version.js';\n\nexport { FfiHandle, FfiEvent, FfiResponse, FfiRequest, livekitDispose as dispose };\n\nexport type FfiClientCallbacks = {\n ffi_event: (event: FfiEvent) => void;\n};\n\nexport enum FfiClientEvent {\n FfiEvent = 'ffi_event',\n}\n\nexport class FfiClient extends (EventEmitter as new () => TypedEmitter<FfiClientCallbacks>) {\n static _client?: FfiClient;\n\n /** @internal */\n static get instance(): FfiClient {\n if (!FfiClient._client) FfiClient._client = new FfiClient();\n\n return FfiClient._client;\n }\n\n constructor() {\n super();\n this.setMaxListeners(0);\n\n livekitInitialize(\n (event_data: Uint8Array) => {\n const event = fromBinary(FfiEventSchema, event_data);\n this.emit(FfiClientEvent.FfiEvent, event);\n },\n true,\n SDK_VERSION,\n );\n }\n\n request<T>(req: MessageInitShape<typeof FfiRequestSchema>): T {\n const request = create(FfiRequestSchema, req);\n const req_data = toBinary(FfiRequestSchema, request);\n const res_data = livekitFfiRequest(req_data);\n return fromBinary(FfiResponseSchema, res_data).message.value as T;\n }\n\n copyBuffer(ptr: bigint, len: number): Uint8Array {\n return livekitCopyBuffer(ptr, len);\n }\n\n retrievePtr(data: Uint8Array): bigint {\n return livekitRetrievePtr(data);\n }\n\n async waitFor<T>(predicate: (ev: FfiEvent) => boolean): Promise<T> {\n return new Promise<T>((resolve) => {\n const listener = (ev: FfiEvent) => {\n if (predicate(ev)) {\n this.off(FfiClientEvent.FfiEvent, listener);\n resolve(ev.message.value as T);\n }\n };\n this.on(FfiClientEvent.FfiEvent, listener);\n });\n }\n}\n"],"mappings":"AAIA,SAAS,QAAQ,YAAY,gBAAgB;AAE7C,OAAO,kBAAkB;AACzB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,mBAAmB;AAQrB,IAAK,iBAAL,kBAAKA,oBAAL;AACL,EAAAA,gBAAA,cAAW;AADD,SAAAA;AAAA,GAAA;AAIL,MAAM,kBAAmB,aAA4D;AAAA;AAAA,EAI1F,WAAW,WAAsB;AAC/B,QAAI,CAAC,UAAU,QAAS,WAAU,UAAU,IAAI,UAAU;AAE1D,WAAO,UAAU;AAAA,EACnB;AAAA,EAEA,cAAc;AACZ,UAAM;AACN,SAAK,gBAAgB,CAAC;AAEtB;AAAA,MACE,CAAC,eAA2B;AAC1B,cAAM,QAAQ,WAAW,gBAAgB,UAAU;AACnD,aAAK,KAAK,4BAAyB,KAAK;AAAA,MAC1C;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EAEA,QAAW,KAAmD;AAC5D,UAAM,UAAU,OAAO,kBAAkB,GAAG;AAC5C,UAAM,WAAW,SAAS,kBAAkB,OAAO;AACnD,UAAM,WAAW,kBAAkB,QAAQ;AAC3C,WAAO,WAAW,mBAAmB,QAAQ,EAAE,QAAQ;AAAA,EACzD;AAAA,EAEA,WAAW,KAAa,KAAyB;AAC/C,WAAO,kBAAkB,KAAK,GAAG;AAAA,EACnC;AAAA,EAEA,YAAY,MAA0B;AACpC,WAAO,mBAAmB,IAAI;AAAA,EAChC;AAAA,EAEA,MAAM,QAAW,WAAkD;AACjE,WAAO,IAAI,QAAW,CAAC,YAAY;AACjC,YAAM,WAAW,CAAC,OAAiB;AACjC,YAAI,UAAU,EAAE,GAAG;AACjB,eAAK,IAAI,4BAAyB,QAAQ;AAC1C,kBAAQ,GAAG,QAAQ,KAAU;AAAA,QAC/B;AAAA,MACF;AACA,WAAK,GAAG,4BAAyB,QAAQ;AAAA,IAC3C,CAAC;AAAA,EACH;AACF;","names":["FfiClientEvent"]}
1
+ {"version":3,"sources":["../src/ffi_client.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport type { MessageInitShape } from '@bufbuild/protobuf';\nimport { create, fromBinary, toBinary } from '@bufbuild/protobuf';\nimport type { TypedEventEmitter as TypedEmitter } from '@livekit/typed-emitter';\nimport EventEmitter from 'events';\nimport {\n FfiHandle,\n livekitCopyBuffer,\n livekitDispose,\n livekitFfiRequest,\n livekitInitialize,\n livekitRetrievePtr,\n} from './napi/native.js';\nimport {\n type FfiEvent,\n FfiEventSchema,\n type FfiRequest,\n FfiRequestSchema,\n type FfiResponse,\n FfiResponseSchema,\n} from './proto/ffi_pb.js';\nimport { SDK_VERSION } from './version.js';\n\nexport { FfiHandle, type FfiEvent, type FfiResponse, type FfiRequest, livekitDispose as dispose };\n\nexport type FfiClientCallbacks = {\n ffi_event: (event: FfiEvent) => void;\n};\n\nexport enum FfiClientEvent {\n FfiEvent = 'ffi_event',\n}\n\nexport class FfiClient extends (EventEmitter as new () => TypedEmitter<FfiClientCallbacks>) {\n static _client?: FfiClient;\n\n /** @internal */\n static get instance(): FfiClient {\n if (!FfiClient._client) FfiClient._client = new FfiClient();\n\n return FfiClient._client;\n }\n\n constructor() {\n super();\n this.setMaxListeners(0);\n\n livekitInitialize(\n (event_data: Uint8Array) => {\n const event = fromBinary(FfiEventSchema, event_data);\n this.emit(FfiClientEvent.FfiEvent, event);\n },\n true,\n SDK_VERSION,\n );\n }\n\n request<T>(req: MessageInitShape<typeof FfiRequestSchema>): T {\n const request = create(FfiRequestSchema, req);\n const req_data = toBinary(FfiRequestSchema, request);\n const res_data = livekitFfiRequest(req_data);\n return fromBinary(FfiResponseSchema, res_data).message.value as T;\n }\n\n copyBuffer(ptr: bigint, len: number): Uint8Array {\n return livekitCopyBuffer(ptr, len);\n }\n\n retrievePtr(data: Uint8Array): bigint {\n return livekitRetrievePtr(data);\n }\n\n async waitFor<T>(predicate: (ev: FfiEvent) => boolean): Promise<T> {\n return new Promise<T>((resolve) => {\n const listener = (ev: FfiEvent) => {\n if (predicate(ev)) {\n this.off(FfiClientEvent.FfiEvent, listener);\n resolve(ev.message.value as T);\n }\n };\n this.on(FfiClientEvent.FfiEvent, listener);\n });\n }\n}\n"],"mappings":"AAIA,SAAS,QAAQ,YAAY,gBAAgB;AAE7C,OAAO,kBAAkB;AACzB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EAEE;AAAA,EAEA;AAAA,EAEA;AAAA,OACK;AACP,SAAS,mBAAmB;AAQrB,IAAK,iBAAL,kBAAKA,oBAAL;AACL,EAAAA,gBAAA,cAAW;AADD,SAAAA;AAAA,GAAA;AAIL,MAAM,kBAAmB,aAA4D;AAAA;AAAA,EAI1F,WAAW,WAAsB;AAC/B,QAAI,CAAC,UAAU,QAAS,WAAU,UAAU,IAAI,UAAU;AAE1D,WAAO,UAAU;AAAA,EACnB;AAAA,EAEA,cAAc;AACZ,UAAM;AACN,SAAK,gBAAgB,CAAC;AAEtB;AAAA,MACE,CAAC,eAA2B;AAC1B,cAAM,QAAQ,WAAW,gBAAgB,UAAU;AACnD,aAAK,KAAK,4BAAyB,KAAK;AAAA,MAC1C;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EAEA,QAAW,KAAmD;AAC5D,UAAM,UAAU,OAAO,kBAAkB,GAAG;AAC5C,UAAM,WAAW,SAAS,kBAAkB,OAAO;AACnD,UAAM,WAAW,kBAAkB,QAAQ;AAC3C,WAAO,WAAW,mBAAmB,QAAQ,EAAE,QAAQ;AAAA,EACzD;AAAA,EAEA,WAAW,KAAa,KAAyB;AAC/C,WAAO,kBAAkB,KAAK,GAAG;AAAA,EACnC;AAAA,EAEA,YAAY,MAA0B;AACpC,WAAO,mBAAmB,IAAI;AAAA,EAChC;AAAA,EAEA,MAAM,QAAW,WAAkD;AACjE,WAAO,IAAI,QAAW,CAAC,YAAY;AACjC,YAAM,WAAW,CAAC,OAAiB;AACjC,YAAI,UAAU,EAAE,GAAG;AACjB,eAAK,IAAI,4BAAyB,QAAQ;AAC1C,kBAAQ,GAAG,QAAQ,KAAU;AAAA,QAC/B;AAAA,MACF;AACA,WAAK,GAAG,4BAAyB,QAAQ;AAAA,IAC3C,CAAC;AAAA,EACH;AACF;","names":["FfiClientEvent"]}
package/dist/index.cjs CHANGED
@@ -23,54 +23,43 @@ __export(src_exports, {
23
23
  AudioResamplerQuality: () => import_audio_resampler.AudioResamplerQuality,
24
24
  AudioSource: () => import_audio_source.AudioSource,
25
25
  AudioStream: () => import_audio_stream.AudioStream,
26
- AudioTrack: () => import_track.AudioTrack,
27
26
  ConnectError: () => import_room.ConnectError,
28
27
  ConnectionQuality: () => import_room_pb2.ConnectionQuality,
29
28
  ConnectionState: () => import_room_pb2.ConnectionState,
30
29
  ContinualGatheringPolicy: () => import_room_pb2.ContinualGatheringPolicy,
31
30
  DataPacketKind: () => import_room_pb2.DataPacketKind,
32
31
  E2EEManager: () => import_e2ee.E2EEManager,
33
- E2EEOptions: () => import_e2ee.E2EEOptions,
34
32
  EncryptionState: () => import_e2ee_pb.EncryptionState,
35
33
  EncryptionType: () => import_e2ee_pb.EncryptionType,
36
34
  FrameCryptor: () => import_e2ee.FrameCryptor,
37
35
  IceServer: () => IceServer,
38
36
  IceTransportType: () => import_room_pb2.IceTransportType,
39
37
  KeyProvider: () => import_e2ee.KeyProvider,
40
- KeyProviderOptions: () => import_e2ee.KeyProviderOptions,
41
38
  LocalAudioTrack: () => import_track.LocalAudioTrack,
42
39
  LocalParticipant: () => import_participant.LocalParticipant,
43
- LocalTrack: () => import_track.LocalTrack,
44
40
  LocalTrackPublication: () => import_track_publication.LocalTrackPublication,
45
41
  LocalVideoTrack: () => import_track.LocalVideoTrack,
46
42
  Participant: () => import_participant.Participant,
47
43
  ParticipantKind: () => import_participant_pb.ParticipantKind,
48
44
  RemoteAudioTrack: () => import_track.RemoteAudioTrack,
49
45
  RemoteParticipant: () => import_participant.RemoteParticipant,
50
- RemoteTrack: () => import_track.RemoteTrack,
51
46
  RemoteTrackPublication: () => import_track_publication.RemoteTrackPublication,
52
47
  RemoteVideoTrack: () => import_track.RemoteVideoTrack,
53
48
  Room: () => import_room.Room,
54
49
  RoomEvent: () => import_room.RoomEvent,
55
- RoomOptions: () => import_room.RoomOptions,
56
50
  RpcError: () => import_rpc.RpcError,
57
- RtcConfiguration: () => import_room.RtcConfiguration,
58
51
  StreamState: () => import_track_pb2.StreamState,
59
52
  Track: () => import_track.Track,
60
53
  TrackKind: () => import_track_pb2.TrackKind,
61
54
  TrackPublication: () => import_track_publication.TrackPublication,
62
55
  TrackPublishOptions: () => TrackPublishOptions,
63
56
  TrackSource: () => import_track_pb2.TrackSource,
64
- Transcription: () => import_transcription.Transcription,
65
- TranscriptionSegment: () => import_transcription.TranscriptionSegment,
66
57
  VideoBufferType: () => import_video_frame_pb2.VideoBufferType,
67
58
  VideoCodec: () => import_video_frame_pb2.VideoCodec,
68
59
  VideoFrame: () => import_video_frame.VideoFrame,
69
- VideoFrameEvent: () => import_video_stream.VideoFrameEvent,
70
60
  VideoRotation: () => import_video_frame_pb2.VideoRotation,
71
61
  VideoSource: () => import_video_source.VideoSource,
72
62
  VideoStream: () => import_video_stream.VideoStream,
73
- VideoTrack: () => import_track.VideoTrack,
74
63
  combineAudioFrames: () => import_audio_frame.combineAudioFrames,
75
64
  dispose: () => import_ffi_client.dispose
76
65
  });
@@ -134,54 +123,43 @@ class TrackPublishOptions {
134
123
  AudioResamplerQuality,
135
124
  AudioSource,
136
125
  AudioStream,
137
- AudioTrack,
138
126
  ConnectError,
139
127
  ConnectionQuality,
140
128
  ConnectionState,
141
129
  ContinualGatheringPolicy,
142
130
  DataPacketKind,
143
131
  E2EEManager,
144
- E2EEOptions,
145
132
  EncryptionState,
146
133
  EncryptionType,
147
134
  FrameCryptor,
148
135
  IceServer,
149
136
  IceTransportType,
150
137
  KeyProvider,
151
- KeyProviderOptions,
152
138
  LocalAudioTrack,
153
139
  LocalParticipant,
154
- LocalTrack,
155
140
  LocalTrackPublication,
156
141
  LocalVideoTrack,
157
142
  Participant,
158
143
  ParticipantKind,
159
144
  RemoteAudioTrack,
160
145
  RemoteParticipant,
161
- RemoteTrack,
162
146
  RemoteTrackPublication,
163
147
  RemoteVideoTrack,
164
148
  Room,
165
149
  RoomEvent,
166
- RoomOptions,
167
150
  RpcError,
168
- RtcConfiguration,
169
151
  StreamState,
170
152
  Track,
171
153
  TrackKind,
172
154
  TrackPublication,
173
155
  TrackPublishOptions,
174
156
  TrackSource,
175
- Transcription,
176
- TranscriptionSegment,
177
157
  VideoBufferType,
178
158
  VideoCodec,
179
159
  VideoFrame,
180
- VideoFrameEvent,
181
160
  VideoRotation,
182
161
  VideoSource,
183
162
  VideoStream,
184
- VideoTrack,
185
163
  combineAudioFrames,
186
164
  dispose
187
165
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport type { MessageInitShape } from '@bufbuild/protobuf';\nimport { create } from '@bufbuild/protobuf';\nimport type { AudioEncoding, TrackPublishOptionsSchema, VideoEncoding } from './proto/room_pb.js';\nimport {\n AudioEncodingSchema,\n IceServerSchema,\n type IceServer as IceServerType,\n type TrackPublishOptions as TrackPublishOptionsType,\n VideoEncodingSchema,\n} from './proto/room_pb.js';\nimport { TrackSource } from './proto/track_pb.js';\nimport { VideoCodec } from './proto/video_frame_pb.js';\n\nexport { Room, RoomEvent, ConnectError, RoomOptions, RtcConfiguration } from './room.js';\nexport { Participant, RemoteParticipant, LocalParticipant } from './participant.js';\nexport {\n Track,\n LocalTrack,\n RemoteTrack,\n VideoTrack,\n LocalAudioTrack,\n LocalVideoTrack,\n RemoteAudioTrack,\n RemoteVideoTrack,\n AudioTrack,\n} from './track.js';\nexport { VideoFrame } from './video_frame.js';\nexport { AudioFrame, combineAudioFrames } from './audio_frame.js';\nexport { AudioStream } from './audio_stream.js';\nexport { AudioResampler, AudioResamplerQuality } from './audio_resampler.js';\nexport { VideoStream, VideoFrameEvent } from './video_stream.js';\nexport { AudioSource } from './audio_source.js';\nexport { VideoSource } from './video_source.js';\nexport {\n TrackPublication,\n RemoteTrackPublication,\n LocalTrackPublication,\n} from './track_publication.js';\nexport { Transcription, TranscriptionSegment } from './transcription.js';\nexport { E2EEManager, E2EEOptions, KeyProviderOptions, KeyProvider, FrameCryptor } from './e2ee.js';\n\nexport {\n ConnectionQuality,\n IceTransportType,\n DataPacketKind,\n ContinualGatheringPolicy,\n ConnectionState,\n} from './proto/room_pb.js';\nexport { RpcError, type RpcInvocationData, type PerformRpcParams } from './rpc.js';\nexport { EncryptionType, EncryptionState } from './proto/e2ee_pb.js';\nexport { StreamState, TrackKind, TrackSource } from './proto/track_pb.js';\nexport { VideoBufferType, VideoRotation, VideoCodec } from './proto/video_frame_pb.js';\nexport { ParticipantKind } from './proto/participant_pb.js';\nexport { dispose } from './ffi_client.js';\nexport type { ChatMessage } from './types.js';\n\n// exposing helpers for API compatibility with 1.x version of protobuf-es where these were class instances\n\ntype IceServerInit = MessageInitShape<typeof IceServerSchema> & {\n urls: string[];\n};\nexport class IceServer implements IceServerType {\n $typeName = 'livekit.proto.IceServer' as const;\n urls: string[];\n username: string;\n password: string;\n constructor(init: IceServerInit) {\n const { urls, username, password } = init;\n this.urls = urls;\n this.username = username ?? '';\n this.password = password ?? '';\n create(IceServerSchema, init);\n }\n}\n\nexport class TrackPublishOptions implements TrackPublishOptionsType {\n $typeName = 'livekit.proto.TrackPublishOptions' as const;\n videoCodec: VideoCodec;\n videoEncoding?: VideoEncoding | undefined;\n audioEncoding?: AudioEncoding | undefined;\n dtx: boolean;\n simulcast: boolean;\n source: TrackSource;\n stream: string;\n red: boolean;\n\n constructor(init: MessageInitShape<typeof TrackPublishOptionsSchema> = {}) {\n const { videoCodec, videoEncoding, audioEncoding, dtx, simulcast, source, stream, red } = init;\n this.videoCodec = videoCodec ?? VideoCodec.VP8;\n if (videoEncoding) {\n this.videoEncoding = create(VideoEncodingSchema, videoEncoding);\n }\n if (audioEncoding) {\n this.audioEncoding = create(AudioEncodingSchema, audioEncoding);\n }\n this.dtx = dtx ?? false;\n this.simulcast = simulcast ?? false;\n this.source = source ?? TrackSource.SOURCE_UNKNOWN;\n this.stream = stream ?? '';\n this.red = red ?? false;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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E;AACA,SAAK,MAAM,OAAO;AAClB,SAAK,YAAY,aAAa;AAC9B,SAAK,SAAS,UAAU,4BAAY;AACpC,SAAK,SAAS,UAAU;AACxB,SAAK,MAAM,OAAO;AAAA,EACpB;AACF;","names":["import_room_pb","import_track_pb","import_video_frame_pb"]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport type { MessageInitShape } from '@bufbuild/protobuf';\nimport { create } from '@bufbuild/protobuf';\nimport type { AudioEncoding, TrackPublishOptionsSchema, VideoEncoding } from './proto/room_pb.js';\nimport {\n AudioEncodingSchema,\n IceServerSchema,\n type IceServer as IceServerType,\n type TrackPublishOptions as TrackPublishOptionsType,\n VideoEncodingSchema,\n} from './proto/room_pb.js';\nimport { TrackSource } from './proto/track_pb.js';\nimport { VideoCodec } from './proto/video_frame_pb.js';\n\nexport { Room, RoomEvent, ConnectError, type RoomOptions, type RtcConfiguration } from './room.js';\nexport { Participant, RemoteParticipant, LocalParticipant } from './participant.js';\nexport {\n Track,\n type LocalTrack,\n type RemoteTrack,\n type VideoTrack,\n LocalAudioTrack,\n LocalVideoTrack,\n RemoteAudioTrack,\n RemoteVideoTrack,\n type AudioTrack,\n} from './track.js';\nexport { VideoFrame } from './video_frame.js';\nexport { AudioFrame, combineAudioFrames } from './audio_frame.js';\nexport { AudioStream } from './audio_stream.js';\nexport { AudioResampler, AudioResamplerQuality } from './audio_resampler.js';\nexport { VideoStream, type VideoFrameEvent } from './video_stream.js';\nexport { AudioSource } from './audio_source.js';\nexport { VideoSource } from './video_source.js';\nexport {\n TrackPublication,\n RemoteTrackPublication,\n LocalTrackPublication,\n} from './track_publication.js';\nexport { type Transcription, type TranscriptionSegment } from './transcription.js';\nexport {\n E2EEManager,\n type E2EEOptions,\n type KeyProviderOptions,\n KeyProvider,\n FrameCryptor,\n} from './e2ee.js';\n\nexport {\n ConnectionQuality,\n IceTransportType,\n DataPacketKind,\n ContinualGatheringPolicy,\n ConnectionState,\n} from './proto/room_pb.js';\nexport { RpcError, type RpcInvocationData, type PerformRpcParams } from './rpc.js';\nexport { EncryptionType, EncryptionState } from './proto/e2ee_pb.js';\nexport { StreamState, TrackKind, TrackSource } from './proto/track_pb.js';\nexport { VideoBufferType, VideoRotation, VideoCodec } from './proto/video_frame_pb.js';\nexport { ParticipantKind } from './proto/participant_pb.js';\nexport { dispose } from './ffi_client.js';\nexport type { ChatMessage } from './types.js';\n\n// exposing helpers for API compatibility with 1.x version of protobuf-es where these were class instances\n\ntype IceServerInit = MessageInitShape<typeof IceServerSchema> & {\n urls: string[];\n};\nexport class IceServer implements IceServerType {\n $typeName = 'livekit.proto.IceServer' as const;\n urls: string[];\n username: string;\n password: string;\n constructor(init: IceServerInit) {\n const { urls, username, password } = init;\n this.urls = urls;\n this.username = username ?? '';\n this.password = password ?? '';\n create(IceServerSchema, init);\n }\n}\n\nexport class TrackPublishOptions implements TrackPublishOptionsType {\n $typeName = 'livekit.proto.TrackPublishOptions' as const;\n videoCodec: VideoCodec;\n videoEncoding?: VideoEncoding | undefined;\n audioEncoding?: AudioEncoding | undefined;\n dtx: boolean;\n simulcast: boolean;\n source: TrackSource;\n stream: string;\n red: boolean;\n\n constructor(init: MessageInitShape<typeof TrackPublishOptionsSchema> = {}) {\n const { videoCodec, videoEncoding, audioEncoding, dtx, simulcast, source, stream, red } = init;\n this.videoCodec = videoCodec ?? VideoCodec.VP8;\n if (videoEncoding) {\n this.videoEncoding = create(VideoEncodingSchema, videoEncoding);\n }\n if (audioEncoding) {\n this.audioEncoding = create(AudioEncodingSchema, audioEncoding);\n }\n this.dtx = dtx ?? false;\n this.simulcast = simulcast ?? false;\n this.source = source ?? TrackSource.SOURCE_UNKNOWN;\n this.stream = stream ?? '';\n this.red = red ?? false;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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,SAAK,SAAS,UAAU;AACxB,SAAK,MAAM,OAAO;AAAA,EACpB;AACF;","names":["import_room_pb","import_track_pb","import_video_frame_pb"]}
package/dist/index.d.ts CHANGED
@@ -3,19 +3,19 @@ import type { AudioEncoding, TrackPublishOptionsSchema, VideoEncoding } from './
3
3
  import { IceServerSchema, type IceServer as IceServerType, type TrackPublishOptions as TrackPublishOptionsType } from './proto/room_pb.js';
4
4
  import { TrackSource } from './proto/track_pb.js';
5
5
  import { VideoCodec } from './proto/video_frame_pb.js';
6
- export { Room, RoomEvent, ConnectError, RoomOptions, RtcConfiguration } from './room.js';
6
+ export { Room, RoomEvent, ConnectError, type RoomOptions, type RtcConfiguration } from './room.js';
7
7
  export { Participant, RemoteParticipant, LocalParticipant } from './participant.js';
8
- export { Track, LocalTrack, RemoteTrack, VideoTrack, LocalAudioTrack, LocalVideoTrack, RemoteAudioTrack, RemoteVideoTrack, AudioTrack, } from './track.js';
8
+ export { Track, type LocalTrack, type RemoteTrack, type VideoTrack, LocalAudioTrack, LocalVideoTrack, RemoteAudioTrack, RemoteVideoTrack, type AudioTrack, } from './track.js';
9
9
  export { VideoFrame } from './video_frame.js';
10
10
  export { AudioFrame, combineAudioFrames } from './audio_frame.js';
11
11
  export { AudioStream } from './audio_stream.js';
12
12
  export { AudioResampler, AudioResamplerQuality } from './audio_resampler.js';
13
- export { VideoStream, VideoFrameEvent } from './video_stream.js';
13
+ export { VideoStream, type VideoFrameEvent } from './video_stream.js';
14
14
  export { AudioSource } from './audio_source.js';
15
15
  export { VideoSource } from './video_source.js';
16
16
  export { TrackPublication, RemoteTrackPublication, LocalTrackPublication, } from './track_publication.js';
17
- export { Transcription, TranscriptionSegment } from './transcription.js';
18
- export { E2EEManager, E2EEOptions, KeyProviderOptions, KeyProvider, FrameCryptor } from './e2ee.js';
17
+ export { type Transcription, type TranscriptionSegment } from './transcription.js';
18
+ export { E2EEManager, type E2EEOptions, type KeyProviderOptions, KeyProvider, FrameCryptor, } from './e2ee.js';
19
19
  export { ConnectionQuality, IceTransportType, DataPacketKind, ContinualGatheringPolicy, ConnectionState, } from './proto/room_pb.js';
20
20
  export { RpcError, type RpcInvocationData, type PerformRpcParams } from './rpc.js';
21
21
  export { EncryptionType, EncryptionState } from './proto/e2ee_pb.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,KAAK,EAAE,aAAa,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAClG,OAAO,EAEL,eAAe,EACf,KAAK,SAAS,IAAI,aAAa,EAC/B,KAAK,mBAAmB,IAAI,uBAAuB,EAEpD,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpF,OAAO,EACL,KAAK,EACL,UAAU,EACV,WAAW,EACX,UAAU,EACV,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,GACX,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACjE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,CAAC;CAChB,CAAC;AACF,qBAAa,SAAU,YAAW,aAAa;IAC7C,SAAS,4BAAsC;IAC/C,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;gBACL,IAAI,EAAE,aAAa;CAOhC;AAED,qBAAa,mBAAoB,YAAW,uBAAuB;IACjE,SAAS,sCAAgD;IACzD,UAAU,EAAE,UAAU,CAAC;IACvB,aAAa,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAC1C,aAAa,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAC1C,GAAG,EAAE,OAAO,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,OAAO,CAAC;gBAED,IAAI,GAAE,gBAAgB,CAAC,OAAO,yBAAyB,CAAM;CAe1E"}
package/dist/index.js CHANGED
@@ -6,24 +6,20 @@ import {
6
6
  } from "./proto/room_pb.js";
7
7
  import { TrackSource } from "./proto/track_pb.js";
8
8
  import { VideoCodec } from "./proto/video_frame_pb.js";
9
- import { Room, RoomEvent, ConnectError, RoomOptions, RtcConfiguration } from "./room.js";
9
+ import { Room, RoomEvent, ConnectError } from "./room.js";
10
10
  import { Participant, RemoteParticipant, LocalParticipant } from "./participant.js";
11
11
  import {
12
12
  Track,
13
- LocalTrack,
14
- RemoteTrack,
15
- VideoTrack,
16
13
  LocalAudioTrack,
17
14
  LocalVideoTrack,
18
15
  RemoteAudioTrack,
19
- RemoteVideoTrack,
20
- AudioTrack
16
+ RemoteVideoTrack
21
17
  } from "./track.js";
22
18
  import { VideoFrame } from "./video_frame.js";
23
19
  import { AudioFrame, combineAudioFrames } from "./audio_frame.js";
24
20
  import { AudioStream } from "./audio_stream.js";
25
21
  import { AudioResampler, AudioResamplerQuality } from "./audio_resampler.js";
26
- import { VideoStream, VideoFrameEvent } from "./video_stream.js";
22
+ import { VideoStream } from "./video_stream.js";
27
23
  import { AudioSource } from "./audio_source.js";
28
24
  import { VideoSource } from "./video_source.js";
29
25
  import {
@@ -31,8 +27,12 @@ import {
31
27
  RemoteTrackPublication,
32
28
  LocalTrackPublication
33
29
  } from "./track_publication.js";
34
- import { Transcription, TranscriptionSegment } from "./transcription.js";
35
- import { E2EEManager, E2EEOptions, KeyProviderOptions, KeyProvider, FrameCryptor } from "./e2ee.js";
30
+ import {} from "./transcription.js";
31
+ import {
32
+ E2EEManager,
33
+ KeyProvider,
34
+ FrameCryptor
35
+ } from "./e2ee.js";
36
36
  import {
37
37
  ConnectionQuality,
38
38
  IceTransportType,
@@ -80,54 +80,43 @@ export {
80
80
  AudioResamplerQuality,
81
81
  AudioSource,
82
82
  AudioStream,
83
- AudioTrack,
84
83
  ConnectError,
85
84
  ConnectionQuality,
86
85
  ConnectionState,
87
86
  ContinualGatheringPolicy,
88
87
  DataPacketKind,
89
88
  E2EEManager,
90
- E2EEOptions,
91
89
  EncryptionState,
92
90
  EncryptionType,
93
91
  FrameCryptor,
94
92
  IceServer,
95
93
  IceTransportType,
96
94
  KeyProvider,
97
- KeyProviderOptions,
98
95
  LocalAudioTrack,
99
96
  LocalParticipant,
100
- LocalTrack,
101
97
  LocalTrackPublication,
102
98
  LocalVideoTrack,
103
99
  Participant,
104
100
  ParticipantKind,
105
101
  RemoteAudioTrack,
106
102
  RemoteParticipant,
107
- RemoteTrack,
108
103
  RemoteTrackPublication,
109
104
  RemoteVideoTrack,
110
105
  Room,
111
106
  RoomEvent,
112
- RoomOptions,
113
107
  RpcError,
114
- RtcConfiguration,
115
108
  StreamState,
116
109
  Track,
117
110
  TrackKind,
118
111
  TrackPublication,
119
112
  TrackPublishOptions,
120
113
  TrackSource2 as TrackSource,
121
- Transcription,
122
- TranscriptionSegment,
123
114
  VideoBufferType,
124
115
  VideoCodec2 as VideoCodec,
125
116
  VideoFrame,
126
- VideoFrameEvent,
127
117
  VideoRotation,
128
118
  VideoSource,
129
119
  VideoStream,
130
- VideoTrack,
131
120
  combineAudioFrames,
132
121
  dispose
133
122
  };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport type { MessageInitShape } from '@bufbuild/protobuf';\nimport { create } from '@bufbuild/protobuf';\nimport type { AudioEncoding, TrackPublishOptionsSchema, VideoEncoding } from './proto/room_pb.js';\nimport {\n AudioEncodingSchema,\n IceServerSchema,\n type IceServer as IceServerType,\n type TrackPublishOptions as TrackPublishOptionsType,\n VideoEncodingSchema,\n} from './proto/room_pb.js';\nimport { TrackSource } from './proto/track_pb.js';\nimport { VideoCodec } from './proto/video_frame_pb.js';\n\nexport { Room, RoomEvent, ConnectError, RoomOptions, RtcConfiguration } from './room.js';\nexport { Participant, RemoteParticipant, LocalParticipant } from './participant.js';\nexport {\n Track,\n LocalTrack,\n RemoteTrack,\n VideoTrack,\n LocalAudioTrack,\n LocalVideoTrack,\n RemoteAudioTrack,\n RemoteVideoTrack,\n AudioTrack,\n} from './track.js';\nexport { VideoFrame } from './video_frame.js';\nexport { AudioFrame, combineAudioFrames } from './audio_frame.js';\nexport { AudioStream } from './audio_stream.js';\nexport { AudioResampler, AudioResamplerQuality } from './audio_resampler.js';\nexport { VideoStream, VideoFrameEvent } from './video_stream.js';\nexport { AudioSource } from './audio_source.js';\nexport { VideoSource } from './video_source.js';\nexport {\n TrackPublication,\n RemoteTrackPublication,\n LocalTrackPublication,\n} from './track_publication.js';\nexport { Transcription, TranscriptionSegment } from './transcription.js';\nexport { E2EEManager, E2EEOptions, KeyProviderOptions, KeyProvider, FrameCryptor } from './e2ee.js';\n\nexport {\n ConnectionQuality,\n IceTransportType,\n DataPacketKind,\n ContinualGatheringPolicy,\n ConnectionState,\n} from './proto/room_pb.js';\nexport { RpcError, type RpcInvocationData, type PerformRpcParams } from './rpc.js';\nexport { EncryptionType, EncryptionState } from './proto/e2ee_pb.js';\nexport { StreamState, TrackKind, TrackSource } from './proto/track_pb.js';\nexport { VideoBufferType, VideoRotation, VideoCodec } from './proto/video_frame_pb.js';\nexport { ParticipantKind } from './proto/participant_pb.js';\nexport { dispose } from './ffi_client.js';\nexport type { ChatMessage } from './types.js';\n\n// exposing helpers for API compatibility with 1.x version of protobuf-es where these were class instances\n\ntype IceServerInit = MessageInitShape<typeof IceServerSchema> & {\n urls: string[];\n};\nexport class IceServer implements IceServerType {\n $typeName = 'livekit.proto.IceServer' as const;\n urls: string[];\n username: string;\n password: string;\n constructor(init: IceServerInit) {\n const { urls, username, password } = init;\n this.urls = urls;\n this.username = username ?? '';\n this.password = password ?? '';\n create(IceServerSchema, init);\n }\n}\n\nexport class TrackPublishOptions implements TrackPublishOptionsType {\n $typeName = 'livekit.proto.TrackPublishOptions' as const;\n videoCodec: VideoCodec;\n videoEncoding?: VideoEncoding | undefined;\n audioEncoding?: AudioEncoding | undefined;\n dtx: boolean;\n simulcast: boolean;\n source: TrackSource;\n stream: string;\n red: boolean;\n\n constructor(init: MessageInitShape<typeof TrackPublishOptionsSchema> = {}) {\n const { videoCodec, videoEncoding, audioEncoding, dtx, simulcast, source, stream, red } = init;\n this.videoCodec = videoCodec ?? VideoCodec.VP8;\n if (videoEncoding) {\n this.videoEncoding = create(VideoEncodingSchema, videoEncoding);\n }\n if (audioEncoding) {\n this.audioEncoding = create(AudioEncodingSchema, audioEncoding);\n }\n this.dtx = dtx ?? false;\n this.simulcast = simulcast ?? false;\n this.source = source ?? TrackSource.SOURCE_UNKNOWN;\n this.stream = stream ?? '';\n this.red = red ?? false;\n }\n}\n"],"mappings":"AAIA,SAAS,cAAc;AAEvB;AAAA,EACE;AAAA,EACA;AAAA,EAGA;AAAA,OACK;AACP,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAE3B,SAAS,MAAM,WAAW,cAAc,aAAa,wBAAwB;AAC7E,SAAS,aAAa,mBAA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AAY,aAAa;AAC9B,SAAK,SAAS,UAAU,YAAY;AACpC,SAAK,SAAS,UAAU;AACxB,SAAK,MAAM,OAAO;AAAA,EACpB;AACF;","names":["TrackSource","VideoCodec"]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport type { MessageInitShape } from '@bufbuild/protobuf';\nimport { create } from '@bufbuild/protobuf';\nimport type { AudioEncoding, TrackPublishOptionsSchema, VideoEncoding } from './proto/room_pb.js';\nimport {\n AudioEncodingSchema,\n IceServerSchema,\n type IceServer as IceServerType,\n type TrackPublishOptions as TrackPublishOptionsType,\n VideoEncodingSchema,\n} from './proto/room_pb.js';\nimport { TrackSource } from './proto/track_pb.js';\nimport { VideoCodec } from './proto/video_frame_pb.js';\n\nexport { Room, RoomEvent, ConnectError, type RoomOptions, type RtcConfiguration } from './room.js';\nexport { Participant, RemoteParticipant, LocalParticipant } from './participant.js';\nexport {\n Track,\n type LocalTrack,\n type RemoteTrack,\n type VideoTrack,\n LocalAudioTrack,\n LocalVideoTrack,\n RemoteAudioTrack,\n RemoteVideoTrack,\n type AudioTrack,\n} from './track.js';\nexport { VideoFrame } from './video_frame.js';\nexport { AudioFrame, combineAudioFrames } from './audio_frame.js';\nexport { AudioStream } from './audio_stream.js';\nexport { AudioResampler, AudioResamplerQuality } from './audio_resampler.js';\nexport { VideoStream, type VideoFrameEvent } from './video_stream.js';\nexport { AudioSource } from './audio_source.js';\nexport { VideoSource } from './video_source.js';\nexport {\n TrackPublication,\n RemoteTrackPublication,\n LocalTrackPublication,\n} from './track_publication.js';\nexport { type Transcription, type TranscriptionSegment } from './transcription.js';\nexport {\n E2EEManager,\n type E2EEOptions,\n type KeyProviderOptions,\n KeyProvider,\n FrameCryptor,\n} from './e2ee.js';\n\nexport {\n ConnectionQuality,\n IceTransportType,\n DataPacketKind,\n ContinualGatheringPolicy,\n ConnectionState,\n} from './proto/room_pb.js';\nexport { RpcError, type RpcInvocationData, type PerformRpcParams } from './rpc.js';\nexport { EncryptionType, EncryptionState } from './proto/e2ee_pb.js';\nexport { StreamState, TrackKind, TrackSource } from './proto/track_pb.js';\nexport { VideoBufferType, VideoRotation, VideoCodec } from './proto/video_frame_pb.js';\nexport { ParticipantKind } from './proto/participant_pb.js';\nexport { dispose } from './ffi_client.js';\nexport type { ChatMessage } from './types.js';\n\n// exposing helpers for API compatibility with 1.x version of protobuf-es where these were class instances\n\ntype IceServerInit = MessageInitShape<typeof IceServerSchema> & {\n urls: string[];\n};\nexport class IceServer implements IceServerType {\n $typeName = 'livekit.proto.IceServer' as const;\n urls: string[];\n username: string;\n password: string;\n constructor(init: IceServerInit) {\n const { urls, username, password } = init;\n this.urls = urls;\n this.username = username ?? '';\n this.password = password ?? '';\n create(IceServerSchema, init);\n }\n}\n\nexport class TrackPublishOptions implements TrackPublishOptionsType {\n $typeName = 'livekit.proto.TrackPublishOptions' as const;\n videoCodec: VideoCodec;\n videoEncoding?: VideoEncoding | undefined;\n audioEncoding?: AudioEncoding | undefined;\n dtx: boolean;\n simulcast: boolean;\n source: TrackSource;\n stream: string;\n red: boolean;\n\n constructor(init: MessageInitShape<typeof TrackPublishOptionsSchema> = {}) {\n const { videoCodec, videoEncoding, audioEncoding, dtx, simulcast, source, stream, red } = init;\n this.videoCodec = videoCodec ?? VideoCodec.VP8;\n if (videoEncoding) {\n this.videoEncoding = create(VideoEncodingSchema, videoEncoding);\n }\n if (audioEncoding) {\n this.audioEncoding = create(AudioEncodingSchema, audioEncoding);\n }\n this.dtx = dtx ?? false;\n this.simulcast = simulcast ?? false;\n this.source = source ?? TrackSource.SOURCE_UNKNOWN;\n this.stream = stream ?? '';\n this.red = red ?? false;\n }\n}\n"],"mappings":"AAIA,SAAS,cAAc;AAEvB;AAAA,EACE;AAAA,EACA;AAAA,EAGA;AAAA,OACK;AACP,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAE3B,SAAS,MA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B,SAAK,SAAS,UAAU,YAAY;AACpC,SAAK,SAAS,UAAU;AACxB,SAAK,MAAM,OAAO;AAAA,EACpB;AACF;","names":["TrackSource","VideoCodec"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/napi/native.d.ts"],"sourcesContent":["/* tslint:disable */\n/* eslint-disable */\n\n/* auto-generated by NAPI-RS */\n\nexport function livekitInitialize(\n callback: (data: Uint8Array) => void,\n captureLogs: boolean,\n sdkVersion: string,\n): void;\nexport function livekitFfiRequest(data: Uint8Array): Uint8Array;\nexport function livekitRetrievePtr(handle: Uint8Array): bigint;\nexport function livekitCopyBuffer(ptr: bigint, len: number): Uint8Array;\nexport function livekitDispose(): Promise<void>;\nexport declare class FfiHandle {\n constructor(handle: bigint);\n dispose(): void;\n get handle(): bigint;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../src/napi/native.d.ts"],"sourcesContent":["/* tslint:disable */\n/* eslint-disable */\n\n/* auto-generated by NAPI-RS */\n\nexport declare function livekitInitialize(\n callback: (data: Uint8Array) => void,\n captureLogs: boolean,\n sdkVersion: string,\n): void;\nexport declare function livekitFfiRequest(data: Uint8Array): Uint8Array;\nexport declare function livekitRetrievePtr(handle: Uint8Array): bigint;\nexport declare function livekitCopyBuffer(ptr: bigint, len: number): Uint8Array;\nexport declare function livekitDispose(): Promise<void>;\nexport declare class FfiHandle {\n constructor(handle: bigint);\n dispose(): void;\n get handle(): bigint;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -3,15 +3,15 @@
3
3
 
4
4
  /* auto-generated by NAPI-RS */
5
5
 
6
- export function livekitInitialize(
6
+ export declare function livekitInitialize(
7
7
  callback: (data: Uint8Array) => void,
8
8
  captureLogs: boolean,
9
9
  sdkVersion: string,
10
10
  ): void;
11
- export function livekitFfiRequest(data: Uint8Array): Uint8Array;
12
- export function livekitRetrievePtr(handle: Uint8Array): bigint;
13
- export function livekitCopyBuffer(ptr: bigint, len: number): Uint8Array;
14
- export function livekitDispose(): Promise<void>;
11
+ export declare function livekitFfiRequest(data: Uint8Array): Uint8Array;
12
+ export declare function livekitRetrievePtr(handle: Uint8Array): bigint;
13
+ export declare function livekitCopyBuffer(ptr: bigint, len: number): Uint8Array;
14
+ export declare function livekitDispose(): Promise<void>;
15
15
  export declare class FfiHandle {
16
16
  constructor(handle: bigint);
17
17
  dispose(): void;
package/dist/native.d.ts CHANGED
@@ -3,15 +3,15 @@
3
3
 
4
4
  /* auto-generated by NAPI-RS */
5
5
 
6
- export function livekitInitialize(
6
+ export declare function livekitInitialize(
7
7
  callback: (data: Uint8Array) => void,
8
8
  captureLogs: boolean,
9
9
  sdkVersion: string,
10
10
  ): void;
11
- export function livekitFfiRequest(data: Uint8Array): Uint8Array;
12
- export function livekitRetrievePtr(handle: Uint8Array): bigint;
13
- export function livekitCopyBuffer(ptr: bigint, len: number): Uint8Array;
14
- export function livekitDispose(): Promise<void>;
11
+ export declare function livekitFfiRequest(data: Uint8Array): Uint8Array;
12
+ export declare function livekitRetrievePtr(handle: Uint8Array): bigint;
13
+ export declare function livekitCopyBuffer(ptr: bigint, len: number): Uint8Array;
14
+ export declare function livekitDispose(): Promise<void>;
15
15
  export declare class FfiHandle {
16
16
  constructor(handle: bigint);
17
17
  dispose(): void;
package/dist/version.cjs CHANGED
@@ -21,7 +21,7 @@ __export(version_exports, {
21
21
  SDK_VERSION: () => SDK_VERSION
22
22
  });
23
23
  module.exports = __toCommonJS(version_exports);
24
- const SDK_VERSION = "0.12.0";
24
+ const SDK_VERSION = "0.12.1";
25
25
  // Annotate the CommonJS export names for ESM import in node:
26
26
  0 && (module.exports = {
27
27
  SDK_VERSION
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/version.ts"],"sourcesContent":["export const SDK_VERSION = \"0.12.0\";\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,cAAc;","names":[]}
1
+ {"version":3,"sources":["../src/version.ts"],"sourcesContent":["export const SDK_VERSION = \"0.12.1\";\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,cAAc;","names":[]}
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const SDK_VERSION = "0.12.0";
1
+ export declare const SDK_VERSION = "0.12.1";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
- const SDK_VERSION = "0.12.0";
1
+ const SDK_VERSION = "0.12.1";
2
2
  export {
3
3
  SDK_VERSION
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/version.ts"],"sourcesContent":["export const SDK_VERSION = \"0.12.0\";\n"],"mappings":"AAAO,MAAM,cAAc;","names":[]}
1
+ {"version":3,"sources":["../src/version.ts"],"sourcesContent":["export const SDK_VERSION = \"0.12.1\";\n"],"mappings":"AAAO,MAAM,cAAc;","names":[]}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "LiveKit RTC Node",
4
4
  "license": "Apache-2.0",
5
5
  "author": "LiveKit",
6
- "version": "0.12.0",
6
+ "version": "0.12.1",
7
7
  "main": "dist/index.js",
8
8
  "require": "dist/index.cjs",
9
9
  "types": "dist/index.d.ts",
@@ -54,11 +54,11 @@
54
54
  "typescript": "^5.2.2"
55
55
  },
56
56
  "optionalDependencies": {
57
- "@livekit/rtc-node-darwin-arm64": "0.12.0",
58
- "@livekit/rtc-node-darwin-x64": "0.12.0",
59
- "@livekit/rtc-node-linux-arm64-gnu": "0.12.0",
60
- "@livekit/rtc-node-linux-x64-gnu": "0.12.0",
61
- "@livekit/rtc-node-win32-x64-msvc": "0.12.0"
57
+ "@livekit/rtc-node-darwin-arm64": "0.12.1",
58
+ "@livekit/rtc-node-darwin-x64": "0.12.1",
59
+ "@livekit/rtc-node-linux-arm64-gnu": "0.12.1",
60
+ "@livekit/rtc-node-linux-x64-gnu": "0.12.1",
61
+ "@livekit/rtc-node-win32-x64-msvc": "0.12.1"
62
62
  },
63
63
  "engines": {
64
64
  "node": ">= 18"
package/src/ffi_client.ts CHANGED
@@ -14,16 +14,16 @@ import {
14
14
  livekitRetrievePtr,
15
15
  } from './napi/native.js';
16
16
  import {
17
- FfiEvent,
17
+ type FfiEvent,
18
18
  FfiEventSchema,
19
- FfiRequest,
19
+ type FfiRequest,
20
20
  FfiRequestSchema,
21
- FfiResponse,
21
+ type FfiResponse,
22
22
  FfiResponseSchema,
23
23
  } from './proto/ffi_pb.js';
24
24
  import { SDK_VERSION } from './version.js';
25
25
 
26
- export { FfiHandle, FfiEvent, FfiResponse, FfiRequest, livekitDispose as dispose };
26
+ export { FfiHandle, type FfiEvent, type FfiResponse, type FfiRequest, livekitDispose as dispose };
27
27
 
28
28
  export type FfiClientCallbacks = {
29
29
  ffi_event: (event: FfiEvent) => void;
package/src/index.ts CHANGED
@@ -14,24 +14,24 @@ import {
14
14
  import { TrackSource } from './proto/track_pb.js';
15
15
  import { VideoCodec } from './proto/video_frame_pb.js';
16
16
 
17
- export { Room, RoomEvent, ConnectError, RoomOptions, RtcConfiguration } from './room.js';
17
+ export { Room, RoomEvent, ConnectError, type RoomOptions, type RtcConfiguration } from './room.js';
18
18
  export { Participant, RemoteParticipant, LocalParticipant } from './participant.js';
19
19
  export {
20
20
  Track,
21
- LocalTrack,
22
- RemoteTrack,
23
- VideoTrack,
21
+ type LocalTrack,
22
+ type RemoteTrack,
23
+ type VideoTrack,
24
24
  LocalAudioTrack,
25
25
  LocalVideoTrack,
26
26
  RemoteAudioTrack,
27
27
  RemoteVideoTrack,
28
- AudioTrack,
28
+ type AudioTrack,
29
29
  } from './track.js';
30
30
  export { VideoFrame } from './video_frame.js';
31
31
  export { AudioFrame, combineAudioFrames } from './audio_frame.js';
32
32
  export { AudioStream } from './audio_stream.js';
33
33
  export { AudioResampler, AudioResamplerQuality } from './audio_resampler.js';
34
- export { VideoStream, VideoFrameEvent } from './video_stream.js';
34
+ export { VideoStream, type VideoFrameEvent } from './video_stream.js';
35
35
  export { AudioSource } from './audio_source.js';
36
36
  export { VideoSource } from './video_source.js';
37
37
  export {
@@ -39,8 +39,14 @@ export {
39
39
  RemoteTrackPublication,
40
40
  LocalTrackPublication,
41
41
  } from './track_publication.js';
42
- export { Transcription, TranscriptionSegment } from './transcription.js';
43
- export { E2EEManager, E2EEOptions, KeyProviderOptions, KeyProvider, FrameCryptor } from './e2ee.js';
42
+ export { type Transcription, type TranscriptionSegment } from './transcription.js';
43
+ export {
44
+ E2EEManager,
45
+ type E2EEOptions,
46
+ type KeyProviderOptions,
47
+ KeyProvider,
48
+ FrameCryptor,
49
+ } from './e2ee.js';
44
50
 
45
51
  export {
46
52
  ConnectionQuality,
@@ -3,15 +3,15 @@
3
3
 
4
4
  /* auto-generated by NAPI-RS */
5
5
 
6
- export function livekitInitialize(
6
+ export declare function livekitInitialize(
7
7
  callback: (data: Uint8Array) => void,
8
8
  captureLogs: boolean,
9
9
  sdkVersion: string,
10
10
  ): void;
11
- export function livekitFfiRequest(data: Uint8Array): Uint8Array;
12
- export function livekitRetrievePtr(handle: Uint8Array): bigint;
13
- export function livekitCopyBuffer(ptr: bigint, len: number): Uint8Array;
14
- export function livekitDispose(): Promise<void>;
11
+ export declare function livekitFfiRequest(data: Uint8Array): Uint8Array;
12
+ export declare function livekitRetrievePtr(handle: Uint8Array): bigint;
13
+ export declare function livekitCopyBuffer(ptr: bigint, len: number): Uint8Array;
14
+ export declare function livekitDispose(): Promise<void>;
15
15
  export declare class FfiHandle {
16
16
  constructor(handle: bigint);
17
17
  dispose(): void;
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.12.0";
1
+ export const SDK_VERSION = "0.12.1";