Skip to content

Commit 1c09239

Browse files
add v1 prefix to all routes
1 parent d3c5ea4 commit 1c09239

File tree

9 files changed

+57
-53
lines changed

9 files changed

+57
-53
lines changed

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/engine/cloud/analytics/send-test-tx.client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export function SendTestTransaction(props: {
7575
chainId: number;
7676
}) => {
7777
const response = await engineCloudProxy({
78-
pathname: "/write/transaction",
78+
pathname: "/v1/write/transaction",
7979
method: "POST",
8080
headers: {
8181
"Content-Type": "application/json",

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/engine/cloud/analytics/tx-table/tx-table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ async function getTransactions({
3535
}) {
3636
const transactions = await engineCloudProxy<{ result: TransactionsResponse }>(
3737
{
38-
pathname: "/transactions/search",
38+
pathname: "/v1/transactions/search",
3939
method: "POST",
4040
headers: {
4141
"Content-Type": "application/json",

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/engine/cloud/lib/analytics.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export async function getTransactionAnalyticsSummary(props: {
4343

4444
try {
4545
const response = await fetch(
46-
`${THIRDWEB_ENGINE_CLOUD_URL}/transactions/analytics-summary`,
46+
`${THIRDWEB_ENGINE_CLOUD_URL}/v1/transactions/analytics-summary`,
4747
{
4848
method: "POST",
4949
headers: {
@@ -102,7 +102,7 @@ export async function getTransactionsChart({
102102
};
103103

104104
const response = await fetch(
105-
`${THIRDWEB_ENGINE_CLOUD_URL}/transactions/analytics`,
105+
`${THIRDWEB_ENGINE_CLOUD_URL}/v1/transactions/analytics`,
106106
{
107107
method: "POST",
108108
headers: {
@@ -172,7 +172,7 @@ export async function getSingleTransaction({
172172
};
173173

174174
const response = await fetch(
175-
`${THIRDWEB_ENGINE_CLOUD_URL}/transactions/search`,
175+
`${THIRDWEB_ENGINE_CLOUD_URL}/v1/transactions/search`,
176176
{
177177
method: "POST",
178178
headers: {

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/engine/cloud/server-wallets/components/create-server-wallet.client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export default function CreateServerWallet(props: {
6060

6161
// no need to await this, it's not blocking
6262
engineCloudProxy({
63-
pathname: "/cache/smart-account",
63+
pathname: "/v1/cache/smart-account",
6464
method: "POST",
6565
headers: {
6666
"Content-Type": "application/json",

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/engine/cloud/server-wallets/components/try-it-out.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ console.log("Transaction hash:", result.transactionHash);
146146
`;
147147

148148
const curlExample = () => `\
149-
curl -X POST "${THIRDWEB_ENGINE_CLOUD_URL}/write/contract" \\
149+
curl -X POST "${THIRDWEB_ENGINE_CLOUD_URL}/v1/write/contract" \\
150150
-H "Content-Type: application/json" \\
151151
-H "x-secret-key: <your-project-secret-key>" \\
152152
-H "x-vault-access-token: <your-vault-access-token>" \\
@@ -166,7 +166,7 @@ curl -X POST "${THIRDWEB_ENGINE_CLOUD_URL}/write/contract" \\
166166

167167
const jsExample = () => `\
168168
const response = await fetch(
169-
"${THIRDWEB_ENGINE_CLOUD_URL}/write/contract",
169+
"${THIRDWEB_ENGINE_CLOUD_URL}/v1/write/contract",
170170
{
171171
method: "POST",
172172
headers: {
@@ -194,7 +194,7 @@ const pythonExample = () => `\
194194
import requests
195195
import json
196196
197-
url = "${THIRDWEB_ENGINE_CLOUD_URL}/write/contract"
197+
url = "${THIRDWEB_ENGINE_CLOUD_URL}/v1/write/contract"
198198
headers = {
199199
"Content-Type": "application/json",
200200
"x-secret-key": "<your-project-secret-key>",
@@ -228,7 +228,7 @@ import (
228228
)
229229
230230
func main() {
231-
url := "${THIRDWEB_ENGINE_CLOUD_URL}/write/contract"
231+
url := "${THIRDWEB_ENGINE_CLOUD_URL}/v1/write/contract"
232232
233233
// Create the request payload
234234
type Param struct {
@@ -291,7 +291,7 @@ class Program
291291
{
292292
static async Task Main()
293293
{
294-
var url = "${THIRDWEB_ENGINE_CLOUD_URL}/write/contract";
294+
var url = "${THIRDWEB_ENGINE_CLOUD_URL}/v1/write/contract";
295295
296296
var requestData = new
297297
{

packages/engine/src/client/sdk.gen.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ import { client as _heyApiClient } from "./client.gen.js";
99
import type {
1010
EncodeFunctionDataData,
1111
EncodeFunctionDataResponse,
12+
GetNativeBalanceData,
13+
GetNativeBalanceResponse,
1214
GetTransactionAnalyticsData,
1315
GetTransactionAnalyticsResponse,
1416
GetTransactionAnalyticsSummaryData,
1517
GetTransactionAnalyticsSummaryResponse,
16-
PostReadBalanceData,
17-
PostReadBalanceResponse,
1818
ReadContractData,
1919
ReadContractResponse,
2020
SearchTransactionsData,
@@ -66,7 +66,7 @@ export const writeContract = <ThrowOnError extends boolean = false>(
6666
type: "apiKey",
6767
},
6868
],
69-
url: "/write/contract",
69+
url: "/v1/write/contract",
7070
...options,
7171
headers: {
7272
"Content-Type": "application/json",
@@ -93,7 +93,7 @@ export const sendTransaction = <ThrowOnError extends boolean = false>(
9393
type: "apiKey",
9494
},
9595
],
96-
url: "/write/transaction",
96+
url: "/v1/write/transaction",
9797
...options,
9898
headers: {
9999
"Content-Type": "application/json",
@@ -120,7 +120,7 @@ export const signTransaction = <ThrowOnError extends boolean = false>(
120120
type: "apiKey",
121121
},
122122
],
123-
url: "/sign/transaction",
123+
url: "/v1/sign/transaction",
124124
...options,
125125
headers: {
126126
"Content-Type": "application/json",
@@ -147,7 +147,7 @@ export const signMessage = <ThrowOnError extends boolean = false>(
147147
type: "apiKey",
148148
},
149149
],
150-
url: "/sign/message",
150+
url: "/v1/sign/message",
151151
...options,
152152
headers: {
153153
"Content-Type": "application/json",
@@ -174,7 +174,7 @@ export const signTypedData = <ThrowOnError extends boolean = false>(
174174
type: "apiKey",
175175
},
176176
],
177-
url: "/sign/typed-data",
177+
url: "/v1/sign/typed-data",
178178
...options,
179179
headers: {
180180
"Content-Type": "application/json",
@@ -201,7 +201,7 @@ export const readContract = <ThrowOnError extends boolean = false>(
201201
type: "apiKey",
202202
},
203203
],
204-
url: "/read/contract",
204+
url: "/v1/read/contract",
205205
...options,
206206
headers: {
207207
"Content-Type": "application/json",
@@ -211,14 +211,14 @@ export const readContract = <ThrowOnError extends boolean = false>(
211211
};
212212

213213
/**
214-
* Read the Native Balance for an Address
214+
* Read Native Balance
215215
* Fetches the native cryptocurrency balance (e.g., ETH, MATIC) for a given address on a specific chain.
216216
*/
217-
export const postReadBalance = <ThrowOnError extends boolean = false>(
218-
options?: Options<PostReadBalanceData, ThrowOnError>,
217+
export const getNativeBalance = <ThrowOnError extends boolean = false>(
218+
options?: Options<GetNativeBalanceData, ThrowOnError>,
219219
) => {
220220
return (options?.client ?? _heyApiClient).post<
221-
PostReadBalanceResponse,
221+
GetNativeBalanceResponse,
222222
unknown,
223223
ThrowOnError
224224
>({
@@ -228,7 +228,7 @@ export const postReadBalance = <ThrowOnError extends boolean = false>(
228228
type: "apiKey",
229229
},
230230
],
231-
url: "/read/balance",
231+
url: "/v1/read/balance",
232232
...options,
233233
headers: {
234234
"Content-Type": "application/json",
@@ -255,7 +255,7 @@ export const encodeFunctionData = <ThrowOnError extends boolean = false>(
255255
type: "apiKey",
256256
},
257257
],
258-
url: "/encode/contract",
258+
url: "/v1/encode/contract",
259259
...options,
260260
headers: {
261261
"Content-Type": "application/json",
@@ -282,7 +282,7 @@ export const searchTransactions = <ThrowOnError extends boolean = false>(
282282
type: "apiKey",
283283
},
284284
],
285-
url: "/transactions/search",
285+
url: "/v1/transactions/search",
286286
...options,
287287
headers: {
288288
"Content-Type": "application/json",
@@ -309,7 +309,7 @@ export const getTransactionAnalytics = <ThrowOnError extends boolean = false>(
309309
type: "apiKey",
310310
},
311311
],
312-
url: "/transactions/analytics",
312+
url: "/v1/transactions/analytics",
313313
...options,
314314
headers: {
315315
"Content-Type": "application/json",
@@ -338,7 +338,7 @@ export const getTransactionAnalyticsSummary = <
338338
type: "apiKey",
339339
},
340340
],
341-
url: "/transactions/analytics-summary",
341+
url: "/v1/transactions/analytics-summary",
342342
...options,
343343
headers: {
344344
"Content-Type": "application/json",

packages/engine/src/client/types.gen.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export type WriteContractData = {
132132
};
133133
path?: never;
134134
query?: never;
135-
url: "/write/contract";
135+
url: "/v1/write/contract";
136136
};
137137

138138
export type WriteContractResponses = {
@@ -261,7 +261,7 @@ export type SendTransactionData = {
261261
};
262262
path?: never;
263263
query?: never;
264-
url: "/write/transaction";
264+
url: "/v1/write/transaction";
265265
};
266266

267267
export type SendTransactionResponses = {
@@ -461,7 +461,7 @@ export type SignTransactionData = {
461461
};
462462
path?: never;
463463
query?: never;
464-
url: "/sign/transaction";
464+
url: "/v1/sign/transaction";
465465
};
466466

467467
export type SignTransactionResponses = {
@@ -537,7 +537,7 @@ export type SignMessageData = {
537537
};
538538
path?: never;
539539
query?: never;
540-
url: "/sign/message";
540+
url: "/v1/sign/message";
541541
};
542542

543543
export type SignMessageResponses = {
@@ -622,7 +622,7 @@ export type SignTypedDataData = {
622622
};
623623
path?: never;
624624
query?: never;
625-
url: "/sign/typed-data";
625+
url: "/v1/sign/typed-data";
626626
};
627627

628628
export type SignTypedDataResponses = {
@@ -707,7 +707,7 @@ export type ReadContractData = {
707707
};
708708
path?: never;
709709
query?: never;
710-
url: "/read/contract";
710+
url: "/v1/read/contract";
711711
};
712712

713713
export type ReadContractResponses = {
@@ -727,7 +727,7 @@ export type ReadContractResponses = {
727727
export type ReadContractResponse =
728728
ReadContractResponses[keyof ReadContractResponses];
729729

730-
export type PostReadBalanceData = {
730+
export type GetNativeBalanceData = {
731731
body?: {
732732
/**
733733
* The chain ID to query the balance on.
@@ -740,10 +740,10 @@ export type PostReadBalanceData = {
740740
};
741741
path?: never;
742742
query?: never;
743-
url: "/read/balance";
743+
url: "/v1/read/balance";
744744
};
745745

746-
export type PostReadBalanceErrors = {
746+
export type GetNativeBalanceErrors = {
747747
/**
748748
* Bad Request - Invalid input
749749
*/
@@ -754,7 +754,7 @@ export type PostReadBalanceErrors = {
754754
500: unknown;
755755
};
756756

757-
export type PostReadBalanceResponses = {
757+
export type GetNativeBalanceResponses = {
758758
/**
759759
* OK - Balance fetched successfully.
760760
*/
@@ -768,8 +768,8 @@ export type PostReadBalanceResponses = {
768768
};
769769
};
770770

771-
export type PostReadBalanceResponse =
772-
PostReadBalanceResponses[keyof PostReadBalanceResponses];
771+
export type GetNativeBalanceResponse =
772+
GetNativeBalanceResponses[keyof GetNativeBalanceResponses];
773773

774774
export type EncodeFunctionDataData = {
775775
body?: {
@@ -804,7 +804,7 @@ export type EncodeFunctionDataData = {
804804
};
805805
path?: never;
806806
query?: never;
807-
url: "/encode/contract";
807+
url: "/v1/encode/contract";
808808
};
809809

810810
export type EncodeFunctionDataResponses = {
@@ -864,7 +864,7 @@ export type SearchTransactionsData = {
864864
};
865865
path?: never;
866866
query?: never;
867-
url: "/transactions/search";
867+
url: "/v1/transactions/search";
868868
};
869869

870870
export type SearchTransactionsResponses = {
@@ -932,7 +932,7 @@ export type GetTransactionAnalyticsData = {
932932
};
933933
path?: never;
934934
query?: never;
935-
url: "/transactions/analytics";
935+
url: "/v1/transactions/analytics";
936936
};
937937

938938
export type GetTransactionAnalyticsResponses = {
@@ -967,7 +967,7 @@ export type GetTransactionAnalyticsSummaryData = {
967967
};
968968
path?: never;
969969
query?: never;
970-
url: "/transactions/analytics-summary";
970+
url: "/v1/transactions/analytics-summary";
971971
};
972972

973973
export type GetTransactionAnalyticsSummaryErrors = {

0 commit comments

Comments
 (0)