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

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

chevron-rightsubmit-tx.tshashtag

Best Practices

  1. Transaction Verification: Always verify the transaction hex before signing

  2. Signature Format: Ensure the signature is properly formatted from your wallet

  3. Error Handling: Check the response for any errors before assuming success

  4. Chain Validation: Always verify the transaction was confirmed on the blockchain

End-to-End Flow

  1. Build a transaction using a specific endpoint (buy, create listing, make offer)

  2. Sign the transaction with your wallet

  3. Submit the signed transaction using this guide

  4. Verify the transaction on a blockchain explorer

Last updated

Was this helpful?