1
+ {
2
+ "info" : {
3
+ "_postman_id" : " 999b3995-f8e2-48a1-83cf-b7da879a26cf" ,
4
+ "name" : " Cardano-Rosetta" ,
5
+ "schema" : " https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
6
+ },
7
+ "item" : [
8
+ {
9
+ "name" : " data" ,
10
+ "item" : [
11
+ {
12
+ "name" : " /network/list" ,
13
+ "event" : [
14
+ {
15
+ "listen" : " test" ,
16
+ "script" : {
17
+ "exec" : [
18
+ " pm.test(\" Status code is 200\" , function () {" ,
19
+ " pm.response.to.have.status(200);" ,
20
+ " });" ,
21
+ " " ,
22
+ " pm.test(\" Body has single network identifier\" , function () {" ,
23
+ " const networkId = pm.environment.get(\" networkId\" );" ,
24
+ " pm.expect(pm.response.json().network_identifiers).to.have.lengthOf(1);" ,
25
+ " });" ,
26
+ " " ,
27
+ " pm.test(\" Body includes correct blockchain\" , function () {" ,
28
+ " const networkId = pm.environment.get(\" networkId\" );" ,
29
+ " pm.expect(pm.response.json().network_identifiers[0].blockchain).to.eql(\" cardano\" );" ,
30
+ " });" ,
31
+ " " ,
32
+ " pm.test(\" Body includes correct network\" , function () {" ,
33
+ " const networkId = pm.environment.get(\" networkId\" );" ,
34
+ " pm.expect(pm.response.json().network_identifiers[0].network).to.eql(networkId);" ,
35
+ " });"
36
+ ],
37
+ "type" : " text/javascript"
38
+ }
39
+ }
40
+ ],
41
+ "request" : {
42
+ "method" : " POST" ,
43
+ "header" : [],
44
+ "body" : {
45
+ "mode" : " raw" ,
46
+ "raw" : " {\n }" ,
47
+ "options" : {
48
+ "raw" : {
49
+ "language" : " json"
50
+ }
51
+ }
52
+ },
53
+ "url" : {
54
+ "raw" : " {{URL}}/network/list" ,
55
+ "host" : [
56
+ " {{URL}}"
57
+ ],
58
+ "path" : [
59
+ " network" ,
60
+ " list"
61
+ ]
62
+ }
63
+ },
64
+ "response" : []
65
+ },
66
+ {
67
+ "name" : " /network/options" ,
68
+ "event" : [
69
+ {
70
+ "listen" : " test" ,
71
+ "script" : {
72
+ "exec" : [
73
+ " pm.test(\" Status code is 200\" , function () {" ,
74
+ " pm.response.to.have.status(200);" ,
75
+ " });" ,
76
+ " " ,
77
+ " pm.test(\" Body includes correct rosetta version\" , function () {" ,
78
+ " const rosettaVersion = pm.environment.get(\" rosettaVersion\" );" ,
79
+ " pm.expect(pm.response.json().version.rosetta_version).to.eql(rosettaVersion);" ,
80
+ " });"
81
+ ],
82
+ "type" : " text/javascript"
83
+ }
84
+ }
85
+ ],
86
+ "request" : {
87
+ "method" : " POST" ,
88
+ "header" : [],
89
+ "body" : {
90
+ "mode" : " raw" ,
91
+ "raw" : " {\n \" network_identifier\" : {\n \" blockchain\" : \" cardano\" ,\n \" network\" : \" {{networkId}}\"\n },\n \" metadata\" : {}\n }" ,
92
+ "options" : {
93
+ "raw" : {
94
+ "language" : " json"
95
+ }
96
+ }
97
+ },
98
+ "url" : {
99
+ "raw" : " {{URL}}/network/options" ,
100
+ "host" : [
101
+ " {{URL}}"
102
+ ],
103
+ "path" : [
104
+ " network" ,
105
+ " options"
106
+ ]
107
+ }
108
+ },
109
+ "response" : []
110
+ },
111
+ {
112
+ "name" : " /network/status" ,
113
+ "event" : [
114
+ {
115
+ "listen" : " test" ,
116
+ "script" : {
117
+ "exec" : [
118
+ " pm.test(\" Body includes correct genesis block\" , function () {" ,
119
+ " const genesisBlock = pm.environment.get(\" genesisBlockHash\" );" ,
120
+ " pm.expect(pm.response.json().genesis_block_identifier.hash).to.eql(genesisBlock);" ,
121
+ " });"
122
+ ],
123
+ "type" : " text/javascript"
124
+ }
125
+ }
126
+ ],
127
+ "request" : {
128
+ "method" : " POST" ,
129
+ "header" : [],
130
+ "body" : {
131
+ "mode" : " raw" ,
132
+ "raw" : " {\n \" network_identifier\" : {\n \" blockchain\" : \" cardano\" ,\n \" network\" : \" {{networkId}}\"\n },\n \" metadata\" : {}\n }" ,
133
+ "options" : {
134
+ "raw" : {
135
+ "language" : " json"
136
+ }
137
+ }
138
+ },
139
+ "url" : {
140
+ "raw" : " {{URL}}/network/status" ,
141
+ "host" : [
142
+ " {{URL}}"
143
+ ],
144
+ "path" : [
145
+ " network" ,
146
+ " status"
147
+ ]
148
+ }
149
+ },
150
+ "response" : []
151
+ },
152
+ {
153
+ "name" : " /block" ,
154
+ "event" : [
155
+ {
156
+ "listen" : " test" ,
157
+ "script" : {
158
+ "exec" : [
159
+ " pm.test(\" Body includes correct block identifier\" , function () {" ,
160
+ " const blockIndex = parseInt(pm.environment.get(\" blockIndex\" ));" ,
161
+ " const blockHash = pm.environment.get(\" blockHash\" );" ,
162
+ " pm.expect(pm.response.json().block.block_identifier.index).to.eql(blockIndex);" ,
163
+ " pm.expect(pm.response.json().block.block_identifier.hash).to.eql(blockHash);" ,
164
+ " });"
165
+ ],
166
+ "type" : " text/javascript"
167
+ }
168
+ }
169
+ ],
170
+ "request" : {
171
+ "method" : " POST" ,
172
+ "header" : [],
173
+ "body" : {
174
+ "mode" : " raw" ,
175
+ "raw" : " {\n \" network_identifier\" : {\n \" blockchain\" : \" cardano\" ,\n \" network\" : \" {{networkId}}\"\n },\n \" block_identifier\" : {\n \" index\" : {{blockIndex}},\n \" hash\" : \" {{blockHash}}\"\n }\n }" ,
176
+ "options" : {
177
+ "raw" : {
178
+ "language" : " json"
179
+ }
180
+ }
181
+ },
182
+ "url" : {
183
+ "raw" : " {{URL}}/block" ,
184
+ "host" : [
185
+ " {{URL}}"
186
+ ],
187
+ "path" : [
188
+ " block"
189
+ ]
190
+ }
191
+ },
192
+ "response" : []
193
+ },
194
+ {
195
+ "name" : " /block/transaction" ,
196
+ "event" : [
197
+ {
198
+ "listen" : " test" ,
199
+ "script" : {
200
+ "exec" : [
201
+ " pm.test(\" Body includes correct transaction identifier\" , function () {" ,
202
+ " const transactionId = pm.environment.get(\" transactionId\" );" ,
203
+ " pm.expect(pm.response.json().transaction.transaction_identifier.hash).to.eql(transactionId);" ,
204
+ " });" ,
205
+ " " ,
206
+ " pm.test(\" Body includes 1 input and 2 outputs\" , function () {" ,
207
+ " pm.expect(pm.response.json().transaction.operations[0].type).to.eql(\" input\" );" ,
208
+ " pm.expect(pm.response.json().transaction.operations[1].type).to.eql(\" output\" );" ,
209
+ " pm.expect(pm.response.json().transaction.operations[2].type).to.eql(\" output\" );" ,
210
+ " });"
211
+ ],
212
+ "type" : " text/javascript"
213
+ }
214
+ }
215
+ ],
216
+ "request" : {
217
+ "method" : " POST" ,
218
+ "header" : [],
219
+ "body" : {
220
+ "mode" : " raw" ,
221
+ "raw" : " {\n \" network_identifier\" : {\n \" blockchain\" : \" cardano\" ,\n \" network\" : \" {{networkId}}\"\n },\n \" block_identifier\" : {\n \" index\" : {{blockIndex}},\n \" hash\" : \" {{blockHash}}\"\n },\n \" transaction_identifier\" : {\n \" hash\" : \" {{transactionId}}\"\n }\n }" ,
222
+ "options" : {
223
+ "raw" : {
224
+ "language" : " json"
225
+ }
226
+ }
227
+ },
228
+ "url" : {
229
+ "raw" : " localhost:8081/block/transaction" ,
230
+ "host" : [
231
+ " localhost"
232
+ ],
233
+ "port" : " 8081" ,
234
+ "path" : [
235
+ " block" ,
236
+ " transaction"
237
+ ]
238
+ }
239
+ },
240
+ "response" : []
241
+ }
242
+ ]
243
+ }
244
+ ]
245
+ }
0 commit comments