public JObject NetworkOptions(NetworkRequest request)
        {
            Version version = new Version(RosettaApiSettings.Default.RosettaVersion, LocalNode.UserAgent);
            Allow   allow   = new Allow(OperationStatus.AllowedStatuses, OperationType.AllowedOperationTypes, Error.AllowedErrors, false);
            NetworkOptionsResponse networkOptionsResponse = new NetworkOptionsResponse(version, allow);

            return(networkOptionsResponse.ToJson());
        }
        public JObject NetworkOptions(NetworkRequest request)
        {
            if (request.NetworkIdentifier?.Blockchain?.ToLower() != "neo n3")
            {
                return(Error.NETWORK_IDENTIFIER_INVALID.ToJson());
            }
            if (request.NetworkIdentifier?.Network?.ToLower() != network)
            {
                return(Error.NETWORK_IDENTIFIER_INVALID.ToJson());
            }

            Version version = new Version(Settings.Default.RosettaVersion, LocalNode.UserAgent);
            Allow   allow   = new Allow(OperationStatus.AllowedStatuses, OperationType.AllowedOperationTypes, Error.AllowedErrors, false,
                                        Array.Empty <string>(), Array.Empty <BalanceExemption>(), false, 1468595301000);
            NetworkOptionsResponse networkOptionsResponse = new NetworkOptionsResponse(version, allow);

            return(networkOptionsResponse.ToJson());
        }
Example #3
0
 public NetworkOptionsResponse(Version version, Allow allow)
 {
     Version = version;
     Allow   = allow;
 }