-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from rarimo/feature/proofs
Add: airdrop functionality
- Loading branch information
Showing
34 changed files
with
1,153 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ docker-compose.yaml | |
docs/node_modules | ||
docs/web_deploy | ||
vendor/ | ||
airdrop-svc | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
allOf: | ||
- $ref: '#/components/schemas/AirdropKey' | ||
- type: object | ||
required: | ||
- attributes | ||
properties: | ||
attributes: | ||
type: object | ||
required: | ||
- address | ||
- status | ||
- amount | ||
- tx_hash | ||
- created_at | ||
- updated_at | ||
properties: | ||
address: | ||
type: string | ||
description: Destination address for the airdrop | ||
example: "rarimo1qlyq3ej7j7rrkw6sluz658pzne88ymf66vjcap" | ||
status: | ||
type: string | ||
description: Status of the airdrop transaction | ||
enum: [ pending, completed ] | ||
created_at: | ||
type: string | ||
format: time.Time | ||
description: RFC3339 UTC timestamp of the airdrop creation | ||
example: "2021-09-01T00:00:00Z" | ||
updated_at: | ||
type: string | ||
format: time.Time | ||
description: RFC3339 UTC timestamp of the airdrop successful tx | ||
example: "2021-09-01T00:00:00Z" | ||
amount: | ||
type: string | ||
description: Amount of airdropped coins | ||
example: "100stake" | ||
tx_hash: | ||
type: string | ||
description: Hash of the airdrop transaction | ||
example: "F1CC0E80E151A67F75E41F2CDBF07920C29C9A3CDB6131B2A23A7C9D1964AD0B" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
type: object | ||
required: | ||
- id | ||
- type | ||
properties: | ||
id: | ||
type: string | ||
description: User nullifier | ||
example: "0x04a32216f2425dc7343031352de3d62a7b0d3b4bf7a66d6c8c2aa8c9f4f2632b" | ||
type: | ||
type: string | ||
enum: [ airdrop ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
type: object | ||
required: | ||
- id | ||
- type | ||
properties: | ||
id: | ||
type: string | ||
description: Nullifier | ||
example: "0x04a32216f2425dc7343031352de3d62a7b0d3b4bf7a66d6c8c2aa8c9f4f2632b" | ||
type: | ||
type: string | ||
enum: [ create_airdrop ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
docs/spec/paths/integrations@airdrop-svc@airdrops@{id}.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
get: | ||
tags: | ||
- Airdrop | ||
summary: Get an airdrop | ||
description: Get an airdrop for unique user. | ||
operationId: createAirdrop | ||
parameters: | ||
- in: path | ||
name: id | ||
description: User nullifier | ||
required: true | ||
schema: | ||
type: string | ||
example: "0x04a32216f2425dc7343031352de3d62a7b0d3b4bf7a66d6c8c2aa8c9f4f2632b" | ||
responses: | ||
200: | ||
content: | ||
application/vnd.api+json: | ||
schema: | ||
type: object | ||
required: | ||
- data | ||
properties: | ||
data: | ||
$ref: '#/components/schemas/Airdrop' | ||
400: | ||
$ref: '#/components/responses/invalidParameter' | ||
404: | ||
$ref: '#/components/responses/notFound' | ||
409: | ||
description: Airdrop was already done | ||
content: | ||
application/vnd.api+json: | ||
schema: | ||
$ref: '#/components/schemas/Errors' | ||
500: | ||
$ref: '#/components/responses/internalError' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.