Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up Key types #264

Open
Egge21M opened this issue Mar 10, 2025 · 0 comments
Open

Clean up Key types #264

Egge21M opened this issue Mar 10, 2025 · 0 comments
Labels

Comments

@Egge21M
Copy link
Collaborator

Egge21M commented Mar 10, 2025

We have quite a lot of types dealing with a mint's keysets. However the type's names are ambiguous. We should clean these up or move them into their own class.

Example: Here we have the MintKeys type describing a key set with all its key-pairs. Then we have MintKeyset which represents the a single keyset entry without the keys. MintActiveKeys is an Array of MintKeys, but MintAllKeysets is an Array of MintKeysets.

Proposed solution: Merge all these types into a single Keyset Class or type.

export type Keys = { [amount: number]: string };

export type MintActiveKeys = {
	keysets: Array<MintKeys>;
};

export type MintAllKeysets = {
	keysets: Array<MintKeyset>;
};

export type MintKeys = {
	id: string;
	unit: string;
	keys: Keys;
};

export type MintKeyset = {
	id: string;
	unit: string;
	active: boolean;
	input_fee_ppk?: number;
};
@Egge21M Egge21M added the v3 label Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant