Skip to main content
import { Signature, PrivateKey, PublicKey } from 'voltaire-effect'
import { Effect } from 'effect'

const sig = Effect.runSync(Signature.fromHex('0x...'))

Signature

SignatureSchema — Decodes 65-byte hex signature (r + s + v). SignatureFromBytesSchema — Decodes from raw bytes. from / fromHex / fromBytes — Creates signature with Effect error handling.

PrivateKey

PrivateKeySchema — Decodes 32-byte hex private key.
import { PrivateKey } from 'voltaire-effect'
import * as Schema from 'effect/Schema'

const key = Schema.decodeSync(PrivateKey.PrivateKeySchema)('0x...')
from / fromBytes — Creates private key.

PublicKey

PublicKeySchema — Uncompressed public key (65 bytes: 0x04 + x + y). CompressedPublicKeySchema — Compressed public key (33 bytes: 0x02/0x03 + x).
import { PublicKey } from 'voltaire-effect'

PublicKey.from('0x04...')
PublicKey.fromPrivateKey(privateKey)
PublicKey.compress(uncompressedKey)
PublicKey.decompress(compressedKey)

See Also

  • PrivateKey - Sign messages with private keys
  • PublicKey - Verify signatures with public keys
  • Address - Derive address from signature recovery