Skip to content

cleanup openapi spec across repos #808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ryanwaits opened this issue Dec 9, 2024 · 3 comments
Open

cleanup openapi spec across repos #808

ryanwaits opened this issue Dec 9, 2024 · 3 comments

Comments

@ryanwaits
Copy link
Collaborator

There have been a number of minor copy issues that have popped up when fetching openapi specs, need to dedicate some time to clean these up for docs automation.

@ryanwaits ryanwaits added this to Devrel Oct 1, 2024
@ryanwaits ryanwaits converted this from a draft issue Dec 9, 2024
@ECBSJ
Copy link
Contributor

ECBSJ commented Dec 9, 2024

Dev suggested we give a better explanation of what the transaction_payload property should be when passing into the https://api.hiro.so/v2/fees/transaction endpoint. He stated that it wasn't clear enough.

here's more context in this Discord message.

let transaction: StacksTransactionWire
let txlength = estimateTransactionByteLength(transaction)

const json = {
  **transaction_payload: bytesToHex(serializePayloadBytes(transaction.payload)),**
  estimated_len: txlength
}

let response = await fetch("https://api.hiro.so/v2/fees/transaction", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify(json)
})
let result = await response.json()

I guess it's not obvious that one should be grabbing the payload property of the StacksTransactionWire class after it's constructed.

Image

@ECBSJ
Copy link
Contributor

ECBSJ commented Mar 13, 2025

In the NFT metadata endpoint page, the example NFT contract using in the API Playground portion of this endpoint page is returning an error:

❯ curl -X GET "https:// api.hiro .so /metadata/v1/nft/SP497E7RX3233ATBS2AB9G4WTHB63X5PBSP5VGAQ.boomboxes-cycle-12/35"

{"error":"Token error","message":"Metadata could not be processed because the server responded with an error"}

Side notes:

  • calling the get-token-uri function directly from contract returns proper response
  • this issue was flagged by a dev in the Discord

@ECBSJ
Copy link
Contributor

ECBSJ commented Apr 12, 2025

The query param for this RPC endpoint https://api.hiro.so/v2/contracts/call-read/{contract_address}/{contract_name}/{function_name} takes in a tip param. But it doesn't take in the Stacks block height nor hash, but rather the index_block_hash.

This index_block_hash can be found calling another endpoint https://api.hiro.so/extended/v2/blocks/{height_or_hash}.

Let's add some verbage for this in the docs page below for the tip query param:
https://docs.hiro.so/stacks/rpc-api/smart-contracts/read-only

Image

@ryanwaits ryanwaits moved this from 📋 Backlog to 🏗 In Progress in Devrel Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In Progress
Status: No status
Development

No branches or pull requests

2 participants