Code Monkey home page Code Monkey logo

docs's People

Contributors

agraebe avatar alexlmiller avatar andresgalante avatar aravindgee avatar beguene avatar bluescion avatar charliec3 avatar csgui avatar dcsan avatar deantchi avatar diwakergupta avatar ecbsj avatar elenananana avatar he1dar avatar hugocaillard avatar janniks avatar jbencin avatar kyranjamie avatar lakshmilavanyakasturi avatar max-crawford avatar mefrem avatar micaiahreid avatar obycode avatar pgray-hiro avatar rafaelcr avatar ryanwaits avatar sabbyanandan avatar saralab avatar smcclellan avatar trichards-hiro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docs's Issues

/assets and /nft_events end points seem reversed

so these seem the wrong way around to me

Get list of all nfts owned by an address, contains the clarity value of the identifier of the nft

maybe it's just the naming of the end points, the docs also contradict the api endpoint

  • /assets gives a list of all transactions like this:

https://docs.hiro.so/api#operation/get_account_assets

/assets

shows all the NFT events

    INFO tools.stacks response {
  INFO tools.stacks   "limit": 20,
  INFO tools.stacks   "offset": 0,
  INFO tools.stacks   "total": 5,
  INFO tools.stacks   "results": [
  INFO tools.stacks     {
  INFO tools.stacks       "event_index": 0,
  INFO tools.stacks       "event_type": "non_fungible_token_asset",
  INFO tools.stacks       "tx_id": "0x7d9656d9b4da543544d02db59b97f9261aa91e5c8f00481cf9373817cfead017",
  INFO tools.stacks       "asset": {
  INFO tools.stacks         "asset_event_type": "transfer",
  INFO tools.stacks         "asset_id": "SP1CSHTKVHMMQJ7PRQRFYW6SB4QAW6SR3XY2F81PA.stxplates::PLATES",
  INFO tools.stacks         "sender": "SP5JMWT45ZF0RHJZSR4XPAEW8MS7J3DFQS5FAJ0X",
  INFO tools.stacks         "recipient": "SPNWZ5V2TPWGQGVDR6T7B6RQ4XMGZ4PXTEE0VQ0S.marketplace-v4",
  INFO tools.stacks         "value": {
  INFO tools.stacks           "hex": "0x01000000000000000000000000000000ab",
  INFO tools.stacks           "repr": "u171"
  INFO tools.stacks         }
  INFO tools.stacks       }
  INFO tools.stacks     },
  INFO tools.stacks     {
  INFO tools.stacks       "event_index": 0,
  INFO tools.stacks       "event_type": "non_fungible_token_asset",
  INFO tools.stacks       "tx_id": "0x5133847ac6ddfa724b69d31a7c1b11098b75d183948058dcb0ec2d1caaa5a274",
  INFO tools.stacks       "asset": {
  INFO tools.stacks         "asset_event_type": "transfer",
  INFO tools.stacks         "asset_id": "SP1CSHTKVHMMQJ7PRQRFYW6SB4QAW6SR3XY2F81PA.stxplates::PLATES",
  INFO tools.stacks         "sender": "SP1JT14AAXH7N3TYRX118GB7ZPMH4Q341TS0HM0VB",
  INFO tools.stacks         "recipient": "SP5JMWT45ZF0RHJZSR4XPAEW8MS7J3DFQS5FAJ0X",
  INFO tools.stacks         "value": {
  INFO tools.stacks           "hex": "0x01000000000000000000000000000000ab",
  INFO tools.stacks           "repr": "u171"
  INFO tools.stacks         }
  INFO tools.stacks       }
  INFO tools.stacks     },
  INFO tools.stacks     {
  INFO tools.stacks       "event_index": 1,
  INFO tools.stacks       "event_type": "non_fungible_token_asset",
  INFO tools.stacks       "tx_id": "0x3e09b4672aae0dfb150e4383fec05493613f4e7c232ff17d1b247431bdda2c78",
  INFO tools.stacks       "asset": {
  INFO tools.stacks         "asset_event_type": "mint",
  INFO tools.stacks         "asset_id": "SP1CSHTKVHMMQJ7PRQRFYW6SB4QAW6SR3XY2F81PA.stxplates::PLATES",
  INFO tools.stacks         "sender": "",
  INFO tools.stacks         "recipient": "SP5JMWT45ZF0RHJZSR4XPAEW8MS7J3DFQS5FAJ0X",
  INFO tools.stacks         "value": {
  INFO tools.stacks           "hex": "0x01000000000000000000000000000000ad",
  INFO tools.stacks           "repr": "u173"
  INFO tools.stacks         }
  INFO tools.stacks       }
  INFO tools.stacks     },
  INFO tools.stacks     {
  INFO tools.stacks       "event_index": 0,
  INFO tools.stacks       "event_type": "stx_asset",
  INFO tools.stacks       "tx_id": "0x3e09b4672aae0dfb150e4383fec05493613f4e7c232ff17d1b247431bdda2c78",
  INFO tools.stacks       "asset": {
  INFO tools.stacks         "asset_event_type": "transfer",
  INFO tools.stacks         "sender": "SP5JMWT45ZF0RHJZSR4XPAEW8MS7J3DFQS5FAJ0X",
  INFO tools.stacks         "recipient": "SP1CSHTKVHMMQJ7PRQRFYW6SB4QAW6SR3XY2F81PA.stxplates",
  INFO tools.stacks         "amount": "1000000"
  INFO tools.stacks       }
  INFO tools.stacks     },
  INFO tools.stacks     {
  INFO tools.stacks       "event_index": 0,
  INFO tools.stacks       "event_type": "stx_asset",
  INFO tools.stacks       "tx_id": "0x3d863b088d87842730526314dbb25b314f732289d43e6ec3ec1056ce2eb0d942",
  INFO tools.stacks       "asset": {
  INFO tools.stacks         "asset_event_type": "transfer",
  INFO tools.stacks         "sender": "SP1JT14AAXH7N3TYRX118GB7ZPMH4Q341TS0HM0VB",
  INFO tools.stacks         "recipient": "SP5JMWT45ZF0RHJZSR4XPAEW8MS7J3DFQS5FAJ0X",
  INFO tools.stacks         "amount": "100000000"
  INFO tools.stacks       }
  INFO tools.stacks     }
  INFO tools.stacks   ]
  INFO tools.stacks } +0ms

