mirror of
https://github.com/codex-storage/nim-codex.git
synced 2025-01-10 21:15:59 +00:00
9 lines
236 B
Nim
9 lines
236 B
Nim
|
import std/hashes
|
||
|
import pkg/nimcrypto
|
||
|
|
||
|
type PurchaseId* = distinct array[32, byte]
|
||
|
|
||
|
proc hash*(x: PurchaseId): Hash {.borrow.}
|
||
|
proc `==`*(x, y: PurchaseId): bool {.borrow.}
|
||
|
proc toHex*(x: PurchaseId): string = array[32, byte](x).toHex
|