Skip to content

Commit

Permalink
Merge pull request #584 from cardano-foundation/feature/add-mainnet-e…
Browse files Browse the repository at this point in the history
…vent-commands

feat: Created the commands for running the Cardano 2024 Mainnet Event
  • Loading branch information
rcmorano authored Sep 25, 2024
2 parents 1321978 + ac1c7c5 commit 53eae89
Show file tree
Hide file tree
Showing 2 changed files with 679 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@ public class CardanoSubmitApiBlockchainTransactionSubmissionService implements B
@Value("${cardano.tx.submit.api.url}")
private String cardanoSubmitApiUrl;

@Value("${blockfrost.api.key}")
private String blockfrostApiKey;

@Override
@SneakyThrows
public String submitTransaction(byte[] txData) {
var txTransactionSubmitPostRequest = HttpRequest.newBuilder()
.uri(URI.create(cardanoSubmitApiUrl))
.POST(HttpRequest.BodyPublishers.ofByteArray(txData))
.header("Content-Type", "application/cbor")
.header("project_id", blockfrostApiKey)
.build();

var r = httpClient.send(txTransactionSubmitPostRequest, HttpResponse.BodyHandlers.ofString());
Expand Down
Loading

0 comments on commit 53eae89

Please sign in to comment.