Skip to content

Instantly share code, notes, and snippets.

@austbot
Created July 12, 2022 19:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save austbot/6ada12583c4fb9f0fb26b0a47522f5dc to your computer and use it in GitHub Desktop.
Save austbot/6ada12583c4fb9f0fb26b0a47522f5dc to your computer and use it in GitHub Desktop.
das.json
{"openrpc":"1.0.0-rc1","info":{"version":"0.0.1","title":"Digital Asset API"},"servers":[{"url":"https://rpc.metaplex.com/this_is_fake"}],"methods":[{"name":"get_asset_proof","summary":"Get merkle proof for asset","tags":[{"name":"proof"}],"params":[{"$ref":"#/components/contentDescriptors/asset_id"}],"result":{"$ref":"#/components/contentDescriptors/assetProof"},"errors":[{"code":500,"message":"server error"},{"code":400,"message":"invalid request $msg"},{"code":429,"message":"slow down sheesh"}]},{"name":"get_assets_by_owner","summary":"List all assets by owner pubkey","tags":[{"name":"index"}],"params":[{"$ref":"#/components/contentDescriptors/owner_param"},{"$ref":"#/components/contentDescriptors/asset_sort_by"},{"$ref":"#/components/contentDescriptors/limit"},{"$ref":"#/components/contentDescriptors/page"},{"$ref":"#/components/contentDescriptors/before"},{"$ref":"#/components/contentDescriptors/after"}],"result":{"$ref":"#/components/contentDescriptors/assetList"},"errors":[{"code":500,"message":"server error"},{"code":400,"message":"invalid request $msg"},{"code":429,"message":"slow down sheesh"}]},{"name":"get_listed_assets_by_owner","summary":"Gets a List of assets ids that are for sale and where they are on sale","tags":[{"name":"sales"}],"params":[{"$ref":"#/components/contentDescriptors/owner_param"},{"$ref":"#/components/contentDescriptors/asset_sort_by"},{"$ref":"#/components/contentDescriptors/limit"},{"$ref":"#/components/contentDescriptors/page"},{"$ref":"#/components/contentDescriptors/before"},{"$ref":"#/components/contentDescriptors/after"}],"result":{"$ref":"#/components/contentDescriptors/assetIdSaleList"},"errors":[{"code":500,"message":"server error"},{"code":400,"message":"invalid request $msg"},{"code":429,"message":"slow down sheesh"}]},{"name":"get_offers_by_owner","summary":"Gets a List of assets ids that are for sale and where they are on sale","tags":[{"name":"sales"}],"params":[{"$ref":"#/components/contentDescriptors/owner_param"},{"$ref":"#/components/contentDescriptors/offer_sort_by"},{"$ref":"#/components/contentDescriptors/limit"},{"$ref":"#/components/contentDescriptors/page"},{"$ref":"#/components/contentDescriptors/before"},{"$ref":"#/components/contentDescriptors/after"}],"result":{"$ref":"#/components/contentDescriptors/offerList"},"errors":[{"code":500,"message":"server error"},{"code":400,"message":"invalid request $msg"},{"code":429,"message":"slow down sheesh"}]},{"name":"get_assets_by_group","summary":"Gets a List of assets based on a group filter expression, see grouping module","tags":[{"name":"search"}],"params":[{"$ref":"#/components/contentDescriptors/group_expression"},{"$ref":"#/components/contentDescriptors/asset_sort_by"},{"$ref":"#/components/contentDescriptors/limit"},{"$ref":"#/components/contentDescriptors/page"},{"$ref":"#/components/contentDescriptors/before"},{"$ref":"#/components/contentDescriptors/after"}],"result":{"$ref":"#/components/contentDescriptors/assetList"}},{"name":"get_assets_by_creator","summary":"Gets a List of assets based on a creator filter expression","tags":[{"name":"search"}],"params":[{"$ref":"#/components/contentDescriptors/creator_expression"},{"$ref":"#/components/contentDescriptors/asset_sort_by"},{"$ref":"#/components/contentDescriptors/limit"},{"$ref":"#/components/contentDescriptors/page"},{"$ref":"#/components/contentDescriptors/before"},{"$ref":"#/components/contentDescriptors/after"}],"result":{"$ref":"#/components/contentDescriptors/assetList"},"errors":[{"code":500,"message":"server error"},{"code":400,"message":"invalid request $msg"},{"code":429,"message":"slow down sheesh"}]},{"name":"get_sales_stats_by_collection","summary":"Gets a List of assets based on a group expression where the key must be colletion","tags":[{"name":"sales"}],"params":[{"$ref":"#/components/contentDescriptors/group_expression"}],"result":{"$ref":"#/components/contentDescriptors/collectionFloorStats"},"errors":[{"code":500,"message":"server error"},{"code":400,"message":"invalid request $msg"},{"code":429,"message":"slow down sheesh"}]},{"name":"search_assets","summary":"Search Api for Assets","tags":[{"name":"search"}],"params":[{"$ref":"#/components/contentDescriptors/search_expression"},{"$ref":"#/components/contentDescriptors/asset_sort_by"},{"$ref":"#/components/contentDescriptors/limit"},{"$ref":"#/components/contentDescriptors/page"},{"$ref":"#/components/contentDescriptors/before"},{"$ref":"#/components/contentDescriptors/after"}],"result":{"$ref":"#/components/contentDescriptors/assetList"},"errors":[{"code":500,"message":"server error"},{"code":400,"message":"invalid request $msg"},{"code":429,"message":"slow down sheesh"}]}],"components":{"contentDescriptors":{"collectionFloorStats":{"name":"collection_floor_price","description":"A paged an array of assets","schema":{"type":"object","properties":{"floor":{"type":"number"},"total_volume":{"type":"number"},"60_day_volume":{"type":"number"},"30_day_volume":{"type":"number"},"1_day_volume":{"type":"number"}}}},"search_expression":{"name":"search_expression","description":"M$Q search expression","schema":{"$ref":"#/components/schemas/AssetList"},"summary":"Example `files.length() == 2 AND name LIKE \"%only hands%\"`"},"assetList":{"name":"assets","description":"A paged an array of assets","schema":{"$ref":"#/components/schemas/AssetList"}},"offerList":{"name":"offer_list","description":"A paged an array of offers on assets","schema":{"$ref":"#/components/schemas/OfferList"}},"assetProof":{"name":"asset_proof","description":"Array of hashes corresponding to a node_index","schema":{"$ref":"#/components/schemas/AssetProof"}},"assetIdSaleList":{"name":"asset_id_sale_list","description":"A paged an array of listings","schema":{"type":"object","required":["items","total","limit"],"properties":{"total":{"type":"number"},"limit":{"type":"number"},"page":{"type":"number"},"before":{"type":"string"},"after":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/AssetSaleList"}}}}},"group_expression":{"name":"group_expression","description":"The {group key}:{group value} expression key must be a supported indexable group","required":true,"schema":{"type":"string"},"summary":"Examples: `collection:ueyrotot89toiueltoerhotuiy`, `trait.fire:true`"},"creator_expression":{"name":"creator_expression","description":"The list of creators to filter by","required":true,"schema":{"type":"array","items":{"type":"string"}},"summary":"Examples: [creator1, creator2]"},"after":{"name":"after","description":"Cursor based pagination: After Asset ID","required":false,"schema":{"type":"string"}},"before":{"name":"before","description":"Cursor based pagination: Before Asset ID","required":false,"schema":{"type":"string"}},"page":{"name":"page","description":"Page based pagination","required":false,"schema":{"type":"integer","minimum":0}},"asset_id":{"name":"asset_id","description":"ID of the Asset","required":true,"schema":{"type":"string"}},"limit":{"name":"limit","description":"How many items to return at one time (max 1000)","required":false,"schema":{"type":"integer","minimum":1}},"owner_param":{"name":"owner_address","description":"Owner Public Key","required":true,"schema":{"type":"string"}},"asset_sort_by":{"name":"sort_by","description":"How many items to return at one time (max 1000)","required":false,"schema":{"type":"string","enum":["created","updated","recent_action"]}},"offer_sort_by":{"name":"sort_by","description":"How many items to return at one time (max 1000)","required":false,"schema":{"type":"string","enum":["created","updated","price"]}}},"schemas":{"OfferList":{"type":"array","items":{"type":"object","properties":{"offer_id":{"type":"string"},"asset_id":{"type":"string"},"price":{"type":"number"},"amount":{"type":"number"}}}},"AssetSaleList":{"type":"array","items":{"type":"object","properties":{"listing_id":{"type":"string"},"asset_id":{"type":"string"},"amount":{"type":"number"},"price":{"type":"number"},"market_id":{"type":"string"},"highest_offers":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"amount":{"type":"number"},"price":{"type":"number"}}}}}}},"AssetProof":{"type":"object","required":["node_index","tree_id","proof"],"properties":{"proof":{"type":"array","items":{"type":"string"}},"node_index":{"type":"number"},"tree_id":{"type":"string"}}},"Asset":{"type":"object","required":["version","id"],"properties":{"standard":{"type":"string","enum":["NFT1.0","NFT","FungibleAsset","Custom","Identity"]},"id":{"type":"string"},"content":{"type":"object","required":["$schema"],"properties":{"$schema":{"type":"string","required":["$$schema"],"properties":{"$$schema":{"type":"string"}}},"files":{"type":"array","items":{"type":"object","properties":{"uri":{"type":"string"},"mime":{"type":"string"},"quality":{"type":"object","properties":{"$$schema":{"type":"string"}}},"context":{"type":"array","items":{"type":"string","enum":["wallet-default","web-desktop","web-mobile","app-mobile","app-desktop","app","vr"]}}},"oneOf":[{"propertyNames":{"enum":["context","uri","mime"]}},{"propertyNames":{"enum":["context","quality"]}}]}},"metadata":{"type":"array","items":{"type":"object"}},"links":{"type":"array","items":{"type":"object"}}}},"authorities":{"type":"array","items":{"type":"object","address":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}}},"compression":{"type":"object","properties":{"eligible":{"type":"boolean"},"compressed":{"type":"boolean"}}},"grouping":{"type":"array","items":{"type":"object","required":["$$schema"],"properties":{"$$schema":{"type":"string"},"group_key":{"type":"string"},"group_value":{"type":"string"}}}},"royalty":{"type":"object","properties":{"royalty_model":{"type":"string","enum":["creators","fanout","single"]},"target":{"type":"string"},"percent":{"type":"number"},"locked":{"type":"boolean"}}},"creators":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"share":{"type":"string"},"verified":{"type":"boolean"}}}},"ownership":{"type":"object","properties":{"frozen":{"type":"boolean"},"delegated":{"type":"boolean"},"delegate":{"type":"string"},"ownership_model":{"type":"string","enum":["Single","Token"]},"address":{"type":"string"}}}}},"AssetList":{"type":"array","items":{"$ref":"#/components/schemas/Asset"}}}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment