@rsksmart/ipfs-cpinner-client-types
Version:
RIF Identity - IPFS Centralized Pinner Provider Types
31 lines • 948 B
TypeScript
import axios from 'axios';
export declare type LoginResponse = {
accessToken: string;
refreshToken: string;
};
export declare type PersonalSign = (data: string) => Promise<string>;
export interface KeyValueStore {
get(key: string): Promise<string>;
set(key: string, value: string): Promise<void>;
}
export declare type DIDAuthServiceConfig = {
did?: string;
serviceUrl: string;
};
export declare type DIDAuthClientConfig = {
personalSign?: PersonalSign;
};
export declare type DIDAuthStoreConfig = {
store?: KeyValueStore;
};
export declare type DIDAuthConfig = DIDAuthServiceConfig & DIDAuthClientConfig & DIDAuthStoreConfig;
export interface IAuthManager {
get: typeof axios.get;
post: typeof axios.post;
delete: typeof axios.delete;
put: typeof axios.put;
}
export interface IAuthManagerNewable extends IAuthManager {
new (c: DIDAuthConfig): IAuthManager;
}
//# sourceMappingURL=types.d.ts.map