mirror of
https://github.com/codex-storage/nim-codex.git
synced 2025-02-02 08:05:15 +00:00
14 lines
306 B
Nim
14 lines
306 B
Nim
import std/sequtils
|
|
import std/random
|
|
import pkg/libp2p
|
|
import pkg/ipfs/ipfsobject
|
|
|
|
proc example*(t: type seq[byte]): seq[byte] =
|
|
newSeqWith(10, rand(byte))
|
|
|
|
proc example*(t: type IpfsObject): IpfsObject =
|
|
IpfsObject(data: seq[byte].example)
|
|
|
|
proc example*(t: type Cid): Cid =
|
|
IpfsObject.example.cid
|