Skip to content

Commit

Permalink
Halo: Add new commands to the BaseHaloAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
icedevml committed Sep 26, 2024
1 parent 40fe0d5 commit 8f80f40
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions core/src.ts/halo/cmd_exec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* License: MIT
*/
import {
HaloCmdCFGNDEFStoreGraffiti,
HaloCmdExportKey,
HaloCmdGetDataStruct,
HaloCmdGetGraffiti,
Expand All @@ -13,15 +14,15 @@ import {
HaloCmdImportKey,
HaloCmdImportKeyInit,
HaloCmdLoadTransportPK,
HaloCmdReplacePassword,
HaloCmdReplacePassword, HaloCmdReplacePasswordStoreGraffiti,
HaloCmdSetPassword,
HaloCmdSetURLSubdomain,
HaloCmdSign,
HaloCmdSignChallenge,
HaloCmdSignRandom,
HaloCmdStoreGraffiti,
HaloCmdUnsetPassword,
HaloCmdWriteLatch,
HaloCmdWriteLatch, HaloResCFGNDEFStoreGraffiti,
HaloResExportKey,
HaloResGetDataStruct,
HaloResGetGraffiti,
Expand All @@ -31,7 +32,7 @@ import {
HaloResImportKey,
HaloResImportKeyInit,
HaloResLoadTransportPK,
HaloResReplacePassword,
HaloResReplacePassword, HaloResReplacePasswordStoreGraffiti,
HaloResSetPassword,
HaloResSetURLSubdomain,
HaloResSign,
Expand All @@ -54,6 +55,7 @@ import {
HaloResGenKeyFinalize,
HaloResponseObject
} from "../types.js";
import {cmdCfgNDEFStoreGraffiti} from "./commands.js";

export abstract class BaseHaloAPI {
abstract executeCommand(args: HaloCommandObject, options?: HaloAPICallOptions): Promise<HaloResponseObject>;
Expand Down Expand Up @@ -145,4 +147,12 @@ export abstract class BaseHaloAPI {
storeGraffiti(args: HaloCmdStoreGraffiti, options?: HaloAPICallOptions): Promise<HaloResStoreGraffiti> {
return this.executeCommand({...args, name: "store_graffiti"}, options);
}

replacePasswordStoreGraffiti(args: HaloCmdReplacePasswordStoreGraffiti, options?: HaloAPICallOptions): Promise<HaloResReplacePasswordStoreGraffiti> {
return this.executeCommand({...args, name: "replace_password_store_graffiti"}, options);
}

cfgNDEFStoreGraffiti(args: HaloCmdCFGNDEFStoreGraffiti, options?: HaloAPICallOptions): Promise<HaloResCFGNDEFStoreGraffiti> {
return this.executeCommand({...args, name: "cfg_ndef_store_graffiti"}, options);
}
}

0 comments on commit 8f80f40

Please sign in to comment.