/nft_events

shows the single asset I hold:

    INFO tools.stacks response {
  INFO tools.stacks   "nft_events": [
  INFO tools.stacks     {
  INFO tools.stacks       "sender": null,
  INFO tools.stacks       "recipient": "SP5JMWT45ZF0RHJZSR4XPAEW8MS7J3DFQS5FAJ0X",
  INFO tools.stacks       "asset_identifier": "SP1CSHTKVHMMQJ7PRQRFYW6SB4QAW6SR3XY2F81PA.stxplates::PLATES",
  INFO tools.stacks       "value": {
  INFO tools.stacks         "hex": "0x01000000000000000000000000000000ad",
  INFO tools.stacks         "repr": "u173"
  INFO tools.stacks       },
  INFO tools.stacks       "tx_id": "0x3e09b4672aae0dfb150e4383fec05493613f4e7c232ff17d1b247431bdda2c78",
  INFO tools.stacks       "block_height": 38694
  INFO tools.stacks     }
  INFO tools.stacks   ],
  INFO tools.stacks   "total": 1,
  INFO tools.stacks   "limit": 20,
  INFO tools.stacks   "offset": 0
  INFO tools.stacks } +0ms

Documentation on Clarity values returned from API

Several developers have complained that the Stacks API returns Clarity values that must be deserialized before they can be used in Javascript frontends. Although Stacks.js does provide the necessary tools for performing this conversion, the details are not well-documented. The documentation should include:

  1. The type of Clarity value that each endpoint returns (likely included in the OpenAPI spec doc)
  2. Examples of the necessary Stacks.js calls to deserialize each type of value
  3. A cheatsheet or quick reference for common endpoints and their returned values
  4. An example app that exercises the Clarity to JS value code in Stacks.js

Remove Fathom analytics

Once we have confirmed that Segment analytics is working for the Hiro documentation site, remove the Fathom analytics plugin and configuration from the site so we are not double-tracking.

Add troubleshooting guide in a flowchart format

Flowcharts are a better approach to unpack complex scenarios, especially with conditions. That conditionality is always the case when it comes to troubleshooting and debugging.

Mermaid is a tool that is commonly adopted to describe the guide in a markdown format, and it then translates it to visual charts. Mermaid recently also made it into GitHub proper! However, the Docusaurus support is prioritized and still pending.

As a continuation of #86, anything that pertains to troubleshooting can choose this format to explain the steps more visually to readers (i.e., developers).

Here's an example that uses Mermaid to describe the troubleshooting procedure.

Support of SIP-013 Semi-Fungible Token standard

Adding Google Analtyics 4 tracking

Google is forcing a transition to Analytics 4 in July 2023. Marketing would like to start our transition now so we have a good body of year over year data in GA4 before the GA3 cutoff arrives.

Segment has rudimentary support for GA4, but it does not support all the native GA4 features at this time.

