1
- import { AuthMethodType } from './enums' ;
2
1
import * as ethers from 'ethers' ;
3
2
4
3
import {
@@ -7,15 +6,15 @@ import {
7
6
LPACC_SOL ,
8
7
LPACC_EVM_BASIC ,
9
8
} from '@lit-protocol/accs-schemas' ;
9
+
10
+ import { AuthMethodType } from './enums' ;
10
11
import {
11
12
AuthMethod ,
12
13
LitRelayConfig ,
13
14
SignInWithOTPParams ,
14
15
Signature ,
15
16
StytchOtpProviderOptions ,
16
17
WebAuthnProviderOptions ,
17
- } from './interfaces' ;
18
- import {
19
18
AccsOperatorParams ,
20
19
EthWalletProviderOptions ,
21
20
JsonEncryptionRetrieveRequest ,
@@ -78,14 +77,14 @@ export type Chain = string;
78
77
*
79
78
* @typedef { Object } LITChainRequiredProps
80
79
*/
81
- export type LITChainRequiredProps = {
80
+ export interface LITChainRequiredProps {
82
81
name : string ;
83
82
symbol : string ;
84
83
decimals : number ;
85
- rpcUrls : Array < string > ;
86
- blockExplorerUrls : Array < string > ;
84
+ rpcUrls : string [ ] ;
85
+ blockExplorerUrls : string [ ] ;
87
86
vmType : string ;
88
- } ;
87
+ }
89
88
90
89
/**
91
90
* @typedef { Object } LITEVMChain
@@ -117,9 +116,7 @@ export type LITCosmosChain = LITChainRequiredProps & {
117
116
* @property {string } vmType - Either EVM for an Ethereum compatible chain or SVM for a Solana compatible chain
118
117
* @property {string } name - The human readable name of the chain
119
118
*/
120
- export type LITChain < T > = {
121
- [ chainName : string ] : T ;
122
- } ;
119
+ export type LITChain < T > = Record < string , T > ;
123
120
124
121
export type LIT_NETWORKS_KEYS =
125
122
| 'cayenne'
@@ -199,18 +196,18 @@ export type ClaimResult<T = ClaimProcessor> = {
199
196
pubkey : string ;
200
197
} & ( T extends 'relay' ? LitRelayConfig : { signer : ethers . Signer } ) ;
201
198
202
- export type LitContract = {
199
+ export interface LitContract {
203
200
address ?: string ;
204
201
abi ?: any ;
205
202
name ?: string ;
206
- } ;
203
+ }
207
204
208
205
/**
209
206
* Defines a set of contract metadata for bootstrapping
210
207
* network context and interfacing with contracts on Chroncile blockchain
211
208
*
212
209
*/
213
- export type LitContractContext = {
210
+ export interface LitContractContext {
214
211
[ index : string ] : string | any ;
215
212
216
213
Allowlist : LitContract ;
@@ -224,15 +221,15 @@ export type LitContractContext = {
224
221
RateLimitNFT : LitContract ;
225
222
Staking : LitContract ;
226
223
StakingBalances : LitContract ;
227
- } ;
224
+ }
228
225
229
226
/**
230
227
* Type for a contract resolver instance which will be used
231
228
* In place of LitContractContext for loading addresses of lit contracts
232
229
* an instance of LitContractContext can still be provided. which will be used for abi data.
233
230
*
234
231
*/
235
- export type LitContractResolverContext = {
232
+ export interface LitContractResolverContext {
236
233
[ index : string ] :
237
234
| string
238
235
| LitContractContext
@@ -244,6 +241,6 @@ export type LitContractResolverContext = {
244
241
environment : number ;
245
242
contractContext ?: LitContractContext ;
246
243
provider ?: ethers . providers . JsonRpcProvider ;
247
- } ;
244
+ }
248
245
249
246
export type ResponseStrategy = 'leastCommon' | 'mostCommon' | 'custom' ;
0 commit comments