Skip to content

Commit

Permalink
Add signature methods
Browse files Browse the repository at this point in the history
  • Loading branch information
rygine committed Nov 19, 2024
1 parent d8ecc98 commit 998be7f
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions sdks/node-sdk/src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
generateInboxId,
getInboxIdForAddress,
GroupMessageKind,
Level,
LogLevel,
SignatureRequestType,
type Consent,
type ConsentEntityType,
Expand Down Expand Up @@ -78,7 +78,7 @@ export type OtherOptions = {
/**
* Logging level
*/
loggingLevel?: Level;
loggingLevel?: LogLevel;
/**
* Disable automatic registration when creating a client
*/
Expand Down Expand Up @@ -126,7 +126,7 @@ export class Client {

const logOptions: LogOptions = {
structured: options?.structuredLogging ?? false,
level: options?.loggingLevel ?? Level.off,
level: options?.loggingLevel ?? LogLevel.off,
};

const client = new Client(
Expand Down Expand Up @@ -409,4 +409,30 @@ export class Client {
async getConsentState(entityType: ConsentEntityType, entity: string) {
return this.#innerClient.getConsentState(entityType, entity);
}

signWithInstallationKey(signatureText: string) {
return this.#innerClient.signWithInstallationKey(signatureText);
}

verifySignedWithInstallationKey(
signatureText: string,
signatureBytes: Uint8Array,
) {
this.#innerClient.verifySignedWithInstallationKey(
signatureText,
signatureBytes,
);
}

verifySignedWithPublicKey(
signatureText: string,
signatureBytes: Uint8Array,
publicKey: Uint8Array,
) {
this.#innerClient.verifySignedWithPublicKey(
signatureText,
signatureBytes,
publicKey,
);
}
}

0 comments on commit 998be7f

Please sign in to comment.