Example #1
0
 public DepositData(BlsPublicKey publicKey, Hash32 withdrawalCredentials, Gwei amount, BlsSignature signature)
 {
     PublicKey             = publicKey;
     WithdrawalCredentials = withdrawalCredentials;
     Amount    = amount;
     Signature = signature;
 }
Example #2
0
 public BeaconBlockHeader(
     Slot slot,
     Hash32 parentRoot,
     Hash32 stateRoot,
     Hash32 bodyRoot,
     BlsSignature signature)
 {
     Slot       = slot;
     ParentRoot = parentRoot;
     StateRoot  = stateRoot;
     BodyRoot   = bodyRoot;
     Signature  = signature;
 }
Example #3
0
        public static BlsSignature BlsSign(Hash32 messageHash, byte[] privateKey, Domain domain)
        {
            var parameters = new BLSParameters()
            {
                PrivateKey = privateKey
            };

            using var signingAlgorithm = SignatureAlgorithmFactory(parameters);
            var destination = new byte[96];
            var success     = signingAlgorithm.TrySignHash(messageHash.AsSpan(), destination, out var bytesWritten, domain.AsSpan().ToArray());

            return(new BlsSignature(destination));
        }
Example #4
0
 public Hash32 Hash(Hash32 a, Hash32 b)
 {
     return(_cryptographyService.Hash(a, b));
 }
Example #5
0
 public bool BlsVerify(BlsPublicKey publicKey, Hash32 signingRoot, BlsSignature signature, Domain domain)
 {
     return(true);
 }
Example #6
0
 public DepositData(BlsPublicKey publicKey, Hash32 withdrawalCredentials, Gwei amount)
     : this(publicKey, withdrawalCredentials, amount, BlsSignature.Empty)
 {
 }
Example #7
0
 public void SetStateRoot(Hash32 stateRoot)
 {
     StateRoot = stateRoot;
 }
Example #8
0
 public BeaconBlockHeader(Hash32 bodyRoot)
     : this(Slot.Zero, Hash32.Zero, Hash32.Zero, bodyRoot, BlsSignature.Empty)
 {
 }