Skip to content

Commit 5c10b88

Browse files
committed
fix: Styling
Signed-off-by: jamshale <[email protected]>
1 parent e4d77de commit 5c10b88

File tree

1 file changed

+97
-97
lines changed

1 file changed

+97
-97
lines changed

packages/askar-nodejs/src/NodeJSAskar.ts

Lines changed: 97 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,110 @@
11
import {
22
AeadParams,
3-
AeadParamsOptions,
4-
Askar,
3+
type AeadParamsOptions,
4+
type Askar,
55
AskarError,
6-
AskarErrorObject,
7-
EncryptedBuffer,
8-
EntryListCountOptions,
9-
EntryListFreeOptions,
10-
EntryListGetCategoryOptions,
11-
EntryListGetNameOptions,
12-
EntryListGetTagsOptions,
13-
EntryListGetValueOptions,
6+
type AskarErrorObject,
7+
type EncryptedBuffer,
8+
type EntryListCountOptions,
9+
type EntryListFreeOptions,
10+
type EntryListGetCategoryOptions,
11+
type EntryListGetNameOptions,
12+
type EntryListGetTagsOptions,
13+
type EntryListGetValueOptions,
1414
EntryListHandle,
15-
KeyAeadDecryptOptions,
16-
KeyAeadEncryptOptions,
17-
KeyAeadGetPaddingOptions,
18-
KeyAeadGetParamsOptions,
19-
KeyAeadRandomNonceOptions,
20-
KeyConvertOptions,
21-
KeyCryptoBoxOpenOptions,
22-
KeyCryptoBoxOptions,
23-
KeyCryptoBoxSealOpenOptions,
24-
KeyCryptoBoxSealOptions,
25-
KeyDeriveEcdh1puOptions,
26-
KeyDeriveEcdhEsOptions,
27-
KeyEntryListCountOptions,
28-
KeyEntryListFreeOptions,
29-
KeyEntryListGetAlgorithmOptions,
30-
KeyEntryListGetMetadataOptions,
31-
KeyEntryListGetNameOptions,
32-
KeyEntryListGetTagsOptions,
15+
type KeyAeadDecryptOptions,
16+
type KeyAeadEncryptOptions,
17+
type KeyAeadGetPaddingOptions,
18+
type KeyAeadGetParamsOptions,
19+
type KeyAeadRandomNonceOptions,
20+
type KeyConvertOptions,
21+
type KeyCryptoBoxOpenOptions,
22+
type KeyCryptoBoxOptions,
23+
type KeyCryptoBoxSealOpenOptions,
24+
type KeyCryptoBoxSealOptions,
25+
type KeyDeriveEcdh1puOptions,
26+
type KeyDeriveEcdhEsOptions,
27+
type KeyEntryListCountOptions,
28+
type KeyEntryListFreeOptions,
29+
type KeyEntryListGetAlgorithmOptions,
30+
type KeyEntryListGetMetadataOptions,
31+
type KeyEntryListGetNameOptions,
32+
type KeyEntryListGetTagsOptions,
3333
KeyEntryListHandle,
34-
KeyEntryListLoadLocalOptions,
35-
KeyFreeOptions,
36-
KeyFromJwkOptions,
37-
KeyFromKeyExchangeOptions,
38-
KeyFromPublicBytesOptions,
39-
KeyFromSecretBytesOptions,
40-
KeyFromSeedOptions,
41-
KeyGenerateOptions,
42-
KeyGetAlgorithmOptions,
43-
KeyGetEphemeralOptions,
44-
KeyGetJwkPublicOptions,
45-
KeyGetJwkSecretOptions,
46-
KeyGetJwkThumbprintOptions,
47-
KeyGetPublicBytesOptions,
48-
KeyGetSecretBytesOptions,
49-
KeySignMessageOptions,
50-
KeyUnwrapKeyOptions,
51-
KeyVerifySignatureOptions,
52-
KeyWrapKeyOptions,
34+
type KeyEntryListLoadLocalOptions,
35+
type KeyFreeOptions,
36+
type KeyFromJwkOptions,
37+
type KeyFromKeyExchangeOptions,
38+
type KeyFromPublicBytesOptions,
39+
type KeyFromSecretBytesOptions,
40+
type KeyFromSeedOptions,
41+
type KeyGenerateOptions,
42+
type KeyGetAlgorithmOptions,
43+
type KeyGetEphemeralOptions,
44+
type KeyGetJwkPublicOptions,
45+
type KeyGetJwkSecretOptions,
46+
type KeyGetJwkThumbprintOptions,
47+
type KeyGetPublicBytesOptions,
48+
type KeyGetSecretBytesOptions,
49+
type KeySignMessageOptions,
50+
type KeyUnwrapKeyOptions,
51+
type KeyVerifySignatureOptions,
52+
type KeyWrapKeyOptions,
5353
LocalKeyHandle,
54-
MigrateIndySdkOptions,
55-
ScanFreeOptions,
54+
type MigrateIndySdkOptions,
55+
type ScanFreeOptions,
5656
ScanHandle,
57-
ScanNextOptions,
58-
ScanStartOptions,
59-
SessionCloseOptions,
60-
SessionCountOptions,
61-
SessionFetchAllKeysOptions,
62-
SessionFetchAllOptions,
63-
SessionFetchKeyOptions,
64-
SessionFetchOptions,
57+
type ScanNextOptions,
58+
type ScanStartOptions,
59+
type SessionCloseOptions,
60+
type SessionCountOptions,
61+
type SessionFetchAllKeysOptions,
62+
type SessionFetchAllOptions,
63+
type SessionFetchKeyOptions,
64+
type SessionFetchOptions,
6565
SessionHandle,
66-
SessionInsertKeyOptions,
67-
SessionRemoveAllOptions,
68-
SessionRemoveKeyOptions,
69-
SessionStartOptions,
70-
SessionUpdateKeyOptions,
71-
SessionUpdateOptions,
72-
SetCustomLoggerOptions,
73-
SetMaxLogLevelOptions,
74-
StoreCloseOptions,
75-
StoreCopyToOptions,
76-
StoreCreateProfileOptions,
77-
StoreGenerateRawKeyOptions,
78-
StoreGetDefaultProfileOptions,
79-
StoreGetProfileNameOptions,
66+
type SessionInsertKeyOptions,
67+
type SessionRemoveAllOptions,
68+
type SessionRemoveKeyOptions,
69+
type SessionStartOptions,
70+
type SessionUpdateKeyOptions,
71+
type SessionUpdateOptions,
72+
type SetCustomLoggerOptions,
73+
type SetMaxLogLevelOptions,
74+
type StoreCloseOptions,
75+
type StoreCopyToOptions,
76+
type StoreCreateProfileOptions,
77+
type StoreGenerateRawKeyOptions,
78+
type StoreGetDefaultProfileOptions,
79+
type StoreGetProfileNameOptions,
8080
StoreHandle,
81-
StoreListProfilesOptions,
82-
StoreOpenOptions,
83-
StoreProvisionOptions,
84-
StoreRekeyOptions,
85-
StoreRemoveOptions,
86-
StoreRemoveProfileOptions,
87-
StoreSetDefaultProfileOptions,
81+
type StoreListProfilesOptions,
82+
type StoreOpenOptions,
83+
type StoreProvisionOptions,
84+
type StoreRekeyOptions,
85+
type StoreRemoveOptions,
86+
type StoreRemoveProfileOptions,
87+
type StoreSetDefaultProfileOptions,
8888
handleInvalidNullResponse,
8989
} from '@openwallet-foundation/askar-shared'
9090
import {
91-
ByteBufferType,
92-
EncryptedBufferType,
91+
type ByteBufferType,
92+
type EncryptedBufferType,
9393
FFI_ENTRY_LIST_HANDLE,
94-
FFI_INT64,
9594
FFI_INT8,
95+
FFI_INT64,
9696
FFI_KEY_ENTRY_LIST_HANDLE,
9797
FFI_SCAN_HANDLE,
9898
FFI_SESSION_HANDLE,
9999
FFI_STORE_HANDLE,
100100
FFI_STRING,
101101
FFI_STRING_LIST_HANDLE,
102-
NativeCallback,
103-
NativeCallbackWithResponse,
102+
type NativeCallback,
103+
type NativeCallbackWithResponse,
104104
allocateAeadParams,
105105
allocateEncryptedBuffer,
106-
allocateInt32Buffer,
107106
allocateInt8Buffer,
107+
allocateInt32Buffer,
108108
allocatePointer,
109109
allocateSecretBuffer,
110110
allocateStringBuffer,
@@ -115,7 +115,7 @@ import {
115115
serializeArguments,
116116
toNativeCallback,
117117
toNativeCallbackWithResponse,
118-
toNativeLogCallback
118+
toNativeLogCallback,
119119
} from './ffi'
120120
import { getNativeAskar } from './library'
121121

@@ -313,7 +313,7 @@ export class NodeJSAskar implements Askar {
313313
const errorCode = this.nativeAskar.askar_entry_list_get_value(entryListHandle, index, ret)
314314
this.handleError(errorCode)
315315
const byteBuffer = handleReturnPointer<ByteBufferType>(ret)
316-
const bufferArray= new Uint8Array(Buffer.from(secretBufferToBuffer(byteBuffer)))
316+
const bufferArray = new Uint8Array(Buffer.from(secretBufferToBuffer(byteBuffer)))
317317
this.nativeAskar.askar_buffer_free(byteBuffer as unknown as Buffer)
318318

319319
return bufferArray
@@ -326,7 +326,7 @@ export class NodeJSAskar implements Askar {
326326
const errorCode = this.nativeAskar.askar_key_aead_decrypt(localKeyHandle, ciphertext, nonce, tag, aad, ret)
327327
this.handleError(errorCode)
328328
const byteBuffer = handleReturnPointer<ByteBufferType>(ret)
329-
const bufferArray= new Uint8Array(Buffer.from(secretBufferToBuffer(byteBuffer)))
329+
const bufferArray = new Uint8Array(Buffer.from(secretBufferToBuffer(byteBuffer)))
330330
this.nativeAskar.askar_buffer_free(byteBuffer as unknown as Buffer)
331331

332332
return bufferArray
@@ -372,7 +372,7 @@ export class NodeJSAskar implements Askar {
372372
const errorCode = this.nativeAskar.askar_key_aead_random_nonce(localKeyHandle, ret)
373373
this.handleError(errorCode)
374374
const byteBuffer = handleReturnPointer<ByteBufferType>(ret)
375-
const bufferArray= new Uint8Array(Buffer.from(secretBufferToBuffer(byteBuffer)))
375+
const bufferArray = new Uint8Array(Buffer.from(secretBufferToBuffer(byteBuffer)))
376376
this.nativeAskar.askar_buffer_free(byteBuffer as unknown as Buffer)
377377

378378
return bufferArray
@@ -396,7 +396,7 @@ export class NodeJSAskar implements Askar {
396396
const errorCode = this.nativeAskar.askar_key_crypto_box(recipientKey, senderKey, message, nonce, ret)
397397
this.handleError(errorCode)
398398
const byteBuffer = handleReturnPointer<ByteBufferType>(ret)
399-
const bufferArray= new Uint8Array(Buffer.from(secretBufferToBuffer(byteBuffer)))
399+
const bufferArray = new Uint8Array(Buffer.from(secretBufferToBuffer(byteBuffer)))
400400
this.nativeAskar.askar_buffer_free(byteBuffer as unknown as Buffer)
401401

402402
return bufferArray
@@ -409,7 +409,7 @@ export class NodeJSAskar implements Askar {
409409
const errorCode = this.nativeAskar.askar_key_crypto_box_open(recipientKey, senderKey, message, nonce, ret)
410410
this.handleError(errorCode)
411411
const byteBuffer = handleReturnPointer<ByteBufferType>(ret)
412-
const bufferArray= new Uint8Array(Buffer.from(secretBufferToBuffer(byteBuffer)))
412+
const bufferArray = new Uint8Array(Buffer.from(secretBufferToBuffer(byteBuffer)))
413413
this.nativeAskar.askar_buffer_free(byteBuffer as unknown as Buffer)
414414

415415
return bufferArray
@@ -421,7 +421,7 @@ export class NodeJSAskar implements Askar {
421421
const errorCode = this.nativeAskar.askar_key_crypto_box_random_nonce(ret)
422422
this.handleError(errorCode)
423423
const byteBuffer = handleReturnPointer<ByteBufferType>(ret)
424-
const bufferArray= new Uint8Array(Buffer.from(secretBufferToBuffer(byteBuffer)))
424+
const bufferArray = new Uint8Array(Buffer.from(secretBufferToBuffer(byteBuffer)))
425425
this.nativeAskar.askar_buffer_free(byteBuffer as unknown as Buffer)
426426

427427
return bufferArray
@@ -434,7 +434,7 @@ export class NodeJSAskar implements Askar {
434434
const errorCode = this.nativeAskar.askar_key_crypto_box_seal(localKeyHandle, message, ret)
435435
this.handleError(errorCode)
436436
const byteBuffer = handleReturnPointer<ByteBufferType>(ret)
437-
const bufferArray= new Uint8Array(Buffer.from(secretBufferToBuffer(byteBuffer)))
437+
const bufferArray = new Uint8Array(Buffer.from(secretBufferToBuffer(byteBuffer)))
438438
this.nativeAskar.askar_buffer_free(byteBuffer as unknown as Buffer)
439439

440440
return bufferArray
@@ -447,7 +447,7 @@ export class NodeJSAskar implements Askar {
447447
const errorCode = this.nativeAskar.askar_key_crypto_box_seal_open(localKeyHandle, ciphertext, ret)
448448
this.handleError(errorCode)
449449
const byteBuffer = handleReturnPointer<ByteBufferType>(ret)
450-
const bufferArray= new Uint8Array(Buffer.from(secretBufferToBuffer(byteBuffer)))
450+
const bufferArray = new Uint8Array(Buffer.from(secretBufferToBuffer(byteBuffer)))
451451
this.nativeAskar.askar_buffer_free(byteBuffer as unknown as Buffer)
452452

453453
return bufferArray
@@ -673,7 +673,7 @@ export class NodeJSAskar implements Askar {
673673
const errorCode = this.nativeAskar.askar_key_get_jwk_secret(localKeyHandle, ret)
674674
this.handleError(errorCode)
675675
const byteBuffer = handleReturnPointer<ByteBufferType>(ret)
676-
const bufferArray= new Uint8Array(Buffer.from(secretBufferToBuffer(byteBuffer)))
676+
const bufferArray = new Uint8Array(Buffer.from(secretBufferToBuffer(byteBuffer)))
677677
this.nativeAskar.askar_buffer_free(byteBuffer as unknown as Buffer)
678678

679679
return bufferArray
@@ -696,7 +696,7 @@ export class NodeJSAskar implements Askar {
696696
const errorCode = this.nativeAskar.askar_key_get_public_bytes(localKeyHandle, ret)
697697
this.handleError(errorCode)
698698
const byteBuffer = handleReturnPointer<ByteBufferType>(ret)
699-
const bufferArray= new Uint8Array(Buffer.from(secretBufferToBuffer(byteBuffer)))
699+
const bufferArray = new Uint8Array(Buffer.from(secretBufferToBuffer(byteBuffer)))
700700
this.nativeAskar.askar_buffer_free(byteBuffer as unknown as Buffer)
701701

702702
return bufferArray
@@ -709,7 +709,7 @@ export class NodeJSAskar implements Askar {
709709
const errorCode = this.nativeAskar.askar_key_get_secret_bytes(localKeyHandle, ret)
710710
this.handleError(errorCode)
711711
const byteBuffer = handleReturnPointer<ByteBufferType>(ret)
712-
const bufferArray= new Uint8Array(Buffer.from(secretBufferToBuffer(byteBuffer)))
712+
const bufferArray = new Uint8Array(Buffer.from(secretBufferToBuffer(byteBuffer)))
713713
this.nativeAskar.askar_buffer_free(byteBuffer as unknown as Buffer)
714714

715715
return bufferArray
@@ -722,7 +722,7 @@ export class NodeJSAskar implements Askar {
722722
const errorCode = this.nativeAskar.askar_key_sign_message(localKeyHandle, message, sigType, ret)
723723
this.handleError(errorCode)
724724
const byteBuffer = handleReturnPointer<ByteBufferType>(ret)
725-
const bufferArray= new Uint8Array(Buffer.from(secretBufferToBuffer(byteBuffer)))
725+
const bufferArray = new Uint8Array(Buffer.from(secretBufferToBuffer(byteBuffer)))
726726
this.nativeAskar.askar_buffer_free(byteBuffer as unknown as Buffer)
727727

728728
return bufferArray

0 commit comments

Comments
 (0)