fix(core): update
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
import * as plugins from './smartjwt.plugins.js';
|
||||
|
||||
export interface ISmartJWTJSONKeypair {
|
||||
privatePem: string;
|
||||
publicPem: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* A class to create and validate JWTs and their keys
|
||||
*/
|
||||
@@ -51,7 +46,7 @@ export class SmartJwt<T extends object = any> {
|
||||
/**
|
||||
* gets the currently set kaypair as json
|
||||
*/
|
||||
public getKeyPairAsJson(): ISmartJWTJSONKeypair {
|
||||
public getKeyPairAsJson(): plugins.tsclass.network.IJwtKeypair {
|
||||
return {
|
||||
privatePem: this.privateKey.toPemString(),
|
||||
publicPem: this.publicKey.toPemString(),
|
||||
@@ -61,7 +56,7 @@ export class SmartJwt<T extends object = any> {
|
||||
/**
|
||||
* sets the currently set keypair as json
|
||||
*/
|
||||
public setKeyPairAsJson(jsonKeyPair: ISmartJWTJSONKeypair) {
|
||||
public setKeyPairAsJson(jsonKeyPair: plugins.tsclass.network.IJwtKeypair) {
|
||||
this.privateKey = plugins.smartcrypto.PrivateKey.fromPemString(jsonKeyPair.privatePem);
|
||||
this.publicKey = plugins.smartcrypto.PublicKey.fromPemString(jsonKeyPair.publicPem);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user