import { RequesterAuthorizerWithAirnode , AirnodeRrp } from '@api3/airnode-protocol' ; import * as evm from './evm' ; import * as admin from './implementation' ; export class AdminSdk { static getAirnodeRrp = evm . getAirnodeRrp ; static getRequesterAuthorizerWithAirnode = evm . getRequesterAuthorizerWithAirnode ; static deriveEndpointId = ( oisTitle , endpointName ) => admin . deriveEndpointId ( oisTitle , endpointName ) ; static deriveWalletPathFromSponsorAddress = ( sponsorAddress ) => admin . deriveWalletPathFromSponsorAddress ( sponsorAddress ) ; static useAirnodeRrp = evm . useAirnodeRrp ; constructor ( public airnodeRrp , public requesterAuthorizerWithAirnode ) { } deriveAirnodeXpub = ( airnodeMnemonic ) => admin . deriveAirnodeXpub ( airnodeMnemonic ) ; verifyAirnodeXpub = ( airnodeXpub , airnodeAddress ) => admin . verifyAirnodeXpub ( airnodeXpub , airnodeAddress ) ; deriveSponsorWalletAddress = ( airnodeXpub , airnodeAddress , sponsorAddress ) => admin . deriveSponsorWalletAddress ( airnodeXpub , airnodeAddress , sponsorAddress ) ; sponsorRequester = ( requesterAddress ) => admin . sponsorRequester ( this . airnodeRrp , requesterAddress ) ; unsponsorRequester = ( requesterAddress ) => admin . unsponsorRequester ( this . airnodeRrp , requesterAddress ) ; createTemplate = ( template ) => admin . createTemplate ( this . airnodeRrp , template ) ; requestWithdrawal = ( airnodeAddress , sponsorWallet ) => admin . requestWithdrawal ( this . airnodeRrp , airnodeAddress , sponsorWallet ) ; checkWithdrawalRequest = ( withdrawalRequestId ) => admin . checkWithdrawalRequest ( this . airnodeRrp , withdrawalRequestId ) ; requesterToRequestCountPlusOne = ( requesterAddress ) => admin . requesterToRequestCountPlusOne ( this . airnodeRrp , requesterAddress ) ; getTemplate = ( templateId ) => admin . getTemplate ( this . airnodeRrp , templateId ) ; getTemplates = ( templateIds ) => admin . getTemplates ( this . airnodeRrp , templateIds ) ; sponsorToRequesterToSponsorshipStatus = ( sponsorAddress , requesterAddress ) => admin . sponsorToRequesterToSponsorshipStatus ( this . airnodeRrp , sponsorAddress , requesterAddress ) ; sponsorToWithdrawalRequestCount = ( sponsorAddress ) => admin . sponsorToWithdrawalRequestCount ( this . airnodeRrp , sponsorAddress ) ; fulfillWithdrawal = ( requestId , airnodeAddress , sponsorAddress , amount ) => admin . fulfillWithdrawal ( this . airnodeRrp , requestId , airnodeAddress , sponsorAddress , amount ) ; setWhitelistExpiration = ( airnodeAddress , endpointId , requesterAddress , expirationTimestamp ) => admin . setWhitelistExpiration ( this . requesterAuthorizerWithAirnode , airnodeAddress , endpointId , requesterAddress , expirationTimestamp ) ; extendWhitelistExpiration = ( airnodeAddress , endpointId , requesterAddress , expirationTimestamp ) => admin . extendWhitelistExpiration ( this . requesterAuthorizerWithAirnode , airnodeAddress , endpointId , requesterAddress , expirationTimestamp ) ; setIndefiniteWhitelistStatus = ( airnodeAddress , endpointId , requesterAddress , status ) => admin . setIndefiniteWhitelistStatus ( this . requesterAuthorizerWithAirnode , airnodeAddress , endpointId , requesterAddress , status ) ; getWhitelistStatus = ( airnodeAddress , endpointId , requesterAddress ) => admin . getWhitelistStatus ( this . requesterAuthorizerWithAirnode , airnodeAddress , endpointId , requesterAddress ) ; isRequesterWhitelisted = ( airnodeAddress , endpointId , requesterAddress ) => admin . isRequesterWhitelisted ( this . requesterAuthorizerWithAirnode , airnodeAddress , endpointId , requesterAddress ) ; generateMnemonic = ( ) => admin . generateMnemonic ( ) ; deriveAirnodeAddress = ( airnodeMnemonic ) => admin . deriveAirnodeAddress ( airnodeMnemonic ) ; }