File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,8 @@ export interface EcdsaParams extends Algorithm {
8787 hash : AlgorithmIdentifier
8888}
8989
90+ export type EncryptDecryptOptions = { name : string } | { algorithm : string , hash : string , salt ?: string }
91+
9092export interface TokenInfo {
9193 id ?: string
9294 Name ?: string
@@ -496,7 +498,7 @@ export class NodeArweaveWallet {
496498 */
497499 async encrypt (
498500 data : string | Uint8Array ,
499- options : { algorithm : string , hash : string , salt ?: string } ,
501+ options : EncryptDecryptOptions ,
500502 ) : Promise < Uint8Array > {
501503 const dataToEncrypt = typeof data === 'string' ? data : bufferToBase64 ( data )
502504 const result = await this . makeWalletRequest < string > ( 'encrypt' , { data : dataToEncrypt , options } )
@@ -526,7 +528,7 @@ export class NodeArweaveWallet {
526528 */
527529 async decrypt (
528530 data : Uint8Array ,
529- options : { algorithm : string , hash : string , salt ?: string } ,
531+ options : EncryptDecryptOptions ,
530532 ) : Promise < Uint8Array > {
531533 const dataBase64 = bufferToBase64 ( data )
532534 const result = await this . makeWalletRequest < string > ( 'decrypt' , { data : dataBase64 , options } )
You can’t perform that action at this time.
0 commit comments