-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
58 lines (54 loc) · 1.87 KB
/
serverless.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
service:
name: sv-api
# Add the serverless-webpack plugin
plugins:
- serverless-aws-documentation
- serverless-openapi-documentation
- serverless-webpack
- serverless-domain-manager
provider:
name: aws
runtime: nodejs8.10
region: ap-southeast-2
stage: ${opt:stage, 'dev'}
custom:
customDomain: ${file(sls-${self:provider.stage}-domain.yml)}
documentation: ${file(sls-documentation.yml):documentation}
doc: ${file(sls-documentation.yml):docFrags}
functions:
submitProxyVote:
handler: sv/light/handlers.submitProxyVote
events:
- http:
method: post
path: /sv/light/submitProxyVote
cors: true
documentation:
summary: Publish a signed vote
requestBody:
description: Submit a signed and packed vote for an arbitrary actor to submit to the chain on your behalf
requestModels:
"application/json": ProxyVoteInput
methodResponses:
- statusCode: 200
responseModels:
"application/json": SubmitProxyVoteResp
- ${self:custom.doc.ErrResp}
submitEd25519Delegation:
handler: sv/light/handlers.submitEd25519Delegation
events:
- http:
method: post
path: /sv/light/submitEd25519Delegation
cors: true
documentation:
summary: Publish an Ed25519 -> Eth delegation (e.g. for onboarding voters from a stellar chain)
requestBody:
description: Submit a signed and packed ed25519 delegation for an arbitrary actor to submit to the chain on your behalf
requestModels:
"application/json": Ed25519DelegationReq
methodResponses:
- statusCode: 200
responseModels:
"application/json": Ed25519DelegationResp
- ${self:custom.doc.ErrResp}