cardano-web3-utils
Version:
Cardano utils for web3 apps
25 lines (24 loc) • 835 B
TypeScript
export declare class Web3Authentication {
private readonly expirationTimeSpan;
private readonly hostname;
constructor(expirationTimeSpan: number, hostname: string);
authenticate<T>(uri: string, action: string, key: string, signature: string, options?: Web3AuthenticationOptions): {
payload: Web3AuthenticationPayload & T;
walletAddress: string;
};
}
export declare class Web3AuthenticationError extends Error {
httpErrorCode: number;
constructor(message: string, httpErrorCode: number);
}
export type Web3AuthenticationPayload = {
uri: string;
action: string;
timestamp: number;
[property: string]: unknown;
};
export type Web3AuthenticationOptions = {
expirationTimeSpan?: number;
};
export * as authUtils from './auth-utils';
export * as testUtils from './test-utils';