mirror of
https://github.com/getAlby/lndhub.go.git
synced 2026-01-30 10:15:44 +01:00
166 lines
5.0 KiB
JSON
166 lines
5.0 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "Accounting wrapper for the Lightning Network providing separate accounts for end-users.",
|
|
"title": "LNDhub.go",
|
|
"contact": {
|
|
"name": "Alby",
|
|
"url": "https://getalby.com",
|
|
"email": "hello@getalby.com"
|
|
},
|
|
"license": {
|
|
"name": "GNU GPL",
|
|
"url": "https://www.gnu.org/licenses/gpl-3.0.en.html"
|
|
},
|
|
"version": "0.6.1"
|
|
},
|
|
"basePath": "/",
|
|
"paths": {
|
|
"/balance": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"OAuth2Password": []
|
|
}
|
|
],
|
|
"description": "Current user's balance in satoshi",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"account"
|
|
],
|
|
"summary": "Retrieve balance",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controllers.BalanceResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/responses.ErrorResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/responses.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/create": {
|
|
"post": {
|
|
"description": "Create a new account with a login and password",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"summary": "Create an account",
|
|
"parameters": [
|
|
{
|
|
"description": "Create User",
|
|
"name": "account",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/controllers.CreateUserRequestBody"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controllers.CreateUserResponseBody"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/responses.ErrorResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/responses.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"controllers.BalanceResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"btc": {
|
|
"type": "object",
|
|
"properties": {
|
|
"availableBalance": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"controllers.CreateUserRequestBody": {
|
|
"type": "object",
|
|
"properties": {
|
|
"accounttype": {
|
|
"type": "string"
|
|
},
|
|
"login": {
|
|
"type": "string"
|
|
},
|
|
"partnerid": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"controllers.CreateUserResponseBody": {
|
|
"type": "object",
|
|
"properties": {
|
|
"login": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"responses.ErrorResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "integer"
|
|
},
|
|
"error": {
|
|
"type": "boolean"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"securityDefinitions": {
|
|
"OAuth2Password": {
|
|
"type": "oauth2",
|
|
"flow": "password",
|
|
"tokenUrl": "/auth"
|
|
}
|
|
}
|
|
} |