io.nuls.v2.util.JsonRpcUtil Maven / Gradle / Ivy
package io.nuls.v2.util;
import io.nuls.core.constant.CommonCodeConstanst;
import io.nuls.core.log.Log;
import io.nuls.core.parse.JSONUtils;
import io.nuls.v2.model.dto.RpcResult;
import io.nuls.v2.model.dto.RpcResultError;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static io.nuls.v2.SDKContext.wallet_url;
/**
* JSON-RPC 请求工具
* @author: PierreLuo
* @date: 2019-07-01
*/
public class JsonRpcUtil {
private static final String ID = "id";
private static final String JSONRPC = "jsonrpc";
private static final String METHOD = "method";
private static final String PARAMS = "params";
private static final String DEFAULT_ID = "1";
private static final String JSONRPC_VERSION = "2.0";
public static RpcResult request(String method, List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy