Skip to content

Commit

Permalink
Merge pull request #270 from sCrypt-Inc/order
Browse files Browse the repository at this point in the history
add order apis
  • Loading branch information
zhfnjust authored Jun 12, 2024
2 parents b2f06c8 + 5686f20 commit be9fa7e
Show file tree
Hide file tree
Showing 34 changed files with 1,427 additions and 77 deletions.
648 changes: 648 additions & 0 deletions open-api/btc.yaml

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions open-api/btc/deploy-a-brc-20-token.api.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
id: deploy-a-brc-20-token
title: "Deploy a brc20 token"
description: "Create order to deploy a brc20 token."
sidebar_label: "Deploy a brc20 token"
hide_title: true
hide_table_of_contents: true
api: eJylVm1vIjcQ/iuWP91JXHYDhACqqiZcK6VfEhFO/XDJB+P1sg67tmN7IUD5752xNwt5uVyrKhLxy3hmPPM8j3dHPVs4Ov5Or20mLL3v0Ew4bqXxUis6phMrmBdE4y7xmmTClHpDGJlb3k1hZSnUCe1QbYRleOYqg1Nf37ECI8Msq4QXFiPuqIIJGCvh19ouYV9iRMN8QV+ncTmbEF4wqUhjTT5VMIMJ+Zt44XwcObmAwWc4bsVjLa2AZLytRYc6XoiK0fGO+o3BqM5bqRZ0v7+PxuDjUmcbtHgZ+qZN+kf3fycc18oL5dEbM6aUPNQmeXDocvc2Gz1/ENxjiSxW0kvhcNcKLuRKXGSZFc69zb5DxROrTIlLfn5qDJjl1fB8sBllmerli3V3a9P1Q2rK3pYpVz6IkcrNVj32lnyUPvYH9rGCKvZ7dN+huRBTaPZRGAm3WAAsjuKcpimYGu0AOD8xPesPwNRLvvw4cwCXxPilrKT/2BSip2hasaePDbvRMsT3YeVyOummEZhfZ9ewhZtQL6OVi9Xuwok37b+tOYfa53VJWozTnza4TQR67Zmv3URnMEsB18yHxgdGBbIMBoPhYHg66o7O+Vk+GIhBxs+HvbNAmE3be2zwY7Yc9floyAqTqu2ZKx6Wrs5Wfsv4duvz7qonRkVZNCcrXWOG/fRs1N3H+/bfu+Ily8g0UoAGm9O3Nt8Uq32hrdwCyNGTE7y20m8Ck+eCWWEvwAKm90gpYEyh8XaIlJAP7tFk7nmyazi8T0IRXBK4lERqJTwoDsUIdvUsFbUt4XThvXHjJIFGqC/MyBPIcGP8idTJ6hRSP7YDs1JzVhYQf9xL02EwuT8kfoscjI0/Tr8FFTqhjXDgPBrBShz8oW3FoLr0z79moSDY+ulBSH4/IOA1i/8vVY+YCig/IiMQ7plvkVQtpyJxGt48kwMFN9fhyg1HrpS3Oqv5EcgZDyAHuZJYWlcbo63/ra08usE2RZhAjV9L96wQxE3QmlxD38jFzRUBlVtJMCNCZUaDdDiSa0tYoBpQmTCVkYoptsDJilmpa0eYMyCSjuicAJm/PMuv6xB4vKRipSNStaFhGb1MawVxtCLwhJzcqTt15QkrS712oOUrUSKpg7JbASoCK7Ds4a4iI1gdbDI4I2yua08wAZlL3gYudIkIjqHmrGQKbgAzR9aiLPE/eEZptFBHspa+OE6RoBi0WbbeXcgT64a1gjg1YIUE3IqmRsQXVteLggD6SAQkQYKCJDVSdEIbmYYyYgObx/YHL/OLlu0O6vav3/+GNF48+cSU8DRj+MDGXcP97xS4D5bjw3sf6Y+UQmchDfSOyIsiAHRF/uLh3W7OnPhmy/0el4FnFrUHhggPNkf8glBk0uEYlCcHPIgPbvZp2rzZn8l//rp497bNIlN4gRUra5zBcCk2R185+3swLQTDry1MOO5OYlpfZujjcPrN04IaF09cAA6M/9D2WIZvrm9nWOjmE6cKzxG1bI0fL/A7pnfwFz7kAnmCbuH6jgKoF3XQFxr9otqxl2L5ShzDzd6txy+XEawzBM6vbXUiDqE2+/0/TBGcFg==
sidebar_class_name: "post api-method"
info_path: open-api/btc/introduction
custom_edit_url: null
---

