Safe Haskell | None |
---|---|
Language | Haskell2010 |
Module, carrying logic of PACK
instruction.
This is nearly symmetric to adjacent Unpack.hs module.
Synopsis
- packCode' :: Instr inp out -> ByteString
- packT' :: forall (t :: T). SingI t => ByteString
- packValue :: PackedValScope t => Value t -> LByteString
- packValue' :: PackedValScope t => Value t -> ByteString
- packValuePrefix :: IsString s => s
- encodeValue' :: (SingI t, HasNoOp t) => Value t -> ByteString
- encodeValue :: forall t. (SingI t, HasNoOp t) => Value t -> LByteString
- packNotedT' :: forall (t :: T). SingI t => Notes t -> ByteString
- encodeIntPayload :: Integer -> LByteString
- encodeKeyHashRaw :: KeyHash -> LByteString
- encodeEpAddress :: EpAddress -> LByteString
Documentation
packCode' :: Instr inp out -> ByteString Source #
packValue :: PackedValScope t => Value t -> LByteString Source #
Serialize a value given to PACK
instruction.
packValue' :: PackedValScope t => Value t -> ByteString Source #
Same as packValue
, for strict bytestring.
packValuePrefix :: IsString s => s Source #
Prefix prepended to the binary representation of a value.
Serializers used in morley-client
encodeValue' :: (SingI t, HasNoOp t) => Value t -> ByteString Source #
encodeValue :: forall t. (SingI t, HasNoOp t) => Value t -> LByteString Source #
Generic serializer.
We don't require HasNoBigMap
constraint here since the big_map serialization
is only prohibited in PACK
instructions, however, we still want to be able to
serialize big_map e.g. in order to transform typed value to low-level Micheline
representation.
TODO: Serialize chain operations properly as well since they actually also have
byte representation.
packNotedT' :: forall (t :: T). SingI t => Notes t -> ByteString Source #
Internals
encodeIntPayload :: Integer -> LByteString Source #
Encode contents of a given number.