Skip to content

Commit 21cfaf3

Browse files
chore(types): LIT-3125 - Run eslint --fix on types.ts
1 parent ac70021 commit 21cfaf3

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

packages/types/src/lib/types.ts

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { AuthMethodType } from './enums';
21
import * as ethers from 'ethers';
32

43
import {
@@ -7,15 +6,15 @@ import {
76
LPACC_SOL,
87
LPACC_EVM_BASIC,
98
} from '@lit-protocol/accs-schemas';
9+
10+
import { AuthMethodType } from './enums';
1011
import {
1112
AuthMethod,
1213
LitRelayConfig,
1314
SignInWithOTPParams,
1415
Signature,
1516
StytchOtpProviderOptions,
1617
WebAuthnProviderOptions,
17-
} from './interfaces';
18-
import {
1918
AccsOperatorParams,
2019
EthWalletProviderOptions,
2120
JsonEncryptionRetrieveRequest,
@@ -78,14 +77,14 @@ export type Chain = string;
7877
*
7978
* @typedef { Object } LITChainRequiredProps
8079
*/
81-
export type LITChainRequiredProps = {
80+
export interface LITChainRequiredProps {
8281
name: string;
8382
symbol: string;
8483
decimals: number;
85-
rpcUrls: Array<string>;
86-
blockExplorerUrls: Array<string>;
84+
rpcUrls: string[];
85+
blockExplorerUrls: string[];
8786
vmType: string;
88-
};
87+
}
8988

9089
/**
9190
* @typedef { Object } LITEVMChain
@@ -117,9 +116,7 @@ export type LITCosmosChain = LITChainRequiredProps & {
117116
* @property {string} vmType - Either EVM for an Ethereum compatible chain or SVM for a Solana compatible chain
118117
* @property {string} name - The human readable name of the chain
119118
*/
120-
export type LITChain<T> = {
121-
[chainName: string]: T;
122-
};
119+
export type LITChain<T> = Record<string, T>;
123120

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

202-
export type LitContract = {
199+
export interface LitContract {
203200
address?: string;
204201
abi?: any;
205202
name?: string;
206-
};
203+
}
207204

208205
/**
209206
* Defines a set of contract metadata for bootstrapping
210207
* network context and interfacing with contracts on Chroncile blockchain
211208
*
212209
*/
213-
export type LitContractContext = {
210+
export interface LitContractContext {
214211
[index: string]: string | any;
215212

216213
Allowlist: LitContract;
@@ -224,15 +221,15 @@ export type LitContractContext = {
224221
RateLimitNFT: LitContract;
225222
Staking: LitContract;
226223
StakingBalances: LitContract;
227-
};
224+
}
228225

229226
/**
230227
* Type for a contract resolver instance which will be used
231228
* In place of LitContractContext for loading addresses of lit contracts
232229
* an instance of LitContractContext can still be provided. which will be used for abi data.
233230
*
234231
*/
235-
export type LitContractResolverContext = {
232+
export interface LitContractResolverContext {
236233
[index: string]:
237234
| string
238235
| LitContractContext
@@ -244,6 +241,6 @@ export type LitContractResolverContext = {
244241
environment: number;
245242
contractContext?: LitContractContext;
246243
provider?: ethers.providers.JsonRpcProvider;
247-
};
244+
}
248245

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

0 commit comments

Comments
 (0)