Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
21cfaf3
chore(types): LIT-3125 - Run eslint --fix on types.ts
MaximusHaximus Jun 25, 2024
d6c1a7b
types: LIT-3125 - Fix incorrect interface for SessionKeySignedMessage…
MaximusHaximus Jun 25, 2024
549cd84
feat(wrapped-keys): LIT-3125 - Add wrapped keys backend service clien…
MaximusHaximus Jun 25, 2024
46faa91
feat(wrapped-keys): LIT-3125 - Add wrapped keys LIT actions client layer
MaximusHaximus Jun 25, 2024
b05917a
feat(wrapped-keys): LIT-3125 - Constants, types and tests updates
MaximusHaximus Jun 25, 2024
ad58e5a
chore(wrapped-keys): LIT-3125 - Add note to LIT action about missing …
MaximusHaximus Jun 26, 2024
cba8d1d
chore(wrapped-keys): LIT-3125 - Add return type interface for export …
MaximusHaximus Jun 26, 2024
e3d2055
feat(wrapped-keys): LIT-3125 - Implement main API layer for wrapped keys
MaximusHaximus Jun 26, 2024
5b5abb1
chore(wrapped-keys): LIT-3125 - Update entrypoint exports to be expli…
MaximusHaximus Jun 26, 2024
d1e49f8
types(types): LIT-3125 - Revert change to AccessControlConditions typ…
MaximusHaximus Jun 26, 2024
5af0435
constants(wrapped-keys): LIT-3125 - Remove NETWORK_XXXX constants as …
MaximusHaximus Jun 26, 2024
5d89170
test(wrapped-keys): LIT-3125 - Update success tests to latest wrapped…
MaximusHaximus Jun 26, 2024
b66af98
test(wrapped-keys): LIT-3125 - Update fail tests
MaximusHaximus Jun 26, 2024
d8d17ce
chore(wrapped-keys): LIT-3125 - Rename `algo` to `keyType` to avoid c…
MaximusHaximus Jun 26, 2024
9eb0f47
chore(wrapped-keys): LIT-3125 - Remove 'custom' API behaviours and ty…
MaximusHaximus Jun 26, 2024
900ede1
chore(wrapped-keys): LIT-3125 - Remove 'custom' tests
MaximusHaximus Jun 26, 2024
e9d771e
docs(wrapped-keys): LIT-3125 - Update exports for JSDocs
MaximusHaximus Jun 26, 2024
8cff023
feat(wrapped-keys): LIT-3125 - Add storeEncryptedKeyMetadata() method…
MaximusHaximus Jun 26, 2024
241fa97
feat(wrapped-keys): LIT-3125 - Replace `address` with `publicKey`
MaximusHaximus Jun 26, 2024
c3166a5
test(wrapped-keys): LIT-3125 - Update tests to use `publicKey` instea…
MaximusHaximus Jun 26, 2024
ac8f173
chore(wrapped-keys): LIT-3125 - Make internal service client params i…
MaximusHaximus Jun 26, 2024
b48efc9
fix(wrapped-keys): LIT-3125 - Remove inadvertent imports from `index.…
MaximusHaximus Jun 27, 2024
8140964
Published version: 6.0.3@wrapped-keys
DashKash54 Jun 28, 2024
878c4fa
fix(wrapped-keys): LIT-3125 - Remove FIXME :)
MaximusHaximus Jun 28, 2024
acb10f2
test(wrapped-keys): LIT-3125 - Fix actually-failing-fail test string …
MaximusHaximus Jun 28, 2024
c3dafd0
fix(wrapped-keys): LIT-3125 - Add strong type for `KeyType`, and comp…
MaximusHaximus Jun 28, 2024
cbdc556
chore(wrapped-keys): LIT-3125 - Remove commented code and excess `con…
MaximusHaximus Jun 28, 2024
0be70bb
docs(wrapped-keys): LIT-3125 - Fix JSDoc for `StoreEncryptedKeyMetada…
MaximusHaximus Jun 28, 2024
6b72634
docs(wrapped-keys): LIT-3125 - Export constants for `keyType` and `ne…
MaximusHaximus Jun 28, 2024
3a7c943
refac: Prettier
DashKash54 Jun 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
chore(types): LIT-3125 - Run eslint --fix on types.ts
  • Loading branch information
