The Solana API currently provides the generic blockchain operations required by higher-level integrations.
Issue #29 adds support for constructing an unsigned Jupiter Perps position-increase transaction. An external wallet can sign this transaction and produce a complete signed Solana transaction.
The remaining generic operation is submitting the signed transaction to the Solana blockchain.
Transaction submission is not Jupiter-specific. SolanaBlockChain should be able to submit any valid signed Solana transaction, regardless of which Solana program the transaction invokes.
Goal
Extend:
com.r35157.libs.solana.SolanaBlockChain
with a method named:
sendTransaction(...)
The method receives a complete signed Solana transaction, submits it through the configured Solana RPC endpoint, and returns the resulting Solana transaction signature.
/**
* A complete serialized Solana transaction containing all required signatures.
*
* @param serializedTransaction the signed transaction encoded as Base64
*/publicrecordSolanaSignedTransaction(ΩBase64StringΩserializedTransaction){}
The type must be created as a .tjava source.
Transaction signature type
Introduce a suitable ValueTag for the transaction identifier returned by Solana:
SolanaTransactionSignature
The type represents the Base58-encoded transaction signature returned by Solana RPC.
Update detag.conf accordingly.
Requirements
Add sendTransaction(...) to SolanaBlockChain.
Implement the method in the reference Solana implementation.
Use the Solana JSON-RPC sendTransaction operation.
Submit the transaction using Base64 encoding.
Use the existing configured Solana RPC endpoint.
Enable RPC preflight validation.
Return the transaction signature supplied by Solana RPC.
Convert RPC error responses into meaningful Java exceptions.
Reject a missing or blank serialized transaction before making the RPC request.
Do not access private keys.
Do not sign or modify the transaction.
Do not use a Jupiter-specific submission endpoint.
Update the SolanaBlockChain JavaDoc so it no longer describes the complete interface as read-only.
The exact internal JSON records and request identifiers are implementation details.
Verification
Use a real signed transaction produced from the unsigned Jupiter Perps transaction created in issue #29.
Verify that:
sendTransaction(...) accepts the signed transaction.
Solana RPC returns a non-empty transaction signature.
The returned signature can be used to locate the submitted transaction.
The expected blockchain state change can subsequently be observed.
The transaction should initially use a very small amount.
Out of scope
The following are not part of this issue:
Transaction construction
Private-key handling
Transaction signing
Wallet implementation
Confirmation polling
Automatic retries
Durable nonce support
Priority-fee calculation
Jupiter-specific transaction submission
Automatic reconstruction of expired transactions
Confirmation handling can be introduced later as a separate generic Solana API operation.
Definition of done
SolanaSignedTransaction exists as a public Solana API type.
SolanaTransactionSignature exists as an appropriate ValueTag.
SolanaBlockChain contains sendTransaction(...).
The reference implementation submits signed Base64 transactions through Solana RPC.
RPC errors are reported clearly.
A real signed transaction can be submitted successfully.
A non-empty Solana transaction signature is returned.
No private key is accessed by the Solana blockchain implementation.
The complete repository compiles.
## Background
The Solana API currently provides the generic blockchain operations required by higher-level integrations.
Issue #29 adds support for constructing an unsigned Jupiter Perps position-increase transaction. An external wallet can sign this transaction and produce a complete signed Solana transaction.
The remaining generic operation is submitting the signed transaction to the Solana blockchain.
Transaction submission is not Jupiter-specific. `SolanaBlockChain` should be able to submit any valid signed Solana transaction, regardless of which Solana program the transaction invokes.
## Goal
Extend:
```java
com.r35157.libs.solana.SolanaBlockChain
```
with a method named:
```java
sendTransaction(...)
```
The method receives a complete signed Solana transaction, submits it through the configured Solana RPC endpoint, and returns the resulting Solana transaction signature.
Possible API:
```java
@NotNull
ΩSolanaTransactionSignatureΩ sendTransaction(
@NotNull SolanaSignedTransaction transaction
) throws IOException, InterruptedException;
```
## Signed transaction type
Introduce:
```java
com.r35157.libs.solana.SolanaSignedTransaction
```
Possible representation:
```java
/**
* A complete serialized Solana transaction containing all required signatures.
*
* @param serializedTransaction the signed transaction encoded as Base64
*/
public record SolanaSignedTransaction(
ΩBase64StringΩ serializedTransaction
) {
}
```
The type must be created as a `.tjava` source.
## Transaction signature type
Introduce a suitable ValueTag for the transaction identifier returned by Solana:
```text
SolanaTransactionSignature
```
The type represents the Base58-encoded transaction signature returned by Solana RPC.
Update `detag.conf` accordingly.
## Requirements
* Add `sendTransaction(...)` to `SolanaBlockChain`.
* Implement the method in the reference Solana implementation.
* Use the Solana JSON-RPC `sendTransaction` operation.
* Submit the transaction using Base64 encoding.
* Use the existing configured Solana RPC endpoint.
* Enable RPC preflight validation.
* Return the transaction signature supplied by Solana RPC.
* Convert RPC error responses into meaningful Java exceptions.
* Reject a missing or blank serialized transaction before making the RPC request.
* Do not access private keys.
* Do not sign or modify the transaction.
* Do not use a Jupiter-specific submission endpoint.
* Update the `SolanaBlockChain` JavaDoc so it no longer describes the complete interface as read-only.
* The complete repository must continue to compile.
A suitable initial RPC configuration is:
```json
{
"encoding": "base64",
"skipPreflight": false,
"preflightCommitment": "confirmed"
}
```
The exact internal JSON records and request identifiers are implementation details.
## Verification
Use a real signed transaction produced from the unsigned Jupiter Perps transaction created in issue #29.
Verify that:
1. `sendTransaction(...)` accepts the signed transaction.
2. Solana RPC returns a non-empty transaction signature.
3. The returned signature can be used to locate the submitted transaction.
4. The expected blockchain state change can subsequently be observed.
The transaction should initially use a very small amount.
## Out of scope
The following are not part of this issue:
* Transaction construction
* Private-key handling
* Transaction signing
* Wallet implementation
* Confirmation polling
* Automatic retries
* Durable nonce support
* Priority-fee calculation
* Jupiter-specific transaction submission
* Automatic reconstruction of expired transactions
Confirmation handling can be introduced later as a separate generic Solana API operation.
## Definition of done
* `SolanaSignedTransaction` exists as a public Solana API type.
* `SolanaTransactionSignature` exists as an appropriate ValueTag.
* `SolanaBlockChain` contains `sendTransaction(...)`.
* The reference implementation submits signed Base64 transactions through Solana RPC.
* RPC errors are reported clearly.
* A real signed transaction can be submitted successfully.
* A non-empty Solana transaction signature is returned.
* No private key is accessed by the Solana blockchain implementation.
* The complete repository compiles.
A real signed transaction is accepted by Solana RPC.
Solana RPC returns the transaction signature embedded in the transaction.
The method reports HTTP and RPC errors clearly.
Inclusion, confirmation, retry handling, and reliable delivery are outside the scope of this issue.
- A real signed transaction is accepted by Solana RPC.
- Solana RPC returns the transaction signature embedded in the transaction.
- The method reports HTTP and RPC errors clearly.
- Inclusion, confirmation, retry handling, and reliable delivery are outside the scope of this issue.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Background
The Solana API currently provides the generic blockchain operations required by higher-level integrations.
Issue #29 adds support for constructing an unsigned Jupiter Perps position-increase transaction. An external wallet can sign this transaction and produce a complete signed Solana transaction.
The remaining generic operation is submitting the signed transaction to the Solana blockchain.
Transaction submission is not Jupiter-specific.
SolanaBlockChainshould be able to submit any valid signed Solana transaction, regardless of which Solana program the transaction invokes.Goal
Extend:
with a method named:
The method receives a complete signed Solana transaction, submits it through the configured Solana RPC endpoint, and returns the resulting Solana transaction signature.
Possible API:
Signed transaction type
Introduce:
Possible representation:
The type must be created as a
.tjavasource.Transaction signature type
Introduce a suitable ValueTag for the transaction identifier returned by Solana:
The type represents the Base58-encoded transaction signature returned by Solana RPC.
Update
detag.confaccordingly.Requirements
sendTransaction(...)toSolanaBlockChain.sendTransactionoperation.SolanaBlockChainJavaDoc so it no longer describes the complete interface as read-only.A suitable initial RPC configuration is:
The exact internal JSON records and request identifiers are implementation details.
Verification
Use a real signed transaction produced from the unsigned Jupiter Perps transaction created in issue #29.
Verify that:
sendTransaction(...)accepts the signed transaction.The transaction should initially use a very small amount.
Out of scope
The following are not part of this issue:
Confirmation handling can be introduced later as a separate generic Solana API operation.
Definition of done
SolanaSignedTransactionexists as a public Solana API type.SolanaTransactionSignatureexists as an appropriate ValueTag.SolanaBlockChaincontainssendTransaction(...).