Skip to content

Commit

Permalink
feat: add delete-subscription to signer
Browse files Browse the repository at this point in the history
  • Loading branch information
wa0x6e committed Nov 12, 2024
1 parent f8d5630 commit 24edc54
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/sign/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
Profile,
Alias,
DeleteSpace,
DeleteSubscription,
Statement,
spaceTypes,
proposalTypes,
Expand All @@ -36,7 +37,8 @@ import {
profileTypes,
aliasTypes,
deleteSpaceType,
statementTypes
statementTypes,
deleteSubscriptionTypes
} from './types';
import constants from '../constants.json';

Expand Down Expand Up @@ -234,4 +236,12 @@ export default class Client {
) {
return await this.sign(web3, address, message, deleteSpaceType);
}

async deleteSubscription(
web3: Web3Provider | Wallet,
address: string,
message: DeleteSubscription
) {
return await this.sign(web3, address, message, deleteSubscriptionTypes);
}
}
7 changes: 7 additions & 0 deletions src/sign/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ export interface DeleteSpace {
timestamp?: number;
}

export interface DeleteSubscription {
from?: string;
type: string;
value: string;
timestamp?: number;
}

export const spaceTypes = {
Space: [
{ name: 'from', type: 'address' },
Expand Down

0 comments on commit 24edc54

Please sign in to comment.