@1shotapi/client-sdk 1.0.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/README.md +162 -0
- package/dist/categories/chains.d.ts +21 -0
- package/dist/categories/chains.js +44 -0
- package/dist/categories/chains.js.map +1 -0
- package/dist/categories/contractEvents.d.ts +103 -0
- package/dist/categories/contractEvents.js +115 -0
- package/dist/categories/contractEvents.js.map +1 -0
- package/dist/categories/contractMethods.d.ts +377 -0
- package/dist/categories/contractMethods.js +317 -0
- package/dist/categories/contractMethods.js.map +1 -0
- package/dist/categories/structs.d.ts +40 -0
- package/dist/categories/structs.js +68 -0
- package/dist/categories/structs.js.map +1 -0
- package/dist/categories/transactions.d.ts +31 -0
- package/dist/categories/transactions.js +51 -0
- package/dist/categories/transactions.js.map +1 -0
- package/dist/categories/wallets.d.ts +167 -0
- package/dist/categories/wallets.js +238 -0
- package/dist/categories/wallets.js.map +1 -0
- package/dist/client.d.ts +22 -0
- package/dist/client.js +61 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/types/abi.d.ts +32 -0
- package/dist/types/abi.js +2 -0
- package/dist/types/abi.js.map +1 -0
- package/dist/types/chain.d.ts +26 -0
- package/dist/types/chain.js +2 -0
- package/dist/types/chain.js.map +1 -0
- package/dist/types/client.d.ts +13 -0
- package/dist/types/client.js +2 -0
- package/dist/types/client.js.map +1 -0
- package/dist/types/common.d.ts +8 -0
- package/dist/types/common.js +2 -0
- package/dist/types/common.js.map +1 -0
- package/dist/types/contract.d.ts +5 -0
- package/dist/types/contract.js +2 -0
- package/dist/types/contract.js.map +1 -0
- package/dist/types/contractEvent.d.ts +46 -0
- package/dist/types/contractEvent.js +2 -0
- package/dist/types/contractEvent.js.map +1 -0
- package/dist/types/contractMethod.d.ts +31 -0
- package/dist/types/contractMethod.js +2 -0
- package/dist/types/contractMethod.js.map +1 -0
- package/dist/types/struct.d.ts +8 -0
- package/dist/types/struct.js +2 -0
- package/dist/types/struct.js.map +1 -0
- package/dist/types/transaction.d.ts +12 -0
- package/dist/types/transaction.js +2 -0
- package/dist/types/transaction.js.map +1 -0
- package/dist/types/wallet.d.ts +30 -0
- package/dist/types/wallet.js +2 -0
- package/dist/types/wallet.js.map +1 -0
- package/dist/types.d.ts +11 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/webhook.d.ts +19 -0
- package/dist/utils/webhook.js +66 -0
- package/dist/utils/webhook.js.map +1 -0
- package/dist/validation/abi.d.ts +470 -0
- package/dist/validation/abi.js +99 -0
- package/dist/validation/abi.js.map +1 -0
- package/dist/validation/chain.d.ts +157 -0
- package/dist/validation/chain.js +71 -0
- package/dist/validation/chain.js.map +1 -0
- package/dist/validation/common.d.ts +17 -0
- package/dist/validation/common.js +16 -0
- package/dist/validation/common.js.map +1 -0
- package/dist/validation/contractEvent.d.ts +323 -0
- package/dist/validation/contractEvent.js +148 -0
- package/dist/validation/contractEvent.js.map +1 -0
- package/dist/validation/contractMethod.d.ts +2746 -0
- package/dist/validation/contractMethod.js +787 -0
- package/dist/validation/contractMethod.js.map +1 -0
- package/dist/validation/struct.d.ts +495 -0
- package/dist/validation/struct.js +291 -0
- package/dist/validation/struct.js.map +1 -0
- package/dist/validation/transaction.d.ts +359 -0
- package/dist/validation/transaction.js +206 -0
- package/dist/validation/transaction.js.map +1 -0
- package/dist/validation/wallet.d.ts +537 -0
- package/dist/validation/wallet.js +287 -0
- package/dist/validation/wallet.js.map +1 -0
- package/package.json +71 -0
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
// Validation for account balance details
|
|
3
|
+
export const accountBalanceDetailsSchema = z
|
|
4
|
+
.object({
|
|
5
|
+
type: z
|
|
6
|
+
.number()
|
|
7
|
+
.int()
|
|
8
|
+
.refine((val) => val === 0, {
|
|
9
|
+
message: "Type must be 0 (EVM)",
|
|
10
|
+
})
|
|
11
|
+
.describe("The technology of the chain. 1Shot currently only supports EVM (0) chains"),
|
|
12
|
+
ticker: z.string().describe("Symbol of the token"),
|
|
13
|
+
chainId: z.number().int().positive().describe("ID of the blockchain network"),
|
|
14
|
+
tokenAddress: z.string().describe("Address of the token contract (empty for native currency)"),
|
|
15
|
+
accountAddress: z.string().describe("Address of the wallet account"),
|
|
16
|
+
balance: z.string().describe("Current balance of the token in the wallet"),
|
|
17
|
+
decimals: z.number().int().nonnegative().describe("Number of decimal places for the token"),
|
|
18
|
+
})
|
|
19
|
+
.describe("Details about a token balance in a wallet");
|
|
20
|
+
// Validation for wallet
|
|
21
|
+
export const walletSchema = z
|
|
22
|
+
.object({
|
|
23
|
+
id: z.string().uuid().describe("Internal ID of the wallet"),
|
|
24
|
+
accountAddress: z.string().describe("Blockchain address of the wallet"),
|
|
25
|
+
businessId: z
|
|
26
|
+
.string()
|
|
27
|
+
.uuid()
|
|
28
|
+
.nullable()
|
|
29
|
+
.describe("ID of the business that owns this wallet, if any"),
|
|
30
|
+
userId: z.string().uuid().nullable().describe("ID of the user who owns this wallet, if any"),
|
|
31
|
+
chainId: z
|
|
32
|
+
.number()
|
|
33
|
+
.int()
|
|
34
|
+
.positive()
|
|
35
|
+
.describe("ID of the blockchain network where this wallet exists"),
|
|
36
|
+
name: z.string().describe("Name of the wallet"),
|
|
37
|
+
description: z.string().describe("Description of the wallet"),
|
|
38
|
+
isAdmin: z.boolean().describe("Whether this is an admin wallet with special privileges"),
|
|
39
|
+
accountBalanceDetails: accountBalanceDetailsSchema
|
|
40
|
+
.nullable()
|
|
41
|
+
.describe("Current balance details of the wallet"),
|
|
42
|
+
erc7702ContractAddress: z
|
|
43
|
+
.string()
|
|
44
|
+
.nullable()
|
|
45
|
+
.describe("Address of the ERC-7702 contract that the Wallet has been upgraded to"),
|
|
46
|
+
updated: z.number().describe("Unix timestamp of the last update to this wallet"),
|
|
47
|
+
created: z.number().describe("Unix timestamp when this wallet was created"),
|
|
48
|
+
})
|
|
49
|
+
.describe("A wallet that can hold and manage funds");
|
|
50
|
+
// Validation for wallet list response
|
|
51
|
+
export const walletListSchema = z
|
|
52
|
+
.object({
|
|
53
|
+
response: z.array(walletSchema).describe("List of wallets"),
|
|
54
|
+
page: z.number().int().positive().describe("Current page number in the paginated results"),
|
|
55
|
+
pageSize: z.number().int().positive().describe("Number of items per page"),
|
|
56
|
+
totalResults: z
|
|
57
|
+
.number()
|
|
58
|
+
.int()
|
|
59
|
+
.nonnegative()
|
|
60
|
+
.describe("Total number of results across all pages"),
|
|
61
|
+
})
|
|
62
|
+
.describe("Paginated list of wallets");
|
|
63
|
+
// Validation for wallet update parameters
|
|
64
|
+
export const walletUpdateSchema = z
|
|
65
|
+
.object({
|
|
66
|
+
name: z.string().optional().nullable().describe("New name for the wallet"),
|
|
67
|
+
description: z.string().optional().nullable().describe("New description for the wallet"),
|
|
68
|
+
})
|
|
69
|
+
.describe("Parameters for updating a wallet");
|
|
70
|
+
// Validation for wallet creation parameters
|
|
71
|
+
export const walletCreateSchema = z
|
|
72
|
+
.object({
|
|
73
|
+
chainId: z
|
|
74
|
+
.number()
|
|
75
|
+
.int()
|
|
76
|
+
.positive()
|
|
77
|
+
.describe("ID of the blockchain network where the wallet will be created"),
|
|
78
|
+
name: z.string().describe("Name for the new wallet"),
|
|
79
|
+
description: z.string().optional().nullable().describe("Description for the new wallet"),
|
|
80
|
+
})
|
|
81
|
+
.describe("Parameters for creating a new wallet");
|
|
82
|
+
// Validation for list wallets parameters
|
|
83
|
+
export const listWalletsSchema = z
|
|
84
|
+
.object({
|
|
85
|
+
businessId: z.string().uuid().describe("ID of the business to list wallets for"),
|
|
86
|
+
chainId: z
|
|
87
|
+
.number()
|
|
88
|
+
.int()
|
|
89
|
+
.positive()
|
|
90
|
+
.optional()
|
|
91
|
+
.nullable()
|
|
92
|
+
.describe("Filter wallets by blockchain network ID"),
|
|
93
|
+
pageSize: z
|
|
94
|
+
.number()
|
|
95
|
+
.int()
|
|
96
|
+
.positive()
|
|
97
|
+
.optional()
|
|
98
|
+
.nullable()
|
|
99
|
+
.describe("Number of items per page"),
|
|
100
|
+
page: z.number().int().positive().optional().nullable().describe("Page number to retrieve"),
|
|
101
|
+
name: z.string().optional().nullable().describe("Filter wallets by name"),
|
|
102
|
+
})
|
|
103
|
+
.describe("Parameters for listing wallets");
|
|
104
|
+
// Validation for create wallet parameters
|
|
105
|
+
export const createWalletSchema = z
|
|
106
|
+
.object({
|
|
107
|
+
businessId: z.string().uuid().describe("ID of the business to create the wallet for"),
|
|
108
|
+
chainId: z
|
|
109
|
+
.number()
|
|
110
|
+
.int()
|
|
111
|
+
.positive()
|
|
112
|
+
.describe("ID of the blockchain network where the wallet will be created"),
|
|
113
|
+
name: z.string().describe("Name for the new wallet"),
|
|
114
|
+
description: z.string().optional().nullable().describe("Description for the new wallet"),
|
|
115
|
+
})
|
|
116
|
+
.describe("Parameters for creating a new wallet");
|
|
117
|
+
// Validation for get wallet parameters
|
|
118
|
+
export const getWalletSchema = z
|
|
119
|
+
.object({
|
|
120
|
+
walletId: z.string().uuid().describe("ID of the wallet to retrieve"),
|
|
121
|
+
includeBalances: z
|
|
122
|
+
.boolean()
|
|
123
|
+
.optional()
|
|
124
|
+
.nullable()
|
|
125
|
+
.describe("Whether to include balance information in the response"),
|
|
126
|
+
})
|
|
127
|
+
.describe("Parameters for retrieving a wallet");
|
|
128
|
+
// Validation for update wallet parameters
|
|
129
|
+
export const updateWalletSchema = z
|
|
130
|
+
.object({
|
|
131
|
+
walletId: z.string().uuid().describe("ID of the wallet to update"),
|
|
132
|
+
name: z.string().optional().nullable().describe("New name for the wallet"),
|
|
133
|
+
description: z.string().optional().nullable().describe("New description for the wallet"),
|
|
134
|
+
})
|
|
135
|
+
.describe("Parameters for updating a wallet");
|
|
136
|
+
// Validation for delete wallet parameters
|
|
137
|
+
export const deleteWalletSchema = z
|
|
138
|
+
.object({
|
|
139
|
+
walletId: z.string().uuid().describe("ID of the wallet to delete"),
|
|
140
|
+
})
|
|
141
|
+
.describe("Parameters for deleting a wallet");
|
|
142
|
+
// Validation for wallet transfer parameters
|
|
143
|
+
export const transferWalletSchema = z
|
|
144
|
+
.object({
|
|
145
|
+
walletId: z.string().uuid().describe("ID of the wallet to transfer funds from"),
|
|
146
|
+
destinationAccountAddress: z.string().describe("The destination address to transfer funds to"),
|
|
147
|
+
transferAmount: z
|
|
148
|
+
.string()
|
|
149
|
+
.optional()
|
|
150
|
+
.nullable()
|
|
151
|
+
.describe("The amount of native token to transfer. If omitted, 1Shot API will calculate the maximum amount that can be transferred, getting as close to zeroing out the wallet as possible"),
|
|
152
|
+
memo: z.string().optional().describe("An optional memo for the transfer"),
|
|
153
|
+
})
|
|
154
|
+
.describe("Parameters for transferring native tokens from a wallet");
|
|
155
|
+
// Validation for delegation
|
|
156
|
+
export const delegationSchema = z
|
|
157
|
+
.object({
|
|
158
|
+
id: z.string().uuid().describe("Internal ID of the delegation"),
|
|
159
|
+
businessId: z.string().uuid().describe("ID of the business that owns this delegation"),
|
|
160
|
+
escrowWalletId: z
|
|
161
|
+
.string()
|
|
162
|
+
.uuid()
|
|
163
|
+
.describe("ID of the escrow wallet that can execute transactions"),
|
|
164
|
+
delegatorAddress: z.string().describe("The address of the delegator account"),
|
|
165
|
+
startTime: z
|
|
166
|
+
.number()
|
|
167
|
+
.nullable()
|
|
168
|
+
.describe("The start time for the delegation. If null, the delegation starts immediately"),
|
|
169
|
+
endTime: z
|
|
170
|
+
.number()
|
|
171
|
+
.nullable()
|
|
172
|
+
.describe("The end time for the delegation. If null, the delegation has no expiration"),
|
|
173
|
+
contractAddresses: z
|
|
174
|
+
.array(z.string())
|
|
175
|
+
.optional()
|
|
176
|
+
.nullable()
|
|
177
|
+
.describe("Array of contract addresses that the wallet can execute transactions for"),
|
|
178
|
+
methods: z
|
|
179
|
+
.array(z.string())
|
|
180
|
+
.optional()
|
|
181
|
+
.nullable()
|
|
182
|
+
.describe("Array of method names that the wallet can execute. If empty, all methods are allowed"),
|
|
183
|
+
delegationData: z.string().describe("The actual Delegation object serialized as a JSON string"),
|
|
184
|
+
updated: z.number().describe("Unix timestamp of the last update to this delegation"),
|
|
185
|
+
created: z.number().describe("Unix timestamp when this delegation was created"),
|
|
186
|
+
})
|
|
187
|
+
.describe("A delegation allows a wallet to execute transactions on behalf of specified contract addresses and methods");
|
|
188
|
+
// Validation for delegation list response
|
|
189
|
+
export const delegationListSchema = z
|
|
190
|
+
.object({
|
|
191
|
+
response: z.array(delegationSchema).describe("List of delegations"),
|
|
192
|
+
page: z.number().int().positive().describe("Current page number in the paginated results"),
|
|
193
|
+
pageSize: z.number().int().positive().describe("Number of items per page"),
|
|
194
|
+
totalResults: z
|
|
195
|
+
.number()
|
|
196
|
+
.int()
|
|
197
|
+
.nonnegative()
|
|
198
|
+
.describe("Total number of results across all pages"),
|
|
199
|
+
})
|
|
200
|
+
.describe("Paginated list of delegations");
|
|
201
|
+
// Validation for list delegations parameters
|
|
202
|
+
export const listDelegationsSchema = z
|
|
203
|
+
.object({
|
|
204
|
+
walletId: z.string().uuid().describe("ID of the wallet to list delegations for"),
|
|
205
|
+
pageSize: z
|
|
206
|
+
.number()
|
|
207
|
+
.int()
|
|
208
|
+
.positive()
|
|
209
|
+
.optional()
|
|
210
|
+
.nullable()
|
|
211
|
+
.describe("Number of items per page"),
|
|
212
|
+
page: z.number().int().positive().optional().nullable().describe("Page number to retrieve"),
|
|
213
|
+
})
|
|
214
|
+
.describe("Parameters for listing delegations for a wallet");
|
|
215
|
+
// Validation for create delegation parameters
|
|
216
|
+
export const createDelegationSchema = z
|
|
217
|
+
.object({
|
|
218
|
+
walletId: z.string().uuid().describe("ID of the wallet to create the delegation for"),
|
|
219
|
+
startTime: z
|
|
220
|
+
.number()
|
|
221
|
+
.optional()
|
|
222
|
+
.nullable()
|
|
223
|
+
.describe("The start time for the delegation. If not provided, the delegation starts immediately"),
|
|
224
|
+
endTime: z
|
|
225
|
+
.number()
|
|
226
|
+
.optional()
|
|
227
|
+
.nullable()
|
|
228
|
+
.describe("The end time for the delegation. If not provided, the delegation has no expiration"),
|
|
229
|
+
contractAddresses: z
|
|
230
|
+
.array(z.string())
|
|
231
|
+
.optional()
|
|
232
|
+
.nullable()
|
|
233
|
+
.describe("Array of contract addresses that the wallet can execute transactions for. Leave this empty to allow all contracts"),
|
|
234
|
+
methods: z
|
|
235
|
+
.array(z.string())
|
|
236
|
+
.optional()
|
|
237
|
+
.nullable()
|
|
238
|
+
.describe("Array of method names that the wallet can execute. If empty, all methods are allowed"),
|
|
239
|
+
delegationData: z
|
|
240
|
+
.string()
|
|
241
|
+
.describe("The actual Delegation object serialized as a JSON string. BigInts must be encoded as strings"),
|
|
242
|
+
})
|
|
243
|
+
.describe("Parameters for creating a new delegation for a wallet");
|
|
244
|
+
// Validation for delete delegation parameters
|
|
245
|
+
export const deleteDelegationSchema = z
|
|
246
|
+
.object({
|
|
247
|
+
delegationId: z.string().uuid().describe("ID of the delegation to delete"),
|
|
248
|
+
})
|
|
249
|
+
.describe("Parameters for deleting a delegation");
|
|
250
|
+
// Validation for get signature parameters
|
|
251
|
+
export const getSignatureSchema = z
|
|
252
|
+
.object({
|
|
253
|
+
walletId: z.string().uuid().describe("ID of the wallet to get a signature from"),
|
|
254
|
+
type: z
|
|
255
|
+
.enum(["erc3009", "permit2"])
|
|
256
|
+
.describe("The type of signature to get. Currently, only erc3009 and permit2 are supported"),
|
|
257
|
+
contractAddress: z
|
|
258
|
+
.string()
|
|
259
|
+
.describe("The contract address of the token that you are getting a signature for, such as USDC"),
|
|
260
|
+
destinationAddress: z
|
|
261
|
+
.string()
|
|
262
|
+
.describe("The address of the destination that the transfer will be sent to, such as a user's wallet address or another contract"),
|
|
263
|
+
amount: z
|
|
264
|
+
.string()
|
|
265
|
+
.optional()
|
|
266
|
+
.nullable()
|
|
267
|
+
.describe("The amount of the token to transfer. This is in Wei, and depends on the number of decimals of the token. Make sure you know the details of the token you are transferring!"),
|
|
268
|
+
validUntil: z
|
|
269
|
+
.number()
|
|
270
|
+
.optional()
|
|
271
|
+
.nullable()
|
|
272
|
+
.describe("The timestamp until which the signature is valid. This is in seconds since the Unix epoch. For Permit2 signatures, this is the 'deadline' value"),
|
|
273
|
+
validAfter: z
|
|
274
|
+
.number()
|
|
275
|
+
.optional()
|
|
276
|
+
.nullable()
|
|
277
|
+
.describe("The timestamp after which the signature is valid. This is in seconds since the Unix epoch. This is used for Permit2 signatures and will produce an error if it is provided for ERC-3009"),
|
|
278
|
+
})
|
|
279
|
+
.describe("Parameters for getting a signature from a wallet");
|
|
280
|
+
// Validation for signature response
|
|
281
|
+
export const signatureResponseSchema = z
|
|
282
|
+
.object({
|
|
283
|
+
signature: z.string().describe("The signature of the transfer"),
|
|
284
|
+
data: z.string().describe("The actual data that was signed"),
|
|
285
|
+
})
|
|
286
|
+
.describe("The signature and the data that was signed");
|
|
287
|
+
//# sourceMappingURL=wallet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallet.js","sourceRoot":"","sources":["../../src/validation/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,yCAAyC;AACzC,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC;KACzC,MAAM,CAAC;IACN,IAAI,EAAE,CAAC;SACJ,MAAM,EAAE;SACR,GAAG,EAAE;SACL,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,EAAE;QAC1B,OAAO,EAAE,sBAAsB;KAChC,CAAC;SACD,QAAQ,CAAC,2EAA2E,CAAC;IACxF,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;IAClD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;IAC7E,YAAY,EAAE,CAAC,CAAC,MAAM,EAA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ACrC,MAAM,CAAC;IACN,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;IAC/D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;CAC7D,CAAC;KACD,QAAQ,CAAC,4CAA4C,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@1shotapi/client-sdk",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "TypeScript client SDK for 1Shot API. Provides a strongly typed REST client and utility methods for verifying webhook signatures.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "tsc",
|
|
10
|
+
"clean": "rimraf dist",
|
|
11
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
12
|
+
"lint": "eslint \"src/**/*.ts\" --fix",
|
|
13
|
+
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --config jest.config.mjs",
|
|
14
|
+
"prepare": "npm run build",
|
|
15
|
+
"prepublishOnly": "npm run lint && npm run test",
|
|
16
|
+
"preversion": "npm run lint",
|
|
17
|
+
"version": "npm run format && git add -A src",
|
|
18
|
+
"postversion": "git push && git push --tags"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/1Shot-API/1Shot-API-SDK.git"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"1shot",
|
|
26
|
+
"api",
|
|
27
|
+
"client",
|
|
28
|
+
"sdk",
|
|
29
|
+
"typescript"
|
|
30
|
+
],
|
|
31
|
+
"author": "1Shot API",
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"bugs": {
|
|
34
|
+
"url": "https://github.com/1Shot-API/1Shot-API-SDK/issues"
|
|
35
|
+
},
|
|
36
|
+
"homepage": "https://github.com/1Shot-API/1Shot-API-SDK/tree/main/clients/node",
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@eslint/compat": "^1.4.0",
|
|
39
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
40
|
+
"@eslint/js": "^9.37.0",
|
|
41
|
+
"@types/jest": "^29.5.14",
|
|
42
|
+
"@types/node": "^22.15.2",
|
|
43
|
+
"@typescript-eslint/eslint-plugin": "^8.46.0",
|
|
44
|
+
"@typescript-eslint/parser": "^8.46.0",
|
|
45
|
+
"eslint": "^9.37.0",
|
|
46
|
+
"eslint-config-prettier": "^9.1.0",
|
|
47
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
48
|
+
"eslint-plugin-import": "^2.32.0",
|
|
49
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
50
|
+
"jest": "^29.7.0",
|
|
51
|
+
"prettier": "^3.2.5",
|
|
52
|
+
"rimraf": "^5.0.5",
|
|
53
|
+
"ts-jest": "^29.1.2",
|
|
54
|
+
"typescript": "^5.9.2"
|
|
55
|
+
},
|
|
56
|
+
"files": [
|
|
57
|
+
"dist/**/*",
|
|
58
|
+
"README.md",
|
|
59
|
+
"LICENSE"
|
|
60
|
+
],
|
|
61
|
+
"publishConfig": {
|
|
62
|
+
"access": "public"
|
|
63
|
+
},
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"@noble/ed25519": "^2.2.0",
|
|
66
|
+
"@noble/hashes": "^1.3.3"
|
|
67
|
+
},
|
|
68
|
+
"peerDependencies": {
|
|
69
|
+
"zod": "^3.0.0"
|
|
70
|
+
}
|
|
71
|
+
}
|