Skip to content

Commit

Permalink
Add getRevokeInstallationsSignatureText to client
Browse files Browse the repository at this point in the history
  • Loading branch information
rygine committed Nov 1, 2024
1 parent ad0fa8e commit c8a526f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
10 changes: 8 additions & 2 deletions sdks/browser-sdk/src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ export class Client extends ClientWorkerClass {
return this.sendMessage("getRevokeWalletSignatureText", { accountAddress });
}

async getRevokeInstallationsSignatureText() {
return this.sendMessage("getRevokeInstallationsSignatureText", undefined);
}

async addSignature(type: WasmSignatureRequestType, bytes: Uint8Array) {
return this.sendMessage("addSignature", { type, bytes });
}
Expand All @@ -119,8 +123,10 @@ export class Client extends ClientWorkerClass {
return this.sendMessage("findInboxIdByAddress", { address });
}

async inboxState(refreshFromNetwork: boolean) {
return this.sendMessage("inboxState", { refreshFromNetwork });
async inboxState(refreshFromNetwork?: boolean) {
return this.sendMessage("inboxState", {
refreshFromNetwork: refreshFromNetwork ?? false,
});
}

async getLatestInboxState(inboxId: string) {
Expand Down
9 changes: 9 additions & 0 deletions sdks/browser-sdk/src/workers/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,15 @@ self.onmessage = async (event: MessageEvent<ClientEventsClientMessageData>) => {
});
break;
}
case "getRevokeInstallationsSignatureText": {
const result = await client.getRevokeInstallationsSignatureText();
postMessage({
id,
action,
result,
});
break;
}
case "addSignature":
await client.addSignature(data.type, data.bytes);
postMessage({
Expand Down

0 comments on commit c8a526f

Please sign in to comment.