-
Notifications
You must be signed in to change notification settings - Fork 573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(crypto): remove circular dependency #1942
refactor(crypto): remove circular dependency #1942
Conversation
af69451
to
8967b76
Compare
8967b76
to
64270cf
Compare
@@ -43,7 +42,7 @@ export class Secp256k1Keypair implements Keypair { | |||
} | |||
|
|||
publicKeyStr(encoding: SupportedEncodings = 'base64pad'): string { | |||
return uint8arrays.toString(this.publicKey, encoding) | |||
return toString(this.publicKey, encoding) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason to import this as just toString
? if so I think it'd be nice to import it as something like ui8ToString
or similar. otherwise toString
is pretty generic & gotta check imports to see what it's coming from
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just the one nit, otherwise this looks good 👍
Done. Also imported these changes in #2169. |
Merged through #2169 |
in
crypto
, there is a circular dependency betweendid.ts
>plugins.ts
>p256/plugin.ts
>p256/operations.ts
>did.ts
. This PR fixes that by extracting common code into autils.ts
file, and uses that module instead ofdid.ts
from plugin operations.