-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add default OptionalParams to existing client - ready for testing non…
… default params as input
- Loading branch information
Showing
13 changed files
with
435 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
client/src/main/java/com/lmax/solana4j/client/api/SolanaClientOptionalParams.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.lmax.solana4j.client.api; | ||
|
||
import java.util.Map; | ||
|
||
/** | ||
* Interface representing optional parameters for customizing Solana JSON-RPC requests. | ||
* Implementations of this interface allow adding parameters that modify request behavior. | ||
*/ | ||
public interface SolanaClientOptionalParams | ||
{ | ||
/** | ||
* Adds an optional parameter to the request. | ||
* This can be used to pass additional customization options supported by the Solana JSON-RPC API. | ||
* | ||
* @param key the name of the parameter to add (e.g., "commitment", "encoding") | ||
* @param value the value of the parameter, which can be any supported data type | ||
*/ | ||
void addParam(String key, Object value); | ||
|
||
/** | ||
* Retrieves all the optional parameters as a map. | ||
* This map can be used to access the parameters set for a given request. | ||
* | ||
* @return a map containing all the key-value pairs for optional parameters | ||
*/ | ||
Map<String, Object> getParams(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.