-
Notifications
You must be signed in to change notification settings - Fork 50
Description
Issue
TokenTransfer transition (Batch) let you make a transaction signed with two possible purpose types: Transfer and Authentication.
With transfers, everything works perfectly, but there are some inconsistencies in with Authentication security level keys.
Rust DPP's state_transition.getPurpose() correctly return a list of possible key purposes (Authentication, Transfer)
Rust DPP's state_transition.getSecurityLevel(purpose) correctly return a list possible security levels for authentication purpose keys (Critical, High, Medium)
However, when you try to sign the transaction with Rust DPP with Authentication High or Authentication Medium key, .sign() method throw such error:
Invalid public key security level HIGH. The state transition requires one of CRITICAL
It looks like there is a bug in rs-dpp which prevents user to sign such transactions, although they could be accepted by the network.
Possible Solution
Correct .sign() to allow such keys
Steps to Reproduce (for bugs)
- Create token transfer transition
- Try to sign such transaction with authentication high key
- The error will be thrown
Context
Your Environment
- Version used:
- Environment name and version (e.g. Chrome 39, node.js 5.4):
- Operating System and version (desktop, server, or mobile):
- Link to your project: