Skip to content

Commit

Permalink
Merge pull request #3 from rarimo/feature/runner
Browse files Browse the repository at this point in the history
add runner for delete expired proofs; endpoint get proofs list
  • Loading branch information
freigeistig authored Jan 3, 2024
2 parents d455ceb + 473f1b3 commit 1ff72f8
Show file tree
Hide file tree
Showing 18 changed files with 2,456 additions and 1,715 deletions.
10 changes: 9 additions & 1 deletion config-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ log:
listener:
addr: :8000

link:
max_expiration_time: 10h

running_periods:
proofs_cleaner:
normal_period: 50m
min_abnormal_period: 50m
max_abnormal_period: 60m

db:
url: postgres://link:link@localhost:15432/link-db?sslmode=disable

60 changes: 60 additions & 0 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions docs/spec/components/schemas/ProofsAttributes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
type: object
required:
- created_at
- proof
properties:
created_at:
type: string
description: The date and time when the proof was created in the timestamp format
example: '1702480643'
proof:
type: string
description: The proof object in JSON string format
example: "{\"pub_signals\":[...],\"proof\":{\"pi_a\":[...],\"pi_b\":[],\"pi_c\":[...]}}"
71 changes: 71 additions & 0 deletions docs/spec/paths/v1@proofs@user@{user_did}.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
get:
summary: Get Proofs by User DID
description: >
Returns information about the all proofs of the user.
operationId: proofByUserDID
tags:
- Proofs
parameters:
- in: path
name: 'user_did'
required: true
description: The User DID
schema:
type: string
example: "did:iden3:readonly:tM1QCJ7ytcbvLB7EFQhGsJPumc11DEE18gEvAzxE7"
responses:
'200':
# {
# "data": {
# "id": "1",
# "type": "proofs",
# "creator": "string",
# "base64_proofs": "string",
# "attributes": [
# {
# "created_at": "1702480643",
# "proof": "{\"pub_signals\":[...],\"proof\":{\"pi_a\":[...],\"pi_b\":[],\"pi_c\":[...]}}"
# }
# ]
# }
# }
description: OK
content:
application/vnd.api+json:
schema:
type: object
required:
- data
properties:
data:
type: object
required:
- id
- type
- creator
- base64_proofs
- attributes
properties:
id:
type: string
example: "1"
type:
type: string
example: "proofs"
creator:
type: string
example: "string"
base64_proofs:
type: string
example: "string"
attributes:
type: array
items:
$ref: '#/components/schemas/ProofsAttributes'

400:
$ref: '#/components/responses/invalidParameter'
404:
$ref: '#/components/responses/notFound'
500:
$ref: '#/components/responses/internalError'
Loading

0 comments on commit 1ff72f8

Please sign in to comment.