Copyright | Vergara Technologies LLC 2025 |
---|---|
License | MIT |
Maintainer | pitmutt@vergara.tech |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell2010 |
Frost.Types
Description
Types to represent the different artifacts needed for FROST distributed key generation and signatures.
Synopsis
- newtype Identifier = Identifier {
- getId :: HexString
- type SecretPackageR1 = HexString
- type PackageR1 = HexString
- data PayloadR1 = PayloadR1 {
- p1_id :: !Identifier
- p1_pkg :: !PackageR1
- type SecretPackageR2 = HexString
- type PackageR2 = HexString
- data PayloadR2 = PayloadR2 {
- p2_id :: !Identifier
- p2_pkg :: !PackageR2
- data DkgPkg1 = DkgPkg1 {
- secretPkg :: !SecretPackageR1
- pubPkg :: !PackageR1
- data DkgPkg2 = DkgPkg2 {
- r2_secretPkg :: !SecretPackageR2
- r2_pubPkgs :: ![PayloadR2]
- type KeyPackage = HexString
- type PublicKeyPackage = HexString
- data DkgKeyPackage = DkgKeyPackage {}
- type SigningNonces = HexString
- type SigningCommitments = HexString
- data SigningPkgR1 = SigningPkgR1 {}
- type RandomizedParams = HexString
- type Randomizer = HexString
- type SigningPackage = HexString
- data SigningPkgR2 = SigningPkgR2 {}
- data SignPayload = SignPayload {}
- type SignatureShare = HexString
- data AggregatePayload = AggregatePayload {
- ag_id :: !Identifier
- ag_share :: !SignatureShare
- type Signature = HexString
- emptyHexString :: HexString
Documentation
newtype Identifier #
A type used to identify a participant in Distributed Key Generation
Constructors
Identifier | |
Fields
|
Instances
type SecretPackageR1 = HexString #
The secret generated after Round 1 of a DKG ceremony. Must not be shared.
The public package generated after Round 1 of a DKG ceremony. This is shared with all participants in the ceremony.
A wrapper type that bundles the public PackageR1
with the corresponding Identifier
for distribution.
Constructors
PayloadR1 | |
Fields
|
Instances
Generic PayloadR1 # | |||||
Defined in Frost.Types Associated Types
| |||||
Show PayloadR1 # | |||||
BorshSize PayloadR1 # | |||||
Defined in Frost.Types Associated Types
| |||||
FromBorsh PayloadR1 # | |||||
Defined in Frost.Types Methods decodeBorsh :: Decoder s PayloadR1 # | |||||
ToBorsh PayloadR1 # | |||||
Defined in Frost.Types Methods | |||||
Show PayloadR1 # | |||||
Defined in Frost.Types | |||||
Generic PayloadR1 # | |||||
HasDatatypeInfo PayloadR1 # | |||||
Defined in Frost.Types Associated Types
Methods datatypeInfo :: proxy PayloadR1 -> DatatypeInfo (Code PayloadR1) # | |||||
Eq PayloadR1 # | |||||
type Rep PayloadR1 # | |||||
Defined in Frost.Types type Rep PayloadR1 = D1 ('MetaData "PayloadR1" "Frost.Types" "frost-haskell-0.1.0.0-inplace" 'False) (C1 ('MetaCons "PayloadR1" 'PrefixI 'True) (S1 ('MetaSel ('Just "p1_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Identifier) :*: S1 ('MetaSel ('Just "p1_pkg") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PackageR1))) | |||||
type StaticBorshSize PayloadR1 # | |||||
Defined in Frost.Types | |||||
type Code PayloadR1 # | |||||
Defined in Frost.Types | |||||
type DatatypeInfoOf PayloadR1 # | |||||
Defined in Frost.Types |
type SecretPackageR2 = HexString #
The secret generated after Round 2 of a DKG ceremony. Must not be shared.
The shareable package generated after Round 2 of a DKG ceremony. Should only be shared with the participant corresponding to its Identifier
.
A wrapper type that bundles the shareable Round 2 package with its corresponding Identifier
Constructors
PayloadR2 | |
Fields
|
Instances
Generic PayloadR2 # | |||||
Defined in Frost.Types Associated Types
| |||||
Show PayloadR2 # | |||||
BorshSize PayloadR2 # | |||||
Defined in Frost.Types Associated Types
| |||||
FromBorsh PayloadR2 # | |||||
Defined in Frost.Types Methods decodeBorsh :: Decoder s PayloadR2 # | |||||
ToBorsh PayloadR2 # | |||||
Defined in Frost.Types Methods | |||||
Show PayloadR2 # | |||||
Defined in Frost.Types | |||||
Generic PayloadR2 # | |||||
HasDatatypeInfo PayloadR2 # | |||||
Defined in Frost.Types Associated Types
Methods datatypeInfo :: proxy PayloadR2 -> DatatypeInfo (Code PayloadR2) # | |||||
Eq PayloadR2 # | |||||
type Rep PayloadR2 # | |||||
Defined in Frost.Types type Rep PayloadR2 = D1 ('MetaData "PayloadR2" "Frost.Types" "frost-haskell-0.1.0.0-inplace" 'False) (C1 ('MetaCons "PayloadR2" 'PrefixI 'True) (S1 ('MetaSel ('Just "p2_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Identifier) :*: S1 ('MetaSel ('Just "p2_pkg") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PackageR2))) | |||||
type StaticBorshSize PayloadR2 # | |||||
Defined in Frost.Types | |||||
type Code PayloadR2 # | |||||
Defined in Frost.Types | |||||
type DatatypeInfoOf PayloadR2 # | |||||
Defined in Frost.Types |
A helper type that bundles the outputs of Round 1 of a DKG ceremony to facilitate marshalling to the Rust FFI
Constructors
DkgPkg1 | |
Fields
|
Instances
Generic DkgPkg1 # | |||||
Defined in Frost.Types Associated Types
| |||||
Show DkgPkg1 # | |||||
BorshSize DkgPkg1 # | |||||
Defined in Frost.Types Associated Types
| |||||
FromBorsh DkgPkg1 # | |||||
Defined in Frost.Types Methods decodeBorsh :: Decoder s DkgPkg1 # | |||||
ToBorsh DkgPkg1 # | |||||
Defined in Frost.Types Methods | |||||
Show DkgPkg1 # | |||||
Defined in Frost.Types | |||||
Generic DkgPkg1 # | |||||
HasDatatypeInfo DkgPkg1 # | |||||
Defined in Frost.Types Associated Types
Methods datatypeInfo :: proxy DkgPkg1 -> DatatypeInfo (Code DkgPkg1) # | |||||
Eq DkgPkg1 # | |||||
type Rep DkgPkg1 # | |||||
Defined in Frost.Types type Rep DkgPkg1 = D1 ('MetaData "DkgPkg1" "Frost.Types" "frost-haskell-0.1.0.0-inplace" 'False) (C1 ('MetaCons "DkgPkg1" 'PrefixI 'True) (S1 ('MetaSel ('Just "secretPkg") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SecretPackageR1) :*: S1 ('MetaSel ('Just "pubPkg") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PackageR1))) | |||||
type StaticBorshSize DkgPkg1 # | |||||
Defined in Frost.Types | |||||
type Code DkgPkg1 # | |||||
Defined in Frost.Types | |||||
type DatatypeInfoOf DkgPkg1 # | |||||
Defined in Frost.Types |
A helper type that bundles the outputs of Round 2 of a DKG ceremony to facilitate marshalling to the Rust FFI
Constructors
DkgPkg2 | |
Fields
|
Instances
Generic DkgPkg2 # | |||||
Defined in Frost.Types Associated Types
| |||||
Show DkgPkg2 # | |||||
BorshSize DkgPkg2 # | |||||
Defined in Frost.Types Associated Types
| |||||
FromBorsh DkgPkg2 # | |||||
Defined in Frost.Types Methods decodeBorsh :: Decoder s DkgPkg2 # | |||||
ToBorsh DkgPkg2 # | |||||
Defined in Frost.Types Methods | |||||
Show DkgPkg2 # | |||||
Defined in Frost.Types | |||||
Generic DkgPkg2 # | |||||
HasDatatypeInfo DkgPkg2 # | |||||
Defined in Frost.Types Associated Types
Methods datatypeInfo :: proxy DkgPkg2 -> DatatypeInfo (Code DkgPkg2) # | |||||
Eq DkgPkg2 # | |||||
type Rep DkgPkg2 # | |||||
Defined in Frost.Types type Rep DkgPkg2 = D1 ('MetaData "DkgPkg2" "Frost.Types" "frost-haskell-0.1.0.0-inplace" 'False) (C1 ('MetaCons "DkgPkg2" 'PrefixI 'True) (S1 ('MetaSel ('Just "r2_secretPkg") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SecretPackageR2) :*: S1 ('MetaSel ('Just "r2_pubPkgs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [PayloadR2]))) | |||||
type StaticBorshSize DkgPkg2 # | |||||
Defined in Frost.Types | |||||
type Code DkgPkg2 # | |||||
Defined in Frost.Types | |||||
type DatatypeInfoOf DkgPkg2 # | |||||
Defined in Frost.Types |
type KeyPackage = HexString #
The secret key package generated after completion of DKG
type PublicKeyPackage = HexString #
The public key packae generated after completion of DKG (common for all participants)
data DkgKeyPackage #
A helper type that bundles the outputs of Round 3 of a DKG ceremony to facilitate marshalling to the Rust FFI
Constructors
DkgKeyPackage | |
Fields
|
Instances
Generic DkgKeyPackage # | |||||
Defined in Frost.Types Associated Types
| |||||
Show DkgKeyPackage # | |||||
Defined in Frost.Types Methods showsPrec :: Int -> DkgKeyPackage -> ShowS # show :: DkgKeyPackage -> String # showList :: [DkgKeyPackage] -> ShowS # | |||||
BorshSize DkgKeyPackage # | |||||
Defined in Frost.Types Associated Types
Methods borshSize :: Proxy DkgKeyPackage -> Size (StaticBorshSize DkgKeyPackage) # | |||||
FromBorsh DkgKeyPackage # | |||||
Defined in Frost.Types Methods decodeBorsh :: Decoder s DkgKeyPackage # | |||||
ToBorsh DkgKeyPackage # | |||||
Defined in Frost.Types Methods | |||||
Show DkgKeyPackage # | |||||
Defined in Frost.Types Methods toValue :: DkgKeyPackage -> Value | |||||
Generic DkgKeyPackage # | |||||
Defined in Frost.Types Associated Types
| |||||
HasDatatypeInfo DkgKeyPackage # | |||||
Defined in Frost.Types Associated Types
Methods datatypeInfo :: proxy DkgKeyPackage -> DatatypeInfo (Code DkgKeyPackage) # | |||||
Eq DkgKeyPackage # | |||||
Defined in Frost.Types Methods (==) :: DkgKeyPackage -> DkgKeyPackage -> Bool # (/=) :: DkgKeyPackage -> DkgKeyPackage -> Bool # | |||||
type Rep DkgKeyPackage # | |||||
Defined in Frost.Types type Rep DkgKeyPackage = D1 ('MetaData "DkgKeyPackage" "Frost.Types" "frost-haskell-0.1.0.0-inplace" 'False) (C1 ('MetaCons "DkgKeyPackage" 'PrefixI 'True) (S1 ('MetaSel ('Just "keyPkg") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 KeyPackage) :*: S1 ('MetaSel ('Just "pubKeyPkg") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PublicKeyPackage))) | |||||
type StaticBorshSize DkgKeyPackage # | |||||
Defined in Frost.Types | |||||
type Code DkgKeyPackage # | |||||
Defined in Frost.Types | |||||
type DatatypeInfoOf DkgKeyPackage # | |||||
Defined in Frost.Types |
type SigningNonces = HexString #
The Signing Nonces produced after round 1 of a FROST Signature ceremony
type SigningCommitments = HexString #
The Signing Commitments produced after round 1 of a FROST Signature ceremony
data SigningPkgR1 #
A helper type that bundles the outputs of Round 1 of a FROST Signing ceremony
Constructors
SigningPkgR1 | |
Fields |
Instances
Generic SigningPkgR1 # | |||||
Defined in Frost.Types Associated Types
| |||||
Show SigningPkgR1 # | |||||
Defined in Frost.Types Methods showsPrec :: Int -> SigningPkgR1 -> ShowS # show :: SigningPkgR1 -> String # showList :: [SigningPkgR1] -> ShowS # | |||||
BorshSize SigningPkgR1 # | |||||
Defined in Frost.Types Associated Types
Methods borshSize :: Proxy SigningPkgR1 -> Size (StaticBorshSize SigningPkgR1) # | |||||
FromBorsh SigningPkgR1 # | |||||
Defined in Frost.Types Methods decodeBorsh :: Decoder s SigningPkgR1 # | |||||
ToBorsh SigningPkgR1 # | |||||
Defined in Frost.Types Methods | |||||
Show SigningPkgR1 # | |||||
Defined in Frost.Types Methods toValue :: SigningPkgR1 -> Value | |||||
Generic SigningPkgR1 # | |||||
Defined in Frost.Types Associated Types
| |||||
HasDatatypeInfo SigningPkgR1 # | |||||
Defined in Frost.Types Associated Types
Methods datatypeInfo :: proxy SigningPkgR1 -> DatatypeInfo (Code SigningPkgR1) # | |||||
Eq SigningPkgR1 # | |||||
Defined in Frost.Types | |||||
type Rep SigningPkgR1 # | |||||
Defined in Frost.Types type Rep SigningPkgR1 = D1 ('MetaData "SigningPkgR1" "Frost.Types" "frost-haskell-0.1.0.0-inplace" 'False) (C1 ('MetaCons "SigningPkgR1" 'PrefixI 'True) (S1 ('MetaSel ('Just "r1_nonces") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SigningNonces) :*: S1 ('MetaSel ('Just "r1_commits") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SigningCommitments))) | |||||
type StaticBorshSize SigningPkgR1 # | |||||
Defined in Frost.Types | |||||
type Code SigningPkgR1 # | |||||
Defined in Frost.Types | |||||
type DatatypeInfoOf SigningPkgR1 # | |||||
Defined in Frost.Types |
type RandomizedParams = HexString #
The randomized parameters for randomized FROST signatures
type Randomizer = HexString #
The randomizer value for randomized FROST signatures
type SigningPackage = HexString #
The package prepared by the coordinator using the message to be signed and the participants' commitments
data SigningPkgR2 #
The Signing Package produced after the coordinator starts round 2 of a Frost Signature ceremony
Constructors
SigningPkgR2 | |
Fields |
Instances
Generic SigningPkgR2 # | |||||
Defined in Frost.Types Associated Types
| |||||
Show SigningPkgR2 # | |||||
Defined in Frost.Types Methods showsPrec :: Int -> SigningPkgR2 -> ShowS # show :: SigningPkgR2 -> String # showList :: [SigningPkgR2] -> ShowS # | |||||
BorshSize SigningPkgR2 # | |||||
Defined in Frost.Types Associated Types
Methods borshSize :: Proxy SigningPkgR2 -> Size (StaticBorshSize SigningPkgR2) # | |||||
FromBorsh SigningPkgR2 # | |||||
Defined in Frost.Types Methods decodeBorsh :: Decoder s SigningPkgR2 # | |||||
ToBorsh SigningPkgR2 # | |||||
Defined in Frost.Types Methods | |||||
Show SigningPkgR2 # | |||||
Defined in Frost.Types Methods toValue :: SigningPkgR2 -> Value | |||||
Generic SigningPkgR2 # | |||||
Defined in Frost.Types Associated Types
| |||||
HasDatatypeInfo SigningPkgR2 # | |||||
Defined in Frost.Types Associated Types
Methods datatypeInfo :: proxy SigningPkgR2 -> DatatypeInfo (Code SigningPkgR2) # | |||||
Eq SigningPkgR2 # | |||||
Defined in Frost.Types | |||||
type Rep SigningPkgR2 # | |||||
Defined in Frost.Types type Rep SigningPkgR2 = D1 ('MetaData "SigningPkgR2" "Frost.Types" "frost-haskell-0.1.0.0-inplace" 'False) (C1 ('MetaCons "SigningPkgR2" 'PrefixI 'True) (S1 ('MetaSel ('Just "sigRandomizer") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Randomizer) :*: S1 ('MetaSel ('Just "sigPackage") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SigningPackage))) | |||||
type StaticBorshSize SigningPkgR2 # | |||||
Defined in Frost.Types | |||||
type Code SigningPkgR2 # | |||||
Defined in Frost.Types | |||||
type DatatypeInfoOf SigningPkgR2 # | |||||
Defined in Frost.Types |
data SignPayload #
A helper type that bundles the identifier and the signing commitments of a participant
Constructors
SignPayload | |
Fields
|
Instances
Generic SignPayload # | |||||
Defined in Frost.Types Associated Types
| |||||
Show SignPayload # | |||||
Defined in Frost.Types Methods showsPrec :: Int -> SignPayload -> ShowS # show :: SignPayload -> String # showList :: [SignPayload] -> ShowS # | |||||
BorshSize SignPayload # | |||||
Defined in Frost.Types Associated Types
Methods borshSize :: Proxy SignPayload -> Size (StaticBorshSize SignPayload) # | |||||
FromBorsh SignPayload # | |||||
Defined in Frost.Types Methods decodeBorsh :: Decoder s SignPayload # | |||||
ToBorsh SignPayload # | |||||
Defined in Frost.Types Methods | |||||
Show SignPayload # | |||||
Defined in Frost.Types Methods toValue :: SignPayload -> Value | |||||
Generic SignPayload # | |||||
Defined in Frost.Types Associated Types
| |||||
HasDatatypeInfo SignPayload # | |||||
Defined in Frost.Types Associated Types
Methods datatypeInfo :: proxy SignPayload -> DatatypeInfo (Code SignPayload) # | |||||
Eq SignPayload # | |||||
Defined in Frost.Types | |||||
type Rep SignPayload # | |||||
Defined in Frost.Types type Rep SignPayload = D1 ('MetaData "SignPayload" "Frost.Types" "frost-haskell-0.1.0.0-inplace" 'False) (C1 ('MetaCons "SignPayload" 'PrefixI 'True) (S1 ('MetaSel ('Just "sp_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Identifier) :*: S1 ('MetaSel ('Just "sp_commits") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SigningCommitments))) | |||||
type StaticBorshSize SignPayload # | |||||
Defined in Frost.Types | |||||
type Code SignPayload # | |||||
Defined in Frost.Types | |||||
type DatatypeInfoOf SignPayload # | |||||
Defined in Frost.Types |
type SignatureShare = HexString #
The signature share produced by each participant during round 2
data AggregatePayload #
A helper type that bundles the identifier and the signature share of a participant
Constructors
AggregatePayload | |
Fields
|
Instances
Generic AggregatePayload # | |||||
Defined in Frost.Types Associated Types
Methods from :: AggregatePayload -> Rep AggregatePayload x # to :: Rep AggregatePayload x -> AggregatePayload # | |||||
Show AggregatePayload # | |||||
Defined in Frost.Types Methods showsPrec :: Int -> AggregatePayload -> ShowS # show :: AggregatePayload -> String # showList :: [AggregatePayload] -> ShowS # | |||||
BorshSize AggregatePayload # | |||||
Defined in Frost.Types Associated Types
Methods borshSize :: Proxy AggregatePayload -> Size (StaticBorshSize AggregatePayload) # | |||||
FromBorsh AggregatePayload # | |||||
Defined in Frost.Types Methods | |||||
ToBorsh AggregatePayload # | |||||
Defined in Frost.Types Methods | |||||
Show AggregatePayload # | |||||
Defined in Frost.Types Methods toValue :: AggregatePayload -> Value | |||||
Generic AggregatePayload # | |||||
Defined in Frost.Types Associated Types
Methods from :: AggregatePayload -> Rep AggregatePayload # to :: Rep AggregatePayload -> AggregatePayload # | |||||
HasDatatypeInfo AggregatePayload # | |||||
Defined in Frost.Types Associated Types
Methods datatypeInfo :: proxy AggregatePayload -> DatatypeInfo (Code AggregatePayload) # | |||||
Eq AggregatePayload # | |||||
Defined in Frost.Types Methods (==) :: AggregatePayload -> AggregatePayload -> Bool # (/=) :: AggregatePayload -> AggregatePayload -> Bool # | |||||
type Rep AggregatePayload # | |||||
Defined in Frost.Types type Rep AggregatePayload = D1 ('MetaData "AggregatePayload" "Frost.Types" "frost-haskell-0.1.0.0-inplace" 'False) (C1 ('MetaCons "AggregatePayload" 'PrefixI 'True) (S1 ('MetaSel ('Just "ag_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Identifier) :*: S1 ('MetaSel ('Just "ag_share") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SignatureShare))) | |||||
type StaticBorshSize AggregatePayload # | |||||
Defined in Frost.Types | |||||
type Code AggregatePayload # | |||||
Defined in Frost.Types | |||||
type DatatypeInfoOf AggregatePayload # | |||||
Defined in Frost.Types |
The complete FROST signature created from the individual SignatureShare
s
emptyHexString :: HexString #