diff --git a/packages/js-dpp/lib/identity/IdentityPublicKey.js b/packages/js-dpp/lib/identity/IdentityPublicKey.js index 37f99bdd8ba..1346d1d37e1 100644 --- a/packages/js-dpp/lib/identity/IdentityPublicKey.js +++ b/packages/js-dpp/lib/identity/IdentityPublicKey.js @@ -240,6 +240,7 @@ IdentityPublicKey.PURPOSES = { AUTHENTICATION: 0, ENCRYPTION: 1, DECRYPTION: 2, + WITHDRAW: 3, }; IdentityPublicKey.SECURITY_LEVELS = { @@ -262,5 +263,8 @@ IdentityPublicKey.ALLOWED_SECURITY_LEVELS[IdentityPublicKey.PURPOSES.ENCRYPTION] IdentityPublicKey.ALLOWED_SECURITY_LEVELS[IdentityPublicKey.PURPOSES.DECRYPTION] = [ IdentityPublicKey.SECURITY_LEVELS.MEDIUM, ]; +IdentityPublicKey.ALLOWED_SECURITY_LEVELS[IdentityPublicKey.PURPOSES.WITHDRAW] = [ + IdentityPublicKey.SECURITY_LEVELS.MEDIUM, +]; module.exports = IdentityPublicKey; diff --git a/packages/js-dpp/schema/identity/publicKey.json b/packages/js-dpp/schema/identity/publicKey.json index 9a0b97c1e99..799028aa828 100644 --- a/packages/js-dpp/schema/identity/publicKey.json +++ b/packages/js-dpp/schema/identity/publicKey.json @@ -23,9 +23,10 @@ "enum": [ 0, 1, - 2 + 2, + 3 ], - "description": "Public key purpose. 0 - Authentication, 1 - Encryption, 2 - Decryption", + "description": "Public key purpose. 0 - Authentication, 1 - Encryption, 2 - Decryption, 3 - Withdraw", "$comment": "It can't be changed after adding a key" }, "securityLevel": {