public BlindSignRequest(BlsKeyPair secretKey, BbsKeyPair publicKey, byte[] commitment, IndexedMessage[] messages) { SecretKey = secretKey ?? throw new ArgumentNullException(nameof(secretKey)); PublicKey = publicKey ?? throw new ArgumentNullException(nameof(publicKey)); Commitment = commitment ?? throw new ArgumentNullException(nameof(commitment)); Messages = messages ?? throw new ArgumentNullException(nameof(messages)); }
public static Bls12381VerificationKey2020 ToVerificationMethod(this BlsKeyPair keyPair, string id = null, string controller = null) { var method = new Bls12381VerificationKey2020 { PublicKeyBase58 = Multibase.Base58.Encode(keyPair.PublicKey.ToArray()), PrivateKeyBase58 = keyPair.SecretKey is null ? null : Multibase.Base58.Encode(keyPair.SecretKey.ToArray()) }; if (id != null) { method.Id = id; } if (controller != null) { method.Controller = controller; } return(method); } }
public VerifyRequest(BlsKeyPair keyPair, byte[] signature, string[] messages) { KeyPair = keyPair ?? throw new ArgumentNullException(nameof(keyPair)); Signature = signature ?? throw new ArgumentNullException(nameof(signature)); Messages = messages ?? throw new ArgumentNullException(nameof(messages)); }