forked from Constellation-Labs/block_explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
161 lines (155 loc) · 4.36 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
service: api
custom:
stage: ${opt:stage, 'local'}
env: ${file(env.yml):${self:custom.stage}, file(env.yml):default}
# set serverless offline http port, since default port 3000 is already in use by Grafana in the local tessellation cluster
serverless-offline:
httpPort: 3001
provider:
name: aws
runtime: nodejs14.x
region: us-west-1
stage: ${self:custom.stage}
environment:
OPENSEARCH_NODE: ${self:custom.env.opensearch}
SLS_DEBUG: '*'
httpApi:
cors: true
vpc: ${self:custom.env.vpc}
versionFunctions: false
functions:
globalSnapshots:
handler: src/handler.globalSnapshots
events:
- httpApi:
path: /global-snapshots
method: GET
globalSnapshot:
handler: src/handler.globalSnapshot
events:
- httpApi:
path: /global-snapshots/{term}
method: GET
globalSnapshotRewards:
handler: src/handler.globalSnapshotRewards
events:
- httpApi:
path: /global-snapshots/{term}/rewards
method: GET
globalSnapshotTransactions:
handler: src/handler.globalSnapshotTransactions
events:
- httpApi:
path: /global-snapshots/{term}/transactions
method: GET
block:
handler: src/handler.block
events:
- httpApi:
path: /blocks/{hash}
method: GET
transactions:
handler: src/handler.transactions
events:
- httpApi:
path: /transactions
method: GET
transaction:
handler: src/handler.transaction
events:
- httpApi:
path: /transactions/{hash}
method: GET
transactionsByAddress:
handler: src/handler.transactionsByAddress
events:
- httpApi:
path: /addresses/{address}/transactions
method: GET
transactionsBySource:
handler: src/handler.transactionsBySource
events:
- httpApi:
path: /addresses/{address}/transactions/sent
method: GET
transactionsByDestination:
handler: src/handler.transactionsByDestination
events:
- httpApi:
path: /addresses/{address}/transactions/received
method: GET
balanceByAddress:
handler: src/handler.balanceByAddress
events:
- httpApi:
path: /addresses/{address}/balance
method: GET
currencySnapshots:
handler: src/handler.currencySnapshots
events:
- httpApi:
path: /currency/{identifier}/snapshots
method: GET
currencySnapshot:
handler: src/handler.currencySnapshot
events:
- httpApi:
path: /currency/{identifier}/snapshots/{term}
method: GET
currencySnapshotRewards:
handler: src/handler.currencySnapshotRewards
events:
- httpApi:
path: /currency/{identifier}/snapshots/{term}/rewards
method: GET
currencySnapshotTransactions:
handler: src/handler.currencySnapshotTransactions
events:
- httpApi:
path: /currency/{identifier}/snapshots/{term}/transactions
method: GET
currencyBlock:
handler: src/handler.currencyBlock
events:
- httpApi:
path: /currency/{identifier}/blocks/{hash}
method: GET
currencyTransactions:
handler: src/handler.currencyTransactions
events:
- httpApi:
path: /currency/{identifier}/transactions
method: GET
currencyTransaction:
handler: src/handler.currencyTransaction
events:
- httpApi:
path: /currency/{identifier}/transactions/{hash}
method: GET
currencyTransactionsByAddress:
handler: src/handler.currencyTransactionsByAddress
events:
- httpApi:
path: /currency/{identifier}/addresses/{address}/transactions
method: GET
currencyTransactionsBySource:
handler: src/handler.currencyTransactionsBySource
events:
- httpApi:
path: /currency/{identifier}/addresses/{address}/transactions/sent
method: GET
currencyTransactionsByDestination:
handler: src/handler.currencyTransactionsByDestination
events:
- httpApi:
path: /currency/{identifier}/addresses/{address}/transactions/received
method: GET
currencyBalanceByAddress:
handler: src/handler.currencyBalanceByAddress
events:
- httpApi:
path: /currency/{identifier}/addresses/{address}/balance
method: GET
plugins:
- serverless-plugin-typescript
- serverless-offline