1
1
import { FastifyInstance } from "fastify" ;
2
- import { getContractExtensions } from "./contract/metadata/extensions" ;
3
- import { readContract } from "./contract/read/read" ;
4
- import { writeToContract } from "./contract/write/write" ;
5
-
6
- // Transactions
7
- import { cancelTransaction } from "./transaction/cancel" ;
8
- import { getAllTx } from "./transaction/getAll" ;
9
- import { getAllDeployedContracts } from "./transaction/getAllDeployedContracts" ;
10
- import { retryTransaction } from "./transaction/retry" ;
11
- import { checkTxStatus } from "./transaction/status" ;
12
-
13
- // Extensions
14
- import { erc1155Routes } from "./contract/extensions/erc1155" ;
15
- import { erc20Routes } from "./contract/extensions/erc20/index" ;
16
- import { erc721Routes } from "./contract/extensions/erc721" ;
17
- import { marketplaceV3Routes } from "./contract/extensions/marketplaceV3/index" ;
18
- import { prebuiltsRoutes } from "./deploy" ;
19
-
20
- // Chains
21
- import { getChainData } from "./chain/get" ;
22
- import { getAllChainData } from "./chain/getAll" ;
23
-
24
- // Contract events
25
- import { getAllEvents } from "./contract/events/getAllEvents" ;
26
- import { getEvents } from "./contract/events/getEvents" ;
27
-
28
- // Contract roles
29
- import { getRoles } from "./contract/roles/read/get" ;
30
- import { getAllRoles } from "./contract/roles/read/getAll" ;
31
- import { grantRole } from "./contract/roles/write/grant" ;
32
- import { revokeRole } from "./contract/roles/write/revoke" ;
33
-
34
- // Contract royalties
35
- import { getDefaultRoyaltyInfo } from "./contract/royalties/read/getDefaultRoyaltyInfo" ;
36
- import { getTokenRoyaltyInfo } from "./contract/royalties/read/getTokenRoyaltyInfo" ;
37
- import { setDefaultRoyaltyInfo } from "./contract/royalties/write/setDefaultRoyaltyInfo" ;
38
- import { setTokenRoyaltyInfo } from "./contract/royalties/write/setTokenRoyaltyInfo" ;
39
-
40
- // Contract metadata
41
- import { getABI } from "./contract/metadata/abi" ;
42
- import { extractEvents } from "./contract/metadata/events" ;
43
- import { extractFunctions } from "./contract/metadata/functions" ;
44
-
45
- // Wallet
2
+ import { createAccessToken } from "./auth/access-tokens/create" ;
3
+ import { getAllAccessTokens } from "./auth/access-tokens/getAll" ;
4
+ import { revokeAccessToken } from "./auth/access-tokens/revoke" ;
5
+ import { updateAccessToken } from "./auth/access-tokens/update" ;
6
+ import { addKeypair } from "./auth/keypair/add" ;
7
+ import { listPublicKeys } from "./auth/keypair/list" ;
8
+ import { removePublicKey } from "./auth/keypair/remove" ;
9
+ import { getAllPermissions } from "./auth/permissions/getAll" ;
10
+ import { grantPermissions } from "./auth/permissions/grant" ;
11
+ import { revokePermissions } from "./auth/permissions/revoke" ;
46
12
import { createBackendWallet } from "./backend-wallet/create" ;
47
13
import { getAll } from "./backend-wallet/getAll" ;
48
14
import { getBalance } from "./backend-wallet/getBalance" ;
49
15
import { getBackendWalletNonce } from "./backend-wallet/getNonce" ;
16
+ import { getAllTransactions } from "./backend-wallet/getTransactions" ;
50
17
import { importBackendWallet } from "./backend-wallet/import" ;
18
+ import { removeBackendWallet } from "./backend-wallet/remove" ;
19
+ import { resetBackendWalletNonces } from "./backend-wallet/resetNonces" ;
51
20
import { sendTransaction } from "./backend-wallet/sendTransaction" ;
21
+ import { sendTransactionBatch } from "./backend-wallet/sendTransactionBatch" ;
22
+ import { signMessage } from "./backend-wallet/signMessage" ;
23
+ import { signTransaction } from "./backend-wallet/signTransaction" ;
24
+ import { signTypedData } from "./backend-wallet/signTypedData" ;
25
+ import { simulateTransaction } from "./backend-wallet/simulateTransaction" ;
52
26
import { transfer } from "./backend-wallet/transfer" ;
53
27
import { updateBackendWallet } from "./backend-wallet/update" ;
54
-
55
- // Configuration
28
+ import { withdraw } from "./backend-wallet/withdraw" ;
29
+ import { getChainData } from "./chain/get" ;
30
+ import { getAllChainData } from "./chain/getAll" ;
31
+ import { getAuthConfiguration } from "./configuration/auth/get" ;
32
+ import { updateAuthConfiguration } from "./configuration/auth/update" ;
56
33
import { getBackendWalletBalanceConfiguration } from "./configuration/backend-wallet-balance/get" ;
57
34
import { updateBackendWalletBalanceConfiguration } from "./configuration/backend-wallet-balance/update" ;
58
35
import { getCacheConfiguration } from "./configuration/cache/get" ;
@@ -64,84 +41,75 @@ import { updateContractSubscriptionsConfiguration } from "./configuration/contra
64
41
import { addUrlToCorsConfiguration } from "./configuration/cors/add" ;
65
42
import { getCorsConfiguration } from "./configuration/cors/get" ;
66
43
import { removeUrlToCorsConfiguration } from "./configuration/cors/remove" ;
44
+ import { setUrlsToCorsConfiguration } from "./configuration/cors/set" ;
45
+ import { getIpAllowlist } from "./configuration/ip/get" ;
46
+ import { setIpAllowlist } from "./configuration/ip/set" ;
67
47
import { getTransactionConfiguration } from "./configuration/transactions/get" ;
68
48
import { updateTransactionConfiguration } from "./configuration/transactions/update" ;
69
49
import { getWalletsConfiguration } from "./configuration/wallets/get" ;
70
50
import { updateWalletsConfiguration } from "./configuration/wallets/update" ;
71
-
72
- // Webhooks
73
- import { createWebhook } from "./webhooks/create" ;
74
- import { getWebhooksEventTypes } from "./webhooks/events" ;
75
- import { getAllWebhooksData } from "./webhooks/getAll" ;
76
- import { revokeWebhook } from "./webhooks/revoke" ;
77
-
78
- // Access tokens
79
- import { createAccessToken } from "./auth/access-tokens/create" ;
80
- import { getAllAccessTokens } from "./auth/access-tokens/getAll" ;
81
- import { revokeAccessToken } from "./auth/access-tokens/revoke" ;
82
- import { updateAccessToken } from "./auth/access-tokens/update" ;
83
-
84
- // Keypairs
85
- import { addKeypair } from "./auth/keypair/add" ;
86
- import { listPublicKeys } from "./auth/keypair/list" ;
87
- import { removePublicKey } from "./auth/keypair/remove" ;
88
-
89
- // Admins
90
- import { getAllPermissions } from "./auth/permissions/getAll" ;
91
- import { grantPermissions } from "./auth/permissions/grant" ;
92
- import { revokePermissions } from "./auth/permissions/revoke" ;
93
- import { signMessage } from "./backend-wallet/signMessage" ;
94
- import { signTransaction } from "./backend-wallet/signTransaction" ;
95
- import { signTypedData } from "./backend-wallet/signTypedData" ;
96
- import { getAuthConfiguration } from "./configuration/auth/get" ;
97
- import { updateAuthConfiguration } from "./configuration/auth/update" ;
98
-
99
- // Smart accounts
51
+ import { getAllEvents } from "./contract/events/getAllEvents" ;
52
+ import { getContractEventLogs } from "./contract/events/getContractEventLogs" ;
53
+ import { getEventLogs } from "./contract/events/getEventLogsByTimestamp" ;
54
+ import { getEvents } from "./contract/events/getEvents" ;
55
+ import { pageEventLogs } from "./contract/events/paginateEventLogs" ;
100
56
import { accountRoutes } from "./contract/extensions/account" ;
101
57
import { accountFactoryRoutes } from "./contract/extensions/accountFactory" ;
102
-
103
- // Relayers
58
+ import { erc1155Routes } from "./contract/extensions/erc1155" ;
59
+ import { erc20Routes } from "./contract/extensions/erc20/index" ;
60
+ import { erc721Routes } from "./contract/extensions/erc721" ;
61
+ import { marketplaceV3Routes } from "./contract/extensions/marketplaceV3/index" ;
62
+ import { getABI } from "./contract/metadata/abi" ;
63
+ import { extractEvents } from "./contract/metadata/events" ;
64
+ import { getContractExtensions } from "./contract/metadata/extensions" ;
65
+ import { extractFunctions } from "./contract/metadata/functions" ;
66
+ import { readContract } from "./contract/read/read" ;
67
+ import { getRoles } from "./contract/roles/read/get" ;
68
+ import { getAllRoles } from "./contract/roles/read/getAll" ;
69
+ import { grantRole } from "./contract/roles/write/grant" ;
70
+ import { revokeRole } from "./contract/roles/write/revoke" ;
71
+ import { getDefaultRoyaltyInfo } from "./contract/royalties/read/getDefaultRoyaltyInfo" ;
72
+ import { getTokenRoyaltyInfo } from "./contract/royalties/read/getTokenRoyaltyInfo" ;
73
+ import { setDefaultRoyaltyInfo } from "./contract/royalties/write/setDefaultRoyaltyInfo" ;
74
+ import { setTokenRoyaltyInfo } from "./contract/royalties/write/setTokenRoyaltyInfo" ;
75
+ import { addContractSubscription } from "./contract/subscriptions/addContractSubscription" ;
76
+ import { getContractIndexedBlockRange } from "./contract/subscriptions/getContractIndexedBlockRange" ;
77
+ import { getContractSubscriptions } from "./contract/subscriptions/getContractSubscriptions" ;
78
+ import { getLatestBlock } from "./contract/subscriptions/getLatestBlock" ;
79
+ import { removeContractSubscription } from "./contract/subscriptions/removeContractSubscription" ;
80
+ import { getContractTransactionReceipts } from "./contract/transactions/getTransactionReceipts" ;
81
+ import { getContractTransactionReceiptsByTimestamp } from "./contract/transactions/getTransactionReceiptsByTimestamp" ;
82
+ import { pageTransactionReceipts } from "./contract/transactions/paginateTransactionReceipts" ;
83
+ import { writeToContract } from "./contract/write/write" ;
84
+ import { prebuiltsRoutes } from "./deploy" ;
85
+ import { home } from "./home" ;
104
86
import { relayTransaction } from "./relayer" ;
105
87
import { createRelayer } from "./relayer/create" ;
106
88
import { getAllRelayers } from "./relayer/getAll" ;
107
89
import { revokeRelayer } from "./relayer/revoke" ;
108
-
109
- // System
110
- import { getAllTransactions } from "./backend-wallet/getTransactions" ;
111
- import { resetBackendWalletNonces } from "./backend-wallet/resetNonces" ;
112
- import { sendTransactionBatch } from "./backend-wallet/sendTransactionBatch" ;
113
- import { simulateTransaction } from "./backend-wallet/simulateTransaction" ;
114
- import { withdraw } from "./backend-wallet/withdraw" ;
115
- import { home } from "./home" ;
116
90
import { updateRelayer } from "./relayer/update" ;
117
91
import { healthCheck } from "./system/health" ;
118
92
import { queueStatus } from "./system/queue" ;
119
93
import { getTxHashReceipt } from "./transaction/blockchain/getTxReceipt" ;
120
94
import { getUserOpReceipt } from "./transaction/blockchain/getUserOpReceipt" ;
121
95
import { sendSignedTransaction } from "./transaction/blockchain/sendSignedTx" ;
122
96
import { sendSignedUserOp } from "./transaction/blockchain/sendSignedUserOp" ;
97
+ import { cancelTransaction } from "./transaction/cancel" ;
98
+ import { getAllTx } from "./transaction/getAll" ;
99
+ import { getAllDeployedContracts } from "./transaction/getAllDeployedContracts" ;
123
100
import { checkGroupStatus } from "./transaction/group" ;
124
-
125
- // Indexer
126
- import { setUrlsToCorsConfiguration } from "./configuration/cors/set" ;
127
- import { getIpAllowlist } from "./configuration/ip/get" ;
128
- import { setIpAllowlist } from "./configuration/ip/set" ;
129
- import { getContractEventLogs } from "./contract/events/getContractEventLogs" ;
130
- import { getEventLogs } from "./contract/events/getEventLogsByTimestamp" ;
131
- import { pageEventLogs } from "./contract/events/paginateEventLogs" ;
132
- import { addContractSubscription } from "./contract/subscriptions/addContractSubscription" ;
133
- import { getContractIndexedBlockRange } from "./contract/subscriptions/getContractIndexedBlockRange" ;
134
- import { getContractSubscriptions } from "./contract/subscriptions/getContractSubscriptions" ;
135
- import { getLatestBlock } from "./contract/subscriptions/getLatestBlock" ;
136
- import { removeContractSubscription } from "./contract/subscriptions/removeContractSubscription" ;
137
- import { getContractTransactionReceipts } from "./contract/transactions/getTransactionReceipts" ;
138
- import { getContractTransactionReceiptsByTimestamp } from "./contract/transactions/getTransactionReceiptsByTimestamp" ;
139
- import { pageTransactionReceipts } from "./contract/transactions/paginateTransactionReceipts" ;
101
+ import { retryTransaction } from "./transaction/retry" ;
102
+ import { checkTxStatus } from "./transaction/status" ;
140
103
import { syncRetryTransaction } from "./transaction/syncRetry" ;
104
+ import { createWebhook } from "./webhooks/create" ;
105
+ import { getWebhooksEventTypes } from "./webhooks/events" ;
106
+ import { getAllWebhooksData } from "./webhooks/getAll" ;
107
+ import { revokeWebhook } from "./webhooks/revoke" ;
141
108
142
109
export const withRoutes = async ( fastify : FastifyInstance ) => {
143
110
// Backend Wallets
144
111
await fastify . register ( createBackendWallet ) ;
112
+ await fastify . register ( removeBackendWallet ) ;
145
113
await fastify . register ( importBackendWallet ) ;
146
114
await fastify . register ( updateBackendWallet ) ;
147
115
await fastify . register ( getBalance ) ;
0 commit comments