MCPcopy Create free account
hub / github.com/Effect-TS/effect / SignaturePublicKeyFromFormat

Function SignaturePublicKeyFromFormat

packages/effect/src/Schema.ts:14884–14898  ·  view source on GitHub ↗
(
  format: KeyFormat_.Format<"public", "decode", Data>,
  algorithm: A
)

Source from the content-addressed store, hash-verified

14882 * @since 4.0.0
14883 */
14884export const SignaturePublicKeyFromFormat = <A extends Signature_.Algorithm, Data>(
14885 format: KeyFormat_.Format<"public", "decode", Data>,
14886 algorithm: A
14887): decodeTo<SignaturePublicKey<A>, Codec<Data>> =>
14888 cryptoKeyFromFormat(
14889 "SignaturePublicKeyFromFormat",
14890 SignaturePublicKey(algorithm),
14891 format,
14892 (data) =>
14893 KeyFormat_.decodePublic(format, algorithm, data) as Effect.Effect<
14894 Signature_.PublicKey<A>,
14895 CryptoError_.CryptoError
14896 >,
14897 true
14898 )
14899
14900/**
14901 * Type-level representation of {@link SignaturePrivateKey}.

Callers

nothing calls this directly

Calls 2

cryptoKeyFromFormatFunction · 0.85
SignaturePublicKeyFunction · 0.70

Tested by

no test coverage detected