public override bool Equals(object obj) { LockTime item = obj is LockTime ? (LockTime)obj : default(LockTime); if (item == null) { return(false); } return(_value.Equals(item._value)); }
public PuzzlePaymentRequest(Puzzle puzzle, Money amount, LockTime escrowDate) { if (puzzle == null) { throw new ArgumentNullException(nameof(puzzle)); } this.Amount = amount ?? throw new ArgumentNullException(nameof(amount)); this.EscrowDate = escrowDate; this.RsaPubKeyHash = puzzle.RsaPubKey.GetHash(); this.PuzzleValue = puzzle.PuzzleValue; }
public TransactionSignature UntrustedHashSign(KeyPath keyPath, UserPin pin, LockTime lockTime, SigHash sigHashType) { using(Transport.Lock()) { MemoryStream data = new MemoryStream(); byte[] path = Serializer.Serialize(keyPath); BufferUtils.WriteBuffer(data, path); var pinBytes = pin == null ? new byte[0] : pin.ToBytes(); data.WriteByte((byte)pinBytes.Length); BufferUtils.WriteBuffer(data, pinBytes); BufferUtils.WriteUint32BE(data, (uint)lockTime); data.WriteByte((byte)sigHashType); byte[] response = ExchangeApdu(LedgerWalletConstants.LedgerWallet_CLA, LedgerWalletConstants.LedgerWallet_INS_HASH_SIGN, (byte)0x00, (byte)0x00, data.ToArray(), OK); response[0] = (byte)0x30; return new TransactionSignature(response); } }
public TransactionBuilder SetLockTime(LockTime lockTime) { _LockTime = lockTime; return(this); }
public TransactionBuilder SetLockTime(LockTime lockTime) { _LockTime = lockTime; return this; }