import ApiTabs from "@theme/ApiTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes";
import MimeTabs from "@theme/MimeTabs";
import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import SchemaItem from "@theme/SchemaItem";
import SchemaTabs from "@theme/SchemaTabs";
import Markdown from "@theme/Markdown";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";

<h1 className={"openapi__heading"}>Deploy a brc20 token</h1>

<MethodEndpoint method={"post"} path={"/btc/{network}/orders/brc20/deploy/create"}></MethodEndpoint>



Create order to deploy a brc20 token.

## Request

<details style={{"marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collapsed={false} open={true}><summary style={{}}><h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3></summary><div><ul><ParamsItem className={"paramsItem"} param={{"name":"network","in":"path","description":"BTC chain network (mainnet | testnet | signet)","required":true,"schema":{"type":"string"}}}></ParamsItem></ul></div></details><MimeTabs className={"openapi-tabs__mime"}><TabItem label={"application/json"} value={"application/json-schema"}><details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-mime"}><h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3><strong className={"openapi-schema__required"}>required</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}><div style={{"marginTop":"1rem","marginBottom":"1rem"}}>

Parameters to deploy a brc20 token

</div></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"receiveAddress"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"tb1ppresfm876y9ddn3fgw2zr0wj0pl3zanslje9nfpznq3kc90q46rqmnne43"}}></SchemaItem><SchemaItem collapsible={false} name={"feeRate"} required={false} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer","example":100}}></SchemaItem><SchemaItem collapsible={false} name={"postage"} required={false} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer","example":546}}></SchemaItem><SchemaItem collapsible={false} name={"tick"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"ordi"}}></SchemaItem><SchemaItem collapsible={false} name={"limit"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"1000"}}></SchemaItem><SchemaItem collapsible={false} name={"max"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"21000"}}></SchemaItem></ul></details></TabItem></MimeTabs><div><div><ApiTabs label={undefined} id={undefined}><TabItem label={"200"} value={"200"}><div>

Successful operation

