Skip to content

Commit

Permalink
chore: type declaration for encrypt/decrypt
Browse files Browse the repository at this point in the history
  • Loading branch information
martonlederer committed Mar 13, 2021
1 parent 85c6248 commit 380adae
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions src/common/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,22 @@ declare global {
options?: SignatureOptions
): Promise<Transaction>;
getPermissions(): Promise<PermissionType[]>;
encrypt(
data: string,
options: {
algorithm: string;
hash: string;
salt?: string;
}
): Promise<Uint8Array>;
decrypt(
data: Uint8Array,
options: {
algorithm: string;
hash: string;
salt?: string;
}
): Promise<string>;
};
}
interface WindowEventMap {
Expand All @@ -414,7 +430,9 @@ declare global {
/**
* Arweave wallet permission types
*/
export type PermissionType =
export type PermissionType =
| "ACCESS_ADDRESS"
| "ACCESS_ALL_ADDRESSES"
| "SIGN_TRANSACTION";
| "SIGN_TRANSACTION"
| "ENCRYPT"
| "DECRYPT";

0 comments on commit 380adae

Please sign in to comment.