-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpublic-api.yaml
More file actions
134 lines (131 loc) · 3.71 KB
/
public-api.yaml
File metadata and controls
134 lines (131 loc) · 3.71 KB
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
openapi: 3.0.0
info:
title: Stability Protocol Free Transactions API
description: API for interacting with Stability Protocol's free transactions service.
version: "1.0.0"
contact:
name: API Support
url: https://stabilityprotocol.com/support
email: contact@stabilityprotocol.com
servers:
- url: https://api.stabilityprotocol.com/v1
description: Stability Protocol API base URL
paths:
/free-transactions/{address}:
get:
summary: Retrieve free transactions for a specific address
operationId: getFreeTransactions
tags:
- Free Transactions
parameters:
- name: address
in: path
required: true
description: Ethereum address to retrieve the transactions for
schema:
type: string
pattern: "^0x[a-fA-F0-9]{40}$"
responses:
"200":
description: A list of free transactions for the given address
content:
application/json:
schema:
type: object
properties:
transactions:
type: array
items:
$ref: "#/components/schemas/Transaction"
remaining:
type: number
"400":
description: Bad request, e.g., if the address is not in the correct format
"404":
description: Address not found
"500":
description: Internal server error
paid-transactions/keys:
get:
summary: Retrieve api key details
operationId: getApiKeyDetails
tags:
- Paid Transactions
parameters:
- in: header
name: Authorization
schema:
type: string
format: Bearer ${SupabaseAuthToken}
required: true
responses:
"200":
description: Success Retrieving Information
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/ApiKey"
post:
summary: Create api key
operationId: createApiKey
tags:
- Paid Transactions
parameters:
- in: header
name: Authorization
schema:
type: string
format: Bearer ${SupabaseAuthToken}
required: true
responses:
"200":
description: Success creating info
content:
application/json:
schema:
$ref: "#/components/schemas/ApiKey"
components:
schemas:
Transaction:
type: object
properties:
txHash:
type: string
description: The transaction hash
blockNumber:
type: integer
format: int64
description: The block number in which the transaction was recorded
from:
type: string
description: The initiating transaction address
to:
type: string
description: The receiving transaction address
value:
type: string
description: The value transferred in the transaction
gasUsed:
type: integer
format: int64
description: The amount of gas used for the transaction
timestamp:
type: string
format: date-time
description: The timestamp for when the transaction was included in the block
ApiKey:
type: object
properties:
api_key:
type: string
email:
type: string
created_at:
type: string
granularity:
type: string
enum: ["day", "month", "year", "prepaid"]
enabled:
type: boolean