2022-05-19 19:56:03 +00:00
|
|
|
## Nim-Codex
|
2022-04-06 00:34:29 +00:00
|
|
|
## Copyright (c) 2022 Status Research & Development GmbH
|
|
|
|
## Licensed under either of
|
|
|
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
|
|
|
## * MIT license ([LICENSE-MIT](LICENSE-MIT))
|
|
|
|
## at your option.
|
|
|
|
## This file may not be copied, modified, or distributed except according to
|
|
|
|
## those terms.
|
|
|
|
|
2022-08-24 12:15:59 +00:00
|
|
|
# This module defines Manifest and all related types
|
|
|
|
|
2022-04-06 00:34:29 +00:00
|
|
|
import std/tables
|
|
|
|
import pkg/libp2p
|
|
|
|
|
2023-07-06 23:23:27 +00:00
|
|
|
import ../units
|
|
|
|
export units
|
|
|
|
|
2022-04-06 00:34:29 +00:00
|
|
|
const
|
2022-12-03 00:00:55 +00:00
|
|
|
BlockCodec* = multiCodec("raw")
|
2022-04-06 00:34:29 +00:00
|
|
|
DagPBCodec* = multiCodec("dag-pb")
|
|
|
|
|
|
|
|
type
|
|
|
|
ManifestCoderType*[codec: static MultiCodec] = object
|
|
|
|
DagPBCoder* = ManifestCoderType[multiCodec("dag-pb")]
|
|
|
|
|
|
|
|
const
|
|
|
|
ManifestContainers* = {
|
|
|
|
$DagPBCodec: DagPBCoder()
|
|
|
|
}.toTable
|