@silvana-one/api 0.1.1 → 0.1.2
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/node/client/client.gen.d.ts +12 -0
- package/dist/node/client/client.gen.js +6 -0
- package/dist/node/client/client.gen.js.map +1 -0
- package/dist/node/client/sdk.gen.d.ts +53 -26
- package/dist/node/client/sdk.gen.js +322 -48
- package/dist/node/client/sdk.gen.js.map +1 -1
- package/dist/node/client/types.gen.d.ts +1815 -621
- package/dist/node/config.js +1 -1
- package/dist/node/config.js.map +1 -1
- package/dist/node/index.cjs +318 -50
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/tsconfig.web.tsbuildinfo +1 -1
- package/dist/web/client/client.gen.d.ts +12 -0
- package/dist/web/client/client.gen.js +6 -0
- package/dist/web/client/client.gen.js.map +1 -0
- package/dist/web/client/sdk.gen.d.ts +53 -26
- package/dist/web/client/sdk.gen.js +322 -48
- package/dist/web/client/sdk.gen.js.map +1 -1
- package/dist/web/client/types.gen.d.ts +1815 -621
- package/dist/web/config.js +1 -1
- package/dist/web/config.js.map +1 -1
- package/package.json +4 -5
- package/src/client/client.gen.ts +18 -0
- package/src/client/sdk.gen.ts +362 -72
- package/src/client/types.gen.ts +1829 -584
- package/src/config.ts +1 -1
package/src/client/sdk.gen.ts
CHANGED
|
@@ -1,9 +1,45 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import type {
|
|
3
|
+
import type { Options as ClientOptions, TDataShape, Client } from '@hey-api/client-fetch';
|
|
4
|
+
import type { LaunchNftCollectionData, LaunchNftCollectionResponse, LaunchNftCollectionError, LaunchTokenData, LaunchTokenResponse, LaunchTokenError, GetContractInfoData, GetContractInfoResponse, GetContractInfoError, GetNftV2InfoData, GetNftV2InfoResponse, GetNftV2InfoError, FaucetData, FaucetResponse2, FaucetError, GetTokenInfoData, GetTokenInfoResponse, GetTokenInfoError, GetTokenBalanceData, GetTokenBalanceResponse, GetTokenBalanceError, ProveData, ProveResponse, ProveError, GetProofData, GetProofResponse, GetProofError, TxStatusData, TxStatusResponse, TxStatusError, MintTokensData, MintTokensResponse, MintTokensError, MintNftData, MintNftResponse, MintNftError, TransferTokensData, TransferTokensResponse, TransferTokensError, AirdropTokensData, AirdropTokensResponse, AirdropTokensError, RedeemTokensData, RedeemTokensResponse, RedeemTokensError, BurnTokensData, BurnTokensResponse, BurnTokensError, TokenBidData, TokenBidResponse, TokenBidError, TokenOfferData, TokenOfferResponse, TokenOfferError, BuyTokensData, BuyTokensResponse, BuyTokensError, SellTokensData, SellTokensResponse, SellTokensError, WithdrawTokenBidData, WithdrawTokenBidResponse, WithdrawTokenBidError, WithdrawTokenOfferData, WithdrawTokenOfferResponse, WithdrawTokenOfferError, UpdateTokenBidWhitelistData, UpdateTokenBidWhitelistResponse, UpdateTokenBidWhitelistError, UpdateTokenOfferWhitelistData, UpdateTokenOfferWhitelistResponse, UpdateTokenOfferWhitelistError, UpdateTokenAdminWhitelistData, UpdateTokenAdminWhitelistResponse, UpdateTokenAdminWhitelistError } from './types.gen.js';
|
|
5
|
+
import { client as _heyApiClient } from './client.gen.js';
|
|
5
6
|
|
|
6
|
-
export
|
|
7
|
+
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
|
|
8
|
+
/**
|
|
9
|
+
* You can provide a client instance returned by `createClient()` instead of
|
|
10
|
+
* individual options. This might be also useful if you want to implement a
|
|
11
|
+
* custom client.
|
|
12
|
+
*/
|
|
13
|
+
client?: Client;
|
|
14
|
+
/**
|
|
15
|
+
* You can pass arbitrary values through the `meta` object. This can be
|
|
16
|
+
* used to access values that aren't defined as part of the SDK function.
|
|
17
|
+
*/
|
|
18
|
+
meta?: Record<string, unknown>;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Deploy a new NFT Collection contract.
|
|
23
|
+
* The `launch` endpoint is used to deploy a new NFT Collection on the Mina blockchain.
|
|
24
|
+
* It allows users to create a new NFT Collection with customizable parameters.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
export const launchNftCollection = <ThrowOnError extends boolean = false>(options: Options<LaunchNftCollectionData, ThrowOnError>) => {
|
|
28
|
+
return (options.client ?? _heyApiClient).post<LaunchNftCollectionResponse, LaunchNftCollectionError, ThrowOnError>({
|
|
29
|
+
security: [
|
|
30
|
+
{
|
|
31
|
+
name: 'x-api-key',
|
|
32
|
+
type: 'apiKey'
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
url: '/nft/launch',
|
|
36
|
+
...options,
|
|
37
|
+
headers: {
|
|
38
|
+
'Content-Type': 'application/json',
|
|
39
|
+
...options?.headers
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
};
|
|
7
43
|
|
|
8
44
|
/**
|
|
9
45
|
* Deploy a new fungible token contract.
|
|
@@ -12,10 +48,20 @@ export const client = createClient(createConfig());
|
|
|
12
48
|
* decimals, URI, and admin contract type (standard or advanced).
|
|
13
49
|
*
|
|
14
50
|
*/
|
|
15
|
-
export const launchToken = <ThrowOnError extends boolean = false>(options:
|
|
16
|
-
return (options
|
|
51
|
+
export const launchToken = <ThrowOnError extends boolean = false>(options: Options<LaunchTokenData, ThrowOnError>) => {
|
|
52
|
+
return (options.client ?? _heyApiClient).post<LaunchTokenResponse, LaunchTokenError, ThrowOnError>({
|
|
53
|
+
security: [
|
|
54
|
+
{
|
|
55
|
+
name: 'x-api-key',
|
|
56
|
+
type: 'apiKey'
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
url: '/token/launch',
|
|
17
60
|
...options,
|
|
18
|
-
|
|
61
|
+
headers: {
|
|
62
|
+
'Content-Type': 'application/json',
|
|
63
|
+
...options?.headers
|
|
64
|
+
}
|
|
19
65
|
});
|
|
20
66
|
};
|
|
21
67
|
|
|
@@ -23,10 +69,20 @@ export const launchToken = <ThrowOnError extends boolean = false>(options: Optio
|
|
|
23
69
|
* Retrieve contract info
|
|
24
70
|
* Retrieves detailed information about a contract.
|
|
25
71
|
*/
|
|
26
|
-
export const getContractInfo = <ThrowOnError extends boolean = false>(options:
|
|
27
|
-
return (options
|
|
72
|
+
export const getContractInfo = <ThrowOnError extends boolean = false>(options: Options<GetContractInfoData, ThrowOnError>) => {
|
|
73
|
+
return (options.client ?? _heyApiClient).post<GetContractInfoResponse, GetContractInfoError, ThrowOnError>({
|
|
74
|
+
security: [
|
|
75
|
+
{
|
|
76
|
+
name: 'x-api-key',
|
|
77
|
+
type: 'apiKey'
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
url: '/info/contract',
|
|
28
81
|
...options,
|
|
29
|
-
|
|
82
|
+
headers: {
|
|
83
|
+
'Content-Type': 'application/json',
|
|
84
|
+
...options?.headers
|
|
85
|
+
}
|
|
30
86
|
});
|
|
31
87
|
};
|
|
32
88
|
|
|
@@ -34,10 +90,20 @@ export const getContractInfo = <ThrowOnError extends boolean = false>(options: O
|
|
|
34
90
|
* Retrieve NFT Info
|
|
35
91
|
* Retrieves detailed information about a Mina NFT V2.
|
|
36
92
|
*/
|
|
37
|
-
export const getNftV2Info = <ThrowOnError extends boolean = false>(options:
|
|
38
|
-
return (options
|
|
93
|
+
export const getNftV2Info = <ThrowOnError extends boolean = false>(options: Options<GetNftV2InfoData, ThrowOnError>) => {
|
|
94
|
+
return (options.client ?? _heyApiClient).post<GetNftV2InfoResponse, GetNftV2InfoError, ThrowOnError>({
|
|
95
|
+
security: [
|
|
96
|
+
{
|
|
97
|
+
name: 'x-api-key',
|
|
98
|
+
type: 'apiKey'
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
url: '/info/nft-v2',
|
|
39
102
|
...options,
|
|
40
|
-
|
|
103
|
+
headers: {
|
|
104
|
+
'Content-Type': 'application/json',
|
|
105
|
+
...options?.headers
|
|
106
|
+
}
|
|
41
107
|
});
|
|
42
108
|
};
|
|
43
109
|
|
|
@@ -45,10 +111,20 @@ export const getNftV2Info = <ThrowOnError extends boolean = false>(options: Opti
|
|
|
45
111
|
* Request Funds from Faucet
|
|
46
112
|
* Requests funds from the faucet for testing purposes.
|
|
47
113
|
*/
|
|
48
|
-
export const faucet = <ThrowOnError extends boolean = false>(options:
|
|
49
|
-
return (options
|
|
114
|
+
export const faucet = <ThrowOnError extends boolean = false>(options: Options<FaucetData, ThrowOnError>) => {
|
|
115
|
+
return (options.client ?? _heyApiClient).post<FaucetResponse2, FaucetError, ThrowOnError>({
|
|
116
|
+
security: [
|
|
117
|
+
{
|
|
118
|
+
name: 'x-api-key',
|
|
119
|
+
type: 'apiKey'
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
url: '/faucet',
|
|
50
123
|
...options,
|
|
51
|
-
|
|
124
|
+
headers: {
|
|
125
|
+
'Content-Type': 'application/json',
|
|
126
|
+
...options?.headers
|
|
127
|
+
}
|
|
52
128
|
});
|
|
53
129
|
};
|
|
54
130
|
|
|
@@ -57,10 +133,20 @@ export const faucet = <ThrowOnError extends boolean = false>(options: OptionsLeg
|
|
|
57
133
|
* The `info` endpoint retrieves detailed information about a specific fungible token deployed on the Mina blockchain.
|
|
58
134
|
*
|
|
59
135
|
*/
|
|
60
|
-
export const getTokenInfo = <ThrowOnError extends boolean = false>(options:
|
|
61
|
-
return (options
|
|
136
|
+
export const getTokenInfo = <ThrowOnError extends boolean = false>(options: Options<GetTokenInfoData, ThrowOnError>) => {
|
|
137
|
+
return (options.client ?? _heyApiClient).post<GetTokenInfoResponse, GetTokenInfoError, ThrowOnError>({
|
|
138
|
+
security: [
|
|
139
|
+
{
|
|
140
|
+
name: 'x-api-key',
|
|
141
|
+
type: 'apiKey'
|
|
142
|
+
}
|
|
143
|
+
],
|
|
144
|
+
url: '/info/token',
|
|
62
145
|
...options,
|
|
63
|
-
|
|
146
|
+
headers: {
|
|
147
|
+
'Content-Type': 'application/json',
|
|
148
|
+
...options?.headers
|
|
149
|
+
}
|
|
64
150
|
});
|
|
65
151
|
};
|
|
66
152
|
|
|
@@ -69,10 +155,20 @@ export const getTokenInfo = <ThrowOnError extends boolean = false>(options: Opti
|
|
|
69
155
|
* The `balance` endpoint retrieves the balance of a specific fungible token for a given Mina address.
|
|
70
156
|
*
|
|
71
157
|
*/
|
|
72
|
-
export const getTokenBalance = <ThrowOnError extends boolean = false>(options:
|
|
73
|
-
return (options
|
|
158
|
+
export const getTokenBalance = <ThrowOnError extends boolean = false>(options: Options<GetTokenBalanceData, ThrowOnError>) => {
|
|
159
|
+
return (options.client ?? _heyApiClient).post<GetTokenBalanceResponse, GetTokenBalanceError, ThrowOnError>({
|
|
160
|
+
security: [
|
|
161
|
+
{
|
|
162
|
+
name: 'x-api-key',
|
|
163
|
+
type: 'apiKey'
|
|
164
|
+
}
|
|
165
|
+
],
|
|
166
|
+
url: '/info/balance',
|
|
74
167
|
...options,
|
|
75
|
-
|
|
168
|
+
headers: {
|
|
169
|
+
'Content-Type': 'application/json',
|
|
170
|
+
...options?.headers
|
|
171
|
+
}
|
|
76
172
|
});
|
|
77
173
|
};
|
|
78
174
|
|
|
@@ -82,10 +178,20 @@ export const getTokenBalance = <ThrowOnError extends boolean = false>(options: O
|
|
|
82
178
|
* It returns a job ID which can be used to check the status and retrieve the proofs or tx hashes using the `/proof` endpoint.
|
|
83
179
|
*
|
|
84
180
|
*/
|
|
85
|
-
export const prove = <ThrowOnError extends boolean = false>(options:
|
|
86
|
-
return (options
|
|
181
|
+
export const prove = <ThrowOnError extends boolean = false>(options: Options<ProveData, ThrowOnError>) => {
|
|
182
|
+
return (options.client ?? _heyApiClient).post<ProveResponse, ProveError, ThrowOnError>({
|
|
183
|
+
security: [
|
|
184
|
+
{
|
|
185
|
+
name: 'x-api-key',
|
|
186
|
+
type: 'apiKey'
|
|
187
|
+
}
|
|
188
|
+
],
|
|
189
|
+
url: '/transaction/prove',
|
|
87
190
|
...options,
|
|
88
|
-
|
|
191
|
+
headers: {
|
|
192
|
+
'Content-Type': 'application/json',
|
|
193
|
+
...options?.headers
|
|
194
|
+
}
|
|
89
195
|
});
|
|
90
196
|
};
|
|
91
197
|
|
|
@@ -95,10 +201,20 @@ export const prove = <ThrowOnError extends boolean = false>(options: OptionsLega
|
|
|
95
201
|
* It returns the status of the job and the proofs or tx hashes if they are ready.
|
|
96
202
|
*
|
|
97
203
|
*/
|
|
98
|
-
export const getProof = <ThrowOnError extends boolean = false>(options:
|
|
99
|
-
return (options
|
|
204
|
+
export const getProof = <ThrowOnError extends boolean = false>(options: Options<GetProofData, ThrowOnError>) => {
|
|
205
|
+
return (options.client ?? _heyApiClient).post<GetProofResponse, GetProofError, ThrowOnError>({
|
|
206
|
+
security: [
|
|
207
|
+
{
|
|
208
|
+
name: 'x-api-key',
|
|
209
|
+
type: 'apiKey'
|
|
210
|
+
}
|
|
211
|
+
],
|
|
212
|
+
url: '/transaction/proof',
|
|
100
213
|
...options,
|
|
101
|
-
|
|
214
|
+
headers: {
|
|
215
|
+
'Content-Type': 'application/json',
|
|
216
|
+
...options?.headers
|
|
217
|
+
}
|
|
102
218
|
});
|
|
103
219
|
};
|
|
104
220
|
|
|
@@ -107,10 +223,20 @@ export const getProof = <ThrowOnError extends boolean = false>(options: OptionsL
|
|
|
107
223
|
* The `tx-status` endpoint allows you to check the current status of a transaction on the Mina blockchain by providing the transaction hash. It returns whether the transaction has been applied, failed, or is still pending.
|
|
108
224
|
*
|
|
109
225
|
*/
|
|
110
|
-
export const txStatus = <ThrowOnError extends boolean = false>(options:
|
|
111
|
-
return (options
|
|
226
|
+
export const txStatus = <ThrowOnError extends boolean = false>(options: Options<TxStatusData, ThrowOnError>) => {
|
|
227
|
+
return (options.client ?? _heyApiClient).post<TxStatusResponse, TxStatusError, ThrowOnError>({
|
|
228
|
+
security: [
|
|
229
|
+
{
|
|
230
|
+
name: 'x-api-key',
|
|
231
|
+
type: 'apiKey'
|
|
232
|
+
}
|
|
233
|
+
],
|
|
234
|
+
url: '/transaction/status',
|
|
112
235
|
...options,
|
|
113
|
-
|
|
236
|
+
headers: {
|
|
237
|
+
'Content-Type': 'application/json',
|
|
238
|
+
...options?.headers
|
|
239
|
+
}
|
|
114
240
|
});
|
|
115
241
|
};
|
|
116
242
|
|
|
@@ -121,10 +247,44 @@ export const txStatus = <ThrowOnError extends boolean = false>(options: OptionsL
|
|
|
121
247
|
* The sender must have the authority to mint tokens, typically the admin of the token contract.
|
|
122
248
|
*
|
|
123
249
|
*/
|
|
124
|
-
export const mintTokens = <ThrowOnError extends boolean = false>(options:
|
|
125
|
-
return (options
|
|
250
|
+
export const mintTokens = <ThrowOnError extends boolean = false>(options: Options<MintTokensData, ThrowOnError>) => {
|
|
251
|
+
return (options.client ?? _heyApiClient).post<MintTokensResponse, MintTokensError, ThrowOnError>({
|
|
252
|
+
security: [
|
|
253
|
+
{
|
|
254
|
+
name: 'x-api-key',
|
|
255
|
+
type: 'apiKey'
|
|
256
|
+
}
|
|
257
|
+
],
|
|
258
|
+
url: '/token/mint',
|
|
259
|
+
...options,
|
|
260
|
+
headers: {
|
|
261
|
+
'Content-Type': 'application/json',
|
|
262
|
+
...options?.headers
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Mint new NFT to a specified address.
|
|
269
|
+
* The `mint` endpoint allows authorized users to mint new NFT on the Mina blockchain.
|
|
270
|
+
* This transaction creates new NFT.
|
|
271
|
+
* The sender must have the authority to mint NFTs, typically the admin of the NFT contract.
|
|
272
|
+
*
|
|
273
|
+
*/
|
|
274
|
+
export const mintNft = <ThrowOnError extends boolean = false>(options: Options<MintNftData, ThrowOnError>) => {
|
|
275
|
+
return (options.client ?? _heyApiClient).post<MintNftResponse, MintNftError, ThrowOnError>({
|
|
276
|
+
security: [
|
|
277
|
+
{
|
|
278
|
+
name: 'x-api-key',
|
|
279
|
+
type: 'apiKey'
|
|
280
|
+
}
|
|
281
|
+
],
|
|
282
|
+
url: '/nft/mint',
|
|
126
283
|
...options,
|
|
127
|
-
|
|
284
|
+
headers: {
|
|
285
|
+
'Content-Type': 'application/json',
|
|
286
|
+
...options?.headers
|
|
287
|
+
}
|
|
128
288
|
});
|
|
129
289
|
};
|
|
130
290
|
|
|
@@ -134,10 +294,20 @@ export const mintTokens = <ThrowOnError extends boolean = false>(options: Option
|
|
|
134
294
|
* The sender must have sufficient balance and appropriate permissions to perform the transfer.
|
|
135
295
|
*
|
|
136
296
|
*/
|
|
137
|
-
export const transferTokens = <ThrowOnError extends boolean = false>(options:
|
|
138
|
-
return (options
|
|
297
|
+
export const transferTokens = <ThrowOnError extends boolean = false>(options: Options<TransferTokensData, ThrowOnError>) => {
|
|
298
|
+
return (options.client ?? _heyApiClient).post<TransferTokensResponse, TransferTokensError, ThrowOnError>({
|
|
299
|
+
security: [
|
|
300
|
+
{
|
|
301
|
+
name: 'x-api-key',
|
|
302
|
+
type: 'apiKey'
|
|
303
|
+
}
|
|
304
|
+
],
|
|
305
|
+
url: '/token/transfer',
|
|
139
306
|
...options,
|
|
140
|
-
|
|
307
|
+
headers: {
|
|
308
|
+
'Content-Type': 'application/json',
|
|
309
|
+
...options?.headers
|
|
310
|
+
}
|
|
141
311
|
});
|
|
142
312
|
};
|
|
143
313
|
|
|
@@ -147,10 +317,20 @@ export const transferTokens = <ThrowOnError extends boolean = false>(options: Op
|
|
|
147
317
|
* This is efficient for distributing tokens during events like token launches or community rewards.
|
|
148
318
|
*
|
|
149
319
|
*/
|
|
150
|
-
export const airdropTokens = <ThrowOnError extends boolean = false>(options:
|
|
151
|
-
return (options
|
|
320
|
+
export const airdropTokens = <ThrowOnError extends boolean = false>(options: Options<AirdropTokensData, ThrowOnError>) => {
|
|
321
|
+
return (options.client ?? _heyApiClient).post<AirdropTokensResponse, AirdropTokensError, ThrowOnError>({
|
|
322
|
+
security: [
|
|
323
|
+
{
|
|
324
|
+
name: 'x-api-key',
|
|
325
|
+
type: 'apiKey'
|
|
326
|
+
}
|
|
327
|
+
],
|
|
328
|
+
url: '/token/airdrop',
|
|
152
329
|
...options,
|
|
153
|
-
|
|
330
|
+
headers: {
|
|
331
|
+
'Content-Type': 'application/json',
|
|
332
|
+
...options?.headers
|
|
333
|
+
}
|
|
154
334
|
});
|
|
155
335
|
};
|
|
156
336
|
|
|
@@ -160,10 +340,20 @@ export const airdropTokens = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
160
340
|
* The sender must have sufficient balance and appropriate permissions to perform the transfer.
|
|
161
341
|
*
|
|
162
342
|
*/
|
|
163
|
-
export const redeemTokens = <ThrowOnError extends boolean = false>(options:
|
|
164
|
-
return (options
|
|
343
|
+
export const redeemTokens = <ThrowOnError extends boolean = false>(options: Options<RedeemTokensData, ThrowOnError>) => {
|
|
344
|
+
return (options.client ?? _heyApiClient).post<RedeemTokensResponse, RedeemTokensError, ThrowOnError>({
|
|
345
|
+
security: [
|
|
346
|
+
{
|
|
347
|
+
name: 'x-api-key',
|
|
348
|
+
type: 'apiKey'
|
|
349
|
+
}
|
|
350
|
+
],
|
|
351
|
+
url: '/token/redeem',
|
|
165
352
|
...options,
|
|
166
|
-
|
|
353
|
+
headers: {
|
|
354
|
+
'Content-Type': 'application/json',
|
|
355
|
+
...options?.headers
|
|
356
|
+
}
|
|
167
357
|
});
|
|
168
358
|
};
|
|
169
359
|
|
|
@@ -173,10 +363,20 @@ export const redeemTokens = <ThrowOnError extends boolean = false>(options: Opti
|
|
|
173
363
|
* The sender must have sufficient balance and appropriate permissions to perform the burn.
|
|
174
364
|
*
|
|
175
365
|
*/
|
|
176
|
-
export const burnTokens = <ThrowOnError extends boolean = false>(options:
|
|
177
|
-
return (options
|
|
366
|
+
export const burnTokens = <ThrowOnError extends boolean = false>(options: Options<BurnTokensData, ThrowOnError>) => {
|
|
367
|
+
return (options.client ?? _heyApiClient).post<BurnTokensResponse, BurnTokensError, ThrowOnError>({
|
|
368
|
+
security: [
|
|
369
|
+
{
|
|
370
|
+
name: 'x-api-key',
|
|
371
|
+
type: 'apiKey'
|
|
372
|
+
}
|
|
373
|
+
],
|
|
374
|
+
url: '/token/burn',
|
|
178
375
|
...options,
|
|
179
|
-
|
|
376
|
+
headers: {
|
|
377
|
+
'Content-Type': 'application/json',
|
|
378
|
+
...options?.headers
|
|
379
|
+
}
|
|
180
380
|
});
|
|
181
381
|
};
|
|
182
382
|
|
|
@@ -185,10 +385,20 @@ export const burnTokens = <ThrowOnError extends boolean = false>(options: Option
|
|
|
185
385
|
* Allows users to place a bid on an token.
|
|
186
386
|
*
|
|
187
387
|
*/
|
|
188
|
-
export const tokenBid = <ThrowOnError extends boolean = false>(options:
|
|
189
|
-
return (options
|
|
388
|
+
export const tokenBid = <ThrowOnError extends boolean = false>(options: Options<TokenBidData, ThrowOnError>) => {
|
|
389
|
+
return (options.client ?? _heyApiClient).post<TokenBidResponse, TokenBidError, ThrowOnError>({
|
|
390
|
+
security: [
|
|
391
|
+
{
|
|
392
|
+
name: 'x-api-key',
|
|
393
|
+
type: 'apiKey'
|
|
394
|
+
}
|
|
395
|
+
],
|
|
396
|
+
url: '/token/bid/create',
|
|
190
397
|
...options,
|
|
191
|
-
|
|
398
|
+
headers: {
|
|
399
|
+
'Content-Type': 'application/json',
|
|
400
|
+
...options?.headers
|
|
401
|
+
}
|
|
192
402
|
});
|
|
193
403
|
};
|
|
194
404
|
|
|
@@ -197,10 +407,20 @@ export const tokenBid = <ThrowOnError extends boolean = false>(options: OptionsL
|
|
|
197
407
|
* Allows users to create an offer to sell a specified amount of tokens at a given price.
|
|
198
408
|
*
|
|
199
409
|
*/
|
|
200
|
-
export const tokenOffer = <ThrowOnError extends boolean = false>(options:
|
|
201
|
-
return (options
|
|
410
|
+
export const tokenOffer = <ThrowOnError extends boolean = false>(options: Options<TokenOfferData, ThrowOnError>) => {
|
|
411
|
+
return (options.client ?? _heyApiClient).post<TokenOfferResponse, TokenOfferError, ThrowOnError>({
|
|
412
|
+
security: [
|
|
413
|
+
{
|
|
414
|
+
name: 'x-api-key',
|
|
415
|
+
type: 'apiKey'
|
|
416
|
+
}
|
|
417
|
+
],
|
|
418
|
+
url: '/token/offer/create',
|
|
202
419
|
...options,
|
|
203
|
-
|
|
420
|
+
headers: {
|
|
421
|
+
'Content-Type': 'application/json',
|
|
422
|
+
...options?.headers
|
|
423
|
+
}
|
|
204
424
|
});
|
|
205
425
|
};
|
|
206
426
|
|
|
@@ -210,10 +430,20 @@ export const tokenOffer = <ThrowOnError extends boolean = false>(options: Option
|
|
|
210
430
|
* This endpoint facilitates the transaction where tokens are transferred from the offer address to the buyer's address in exchange for the specified price.
|
|
211
431
|
*
|
|
212
432
|
*/
|
|
213
|
-
export const buyTokens = <ThrowOnError extends boolean = false>(options:
|
|
214
|
-
return (options
|
|
433
|
+
export const buyTokens = <ThrowOnError extends boolean = false>(options: Options<BuyTokensData, ThrowOnError>) => {
|
|
434
|
+
return (options.client ?? _heyApiClient).post<BuyTokensResponse, BuyTokensError, ThrowOnError>({
|
|
435
|
+
security: [
|
|
436
|
+
{
|
|
437
|
+
name: 'x-api-key',
|
|
438
|
+
type: 'apiKey'
|
|
439
|
+
}
|
|
440
|
+
],
|
|
441
|
+
url: '/token/offer/buy',
|
|
215
442
|
...options,
|
|
216
|
-
|
|
443
|
+
headers: {
|
|
444
|
+
'Content-Type': 'application/json',
|
|
445
|
+
...options?.headers
|
|
446
|
+
}
|
|
217
447
|
});
|
|
218
448
|
};
|
|
219
449
|
|
|
@@ -222,10 +452,20 @@ export const buyTokens = <ThrowOnError extends boolean = false>(options: Options
|
|
|
222
452
|
* Allows token owners to sell their tokens to the Bid contract.
|
|
223
453
|
*
|
|
224
454
|
*/
|
|
225
|
-
export const sellTokens = <ThrowOnError extends boolean = false>(options:
|
|
226
|
-
return (options
|
|
455
|
+
export const sellTokens = <ThrowOnError extends boolean = false>(options: Options<SellTokensData, ThrowOnError>) => {
|
|
456
|
+
return (options.client ?? _heyApiClient).post<SellTokensResponse, SellTokensError, ThrowOnError>({
|
|
457
|
+
security: [
|
|
458
|
+
{
|
|
459
|
+
name: 'x-api-key',
|
|
460
|
+
type: 'apiKey'
|
|
461
|
+
}
|
|
462
|
+
],
|
|
463
|
+
url: '/token/bid/sell',
|
|
227
464
|
...options,
|
|
228
|
-
|
|
465
|
+
headers: {
|
|
466
|
+
'Content-Type': 'application/json',
|
|
467
|
+
...options?.headers
|
|
468
|
+
}
|
|
229
469
|
});
|
|
230
470
|
};
|
|
231
471
|
|
|
@@ -235,10 +475,20 @@ export const sellTokens = <ThrowOnError extends boolean = false>(options: Option
|
|
|
235
475
|
* This transaction cancels the active bid, releasing any locked funds.
|
|
236
476
|
*
|
|
237
477
|
*/
|
|
238
|
-
export const withdrawTokenBid = <ThrowOnError extends boolean = false>(options:
|
|
239
|
-
return (options
|
|
478
|
+
export const withdrawTokenBid = <ThrowOnError extends boolean = false>(options: Options<WithdrawTokenBidData, ThrowOnError>) => {
|
|
479
|
+
return (options.client ?? _heyApiClient).post<WithdrawTokenBidResponse, WithdrawTokenBidError, ThrowOnError>({
|
|
480
|
+
security: [
|
|
481
|
+
{
|
|
482
|
+
name: 'x-api-key',
|
|
483
|
+
type: 'apiKey'
|
|
484
|
+
}
|
|
485
|
+
],
|
|
486
|
+
url: '/token/bid/withdraw',
|
|
240
487
|
...options,
|
|
241
|
-
|
|
488
|
+
headers: {
|
|
489
|
+
'Content-Type': 'application/json',
|
|
490
|
+
...options?.headers
|
|
491
|
+
}
|
|
242
492
|
});
|
|
243
493
|
};
|
|
244
494
|
|
|
@@ -248,10 +498,20 @@ export const withdrawTokenBid = <ThrowOnError extends boolean = false>(options:
|
|
|
248
498
|
* This transaction cancels the active offer, releasing any locked tokens.
|
|
249
499
|
*
|
|
250
500
|
*/
|
|
251
|
-
export const withdrawTokenOffer = <ThrowOnError extends boolean = false>(options:
|
|
252
|
-
return (options
|
|
501
|
+
export const withdrawTokenOffer = <ThrowOnError extends boolean = false>(options: Options<WithdrawTokenOfferData, ThrowOnError>) => {
|
|
502
|
+
return (options.client ?? _heyApiClient).post<WithdrawTokenOfferResponse, WithdrawTokenOfferError, ThrowOnError>({
|
|
503
|
+
security: [
|
|
504
|
+
{
|
|
505
|
+
name: 'x-api-key',
|
|
506
|
+
type: 'apiKey'
|
|
507
|
+
}
|
|
508
|
+
],
|
|
509
|
+
url: '/token/offer/withdraw',
|
|
253
510
|
...options,
|
|
254
|
-
|
|
511
|
+
headers: {
|
|
512
|
+
'Content-Type': 'application/json',
|
|
513
|
+
...options?.headers
|
|
514
|
+
}
|
|
255
515
|
});
|
|
256
516
|
};
|
|
257
517
|
|
|
@@ -261,10 +521,20 @@ export const withdrawTokenOffer = <ThrowOnError extends boolean = false>(options
|
|
|
261
521
|
* This is essential for managing participation in bidding processes, especially for controlled or private auctions.
|
|
262
522
|
*
|
|
263
523
|
*/
|
|
264
|
-
export const updateTokenBidWhitelist = <ThrowOnError extends boolean = false>(options:
|
|
265
|
-
return (options
|
|
524
|
+
export const updateTokenBidWhitelist = <ThrowOnError extends boolean = false>(options: Options<UpdateTokenBidWhitelistData, ThrowOnError>) => {
|
|
525
|
+
return (options.client ?? _heyApiClient).post<UpdateTokenBidWhitelistResponse, UpdateTokenBidWhitelistError, ThrowOnError>({
|
|
526
|
+
security: [
|
|
527
|
+
{
|
|
528
|
+
name: 'x-api-key',
|
|
529
|
+
type: 'apiKey'
|
|
530
|
+
}
|
|
531
|
+
],
|
|
532
|
+
url: '/token/bid/whitelist',
|
|
266
533
|
...options,
|
|
267
|
-
|
|
534
|
+
headers: {
|
|
535
|
+
'Content-Type': 'application/json',
|
|
536
|
+
...options?.headers
|
|
537
|
+
}
|
|
268
538
|
});
|
|
269
539
|
};
|
|
270
540
|
|
|
@@ -274,10 +544,20 @@ export const updateTokenBidWhitelist = <ThrowOnError extends boolean = false>(op
|
|
|
274
544
|
* This is essential for managing participation in offer processes, especially for controlled or private sales.
|
|
275
545
|
*
|
|
276
546
|
*/
|
|
277
|
-
export const updateTokenOfferWhitelist = <ThrowOnError extends boolean = false>(options:
|
|
278
|
-
return (options
|
|
547
|
+
export const updateTokenOfferWhitelist = <ThrowOnError extends boolean = false>(options: Options<UpdateTokenOfferWhitelistData, ThrowOnError>) => {
|
|
548
|
+
return (options.client ?? _heyApiClient).post<UpdateTokenOfferWhitelistResponse, UpdateTokenOfferWhitelistError, ThrowOnError>({
|
|
549
|
+
security: [
|
|
550
|
+
{
|
|
551
|
+
name: 'x-api-key',
|
|
552
|
+
type: 'apiKey'
|
|
553
|
+
}
|
|
554
|
+
],
|
|
555
|
+
url: '/token/offer/whitelist',
|
|
279
556
|
...options,
|
|
280
|
-
|
|
557
|
+
headers: {
|
|
558
|
+
'Content-Type': 'application/json',
|
|
559
|
+
...options?.headers
|
|
560
|
+
}
|
|
281
561
|
});
|
|
282
562
|
};
|
|
283
563
|
|
|
@@ -286,9 +566,19 @@ export const updateTokenOfferWhitelist = <ThrowOnError extends boolean = false>(
|
|
|
286
566
|
* Allows administrators to update the whitelist of admin contracts.
|
|
287
567
|
*
|
|
288
568
|
*/
|
|
289
|
-
export const updateTokenAdminWhitelist = <ThrowOnError extends boolean = false>(options:
|
|
290
|
-
return (options
|
|
569
|
+
export const updateTokenAdminWhitelist = <ThrowOnError extends boolean = false>(options: Options<UpdateTokenAdminWhitelistData, ThrowOnError>) => {
|
|
570
|
+
return (options.client ?? _heyApiClient).post<UpdateTokenAdminWhitelistResponse, UpdateTokenAdminWhitelistError, ThrowOnError>({
|
|
571
|
+
security: [
|
|
572
|
+
{
|
|
573
|
+
name: 'x-api-key',
|
|
574
|
+
type: 'apiKey'
|
|
575
|
+
}
|
|
576
|
+
],
|
|
577
|
+
url: '/token/admin/whitelist',
|
|
291
578
|
...options,
|
|
292
|
-
|
|
579
|
+
headers: {
|
|
580
|
+
'Content-Type': 'application/json',
|
|
581
|
+
...options?.headers
|
|
582
|
+
}
|
|
293
583
|
});
|
|
294
584
|
};
|