responded to comments

This commit is contained in:
Pavitthra Pandurangan
2021-03-10 10:04:58 -08:00
parent f98bfb88f6
commit ea6e0c632f
7 changed files with 85 additions and 10 deletions

View File

@@ -338,3 +338,9 @@ object of the following form:
"cause": "Unchecked(PublicFunctionNotReadOnly(..."
}
```
### GET /v2/traits/[Stacks Address]/[Contract Name]/[Trait Stacks Address]/[Trait Contract Name]/[Trait Name]
Determine whether a given trait is implemented within the specified contract (either explicitly or implicitly).
See OpenAPI [spec](./rpc/openapi.yaml) for details.

View File

@@ -0,0 +1,3 @@
{
"is_implemented": true
}

View File

@@ -0,0 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "GET request to get trait implementation information",
"title": "IsTraitImplementedSuccessResponse",
"type": "object",
"additionalProperties": false,
"required": ["is_implemented"],
"properties": {
"is_implemented": {
"type": "boolean"
},
}
}

View File

@@ -326,3 +326,56 @@ paths:
$ref: ./api/core-node/get-pox.schema.json
example:
$ref: ./api/core-node/get-pox.example.json
/v2/traits/{contract_address}/{contract_name}/{trait_contract_address}/{trait_ contract_name}/{trait_name}:
get:
summary: Get trait implementation details
description: Determine whether or not a specified trait is implemented (either explicitly or implicitly) within a given contract.
tags:
- Info
operationId: get_is_trait_implemented
responses:
200:
description: Success
content:
application/json:
schema:
$ref: ./api/trait/get-is-trait-implemented.schema.json
example:
$ref: ./api/trait/get-is-trait-implemented.example.json
parameters:
- name: contract_address
in: path
required: true
description: Stacks address
schema:
type: string
- name: contract_name
in: path
required: true
description: Contract name
schema:
type: string
- name: trait_contract_address
in: path
required: true
description: Trait Stacks address
schema:
type: string
- name: trait_contract_name
in: path
required: true
description: Trait contract name
schema:
type: string
- name: trait_name
in: path
required: true
description: Trait name
schema:
type: string
- name: tip
in: query
schema:
type: string
description: The Stacks chain tip to query from