src/main/java/convex/java/Convex.java
/**
	 * Creates a new Account using the given key pair
	 * 
	 * @param keyPair
	 * @return Address of new account
	 */
Creates a new Account using the given key pair

@param keyPair
@return Address of new account
Creates a new Account using the given key pair @param keyPair @return Address of new account
public Address createAccount(AKeyPair keyPair) {
		if (keyPair==null) throw new IllegalArgumentException("createAccount requires a non-null valid keyPair");
		HashMap<String,Object> req=new HashMap<>();
		req.put("accountKey", keyPair.getAccountKey().toHexString());
		String json=JSON.toPrettyString(req);
		Map<String,Object> response= doPost(url+"/api/v1/createAccount",json);
		Address address=Address.parse((String)response.get("address"));
		if (address==null) throw new Error("Account creation failed: "+response);
		return address;
	}
public Address createAccount ( AKeyPair keyPair ) { if ( keyPair == null ) throw new IllegalArgumentException ( "createAccount requires a non-null valid keyPair" ) ; HashMap < String , Object > req = new HashMap < > ( ) ; req . put ( "accountKey" , keyPair . getAccountKey ( ) . toHexString ( ) ) ; String json = JSON . toPrettyString ( req ) ; Map < String , Object > response = doPost ( url + "/api/v1/createAccount" , json ) ; Address address = Address . parse ( ( String ) response . get ( "address" ) ) ; if ( address == null ) throw new Error ( "Account creation failed: " + response ) ; return address ; }
Creates a new Account using the given key pair
Creates a new Account using the given key pair