The GA4 tracking script can sit alongside Segment so that any systems that draw from the Segment data will still have docs pageview data.

The GA4 script is as follows and should be placed in the <head> of each page on the site:

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-NB2VBT0KY2"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-NB2VBT0KY2');
</script>```

Revise Tutorials

The code snippets embedded in the docs would have to evolve as we tweak the app.

Finally, we must find a way to wrap test harnesses and run those through CI for continuous functionality checks.

Relates to #57.

Add link to Hiro newsletter from Docs site

Marketing would like to add a link to the Docs site to our newsletter signup. The destination URL is:

https://hiro.so/updates-docs

Edit: Swapped in much shorter URL.

Revise TODO Example

Some of the apps have dated screenshots (eg: TODO) and the "heystack" application doesn't work anymore. Either the dependencies aren't entirely in good shape or the integration of those apps with later versions of APIs or stacks.js modules require updates.

This an extension to #78; just splitting them, so we can address them independently.

Add FAQ section

As we continue to answer the questions (sometimes repetitively), it'd be efficient to compile those questions and present them in an FAQ format.

Perhaps add a new FAQ line-item under Developer references, and under the FAQ, we could list API, Clarinet and others.

Something like this:
image

Update Stacks Blockchain API documentation

The Stacks Blockchain API documentation is lacking quite a bit of detail. Most endpoints do not have a fully realized description, and all of them lack functional examples of how to at least CURL them. The documentation is generated from the OpenAPI spec file in the stacks-blockchain-api repository, located here.

Update the OpenAPI spec to include relevant details for every endpoint.

Add url checker

Just like we did in the Stacks docs, we should add a URL checker and fix broken links. Steps:

Install markdown-link-check:

yarn add markdown-link-check

Add link checker config file mlc_config.json:

{
  "ignorePatterns": [
    {
      "pattern": "^http://localhost"
    },
    {
      "pattern": "^https://banter.pub"
    },
    {
      "pattern": "^/img"
    }
  ],
  "replacementPatterns": [
    {
      "pattern": "^/",
      "replacement": "https://docs.hiro.so/"
    }
  ],
  "timeout": "10s",
  "retryOn429": true,
  "retryCount": 5
}

Add a script to package.json:

"urlcheck": "find . -type f -name '*.md' ! -path './node_modules/*' ! -path './_site/*' | xargs -L1 npx markdown-link-check -q -c mlc_config.json",

Update links to reflect repository move from blockstack -> hirosystems

Recently, many Hiro products were moved from the blockstack organization to the hirosystems organization in GitHub. Although this move should be mostly transparent, we should make sure that we're not relying on GitHub's internal redirects. Ensure that any links in the documentation point at the correct repository.

Getting started: How to use and review prints/logs

We received feedback that a developer wanted to print/log via Clarity but didn't understand if/how it is possible. We could add a small example to one of our Clarinet tutorials that points out to Clarity can be used to log something and how it can be reviewed using Clarinet and/or the API

Add placeholders and examples for CLI commands

Description:

  1. Add placeholders where ever user need to update his values received by running commands.
    Eg: Balance, btcaddress, stx address etc.

  2. Add a note for each command to where user can get the values like stx-address, btc-address from.
    Eg: Get from #Get balance command.

  3. Output need to stay outside of the bash command tags.
    Example:

CLI command

Output:
{eligible : true}

Fix site from timing out when navigating

I've tried a few times over the past few days to navigate from the index page to "Write smart contracts" but the site keeps timing out whenever I try, freezing as such:

image

Enable Google Analytics

Our docs currently use Fathom for analytics. We decided to move to Google Analytics. As part of that we need to replace the tracking code.

Once we get closer to work on this issue, we can create the project ID that should be used for tracking. The GA property needs to be configurated appropriately and all stakeholders should be invited.

Switch from Segment to Google Tag Manager

As discussed in #90, we want to cleanly switch to Google Tag Manager and rely on it going forward and not rely on Segment's backdoor integration with Google Measurement Protocol API.

Import README fragments

With Clarinet, stacks.js, and others, we duplicate the install steps in docs instead of maintaining those steps centrally in GitHub READMEs. I couldn't find a way to do that with Docusaurus. There are a few workarounds, including creating a file with .mdx and references to the README file, but that may not be as dynamic.

It'd be helpful to explore a way to maintain the source of truth centrally in a single location.

Add example for each API endpoint

Note from @BowTiedDeployer:

for every api have a specific example explained

  • this is the contract
  • this way it is called specifically on it

this gets a better learning curve for using a given api for the first time, after using it once it is enough the theory because you already know an example where you applied it

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.