@matter/general 0.13.1-alpha.0-20250516-6288f3c54 → 0.13.1-alpha.0-20250520-d699cd56d

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.
@@ -19,7 +19,7 @@ export declare const ec: {
19
19
  FpPow<T>(Fp: mod.IField<T>, num: T, power: bigint): T;
20
20
  FpInvertBatch<T>(Fp: mod.IField<T>, nums: T[], passZero?: boolean): T[];
21
21
  FpDiv<T>(Fp: mod.IField<T>, lhs: T, rhs: T | bigint): T;
22
- FpLegendre<T>(Fp: mod.IField<T>, n: T): number;
22
+ FpLegendre<T>(Fp: mod.IField<T>, n: T): -1 | 0 | 1;
23
23
  FpIsSquare<T>(Fp: mod.IField<T>, n: T): boolean;
24
24
  nLength(n: bigint, nBitLength?: number): {
25
25
  nBitLength: number;
@@ -9,7 +9,7 @@ import { Resource } from "./Resource.js";
9
9
  import { ResourceSet } from "./ResourceSet.js";
10
10
  import { Status } from "./Status.js";
11
11
  /**
12
- * .
12
+ * Two-phase commit implementation.
13
13
  *
14
14
  * Transactions are either shared (for reads) or exclusive (for writes). Exclusive transactions do not block shared
15
15
  * transactions but state updates will not be visible until the transaction completes.
@@ -20,8 +20,7 @@ import { Status } from "./Status.js";
20
20
  * locks.
21
21
  *
22
22
  * Persistence is implemented by a list of participants. Commits are two phase. If an error throws in phase one all
23
- * participants roll back. An error in phase 2 could result in data inconsistency as we don't have any form of retry as
24
- * of yet.
23
+ * participants roll back. An error in phase 2 could result in data inconsistency.
25
24
  *
26
25
  * TODO - does prevent deadlock but we should probably add a timeout for resource locking
27
26
  */
@@ -64,8 +63,8 @@ export interface Transaction {
64
63
  /**
65
64
  * Add {@link ResourceType}s to the transaction synchronously.
66
65
  *
67
- * Unlike {@link addResources}, this method will throw an error if the
68
- * transaction is exclusive and the resources cannot be locked.
66
+ * Unlike {@link addResources}, this method will throw an error if the transaction is exclusive and the resources
67
+ * cannot be locked.
69
68
  */
70
69
  addResourcesSync(...resources: Resource[]): void;
71
70
  /**
@@ -144,16 +143,16 @@ export declare const Transaction: {
144
143
  */
145
144
  act<T>(via: string, actor: (transaction: Transaction) => MaybePromise<T>): MaybePromise<T>;
146
145
  ReadOnly: {
147
- "__#15456@#participants": Set<Participant>;
148
- "__#15456@#roles": Map<{}, Participant>;
149
- "__#15456@#resources": Set<Resource>;
150
- "__#15456@#status": Status;
151
- "__#15456@#waitingOn"?: Iterable<Transaction>;
152
- "__#15456@#via": string;
153
- "__#15456@#shared"?: import("../index.js").Observable<[]>;
154
- "__#15456@#closed"?: import("../index.js").Observable<[]>;
155
- "__#15456@#isAsync": boolean;
156
- "__#15456@#reportingLocks": boolean;
146
+ "__#15458@#participants": Set<Participant>;
147
+ "__#15458@#roles": Map<{}, Participant>;
148
+ "__#15458@#resources": Set<Resource>;
149
+ "__#15458@#status": Status;
150
+ "__#15458@#waitingOn"?: Iterable<Transaction>;
151
+ "__#15458@#via": string;
152
+ "__#15458@#shared"?: import("../index.js").Observable<[]>;
153
+ "__#15458@#closed"?: import("../index.js").Observable<[]>;
154
+ "__#15458@#isAsync": boolean;
155
+ "__#15458@#reportingLocks": boolean;
157
156
  close(): void;
158
157
  readonly via: string;
159
158
  readonly status: Status;
@@ -175,15 +174,15 @@ export declare const Transaction: {
175
174
  waitFor(others: Set<Transaction>): Promise<void>;
176
175
  toString(): string;
177
176
  treatAsSlow(): void;
178
- "__#15456@#finalize"(status: Status, why: string, finalizer: () => MaybePromise): Promise<void> | undefined;
179
- "__#15456@#executePreCommit"(): MaybePromise<void>;
180
- "__#15456@#executeCommit"(): MaybePromise;
181
- "__#15456@#executeCommit1"(): MaybePromise;
182
- "__#15456@#executeCommit2"(): Promise<void> | undefined;
183
- "__#15456@#executePostCommit"(participants: Participant[]): MaybePromise;
184
- "__#15456@#executeRollback"(): Promise<void> | undefined;
185
- "__#15456@#locksChanged"(resources: Set<Resource>, how?: string): void;
186
- "__#15456@#assertAvailable"(): void;
177
+ "__#15458@#finalize"(status: Status, why: string, finalizer: () => MaybePromise): Promise<void> | undefined;
178
+ "__#15458@#executePreCommit"(): MaybePromise<void>;
179
+ "__#15458@#executeCommit"(): MaybePromise;
180
+ "__#15458@#executeCommit1"(): MaybePromise;
181
+ "__#15458@#executeCommit2"(): Promise<void> | undefined;
182
+ "__#15458@#executePostCommit"(participants: Participant[]): MaybePromise;
183
+ "__#15458@#executeRollback"(): Promise<void> | undefined;
184
+ "__#15458@#locksChanged"(resources: Set<Resource>, how?: string): void;
185
+ "__#15458@#assertAvailable"(): void;
187
186
  };
188
187
  Status: typeof Status;
189
188
  Resource: typeof Resource;
@@ -1 +1 @@
1
- {"version":3,"file":"Transaction.d.ts","sourceRoot":"","sources":["../../../src/transaction/Transaction.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,WAAW;IACxB;;OAEG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;IAExC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IAElC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC;IAEtD;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,IAAI,EAAE,IAAI,CAAC,EAAE,OAAO,G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AAA;AAAA;AAAA;AA2JO,MAAM,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASvB,IAAO,KAAa,OAAuE;AAEvF,eAAO,eAAI,KAAK,KAAK;AAAA,EACzB;AAAA,EAEA,UAAU;AAAA,EAEV;AAAA,EAEA;AAAA,EAEA,CAAC,OAAO,WAAW,GAAG;AAC1B;AAGA,YAAY,MAAM;",
4
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,sBAAyB;AAEzB,oBAAuB;AACvB,gBAAyC;AAXzC;AAAA;AAAA;AAAA;AAAA;AA0JO,MAAM,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASvB,IAAO,KAAa,OAAuE;AAEvF,eAAO,eAAI,KAAK,KAAK;AAAA,EACzB;AAAA,EAEA,UAAU;AAAA,EAEV;AAAA,EAEA;AAAA,EAEA,CAAC,OAAO,WAAW,GAAG;AAC1B;AAGA,YAAY,MAAM;",
5
5
  "names": []
6
6
  }
@@ -19,7 +19,7 @@ export declare const ec: {
19
19
  FpPow<T>(Fp: mod.IField<T>, num: T, power: bigint): T;
20
20
  FpInvertBatch<T>(Fp: mod.IField<T>, nums: T[], passZero?: boolean): T[];
21
21
  FpDiv<T>(Fp: mod.IField<T>, lhs: T, rhs: T | bigint): T;
22
- FpLegendre<T>(Fp: mod.IField<T>, n: T): number;
22
+ FpLegendre<T>(Fp: mod.IField<T>, n: T): -1 | 0 | 1;
23
23
  FpIsSquare<T>(Fp: mod.IField<T>, n: T): boolean;
24
24
  nLength(n: bigint, nBitLength?: number): {
25
25
  nBitLength: number;
@@ -9,7 +9,7 @@ import { Resource } from "./Resource.js";
9
9
  import { ResourceSet } from "./ResourceSet.js";
10
10
  import { Status } from "./Status.js";
11
11
  /**
12
- * .
12
+ * Two-phase commit implementation.
13
13
  *
14
14
  * Transactions are either shared (for reads) or exclusive (for writes). Exclusive transactions do not block shared
15
15
  * transactions but state updates will not be visible until the transaction completes.
@@ -20,8 +20,7 @@ import { Status } from "./Status.js";
20
20
  * locks.
21
21
  *
22
22
  * Persistence is implemented by a list of participants. Commits are two phase. If an error throws in phase one all
23
- * participants roll back. An error in phase 2 could result in data inconsistency as we don't have any form of retry as
24
- * of yet.
23
+ * participants roll back. An error in phase 2 could result in data inconsistency.
25
24
  *
26
25
  * TODO - does prevent deadlock but we should probably add a timeout for resource locking
27
26
  */
@@ -64,8 +63,8 @@ export interface Transaction {
64
63
  /**
65
64
  * Add {@link ResourceType}s to the transaction synchronously.
66
65
  *
67
- * Unlike {@link addResources}, this method will throw an error if the
68
- * transaction is exclusive and the resources cannot be locked.
66
+ * Unlike {@link addResources}, this method will throw an error if the transaction is exclusive and the resources
67
+ * cannot be locked.
69
68
  */
70
69
  addResourcesSync(...resources: Resource[]): void;
71
70
  /**
@@ -144,16 +143,16 @@ export declare const Transaction: {
144
143
  */
145
144
  act<T>(via: string, actor: (transaction: Transaction) => MaybePromise<T>): MaybePromise<T>;
146
145
  ReadOnly: {
147
- "__#15456@#participants": Set<Participant>;
148
- "__#15456@#roles": Map<{}, Participant>;
149
- "__#15456@#resources": Set<Resource>;
150
- "__#15456@#status": Status;
151
- "__#15456@#waitingOn"?: Iterable<Transaction>;
152
- "__#15456@#via": string;
153
- "__#15456@#shared"?: import("../index.js").Observable<[]>;
154
- "__#15456@#closed"?: import("../index.js").Observable<[]>;
155
- "__#15456@#isAsync": boolean;
156
- "__#15456@#reportingLocks": boolean;
146
+ "__#15458@#participants": Set<Participant>;
147
+ "__#15458@#roles": Map<{}, Participant>;
148
+ "__#15458@#resources": Set<Resource>;
149
+ "__#15458@#status": Status;
150
+ "__#15458@#waitingOn"?: Iterable<Transaction>;
151
+ "__#15458@#via": string;
152
+ "__#15458@#shared"?: import("../index.js").Observable<[]>;
153
+ "__#15458@#closed"?: import("../index.js").Observable<[]>;
154
+ "__#15458@#isAsync": boolean;
155
+ "__#15458@#reportingLocks": boolean;
157
156
  close(): void;
158
157
  readonly via: string;
159
158
  readonly status: Status;
@@ -175,15 +174,15 @@ export declare const Transaction: {
175
174
  waitFor(others: Set<Transaction>): Promise<void>;
176
175
  toString(): string;
177
176
  treatAsSlow(): void;
178
- "__#15456@#finalize"(status: Status, why: string, finalizer: () => MaybePromise): Promise<void> | undefined;
179
- "__#15456@#executePreCommit"(): MaybePromise<void>;
180
- "__#15456@#executeCommit"(): MaybePromise;
181
- "__#15456@#executeCommit1"(): MaybePromise;
182
- "__#15456@#executeCommit2"(): Promise<void> | undefined;
183
- "__#15456@#executePostCommit"(participants: Participant[]): MaybePromise;
184
- "__#15456@#executeRollback"(): Promise<void> | undefined;
185
- "__#15456@#locksChanged"(resources: Set<Resource>, how?: string): void;
186
- "__#15456@#assertAvailable"(): void;
177
+ "__#15458@#finalize"(status: Status, why: string, finalizer: () => MaybePromise): Promise<void> | undefined;
178
+ "__#15458@#executePreCommit"(): MaybePromise<void>;
179
+ "__#15458@#executeCommit"(): MaybePromise;
180
+ "__#15458@#executeCommit1"(): MaybePromise;
181
+ "__#15458@#executeCommit2"(): Promise<void> | undefined;
182
+ "__#15458@#executePostCommit"(participants: Participant[]): MaybePromise;
183
+ "__#15458@#executeRollback"(): Promise<void> | undefined;
184
+ "__#15458@#locksChanged"(resources: Set<Resource>, how?: string): void;
185
+ "__#15458@#assertAvailable"(): void;
187
186
  };
188
187
  Status: typeof Status;
189
188
  Resource: typeof Resource;
@@ -1 +1 @@
1
- {"version":3,"file":"Transaction.d.ts","sourceRoot":"","sources":["../../../src/transaction/Transaction.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,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EAAE,WAAW,KAAK,YAAY,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAY7F,CAAC;AAKF,yBAAiB,WAAW,CAAC;IACzB,KAAY,MAAM,GAAG,UAAU,CAAC;IAEhC,KAAY,QAAQ,GAAG,YAAY,CAAC;IAEpC,KAAY,WAAW,GAAG,eAAe,CAAC;IAE1C,KAAY,WAAW,GAAG,eAAe,CAAC;CAC7C"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/transaction/Transaction.ts"],
4
- "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,SAAS,gBAAgB;AAEzB,SAAS,cAAc;AACvB,SAAS,qBAAqB,WAAW;AAgJlC,MAAM,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASvB,IAAO,KAAa,OAAuE;AAEvF,WAAO,IAAI,KAAK,KAAK;AAAA,EACzB;AAAA,EAEA,UAAU;AAAA,EAEV;AAAA,EAEA;AAAA,EAEA,CAAC,OAAO,WAAW,GAAG;AAC1B;AAGA,YAAY,MAAM;",
4
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,SAAS,gBAAgB;AAEzB,SAAS,cAAc;AACvB,SAAS,qBAAqB,WAAW;AA+IlC,MAAM,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASvB,IAAO,KAAa,OAAuE;AAEvF,WAAO,IAAI,KAAK,KAAK;AAAA,EACzB;AAAA,EAEA,UAAU;AAAA,EAEV;AAAA,EAEA;AAAA,EAEA,CAAC,OAAO,WAAW,GAAG;AAC1B;AAGA,YAAY,MAAM;",
5
5
  "names": []
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matter/general",
3
- "version": "0.13.1-alpha.0-20250516-6288f3c54",
3
+ "version": "0.13.1-alpha.0-20250520-d699cd56d",
4
4
  "description": "Non-Matter support for Matter.js",
5
5
  "keywords": [
6
6
  "iot",
@@ -33,10 +33,10 @@
33
33
  "embed-examples": "embedme **/README.md"
34
34
  },
35
35
  "dependencies": {
36
- "@noble/curves": "^1.8.2"
36
+ "@noble/curves": "^1.9.1"
37
37
  },
38
38
  "devDependencies": {
39
- "@matter/testing": "0.13.1-alpha.0-20250516-6288f3c54"
39
+ "@matter/testing": "0.13.1-alpha.0-20250520-d699cd56d"
40
40
  },
41
41
  "files": [
42
42
  "dist/**/*",
@@ -12,7 +12,7 @@ import { Status } from "./Status.js";
12
12
  import { ReadOnlyTransaction, act } from "./Tx.js";
13
13
 
14
14
  /**
15
- * .
15
+ * Two-phase commit implementation.
16
16
  *
17
17
  * Transactions are either shared (for reads) or exclusive (for writes). Exclusive transactions do not block shared
18
18
  * transactions but state updates will not be visible until the transaction completes.
@@ -23,8 +23,7 @@ import { ReadOnlyTransaction, act } from "./Tx.js";
23
23
  * locks.
24
24
  *
25
25
  * Persistence is implemented by a list of participants. Commits are two phase. If an error throws in phase one all
26
- * participants roll back. An error in phase 2 could result in data inconsistency as we don't have any form of retry as
27
- * of yet.
26
+ * participants roll back. An error in phase 2 could result in data inconsistency.
28
27
  *
29
28
  * TODO - does prevent deadlock but we should probably add a timeout for resource locking
30
29
  */
@@ -75,8 +74,8 @@ export interface Transaction {
75
74
  /**
76
75
  * Add {@link ResourceType}s to the transaction synchronously.
77
76
  *
78
- * Unlike {@link addResources}, this method will throw an error if the
79
- * transaction is exclusive and the resources cannot be locked.
77
+ * Unlike {@link addResources}, this method will throw an error if the transaction is exclusive and the resources
78
+ * cannot be locked.
80
79
  */
81
80
  addResourcesSync(...resources: Resource[]): void;
82
81