MaximusHaximus committed Jun 25, 2024
commit 21cfaf35bdf15f7add6ec2882fcad65963e15c72
29 changes: 13 additions & 16 deletions packages/types/src/lib/types.ts
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why have we changed these to interfaces do we plan to extend it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing changed -- our ESLint rule configuration (and SDK-wide convention) enforces that we always use interfaces unless we are using features that require a type. I ran eslint --fix on the file and it fixed the entries that should have been interfaces :). See first commit in the pr here: 21cfaf3

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then EsLint is not being run in the CI? @MaximusHaximus @Ansonhkg ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right, there is no mutative CI that changes files, and not everyone has their editors set to run eslint --fix on save, so these things happen ™️. It's been on the roadmap to implement for a few months.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { AuthMethodType } from './enums';
import * as ethers from 'ethers';

import {
Expand All @@ -7,15 +6,15 @@ import {
LPACC_SOL,
LPACC_EVM_BASIC,
} from '@lit-protocol/accs-schemas';

import { AuthMethodType } from './enums';
import {
AuthMethod,
LitRelayConfig,
SignInWithOTPParams,
Signature,
StytchOtpProviderOptions,
WebAuthnProviderOptions,
} from './interfaces';
import {
AccsOperatorParams,
EthWalletProviderOptions,
JsonEncryptionRetrieveRequest,
Expand Down Expand Up @@ -78,14 +77,14 @@ export type Chain = string;
*
* @typedef { Object } LITChainRequiredProps
*/
export type LITChainRequiredProps = {
export interface LITChainRequiredProps {
name: string;
symbol: string;
decimals: number;
rpcUrls: Array<string>;
blockExplorerUrls: Array<string>;
rpcUrls: string[];
blockExplorerUrls: string[];
vmType: string;
};
}

/**
* @typedef { Object } LITEVMChain
Expand Down Expand Up @@ -117,9 +116,7 @@ export type LITCosmosChain = LITChainRequiredProps & {
* @property {string} vmType - Either EVM for an Ethereum compatible chain or SVM for a Solana compatible chain
* @property {string} name - The human readable name of the chain
*/
export type LITChain<T> = {
[chainName: string]: T;
};
export type LITChain<T> = Record<string, T>;

export type LIT_NETWORKS_KEYS =
| 'cayenne'
Expand Down Expand Up @@ -199,18 +196,18 @@ export type ClaimResult<T = ClaimProcessor> = {
pubkey: string;
} & (T extends 'relay' ? LitRelayConfig : { signer: ethers.Signer });

export type LitContract = {
export interface LitContract {
address?: string;
abi?: any;
name?: string;
};
}

/**
* Defines a set of contract metadata for bootstrapping
* network context and interfacing with contracts on Chroncile blockchain
*
*/
export type LitContractContext = {
export interface LitContractContext {
[index: string]: string | any;

Allowlist: LitContract;
Expand All @@ -224,15 +221,15 @@ export type LitContractContext = {
RateLimitNFT: LitContract;
Staking: LitContract;
StakingBalances: LitContract;
};
}

/**
* Type for a contract resolver instance which will be used
* In place of LitContractContext for loading addresses of lit contracts
* an instance of LitContractContext can still be provided. which will be used for abi data.
*
*/
export type LitContractResolverContext = {
export interface LitContractResolverContext {
[index: string]:
| string
| LitContractContext
Expand All @@ -244,6 +241,6 @@ export type LitContractResolverContext = {
environment: number;
contractContext?: LitContractContext;
provider?: ethers.providers.JsonRpcProvider;
};
}

export type ResponseStrategy = 'leastCommon' | 'mostCommon' | 'custom';