Skip to content

Commit

Permalink
Add encryption key params as required property to encrypted secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
sisou committed Jan 15, 2025
1 parent 06b50ea commit a4b135d
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 14 deletions.
8 changes: 8 additions & 0 deletions client/PublicRequestTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,12 @@ export interface SignedTransaction {
};
}

export interface EncryptionKeyParams {
kdf: string;
iterations: number;
keySize: number;
}

export interface MultisigInfo {
publicKeys: Bytes[];
numberOfSigners: number;
Expand All @@ -261,6 +267,7 @@ export interface MultisigInfo {
} | {
encryptedSecrets: Bytes[];
bScalar: Bytes;
keyParams: EncryptionKeyParams;
};
aggregatedCommitment: Bytes;
userName?: string;
Expand Down Expand Up @@ -636,6 +643,7 @@ export interface ConnectedAccount {
keyData: Uint8Array,
algorithm: { name: string, hash: string },
keyUsages: ['encrypt'],
keyParams: EncryptionKeyParams,
};
account: {
label: string;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@nimiq/electrum-client": "https://github.com/nimiq/electrum-client#build",
"@nimiq/fastspot-api": "^1.10.2",
"@nimiq/iqons": "^1.5.2",
"@nimiq/keyguard-client": "^1.8.0",
"@nimiq/keyguard-client": "https://gitpkg.now.sh/nimiq/keyguard?scripts.postinstall=cd%20client%20%26%26%20.%2Fbuild-gitpkg.sh&a62aa9f557e2ac4c0d7306828e423230f423a0f1",
"@nimiq/ledger-api": "^3.1.1",
"@nimiq/oasis-api": "^1.1.1",
"@nimiq/rpc": "^0.4.1",
Expand Down
8 changes: 8 additions & 0 deletions src/i18n/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ msgstr ""
msgid "All labels saved."
msgstr ""

#: src/views/ConnectAccount.vue:8
msgid "All private funds remain separate."
msgstr ""

#: src/components/CheckoutCardBitcoin.vue:30
#: src/components/CheckoutCardEthereum.vue:27
#: src/components/CheckoutCardNimiqExternal.vue:32
Expand Down Expand Up @@ -1292,6 +1296,10 @@ msgstr ""
msgid "Your {app} app is outdated. Please update your Ledger firmware and {app} app using Ledger Live."
msgstr ""

#: src/views/ConnectAccount.vue:7
msgid "Your account will be used for approving only."
msgstr ""

#: src/views/LoginSuccess.vue:207
#: src/views/SignupLedger.vue:106
msgid ""
Expand Down
1 change: 1 addition & 0 deletions src/lib/RequestParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,7 @@ export class RequestParser {
(bytes) => parseBytes(bytes),
),
bScalar: parseBytes(signMultisigTxRequest.multisigConfig.secret.bScalar),
keyParams: signMultisigTxRequest.multisigConfig.secret.keyParams,
},
aggregatedCommitment: parseBytes(signMultisigTxRequest.multisigConfig.aggregatedCommitment),
userName: signMultisigTxRequest.multisigConfig.userName,
Expand Down
5 changes: 5 additions & 0 deletions src/lib/RequestTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ export interface ParsedMultisigInfo {
} | {
encryptedSecrets: Uint8Array[];
bScalar: Uint8Array;
keyParams: {
kdf: string;
iterations: number;
keySize: number;
};
};
aggregatedCommitment: Uint8Array;
userName?: string;
Expand Down
16 changes: 3 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1843,14 +1843,9 @@
dependencies:
dom-parser "^0.1.5"

"@nimiq/keyguard-client@^1.8.0":
version "1.8.0"
resolved "https://registry.yarnpkg.com/@nimiq/keyguard-client/-/keyguard-client-1.8.0.tgz#59e9097365c28fa71f354360872893dfc5c9e1af"
integrity sha512-KmU+QpLOPNGhchSSEgpXU0psz7RwLGOZ3lL++xTI1Fru5YwhGLlJ2JJGa3/mpfMxU3V5uM39qDC2Cigd50AnvQ==
dependencies:
"@nimiq/albatross-wasm" "npm:@nimiq/core@^2.0.0"
"@nimiq/rpc" "^0.3.0"
"@opengsn/common" "^2.2.5"
"@nimiq/keyguard-client@https://gitpkg.now.sh/nimiq/keyguard?scripts.postinstall=cd%20client%20%26%26%20.%2Fbuild-gitpkg.sh&a62aa9f557e2ac4c0d7306828e423230f423a0f1":
version "1.0.0"
resolved "https://gitpkg.now.sh/nimiq/keyguard?scripts.postinstall=cd%20client%20%26%26%20.%2Fbuild-gitpkg.sh&a62aa9f557e2ac4c0d7306828e423230f423a0f1#b821554c4e4751e93cd9e287cd3617812e2a3ea2"

"@nimiq/ledger-api@^3.1.1":
version "3.1.1"
Expand Down Expand Up @@ -1878,11 +1873,6 @@
resolved "https://registry.yarnpkg.com/@nimiq/oasis-api/-/oasis-api-1.1.1.tgz#d1aa3d0f9afabf9116205809a0fc72d2e392bafa"
integrity sha512-jXNO7nvE0mzAyDCrucByv5AcyDWZjyqb9810YctysxqUtOxNG27hPkhomL+WW6nrnTVgvriJo3yaTFPTfLphKw==

"@nimiq/rpc@^0.3.0":
version "0.3.0"
resolved "https://registry.yarnpkg.com/@nimiq/rpc/-/rpc-0.3.0.tgz#654c05acccc193b7d79fb09b2faf2114945ff872"
integrity sha512-je7fv+wP4nLEgTcZwu3FaGre22qkZ9AYGbStglVaJAxOH+3CvDnnOIa9IjGFaCEhtRQKRaQEvFqa5vN4IVnH+Q==

"@nimiq/rpc@^0.4.1":
version "0.4.1"
resolved "https://registry.yarnpkg.com/@nimiq/rpc/-/rpc-0.4.1.tgz#d5df1e426793afcdd8c407a2968442bbee874dbd"
Expand Down

0 comments on commit a4b135d

Please sign in to comment.