</div><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}>any</ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"statusCode\": 0,\n \"data\": {\n \"orderId\": \"66686819297c5f66e6dc7835\",\n \"payAddress\": \"tb1qdk94c98ahp0nz5shjksudvtzaczztf2v3e9hlh\",\n \"payAmount\": 40592\n }\n}"} language={"json"}></ResponseSamples></TabItem><TabItem label={"Example"} value={"Example"}><ResponseSamples responseExample={"{\n \"statusCode\": 0,\n \"data\": {\n \"orderId\": \"66686819297c5f66e6dc7835\",\n \"payAddress\": \"tb1qdk94c98ahp0nz5shjksudvtzaczztf2v3e9hlh\",\n \"payAmount\": 40592\n }\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>

Bad Request

</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>

Unauthorized

</div><div></div></TabItem></ApiTabs></div></div>

54 changes: 54 additions & 0 deletions open-api/btc/etch-a-rune.api.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
id: etch-a-rune
title: "Etch a rune"
description: "Create order to etch a rune."
sidebar_label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iS1Z5lxTETCoWwwoVO2FFrMabASTpnSM+EtCo9nJmOXk/GXToLyvQDtWwwvN6VF4ZnSh6NxmrwQ63GLZnjpnNzre30dmCgKs/YshRUURG1P94ADVCycwemAuULKqDrUbHTGxMyUgVEAKlPycHBuCsJxddRMFEJjBjjybA1FQb/omUTLYR3ZWoW8GSIjSThEefDuY5xUN6oVnlMiZljEL9Q1YiF3ppznDFHIKmAyoikKUy1IJ7wWeSxjAxbPr/Bnndodpe2jZ0FNlQA/QtsWeHXTYZGDu5rv3znyHS1Hx/dARXleIZV+65u3Jj5SlDhLW3e7mfBw54r9nqaRW47UBj8JCmJGWEVxSJWnb9SaDHsP76TzaVLf7p/Zf357vJlrPSn0hlNQRUkj/FzApvEG2j+gaQ6CXl4UcLU6rsL6MiUfx92vLhPStWrHBfbchndtm8L77eZ2SnpVP4CW8QLiTqyp9vh/xO/xL77uIlGiVtH8jiOA52XUFF75JZUQzwXyhSDGzN6sx0+XFTCnRJafD9WJ3KHa7Pf/APS5oeg=
sidebar_class_name: "post api-method"
info_path: open-api/btc/introduction
custom_edit_url: null
---

import ApiTabs from "@theme/ApiTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes";
import MimeTabs from "@theme/MimeTabs";
import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import SchemaItem from "@theme/SchemaItem";
import SchemaTabs from "@theme/SchemaTabs";
import Markdown from "@theme/Markdown";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";

<h1 className={"openapi__heading"}>Etch a rune</h1>

<MethodEndpoint method={"post"} path={"/btc/{network}/orders/runes/etch/create"}></MethodEndpoint>



Create order to etch a rune.

## Request

<details style={{"marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collapsed={false} open={true}><summary style={{}}><h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3></summary><div><ul><ParamsItem className={"paramsItem"} param={{"name":"network","in":"path","description":"BTC chain network (mainnet | testnet | signet)","required":true,"schema":{"type":"string"}}}></ParamsItem></ul></div></details><MimeTabs className={"openapi-tabs__mime"}><TabItem label={"application/json"} value={"application/json-schema"}><details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-mime"}><h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3><strong className={"openapi-schema__required"}>required</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}><div style={{"marginTop":"1rem","marginBottom":"1rem"}}>

Create a order to etch

</div></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"receiveAddress"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"tb1ppresfm876y9ddn3fgw2zr0wj0pl3zanslje9nfpznq3kc90q46rqmnne43"}}></SchemaItem><SchemaItem collapsible={false} name={"feeRate"} required={false} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer","example":100}}></SchemaItem><SchemaItem collapsible={false} name={"postage"} required={false} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer","example":546}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>rune</strong><span className={"openapi-schema__name"}> object</span></span></summary><div style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"name"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"MYRUNE"}}></SchemaItem><SchemaItem collapsible={false} name={"amount"} required={false} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer","example":1000}}></SchemaItem><SchemaItem collapsible={false} name={"cap"} required={false} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer","example":21000}}></SchemaItem></div></details></SchemaItem></ul></details></TabItem></MimeTabs><div><div><ApiTabs label={undefined} id={undefined}><TabItem label={"200"} value={"200"}><div>

Successful operation

</div><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}>any</ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"statusCode\": 0,\n \"data\": {\n \"orderId\": \"66686819297c5f66e6dc7835\",\n \"payAddress\": \"tb1qdk94c98ahp0nz5shjksudvtzaczztf2v3e9hlh\",\n \"payAmount\": 40592\n }\n}"} language={"json"}></ResponseSamples></TabItem><TabItem label={"Example"} value={"Example"}><ResponseSamples responseExample={"{\n \"statusCode\": 0,\n \"data\": {\n \"orderId\": \"66686819297c5f66e6dc7835\",\n \"payAddress\": \"tb1qdk94c98ahp0nz5shjksudvtzaczztf2v3e9hlh\",\n \"payAmount\": 40592\n }\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>

Bad Request

</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>

Unauthorized

</div><div></div></TabItem></ApiTabs></div></div>

Loading

0 comments on commit be9fa7e

Please sign in to comment.