UNPKG

@solsdk/jito-ts

Version:

## What is it and why do you need it?

24 lines (23 loc) 882 B
import { Interceptor } from '@grpc/grpc-js'; import { Keypair } from '@solana/web3.js'; import { AuthServiceClient } from '../../gen/block-engine/auth'; export declare const authInterceptor: (authProvider: AuthProvider) => Interceptor; export declare class Jwt { readonly token: string; private readonly expiration; constructor(token: string, expiration: number); isExpired(): boolean; } export declare class AuthProvider { private client; private readonly authKeypair; private accessToken; private refreshToken; private refreshing; constructor(client: AuthServiceClient, authKeypair: Keypair); injectAccessToken(callback: (accessToken: Jwt) => void): void; private refreshAccessToken; static create(client: AuthServiceClient, authKeypair: Keypair): Promise<AuthProvider>; private fullAuth; private static isValidToken; }