Skip to content

Commit

Permalink
Fix utility func usage (#67)
Browse files Browse the repository at this point in the history
* temporary allow keyshares produced by version 1.1.0

* fix for utility function usage

* added test case

* update license to GNU

* added compiled files

* bug fix - "or" instead "and"
  • Loading branch information
IlyaVi authored Dec 18, 2024
1 parent 8d195ab commit 8142aff
Show file tree
Hide file tree
Showing 25 changed files with 212 additions and 42 deletions.
4 changes: 2 additions & 2 deletions dist/esbuild/main.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/esbuild/main.js.map

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions dist/tsc/src/lib/KeyShares/KeyShares.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/tsc/src/lib/KeyShares/KeyShares.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface IKeySharesData {
get operatorIds(): number[];
get operatorPublicKeys(): string[];
}
export interface IKeySharesPartitialData {
export interface IKeySharesPartialData {
ownerNonce?: number | null;
ownerAddress?: string | null;
publicKey?: string | null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface IKeySharesPayload {
validate(): void;
build(data: any): any;
}
export interface IKeySharesPartitialPayload {
export interface IKeySharesPartialPayload {
sharesData: string;
publicKey: string;
operatorIds: number[];
Expand Down
4 changes: 2 additions & 2 deletions dist/tsc/src/lib/KeyShares/KeySharesData/KeySharesData.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { OperatorData } from './OperatorData';
import { IKeySharesData, IKeySharesPartitialData } from './IKeySharesData';
import { IKeySharesData, IKeySharesPartialData } from './IKeySharesData';
export declare class KeySharesData implements IKeySharesData {
ownerNonce?: number | null;
ownerAddress?: string | null;
publicKey?: string | null;
operators?: OperatorData[] | null;
update(data: IKeySharesPartitialData): void;
update(data: IKeySharesPartialData): void;
/**
* Do all possible validations.
*/
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IKeySharesPartitialPayload, IKeySharesPayload } from './IKeySharesPayload';
import { IKeySharesPartialPayload, IKeySharesPayload } from './IKeySharesPayload';
/**
* Key Shares Payload
*/
Expand All @@ -17,7 +17,7 @@ export declare class KeySharesPayload implements IKeySharesPayload {
* Updates the payload with new data and validates it.
* @param data Partial key shares payload to update.
*/
update(data: IKeySharesPartitialPayload): void;
update(data: IKeySharesPartialPayload): void;
/**
* Validates the current state of the instance.
* @returns {void | ValidationError[]} Validation errors if any, otherwise undefined.
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/tsc/src/lib/KeyShares/KeySharesItem.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { KeySharesData } from './KeySharesData/KeySharesData';
import { KeySharesPayload } from './KeySharesData/KeySharesPayload';
import { EncryptShare } from '../Encryption/Encryption';
import { IKeySharesPartitialData } from './KeySharesData/IKeySharesData';
import { IKeySharesPartialData } from './KeySharesData/IKeySharesData';
import { IOperator } from './KeySharesData/IOperator';
import { SSVKeysException } from '../exceptions/base';
export interface IKeySharesPayloadData {
Expand Down Expand Up @@ -41,7 +41,7 @@ export declare class KeySharesItem {
/**
* Updates the current instance with partial data and payload, and validates.
*/
update(data: IKeySharesPartitialData): void;
update(data: IKeySharesPartialData): void;
/**
* Validate everything
*/
Expand Down
4 changes: 2 additions & 2 deletions dist/tsc/src/lib/KeyShares/KeySharesItem.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8142aff

Please sign in to comment.