Exemple #1
0
            public void serialize(CryptoNote.ISerializer serializer, WalletService service)
            {
                serializer.functorMethod(addresses, "addresses");

                if (serializer.functorMethod(transfers, "transfers") == null)
                {
                    throw new RequestSerializationError();
                }

                serializer.functorMethod(changeAddress, "changeAddress");

                if (serializer.functorMethod(fee, "fee") == null)
                {
                    throw new RequestSerializationError();
                }

                if (serializer.functorMethod(anonymity, "anonymity") == null)
                {
                    anonymity = service.getDefaultMixin();
                }

                bool hasExtra     = serializer.functorMethod(extra, "extra");
                bool hasPaymentId = serializer.functorMethod(paymentId, "paymentId");

                if (hasExtra && hasPaymentId)
                {
                    throw new RequestSerializationError();
                }

                serializer.functorMethod(unlockTime, "unlockTime");
            }
Exemple #2
0
            public void serialize(CryptoNote.ISerializer serializer, WalletService service)
            {
                if (serializer.functorMethod(threshold, "threshold") == null)
                {
                    throw new RequestSerializationError();
                }

                if (serializer.functorMethod(anonymity, "anonymity") == null)
                {
                    anonymity = service.getDefaultMixin();
                }

                serializer.functorMethod(addresses, "addresses");
                serializer.functorMethod(destinationAddress, "destinationAddress");
            }