Submit Transaction
How to submit signed transactions to the Wayup Marketplace
Introduction
This guide demonstrates how to submit a signed transaction to the Wayup Marketplace using the API. This step comes after you've built and signed a transaction, such as for buying an NFT, making an offer, or creating a listing.
Requirements
A transaction hex from a previous
/build-txcallA signature from your wallet after signing the transaction (optional). See Sign Transactions
API Request Structure
Configuration
// API endpoint for Wayup Marketplace
const BASE_URL = "https://prod.api.ada-anvil.app/marketplace/api";
// Replace these with your actual signature and transaction hex
// The signature comes from your wallet after signing the transaction hex
// The transaction is the hex output from a previous build-tx call
const SIGNATURE = "SIGNATURE";
const TRANSACTION = "TRANSACTION";Type Definitions
Implementation
Step 1: Prepare the Submission Payload
First, prepare the payload with your signature and transaction hex:
Step 2: Submit the Transaction
Next, submit the transaction to the API:
Step 3: Process the Response
Finally, process the response from the API:
Running the Example
Example Output
The Complete File
Best Practices
Transaction Verification: Always verify the transaction hex before signing
Signature Format: Ensure the signature is properly formatted from your wallet
Error Handling: Check the response for any errors before assuming success
Chain Validation: Always verify the transaction was confirmed on the blockchain
End-to-End Flow
Build a transaction using a specific endpoint (buy, create listing, make offer)
Sign the transaction with your wallet
Submit the signed transaction using this guide
Verify the transaction on a blockchain explorer
Last updated
Was this helpful?

