Skip to content
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

Adrian paez t1 create wallet api endpoint #3

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions AdrianPaez_espec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
openapi: 3.0.0
info:
title: Python to .Net
description: Still whitout description.
version: 0.25.1
servers:
- url: http://www.skycoin.net
description: Main Skycoin server
- url: http://staging.node.skycoin.net
description: Internal staging server for developer.
components:
securitySchemes:
CsrfTokenAuth: # arbitrary name for the security scheme
type: apiKey
in: header # can be "header", "query" or "cookie"
name: X-CSRF-TOKEN # name of the header, query parameter or cookie
schemas:
genericError:
description: This is a generic error that should be default response
type: object
properties:
code:
type: integer
format: int64
message:
type: string
paths:
/api/wallets:
post:
summary: Create wallet method.
description: Should create a new wallet (address) in the blockchain.

security:
- CsrfTokenAuth: []

responses:
'200':
description: Should create a new wallet (address) in the blockchain
content:
application/json:
schema:
type: object
properties:
privateKey:
description: Private key, which will be used to sign transactions by the [POST] /api/sign
type: string
publicAddress:
description: Address which identifies the wallet in the blockchain
type: string
addressContext:
description: Any non security sensitive data associated with wallet. This context will be passed to [POST] /api/transactions/*. Can be empty.
type: string
default:
$ref : '#/components/schemas/genericError'

# To remember :
# Every post method should use security schema.
# Feel free to use and reuse components
# I will remember other stuffs in the process