public Transaction CreateOrUpdateNanoPay(string toAddress, decimal amount, int expiration, long?id, TransactionOptions options = null) { options = options ?? new TransactionOptions(); if (Common.Address.Verify(toAddress) == false) { throw new System.Exception(); } id = id ?? PseudoRandom.RandomLong(); var payload = TransactionFactory.MakeNanoPayPayload( this.programHash, Common.Address.ToProgramHash(toAddress), id.Value, new Amount(amount).Value, expiration, expiration); return(this.CreateTransaction(payload, 0, options)); }