> For the complete documentation index, see [llms.txt](https://docs.skylinebridge.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.skylinebridge.tech/web-api/transaction.md).

# Transaction

## Create a bridging transaction

> Builds a bridging transaction with all required fees and metadata. The transaction must be signed and submitted separately.

```json
{"openapi":"3.0.0","info":{"title":"Web API","version":"1.0"},"paths":{"/transaction/createCardano":{"post":{"operationId":"TransactionController_createCardano","summary":"Create a bridging transaction","description":"Builds a bridging transaction with all required fees and metadata. The transaction must be signed and submitted separately.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTransactionDto"}}}},"responses":{"200":{"description":"OK - Returns the raw transaction data, transaction hash, and calculated bridging fee and amounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCardanoTransactionResponseDto"}}}},"400":{"description":"Bad Request - Error while creating bridging transaction."},"500":{"description":"Internal server Error"}},"tags":["Transaction"]}}},"components":{"schemas":{"CreateTransactionDto":{"type":"object","properties":{"senderAddress":{"type":"string","description":"Address that initiates the bridging request on the source chain"},"originChain":{"type":"string","description":"Source chain ID","enum":["cardano","prime"]},"destinationChain":{"type":"string","description":"Destination chain ID","enum":["cardano","prime"]},"destinationAddress":{"type":"string","description":"Receiver address on destination chain"},"amount":{"type":"string","description":"Amount to be bridged"},"bridgingFee":{"type":"string","description":"Fee covering the submission of the transaction on the destination chain, expressed in Lovelace","nullable":true},"operationFee":{"type":"string","description":"Fee covering the operational cost of processing the bridging request, expressed in Lovelace","nullable":true},"utxoCacheKey":{"type":"string","description":"Key used to enable caching of spent UTXOs","nullable":true},"isNativeToken":{"type":"boolean","description":"True if the amount is specified in a native token; false if in a currency on source chain"}},"required":["senderAddress","originChain","destinationChain","destinationAddress","amount","isNativeToken"]},"CreateCardanoTransactionResponseDto":{"type":"object","properties":{"txRaw":{"type":"string","description":"Raw transaction data, encoded as a hexadecimal string"},"txHash":{"type":"string","description":"Transaction hash"},"bridgingFee":{"type":"number","description":"Bridging fee for covering submission on the destination chain, expressed in Lovelace"},"isFallback":{"type":"boolean","description":"Indicates is fallback mechanism used"},"amount":{"type":"number","description":"Amount of currency to be bridged, expressed in Lovelace"},"nativeTokenAmount":{"type":"number","description":"Amount of native token to be bridged"}},"required":["txRaw","txHash","bridgingFee","isFallback","amount","nativeTokenAmount"]}}}}
```

## Get fees required for a bridging transaction

> Returns the transaction and bridging fees that the sender must pay on the source chain. The bridging fee covers the cost for the fee payer to submit the transaction on the destination chain.

```json
{"openapi":"3.0.0","info":{"title":"Web API","version":"1.0"},"paths":{"/transaction/getCardanoTxFee":{"post":{"operationId":"TransactionController_getCardanoTxFee","summary":"Get fees required for a bridging transaction","description":"Returns the transaction and bridging fees that the sender must pay on the source chain. The bridging fee covers the cost for the fee payer to submit the transaction on the destination chain.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTransactionDto"}}}},"responses":{"200":{"description":"OK - Returns calculated fees.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardanoTransactionFeeResponseDto"}}}},"400":{"description":"Bad Request - Error while getting bridging transaction fees."},"500":{"description":"Internal server Error"}},"tags":["Transaction"]}}},"components":{"schemas":{"CreateTransactionDto":{"type":"object","properties":{"senderAddress":{"type":"string","description":"Address that initiates the bridging request on the source chain"},"originChain":{"type":"string","description":"Source chain ID","enum":["cardano","prime"]},"destinationChain":{"type":"string","description":"Destination chain ID","enum":["cardano","prime"]},"destinationAddress":{"type":"string","description":"Receiver address on destination chain"},"amount":{"type":"string","description":"Amount to be bridged"},"bridgingFee":{"type":"string","description":"Fee covering the submission of the transaction on the destination chain, expressed in Lovelace","nullable":true},"operationFee":{"type":"string","description":"Fee covering the operational cost of processing the bridging request, expressed in Lovelace","nullable":true},"utxoCacheKey":{"type":"string","description":"Key used to enable caching of spent UTXOs","nullable":true},"isNativeToken":{"type":"boolean","description":"True if the amount is specified in a native token; false if in a currency on source chain"}},"required":["senderAddress","originChain","destinationChain","destinationAddress","amount","isNativeToken"]},"CardanoTransactionFeeResponseDto":{"type":"object","properties":{"fee":{"type":"number","description":"Transaction fee on the source chain, expressed in Lovelace"},"bridgingFee":{"type":"number","description":"Bridging fee for covering submission on the destination chain, expressed in Lovelace"}},"required":["fee","bridgingFee"]}}}}
```

## Confirm the bridging transaction submission on the source chain

> Returns a confirmed bridging transaction along with its associated data.

```json
{"openapi":"3.0.0","info":{"title":"Web API","version":"1.0"},"paths":{"/transaction/bridgingTransactionSubmitted":{"post":{"operationId":"TransactionController_bridgingTransactionSubmitted","summary":"Confirm the bridging transaction submission on the source chain","description":"Returns a confirmed bridging transaction along with its associated data.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionSubmittedDto"}}}},"responses":{"200":{"description":"OK - Returns confirmed bridging transaction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BridgeTransactionDto"}}}},"400":{"description":"Bad Request - Error while confirming transaction submittion."}},"tags":["Transaction"]}}},"components":{"schemas":{"TransactionSubmittedDto":{"type":"object","properties":{"originChain":{"type":"string","description":"Source chain ID","enum":["cardano","prime"]},"destinationChain":{"type":"string","description":"Destination chain ID","enum":["cardano","prime"]},"originTxHash":{"type":"string","description":"Transaction hash on source chain"},"senderAddress":{"type":"string","description":"Address that initiated the bridging request on the source chain"},"receiverAddrs":{"description":"Recipient addresses on the destination chain","type":"array","items":{"type":"string"}},"amount":{"type":"string","description":"Amount of currency to be bridged, including bridging fee"},"nativeTokenAmount":{"type":"string","description":"Amount of native token to be bridged"},"txRaw":{"type":"string","description":"Transaction raw data on source chain"},"isFallback":{"type":"boolean","description":"Indicates is fallback mechanism used"}},"required":["originChain","destinationChain","originTxHash","senderAddress","receiverAddrs","amount","nativeTokenAmount","txRaw","isFallback"]},"BridgeTransactionDto":{"type":"object","properties":{"id":{"type":"number","description":"Bridging transaction ID"},"senderAddress":{"type":"string","description":"Address that initiated the bridging transaction on the source chain"},"receiverAddresses":{"type":"string","description":"Recipient addresses on the destination chain"},"amount":{"type":"string","description":"Bridged amount"},"nativeTokenAmount":{"type":"string","description":"Bridged native token amount"},"originChain":{"type":"string","description":"Source chain ID","enum":["cardano","prime"]},"destinationChain":{"type":"string","description":"Destination chain ID","enum":["cardano","prime"]},"sourceTxHash":{"type":"string","description":"Transaction hash on source chain"},"destinationTxHash":{"type":"string","description":"Transaction hash on destination chain","nullable":true},"status":{"type":"string","description":"Status of bridging request","enum":["Pending","DiscoveredOnSource","InvalidRequest","SubmittedToBridge","IncludedInBatch","SubmittedToDestination","FailedToExecuteOnDestination","ExecutedOnDestination"]},"createdAt":{"format":"date-time","type":"string","description":"Transaction creation date"},"finishedAt":{"format":"date-time","type":"string","description":"Transaction finalization date","nullable":true}},"required":["id","senderAddress","receiverAddresses","amount","nativeTokenAmount","originChain","destinationChain","sourceTxHash","status","createdAt"]}}}}
```
