@@ -13,6 +13,13 @@ import { getChildLogger } from '@lit-protocol/logger';
1313import {
1414 type LitNetworkModule ,
1515 type PKPStorageProvider ,
16+ type ExpectedAccountOrWalletClient ,
17+ type GenericTxRes ,
18+ type LitTxRes ,
19+ type PKPData ,
20+ type AuthMethod ,
21+ PKPPermissionsManager ,
22+ PaymentManager ,
1623} from '@lit-protocol/networks' ;
1724import {
1825 AuthContextSchema2 ,
@@ -735,8 +742,14 @@ export const _createNagaLitClient = async (
735742 loginUrl : networkModule . getDefaultLoginBaseUrl ( ) ,
736743 } ,
737744 disconnect : _stateManager . stop ,
738- mintWithEoa : networkModule . chainApi . mintWithEoa ,
739- mintWithAuth : networkModule . chainApi . mintWithAuth ,
745+ mintWithEoa : networkModule . chainApi . mintWithEoa as ( params : {
746+ account : ExpectedAccountOrWalletClient ;
747+ } ) => Promise < GenericTxRes < LitTxRes < PKPData > , PKPData > > ,
748+ mintWithAuth : networkModule . chainApi . mintWithAuth as ( params : {
749+ account : ExpectedAccountOrWalletClient ;
750+ authData : any ;
751+ scopes : string [ ] ;
752+ } ) => Promise < GenericTxRes < LitTxRes < PKPData > , PKPData > > ,
740753 mintWithCustomAuth : async ( params : MintWithCustomAuthRequest ) => {
741754 const validatedParams = MintWithCustomAuthSchema . parse ( params ) ;
742755
@@ -801,11 +814,15 @@ export const _createNagaLitClient = async (
801814 pkpData : pkp ,
802815 } ;
803816 } ,
804- getPKPPermissionsManager : networkModule . chainApi . getPKPPermissionsManager ,
817+ getPKPPermissionsManager : networkModule . chainApi
818+ . getPKPPermissionsManager as ( params : {
819+ pkpIdentifier : PkpIdentifierRaw ;
820+ account : ExpectedAccountOrWalletClient ;
821+ } ) => Promise < PKPPermissionsManager > ,
805822 getPaymentManager : async ( params : { account : any } ) => {
806- return await networkModule . chainApi . getPaymentManager ( {
823+ return ( await networkModule . chainApi . getPaymentManager ( {
807824 account : params . account ,
808- } ) ;
825+ } ) ) as PaymentManager ;
809826 } ,
810827 viewPKPPermissions : async ( pkpIdentifier : PkpIdentifierRaw ) => {
811828 // It's an Anvil private key, chill. 🤣
0 commit comments