Skip to content

Move importKey to @taquito/taquito and refactor key comparison #3190

@hui-an-yang

Description

@hui-an-yang

Summary:
To improve the Taquito architecture by moving the importKey function to @taquito/taquito to avoid circular dependencies and optimizing the key compare logic of the KeyToken class in @taquito/michelson-encoder.

Current status:
Currently compare logic in KeyToken class is a temporary fix which is importing crypto package elliptic made both @taquito/michelson-encoder and @taquito/signer both depends on it.
Would be ideal to only have @taquito/signer depends on it, hence we're looking to refactor the compare logic to import function publicKeyFromString from @taquito/signer to deal with the compare public key logic
In the process, we found circular dependency caused by importKey function in @taquito/signer
To prioritize developer experience, we decided to delay to move importKey to @taquito/taquito in the next minor release

Refactor plan:
Phase 1: Move importKey to @taquito/taquito
Phase2: Refactor Key Compare logic in KeyToken Class from @taquito/michelson-encoder to use publicKeyFromString from @taquito/signer

make sure to update dependencies, tests and documentations

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status

To do

Relationships

None yet

Development

No branches or pull requests

Issue actions