tapimo 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.d.ts +5561 -5026
- package/dist/App.d.ts.map +1 -1
- package/dist/App.js +38 -3
- package/dist/App.js.map +1 -1
- package/dist/Scope.d.ts +2 -0
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js +17 -0
- package/dist/Scope.js.map +1 -1
- package/dist/admin/App.d.ts +123 -74
- package/dist/admin/App.d.ts.map +1 -1
- package/dist/admin/apps/api-keys.d.ts +80 -0
- package/dist/admin/apps/api-keys.d.ts.map +1 -1
- package/dist/admin/apps/api-keys.js +54 -0
- package/dist/admin/apps/api-keys.js.map +1 -1
- package/dist/admin/apps/earn-vaults.d.ts +15 -15
- package/dist/admin/apps/earn-vaults.js +1 -1
- package/dist/admin/apps/verified-tokens.d.ts +81 -81
- package/dist/admin/ui.generated.d.ts +1 -1
- package/dist/admin/ui.generated.d.ts.map +1 -1
- package/dist/admin/ui.generated.js +151 -151
- package/dist/admin/ui.generated.js.map +1 -1
- package/dist/apps/Zones.d.ts +16 -16
- package/dist/apps/Zones.js +4 -4
- package/dist/apps/data/App.js +18 -18
- package/dist/apps/data/App.js.map +1 -1
- package/dist/apps/data/ZoneSelection.d.ts +8 -8
- package/dist/apps/data/ZoneSelection.d.ts.map +1 -1
- package/dist/apps/data/ZoneSelection.js +1 -1
- package/dist/apps/data/ZoneSelection.js.map +1 -1
- package/dist/apps/data/routes/activities.d.ts +588 -584
- package/dist/apps/data/routes/activities.d.ts.map +1 -1
- package/dist/apps/data/routes/activities.js +1561 -1239
- package/dist/apps/data/routes/activities.js.map +1 -1
- package/dist/apps/data/routes/balances.d.ts +26 -26
- package/dist/apps/data/routes/balances.d.ts.map +1 -1
- package/dist/apps/data/routes/balances.js +43 -16
- package/dist/apps/data/routes/balances.js.map +1 -1
- package/dist/apps/data/routes/blocks.d.ts +44 -44
- package/dist/apps/data/routes/blocks.d.ts.map +1 -1
- package/dist/apps/data/routes/blocks.js +21 -11
- package/dist/apps/data/routes/blocks.js.map +1 -1
- package/dist/apps/data/routes/coingecko.d.ts +3 -3
- package/dist/apps/data/routes/earn.d.ts +18 -18
- package/dist/apps/data/routes/earn.js +13 -13
- package/dist/apps/data/routes/exchanges.d.ts +145 -145
- package/dist/apps/data/routes/fee-amm.d.ts +2 -2
- package/dist/apps/data/routes/receipts.d.ts +155 -55
- package/dist/apps/data/routes/receipts.d.ts.map +1 -1
- package/dist/apps/data/routes/receipts.js +28 -10
- package/dist/apps/data/routes/receipts.js.map +1 -1
- package/dist/apps/data/routes/tokenlist.d.ts +13 -13
- package/dist/apps/data/routes/tokens.d.ts +98 -98
- package/dist/apps/data/routes/tokens.d.ts.map +1 -1
- package/dist/apps/data/routes/tokens.js +51 -20
- package/dist/apps/data/routes/tokens.js.map +1 -1
- package/dist/apps/data/routes/transactions.d.ts +7 -2
- package/dist/apps/data/routes/transactions.d.ts.map +1 -1
- package/dist/apps/data/routes/transactions.js +37 -17
- package/dist/apps/data/routes/transactions.js.map +1 -1
- package/dist/apps/data/routes/transfers.d.ts +1 -1
- package/dist/apps/data/routes/transfers.d.ts.map +1 -1
- package/dist/apps/data/routes/transfers.js +18 -12
- package/dist/apps/data/routes/transfers.js.map +1 -1
- package/dist/apps/data/routes/valuation.d.ts +1 -1
- package/dist/apps/data/routes/valuation.d.ts.map +1 -1
- package/dist/apps/data/routes/valuation.js +12 -7
- package/dist/apps/data/routes/valuation.js.map +1 -1
- package/dist/apps/data/routes/verified-tokens.d.ts +3 -3
- package/dist/apps/data/routes/webhooks.d.ts +11 -11
- package/dist/apps/data/routes/zones.d.ts +14 -14
- package/dist/apps/data/routes/zones.js +1 -1
- package/dist/apps/funding/App.d.ts +11 -0
- package/dist/apps/funding/App.d.ts.map +1 -1
- package/dist/apps/funding/routes/deposit-addresses.d.ts.map +1 -1
- package/dist/apps/funding/routes/deposit-addresses.js +16 -11
- package/dist/apps/funding/routes/deposit-addresses.js.map +1 -1
- package/dist/apps/funding/routes/transfers.d.ts +60 -48
- package/dist/apps/funding/routes/transfers.d.ts.map +1 -1
- package/dist/apps/funding/routes/transfers.js +27 -19
- package/dist/apps/funding/routes/transfers.js.map +1 -1
- package/dist/apps/management/App.d.ts +4487 -3963
- package/dist/apps/management/App.d.ts.map +1 -1
- package/dist/apps/management/routes/api-keys.d.ts +710 -159
- package/dist/apps/management/routes/api-keys.d.ts.map +1 -1
- package/dist/apps/management/routes/api-keys.js +236 -4
- package/dist/apps/management/routes/api-keys.js.map +1 -1
- package/dist/apps/management/routes/faucet.d.ts +6 -6
- package/dist/apps/management/routes/invite-links.d.ts +42 -42
- package/dist/apps/management/routes/members.d.ts +30 -30
- package/dist/apps/management/routes/projects.d.ts +40 -40
- package/dist/apps/management/routes/usage.d.ts +24 -24
- package/dist/apps/management/routes/verified-token-requests.d.ts +1 -1
- package/dist/apps/management/routes/webhooks.d.ts +55 -55
- package/dist/db/Db.d.ts.map +1 -1
- package/dist/db/Db.js +12 -1
- package/dist/db/Db.js.map +1 -1
- package/dist/db/Schema.d.ts +3 -2
- package/dist/db/Schema.d.ts.map +1 -1
- package/dist/db/Schema.js +5 -2
- package/dist/db/Schema.js.map +1 -1
- package/dist/db/tables/fundingCatalog.d.ts +4 -2
- package/dist/db/tables/fundingCatalog.d.ts.map +1 -1
- package/dist/db/tables/fundingCatalog.js +5 -1
- package/dist/db/tables/fundingCatalog.js.map +1 -1
- package/dist/handlers/internal/utils.d.ts.map +1 -1
- package/dist/handlers/internal/utils.js +9 -0
- package/dist/handlers/internal/utils.js.map +1 -1
- package/dist/internal/Auth.d.ts +3 -1
- package/dist/internal/Auth.d.ts.map +1 -1
- package/dist/internal/Auth.js +6 -3
- package/dist/internal/Auth.js.map +1 -1
- package/dist/internal/EarnVaults.d.ts +3 -3
- package/dist/internal/EarnVaults.js +3 -3
- package/dist/internal/Fetch.d.ts +23 -0
- package/dist/internal/Fetch.d.ts.map +1 -0
- package/dist/internal/Fetch.js +26 -0
- package/dist/internal/Fetch.js.map +1 -0
- package/dist/internal/Log.d.ts +3 -1
- package/dist/internal/Log.d.ts.map +1 -1
- package/dist/internal/Log.js +16 -3
- package/dist/internal/Log.js.map +1 -1
- package/dist/internal/OpenApi.d.ts +5 -3
- package/dist/internal/OpenApi.d.ts.map +1 -1
- package/dist/internal/OpenApi.js +13 -3
- package/dist/internal/OpenApi.js.map +1 -1
- package/dist/internal/Response.d.ts +1 -1
- package/dist/internal/Response.d.ts.map +1 -1
- package/dist/internal/Schema.d.ts +6 -3
- package/dist/internal/Schema.d.ts.map +1 -1
- package/dist/internal/Schema.js +8 -2
- package/dist/internal/Schema.js.map +1 -1
- package/dist/internal/Store.d.ts +16 -3
- package/dist/internal/Store.d.ts.map +1 -1
- package/dist/internal/Store.js +82 -16
- package/dist/internal/Store.js.map +1 -1
- package/dist/internal/Tidx.d.ts.map +1 -1
- package/dist/internal/Tidx.js +7 -2
- package/dist/internal/Tidx.js.map +1 -1
- package/dist/internal/Timeout.d.ts +36 -0
- package/dist/internal/Timeout.d.ts.map +1 -0
- package/dist/internal/Timeout.js +37 -0
- package/dist/internal/Timeout.js.map +1 -0
- package/dist/internal/Timing.d.ts +9 -0
- package/dist/internal/Timing.d.ts.map +1 -1
- package/dist/internal/Timing.js +7 -0
- package/dist/internal/Timing.js.map +1 -1
- package/dist/internal/WebhookDestination.d.ts.map +1 -1
- package/dist/internal/WebhookDestination.js +3 -0
- package/dist/internal/WebhookDestination.js.map +1 -1
- package/dist/internal/funding/Action.d.ts +9 -0
- package/dist/internal/funding/Action.d.ts.map +1 -1
- package/dist/internal/funding/Action.js +16 -8
- package/dist/internal/funding/Action.js.map +1 -1
- package/dist/internal/funding/Catalog.d.ts +9 -2
- package/dist/internal/funding/Catalog.d.ts.map +1 -1
- package/dist/internal/funding/Catalog.js +19 -8
- package/dist/internal/funding/Catalog.js.map +1 -1
- package/dist/internal/funding/Provider.d.ts +68 -13
- package/dist/internal/funding/Provider.d.ts.map +1 -1
- package/dist/internal/funding/Provider.js +29 -8
- package/dist/internal/funding/Provider.js.map +1 -1
- package/dist/internal/funding/Transfer.d.ts +13 -12
- package/dist/internal/funding/Transfer.d.ts.map +1 -1
- package/dist/internal/funding/Transfer.js +23 -21
- package/dist/internal/funding/Transfer.js.map +1 -1
- package/dist/internal/funding/providers/stargate.d.ts +28 -9
- package/dist/internal/funding/providers/stargate.d.ts.map +1 -1
- package/dist/internal/funding/providers/stargate.js +251 -117
- package/dist/internal/funding/providers/stargate.js.map +1 -1
- package/dist/internal/index.d.ts +1 -0
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/index.js +1 -0
- package/dist/internal/index.js.map +1 -1
- package/package.json +2 -2
- package/src/App.test.ts +100 -0
- package/src/App.ts +42 -3
- package/src/Client.test-d.ts +46 -0
- package/src/Scope.test.ts +20 -0
- package/src/Scope.ts +16 -0
- package/src/admin/apps/api-keys.test.ts +75 -0
- package/src/admin/apps/api-keys.ts +64 -0
- package/src/admin/apps/earn-vaults.test.ts +1 -1
- package/src/admin/apps/earn-vaults.ts +1 -1
- package/src/admin/ui/src/lib/api-keys.ts +19 -0
- package/src/admin/ui/src/routes/api-keys.tsx +89 -2
- package/src/admin/ui.generated.ts +189 -151
- package/src/apps/Zones.test.ts +4 -4
- package/src/apps/Zones.ts +4 -4
- package/src/apps/composition.test.ts +1 -1
- package/src/apps/data/App.test.ts +41 -0
- package/src/apps/data/App.ts +18 -18
- package/src/apps/data/ZoneSelection.test.ts +2 -2
- package/src/apps/data/ZoneSelection.ts +8 -8
- package/src/apps/data/routes/activities.test.ts +1526 -12
- package/src/apps/data/routes/activities.ts +1774 -1356
- package/src/apps/data/routes/balances.ts +133 -97
- package/src/apps/data/routes/blocks.test.ts +533 -0
- package/src/apps/data/routes/blocks.ts +35 -16
- package/src/apps/data/routes/earn.test.ts +4 -2
- package/src/apps/data/routes/earn.ts +13 -13
- package/src/apps/data/routes/earn.zone-access.test.ts +6 -6
- package/src/apps/data/routes/receipts.ts +47 -16
- package/src/apps/data/routes/tokens.test.ts +578 -0
- package/src/apps/data/routes/tokens.ts +283 -225
- package/src/apps/data/routes/transactions.ts +68 -29
- package/src/apps/data/routes/transfers.test.ts +421 -0
- package/src/apps/data/routes/transfers.ts +45 -27
- package/src/apps/data/routes/valuation.ts +94 -78
- package/src/apps/data/routes/zones.test.ts +2 -2
- package/src/apps/data/routes/zones.ts +1 -1
- package/src/apps/funding/routes/deposit-addresses.test.ts +25 -3
- package/src/apps/funding/routes/deposit-addresses.ts +17 -12
- package/src/apps/funding/routes/quotes.test.ts +5 -9
- package/src/apps/funding/routes/transfers.test.ts +395 -8
- package/src/apps/funding/routes/transfers.ts +76 -59
- package/src/apps/management/routes/api-keys.test.ts +220 -0
- package/src/apps/management/routes/api-keys.ts +280 -3
- package/src/db/Db.ts +13 -1
- package/src/db/Schema.ts +5 -2
- package/src/db/tables/earnVaults.test.ts +9 -9
- package/src/db/tables/fundingCatalog.test.ts +16 -2
- package/src/db/tables/fundingCatalog.ts +9 -3
- package/src/handlers/internal/utils.test.ts +53 -0
- package/src/handlers/internal/utils.ts +15 -0
- package/src/internal/Auth.ts +12 -4
- package/src/internal/EarnVaults.capabilities.test.ts +2 -2
- package/src/internal/EarnVaults.test.ts +1 -1
- package/src/internal/EarnVaults.ts +3 -3
- package/src/internal/Fetch.test.ts +46 -0
- package/src/internal/Fetch.ts +56 -0
- package/src/internal/Log.test.ts +21 -0
- package/src/internal/Log.ts +20 -5
- package/src/internal/OpenApi.ts +14 -4
- package/src/internal/Response.ts +1 -1
- package/src/internal/Schema.test.ts +2 -0
- package/src/internal/Schema.ts +12 -2
- package/src/internal/Store.test.ts +178 -0
- package/src/internal/Store.ts +104 -18
- package/src/internal/Tidx.test.ts +2 -1
- package/src/internal/Tidx.ts +7 -2
- package/src/internal/Timeout.test.ts +35 -0
- package/src/internal/Timeout.ts +73 -0
- package/src/internal/Timing.ts +16 -0
- package/src/internal/WebhookDestination.ts +3 -0
- package/src/internal/funding/Action.test.ts +41 -1
- package/src/internal/funding/Action.ts +69 -41
- package/src/internal/funding/Catalog.test.ts +34 -0
- package/src/internal/funding/Catalog.ts +28 -11
- package/src/internal/funding/Provider.test.ts +73 -0
- package/src/internal/funding/Provider.ts +82 -28
- package/src/internal/funding/Transfer.ts +133 -110
- package/src/internal/funding/providers/index.test.ts +4 -167
- package/src/internal/funding/providers/relay.test.ts +2 -2
- package/src/internal/funding/providers/stargate.test.ts +163 -0
- package/src/internal/funding/providers/stargate.ts +359 -134
- package/src/internal/index.test.ts +1 -0
- package/src/internal/index.ts +1 -0
|
@@ -107,137 +107,140 @@ export namespace schema {
|
|
|
107
107
|
.check(z.describe('Query parameters for looking up one token’s metadata.'))
|
|
108
108
|
|
|
109
109
|
/** TIP-20 token metadata returned by token endpoints. */
|
|
110
|
-
export const Response =
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
admin: z
|
|
116
|
-
.optional(Schema.Address)
|
|
117
|
-
.check(
|
|
118
|
-
z.describe(
|
|
119
|
-
'Token admin from the onchain `TokenCreated` event, present when requested ' +
|
|
120
|
-
'via `include=admin` and indexed data is available.',
|
|
121
|
-
),
|
|
110
|
+
export const Response = OpenApi.component(
|
|
111
|
+
Schema.describe(
|
|
112
|
+
z.object({
|
|
113
|
+
address: Schema.tokenAddress(tokenExample.address).check(
|
|
114
|
+
z.describe('The TIP-20 token contract address on Tempo.'),
|
|
122
115
|
),
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
116
|
+
admin: z
|
|
117
|
+
.optional(Schema.Address)
|
|
118
|
+
.check(
|
|
119
|
+
z.describe(
|
|
120
|
+
'Token admin from the onchain `TokenCreated` event, present when requested ' +
|
|
121
|
+
'via `include=admin` and indexed data is available.',
|
|
122
|
+
),
|
|
128
123
|
),
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
'and indexed data is available.',
|
|
124
|
+
currency: z
|
|
125
|
+
.string()
|
|
126
|
+
.check(
|
|
127
|
+
z.describe(
|
|
128
|
+
'The currency label for this token, such as `USD` for USD-denominated stablecoins.',
|
|
129
|
+
),
|
|
130
|
+
z.meta({ examples: [tokenExample.currency] }),
|
|
137
131
|
),
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
'The number of decimal places the token uses; Tempo stablecoins typically use 6.',
|
|
132
|
+
createdAt: z
|
|
133
|
+
.optional(z.iso.datetime())
|
|
134
|
+
.check(
|
|
135
|
+
z.describe(
|
|
136
|
+
'Token creation timestamp, present when requested via `include=createdAt` ' +
|
|
137
|
+
'and indexed data is available.',
|
|
138
|
+
),
|
|
139
|
+
z.meta({ examples: ['2024-01-01T00:00:00Z'] }),
|
|
147
140
|
),
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
141
|
+
decimals: z
|
|
142
|
+
.number()
|
|
143
|
+
.check(
|
|
144
|
+
z.int(),
|
|
145
|
+
z.nonnegative(),
|
|
146
|
+
z.describe(
|
|
147
|
+
'The number of decimal places the token uses; Tempo stablecoins typically use 6.',
|
|
148
|
+
),
|
|
149
|
+
z.meta({ examples: [tokenExample.decimals] }),
|
|
155
150
|
),
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
),
|
|
164
|
-
logoUri: z.optional(z.string()).check(
|
|
165
|
-
z.describe('A URL for the token’s logo image, when one is available.'),
|
|
166
|
-
z.meta({
|
|
167
|
-
examples: [tokenExample.logoUri],
|
|
168
|
-
}),
|
|
169
|
-
),
|
|
170
|
-
name: z
|
|
171
|
-
.string()
|
|
172
|
-
.check(
|
|
173
|
-
z.describe('The token’s human-readable name.'),
|
|
174
|
-
z.meta({ examples: [tokenExample.name] }),
|
|
175
|
-
),
|
|
176
|
-
quoteToken: z
|
|
177
|
-
.optional(Schema.Address)
|
|
178
|
-
.check(
|
|
179
|
-
z.describe(
|
|
180
|
-
'Quote token from the onchain `TokenCreated` event, present when requested ' +
|
|
181
|
-
'via `include=quoteToken` and indexed data is available.',
|
|
151
|
+
holderCount: z
|
|
152
|
+
.optional(z.number().check(z.int(), z.nonnegative()))
|
|
153
|
+
.check(
|
|
154
|
+
z.describe(
|
|
155
|
+
'The number of accounts that currently hold a positive balance of this token, when indexed holder data is available.',
|
|
156
|
+
),
|
|
157
|
+
z.meta({ examples: [1234] }),
|
|
182
158
|
),
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
z.meta({ examples: [tokenExample.symbol] }),
|
|
189
|
-
),
|
|
190
|
-
totalSupply: z
|
|
191
|
-
.optional(z.string().check(z.regex(/^\d+$/)))
|
|
192
|
-
.check(
|
|
193
|
-
z.describe(
|
|
194
|
-
'The token’s total supply as a decimal string in the smallest unit, so large values keep full precision.',
|
|
159
|
+
id: z
|
|
160
|
+
.string()
|
|
161
|
+
.check(
|
|
162
|
+
z.describe('A stable resource ID for this token, equal to its contract address.'),
|
|
163
|
+
z.meta({ examples: [tokenExample.id] }),
|
|
195
164
|
),
|
|
196
|
-
|
|
165
|
+
logoUri: z.optional(z.string()).check(
|
|
166
|
+
z.describe('A URL for the token’s logo image, when one is available.'),
|
|
167
|
+
z.meta({
|
|
168
|
+
examples: [tokenExample.logoUri],
|
|
169
|
+
}),
|
|
197
170
|
),
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
171
|
+
name: z
|
|
172
|
+
.string()
|
|
173
|
+
.check(
|
|
174
|
+
z.describe('The token’s human-readable name.'),
|
|
175
|
+
z.meta({ examples: [tokenExample.name] }),
|
|
176
|
+
),
|
|
177
|
+
quoteToken: z
|
|
178
|
+
.optional(Schema.Address)
|
|
179
|
+
.check(
|
|
180
|
+
z.describe(
|
|
181
|
+
'Quote token from the onchain `TokenCreated` event, present when requested ' +
|
|
182
|
+
'via `include=quoteToken` and indexed data is available.',
|
|
183
|
+
),
|
|
184
|
+
),
|
|
185
|
+
symbol: z
|
|
186
|
+
.string()
|
|
187
|
+
.check(
|
|
188
|
+
z.describe('The short ticker symbol wallets and apps show for this token.'),
|
|
189
|
+
z.meta({ examples: [tokenExample.symbol] }),
|
|
190
|
+
),
|
|
191
|
+
totalSupply: z
|
|
192
|
+
.optional(z.string().check(z.regex(/^\d+$/)))
|
|
193
|
+
.check(
|
|
194
|
+
z.describe(
|
|
195
|
+
'The token’s total supply as a decimal string in the smallest unit, so large values keep full precision.',
|
|
196
|
+
),
|
|
197
|
+
z.meta({ examples: [tokenExample.totalSupply] }),
|
|
198
|
+
),
|
|
199
|
+
transferStats: z
|
|
200
|
+
.optional(
|
|
201
|
+
z.object({
|
|
202
|
+
count: z
|
|
203
|
+
.number()
|
|
204
|
+
.check(
|
|
205
|
+
z.int(),
|
|
206
|
+
z.nonnegative(),
|
|
207
|
+
z.describe('The total number of `Transfer` events emitted by this token.'),
|
|
208
|
+
z.meta({ examples: [12345] }),
|
|
214
209
|
),
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
210
|
+
firstAt: z
|
|
211
|
+
.nullable(z.iso.datetime())
|
|
212
|
+
.check(
|
|
213
|
+
z.describe(
|
|
214
|
+
'The time of this token’s first `Transfer` event, or `null` if no transfers exist.',
|
|
215
|
+
),
|
|
216
|
+
z.meta({ examples: ['2024-01-01T00:00:00Z'] }),
|
|
222
217
|
),
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
218
|
+
lastAt: z
|
|
219
|
+
.nullable(z.iso.datetime())
|
|
220
|
+
.check(
|
|
221
|
+
z.describe(
|
|
222
|
+
'The time of this token’s most recent `Transfer` event, or `null` if no transfers exist.',
|
|
223
|
+
),
|
|
224
|
+
z.meta({ examples: ['2024-06-01T12:00:00Z'] }),
|
|
225
|
+
),
|
|
226
|
+
}),
|
|
227
|
+
)
|
|
228
|
+
.check(
|
|
229
|
+
z.describe(
|
|
230
|
+
'Lifetime `Transfer` event statistics, present when requested via ' +
|
|
231
|
+
'`include=transferStats` and indexed data is available.',
|
|
232
|
+
),
|
|
231
233
|
),
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
234
|
+
verified: z
|
|
235
|
+
.boolean()
|
|
236
|
+
.check(
|
|
237
|
+
z.describe('Whether this token is in Tempo’s curated verified token list.'),
|
|
238
|
+
z.meta({ examples: [tokenExample.verified] }),
|
|
239
|
+
),
|
|
240
|
+
}),
|
|
241
|
+
'Token metadata for a TIP-20 token, including name, symbol, decimals, supply, and optional indexed details.',
|
|
242
|
+
),
|
|
243
|
+
'Token',
|
|
241
244
|
)
|
|
242
245
|
}
|
|
243
246
|
|
|
@@ -247,24 +250,30 @@ export namespace schema {
|
|
|
247
250
|
* temporal facts (`totalSupply`, `holderCount`, `createdAt`) belong on the
|
|
248
251
|
* token detail endpoint, not in feed rows.
|
|
249
252
|
*/
|
|
250
|
-
export const Token =
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
253
|
+
export const Token = OpenApi.component(
|
|
254
|
+
Schema.describe(
|
|
255
|
+
z.pick(getToken.Response, {
|
|
256
|
+
address: true,
|
|
257
|
+
currency: true,
|
|
258
|
+
decimals: true,
|
|
259
|
+
id: true,
|
|
260
|
+
logoUri: true,
|
|
261
|
+
name: true,
|
|
262
|
+
symbol: true,
|
|
263
|
+
verified: true,
|
|
264
|
+
}),
|
|
265
|
+
'A compact TIP-20 token reference with identity and display fields only.',
|
|
266
|
+
),
|
|
267
|
+
'TokenReference',
|
|
262
268
|
)
|
|
263
269
|
|
|
264
270
|
/** RPC token metadata embedded in resources, with optional curated fields. */
|
|
265
|
-
export const TokenReference =
|
|
266
|
-
|
|
267
|
-
|
|
271
|
+
export const TokenReference = OpenApi.component(
|
|
272
|
+
Schema.describe(
|
|
273
|
+
z.partial(z.omit(Token, { id: true }), { logoUri: true, verified: true }),
|
|
274
|
+
'A compact TIP-20 token reference with RPC metadata and optional enrichments.',
|
|
275
|
+
),
|
|
276
|
+
'RpcTokenReference',
|
|
268
277
|
)
|
|
269
278
|
|
|
270
279
|
/** Schemas for the getTokenBySymbol operation. */
|
|
@@ -373,12 +382,15 @@ export namespace schema {
|
|
|
373
382
|
.check(...Schema.pageChecks(), z.describe('Query parameters for listing TIP-20 tokens.'))
|
|
374
383
|
|
|
375
384
|
/** Page of TIP-20 tokens. */
|
|
376
|
-
export const Response =
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
385
|
+
export const Response = OpenApi.component(
|
|
386
|
+
z
|
|
387
|
+
.object({
|
|
388
|
+
data: z.array(getToken.Response).check(z.describe('The tokens in this page.')),
|
|
389
|
+
nextCursor: Schema.NextCursor,
|
|
390
|
+
})
|
|
391
|
+
.check(z.describe('A page of TIP-20 tokens on Tempo.')),
|
|
392
|
+
'TokenList',
|
|
393
|
+
)
|
|
382
394
|
}
|
|
383
395
|
|
|
384
396
|
/** Schemas for the getTokenHolders operation. */
|
|
@@ -417,64 +429,73 @@ export namespace schema {
|
|
|
417
429
|
.check(...Schema.pageChecks(), z.describe('Query parameters for listing a token’s holders.'))
|
|
418
430
|
|
|
419
431
|
/** A single TIP-20 token holder. */
|
|
420
|
-
export const Holder =
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
432
|
+
export const Holder = OpenApi.component(
|
|
433
|
+
z
|
|
434
|
+
.object({
|
|
435
|
+
address: Schema.Address.check(z.describe('The account address that holds this token.')),
|
|
436
|
+
balance: z
|
|
437
|
+
.string()
|
|
438
|
+
.check(
|
|
439
|
+
z.regex(/^\d+$/),
|
|
440
|
+
z.describe(
|
|
441
|
+
'A non-negative whole number, given as a decimal string so very large token amounts keep full precision. Expressed in the smallest unit of the token.',
|
|
442
|
+
),
|
|
443
|
+
z.meta({ examples: ['1000000'] }),
|
|
429
444
|
),
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
445
|
+
id: z
|
|
446
|
+
.string()
|
|
447
|
+
.check(
|
|
448
|
+
z.describe('A stable resource ID for this holder, equal to the holder address.'),
|
|
449
|
+
z.meta({ examples: ['0xbe058e1c4df8a4366a387bf595b284246a93039e'] }),
|
|
450
|
+
),
|
|
451
|
+
})
|
|
452
|
+
.check(z.describe('One account holding a positive balance of this TIP-20 token.')),
|
|
453
|
+
'TokenHolder',
|
|
454
|
+
)
|
|
440
455
|
|
|
441
456
|
/** Resources embedded on demand via `include`. */
|
|
442
|
-
export const Meta =
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
457
|
+
export const Meta = OpenApi.component(
|
|
458
|
+
z
|
|
459
|
+
.object({
|
|
460
|
+
totalCountCapped: z
|
|
461
|
+
.optional(Schema.TotalCountCapped)
|
|
462
|
+
.check(
|
|
463
|
+
z.describe(
|
|
464
|
+
'Whether `totalCount` reached the API count cap; holder counts are exact here.',
|
|
465
|
+
),
|
|
449
466
|
),
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
z.describe('A compact token reference, returned when you request `include=token`.'),
|
|
455
|
-
),
|
|
456
|
-
totalCount: z
|
|
457
|
-
.optional(Schema.TotalCount)
|
|
458
|
-
.check(
|
|
459
|
-
z.describe(
|
|
460
|
-
'The total number of token holders, returned when you request `include=totalCount`.',
|
|
467
|
+
token: z
|
|
468
|
+
.optional(Token)
|
|
469
|
+
.check(
|
|
470
|
+
z.describe('A compact token reference, returned when you request `include=token`.'),
|
|
461
471
|
),
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
472
|
+
totalCount: z
|
|
473
|
+
.optional(Schema.TotalCount)
|
|
474
|
+
.check(
|
|
475
|
+
z.describe(
|
|
476
|
+
'The total number of token holders, returned when you request `include=totalCount`.',
|
|
477
|
+
),
|
|
478
|
+
),
|
|
479
|
+
})
|
|
480
|
+
.check(z.describe('Extra resources included because you requested them with `include`.')),
|
|
481
|
+
'TokenHolderListMeta',
|
|
482
|
+
)
|
|
465
483
|
|
|
466
484
|
/** Page of TIP-20 token holders, ordered by balance descending. */
|
|
467
|
-
export const Response =
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
485
|
+
export const Response = OpenApi.component(
|
|
486
|
+
z
|
|
487
|
+
.object({
|
|
488
|
+
data: z
|
|
489
|
+
.array(Holder)
|
|
490
|
+
.check(
|
|
491
|
+
z.describe('The holders in this page, ordered by balance from highest to lowest.'),
|
|
492
|
+
),
|
|
493
|
+
meta: z.optional(Meta).check(z.describe('Extra resources you requested with `include`.')),
|
|
494
|
+
nextCursor: Schema.NextCursor,
|
|
495
|
+
})
|
|
496
|
+
.check(z.describe('A page of accounts holding this TIP-20 token.')),
|
|
497
|
+
'TokenHolderList',
|
|
498
|
+
)
|
|
478
499
|
}
|
|
479
500
|
|
|
480
501
|
/** Schemas for the getTokenTransactions operation. */
|
|
@@ -531,29 +552,32 @@ export namespace schema {
|
|
|
531
552
|
)
|
|
532
553
|
|
|
533
554
|
/** Resources embedded on demand via `include`. */
|
|
534
|
-
export const Meta =
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
555
|
+
export const Meta = OpenApi.component(
|
|
556
|
+
z
|
|
557
|
+
.object({
|
|
558
|
+
totalCountCapped: z
|
|
559
|
+
.optional(Schema.TotalCountCapped)
|
|
560
|
+
.check(
|
|
561
|
+
z.describe(
|
|
562
|
+
'Whether `totalCount` reached the API count cap; when `true`, treat the count as a lower bound.',
|
|
563
|
+
),
|
|
541
564
|
),
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
z.describe('A compact token reference, returned when you request `include=token`.'),
|
|
547
|
-
),
|
|
548
|
-
totalCount: z
|
|
549
|
-
.optional(Schema.TotalCount)
|
|
550
|
-
.check(
|
|
551
|
-
z.describe(
|
|
552
|
-
'The capped total number of matching transactions, returned when you request `include=totalCount`.',
|
|
565
|
+
token: z
|
|
566
|
+
.optional(Token)
|
|
567
|
+
.check(
|
|
568
|
+
z.describe('A compact token reference, returned when you request `include=token`.'),
|
|
553
569
|
),
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
570
|
+
totalCount: z
|
|
571
|
+
.optional(Schema.TotalCount)
|
|
572
|
+
.check(
|
|
573
|
+
z.describe(
|
|
574
|
+
'The capped total number of matching transactions, returned when you request `include=totalCount`.',
|
|
575
|
+
),
|
|
576
|
+
),
|
|
577
|
+
})
|
|
578
|
+
.check(z.describe('Extra resources included because you requested them with `include`.')),
|
|
579
|
+
'TokenTransactionListMeta',
|
|
580
|
+
)
|
|
557
581
|
|
|
558
582
|
/**
|
|
559
583
|
* Page of transactions touching the token contract. Each row is the
|
|
@@ -564,15 +588,18 @@ export namespace schema {
|
|
|
564
588
|
* already imports `Tokens.schema` at module init; a direct reference
|
|
565
589
|
* here would close the import cycle and crash during evaluation.
|
|
566
590
|
*/
|
|
567
|
-
export const Response =
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
591
|
+
export const Response = OpenApi.component(
|
|
592
|
+
z
|
|
593
|
+
.object({
|
|
594
|
+
data: z
|
|
595
|
+
.array(z.lazy(() => Transactions.schema.getTransaction.Response))
|
|
596
|
+
.check(z.describe('The transactions in this page.')),
|
|
597
|
+
meta: z.optional(Meta).check(z.describe('Extra resources you requested with `include`.')),
|
|
598
|
+
nextCursor: Schema.NextCursor,
|
|
599
|
+
})
|
|
600
|
+
.check(z.describe('A page of transactions that interact with this token contract.')),
|
|
601
|
+
'TokenTransactionList',
|
|
602
|
+
)
|
|
576
603
|
}
|
|
577
604
|
}
|
|
578
605
|
|
|
@@ -591,6 +618,9 @@ export function tokens() {
|
|
|
591
618
|
'Lists TIP-20 tokens on Tempo. TIP-20 is Tempo’s payments-focused token standard and a superset of ERC-20.',
|
|
592
619
|
operationId: 'getTokens',
|
|
593
620
|
responses: OpenApi.responses({
|
|
621
|
+
errors: {
|
|
622
|
+
400: { codes: ['chain_id_invalid', 'chain_id_unsupported', 'query_invalid'] },
|
|
623
|
+
},
|
|
594
624
|
success: { description: 'A page of TIP-20 tokens.', schema: schema.getTokens.Response },
|
|
595
625
|
}),
|
|
596
626
|
summary: 'List tokens',
|
|
@@ -666,6 +696,14 @@ export function tokens() {
|
|
|
666
696
|
operationId: 'getTokenBySymbol',
|
|
667
697
|
responses: OpenApi.responses({
|
|
668
698
|
errors: {
|
|
699
|
+
400: {
|
|
700
|
+
codes: [
|
|
701
|
+
'chain_id_invalid',
|
|
702
|
+
'chain_id_unsupported',
|
|
703
|
+
'query_invalid',
|
|
704
|
+
'symbol_invalid',
|
|
705
|
+
],
|
|
706
|
+
},
|
|
669
707
|
404: {
|
|
670
708
|
description: 'No token was found for this address or symbol.',
|
|
671
709
|
codes: ['token_not_found'],
|
|
@@ -739,6 +777,9 @@ export function tokens() {
|
|
|
739
777
|
operationId: 'getToken',
|
|
740
778
|
responses: OpenApi.responses({
|
|
741
779
|
errors: {
|
|
780
|
+
400: {
|
|
781
|
+
codes: ['chain_id_invalid', 'chain_id_unsupported', 'query_invalid', 'token_invalid'],
|
|
782
|
+
},
|
|
742
783
|
404: {
|
|
743
784
|
description: 'No token was found for this address or symbol.',
|
|
744
785
|
codes: ['token_not_found'],
|
|
@@ -799,8 +840,15 @@ export function tokens() {
|
|
|
799
840
|
description: 'The token logo image.',
|
|
800
841
|
headers: OpenApi.successHeaders,
|
|
801
842
|
},
|
|
802
|
-
400: OpenApi.standardError(400, 'The request parameters were invalid.'
|
|
843
|
+
400: OpenApi.standardError(400, 'The request parameters were invalid.', [
|
|
844
|
+
'api_key_malformed',
|
|
845
|
+
'chain_id_invalid',
|
|
846
|
+
'chain_id_unsupported',
|
|
847
|
+
'query_invalid',
|
|
848
|
+
'token_invalid',
|
|
849
|
+
]),
|
|
803
850
|
401: OpenApi.standardError(401, 'The API key is missing or invalid.'),
|
|
851
|
+
403: OpenApi.standardError(403, 'The API key cannot access this resource.'),
|
|
804
852
|
404: OpenApi.standardError(404, 'No logo image was found for this token.', [
|
|
805
853
|
'token_logo_not_found',
|
|
806
854
|
]),
|
|
@@ -884,7 +932,12 @@ export function tokens() {
|
|
|
884
932
|
'Lists the accounts that hold a TIP-20 token, ordered from largest to smallest balance.',
|
|
885
933
|
operationId: 'getTokenHolders',
|
|
886
934
|
responses: OpenApi.responses({
|
|
887
|
-
errors: {
|
|
935
|
+
errors: {
|
|
936
|
+
400: {
|
|
937
|
+
codes: ['chain_id_invalid', 'chain_id_unsupported', 'query_invalid', 'token_invalid'],
|
|
938
|
+
},
|
|
939
|
+
502: 'The upstream indexer could not serve this request.',
|
|
940
|
+
},
|
|
888
941
|
success: {
|
|
889
942
|
description: 'A page of token holders.',
|
|
890
943
|
schema: schema.getTokenHolders.Response,
|
|
@@ -974,7 +1027,12 @@ export function tokens() {
|
|
|
974
1027
|
description: 'Lists transactions that interacted with this token contract.',
|
|
975
1028
|
operationId: 'getTokenTransactions',
|
|
976
1029
|
responses: OpenApi.responses({
|
|
977
|
-
errors: {
|
|
1030
|
+
errors: {
|
|
1031
|
+
400: {
|
|
1032
|
+
codes: ['chain_id_invalid', 'chain_id_unsupported', 'query_invalid', 'token_invalid'],
|
|
1033
|
+
},
|
|
1034
|
+
502: 'The upstream indexer could not serve this request.',
|
|
1035
|
+
},
|
|
978
1036
|
success: {
|
|
979
1037
|
description: 'A page of transactions involving this token contract.',
|
|
980
1038
|
schema: schema.getTokenTransactions.Response,
|