parsec-api 0.8.1 → 0.11.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/CHANGELOG.md +57 -0
- package/README.md +0 -117
- package/client.d.mts +21 -28
- package/client.d.mts.map +1 -1
- package/client.d.ts +21 -28
- package/client.d.ts.map +1 -1
- package/client.js +21 -41
- package/client.js.map +1 -1
- package/client.mjs +21 -41
- package/client.mjs.map +1 -1
- package/core/error.d.mts +0 -12
- package/core/error.d.mts.map +1 -1
- package/core/error.d.ts +0 -12
- package/core/error.d.ts.map +1 -1
- package/core/error.js +0 -24
- package/core/error.js.map +1 -1
- package/core/error.mjs +0 -24
- package/core/error.mjs.map +1 -1
- package/index.d.mts +0 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts +0 -1
- package/index.d.ts.map +1 -1
- package/index.js +1 -3
- package/index.js.map +1 -1
- package/index.mjs +0 -1
- package/index.mjs.map +1 -1
- package/internal/tslib.js +21 -21
- package/internal/utils/query.d.mts +2 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +2 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +10 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +6 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils.d.mts +1 -0
- package/internal/utils.d.ts +1 -0
- package/internal/utils.js +1 -0
- package/internal/utils.js.map +1 -1
- package/internal/utils.mjs +1 -0
- package/package.json +2 -3
- package/resources/account.d.mts +72 -27
- package/resources/account.d.mts.map +1 -1
- package/resources/account.d.ts +72 -27
- package/resources/account.d.ts.map +1 -1
- package/resources/account.js +17 -15
- package/resources/account.js.map +1 -1
- package/resources/account.mjs +17 -15
- package/resources/account.mjs.map +1 -1
- package/resources/builder/builder.d.mts +40 -0
- package/resources/builder/builder.d.mts.map +1 -0
- package/resources/builder/builder.d.ts +40 -0
- package/resources/builder/builder.d.ts.map +1 -0
- package/resources/builder/builder.js +32 -0
- package/resources/builder/builder.js.map +1 -0
- package/resources/builder/builder.mjs +27 -0
- package/resources/builder/builder.mjs.map +1 -0
- package/resources/builder/escrow.d.mts +49 -0
- package/resources/builder/escrow.d.mts.map +1 -0
- package/resources/builder/escrow.d.ts +49 -0
- package/resources/builder/escrow.d.ts.map +1 -0
- package/resources/builder/escrow.js +17 -0
- package/resources/builder/escrow.js.map +1 -0
- package/resources/builder/escrow.mjs +13 -0
- package/resources/builder/escrow.mjs.map +1 -0
- package/resources/builder/index.d.mts +5 -0
- package/resources/builder/index.d.mts.map +1 -0
- package/resources/builder/index.d.ts +5 -0
- package/resources/builder/index.d.ts.map +1 -0
- package/resources/builder/index.js +13 -0
- package/resources/builder/index.js.map +1 -0
- package/resources/builder/index.mjs +6 -0
- package/resources/builder/index.mjs.map +1 -0
- package/resources/builder/onboard.d.mts +163 -0
- package/resources/builder/onboard.d.mts.map +1 -0
- package/resources/builder/onboard.d.ts +163 -0
- package/resources/builder/onboard.d.ts.map +1 -0
- package/resources/builder/onboard.js +16 -0
- package/resources/builder/onboard.js.map +1 -0
- package/resources/builder/onboard.mjs +12 -0
- package/resources/builder/onboard.mjs.map +1 -0
- package/resources/builder/users.d.mts +469 -0
- package/resources/builder/users.d.mts.map +1 -0
- package/resources/builder/users.d.ts +469 -0
- package/resources/builder/users.d.ts.map +1 -0
- package/resources/builder/users.js +46 -0
- package/resources/builder/users.js.map +1 -0
- package/resources/builder/users.mjs +42 -0
- package/resources/builder/users.mjs.map +1 -0
- package/resources/builder.d.mts +2 -0
- package/resources/builder.d.mts.map +1 -0
- package/resources/builder.d.ts +2 -0
- package/resources/builder.d.ts.map +1 -0
- package/resources/builder.js +6 -0
- package/resources/builder.js.map +1 -0
- package/resources/builder.mjs +3 -0
- package/resources/builder.mjs.map +1 -0
- package/resources/ctf.d.mts +97 -0
- package/resources/ctf.d.mts.map +1 -0
- package/resources/ctf.d.ts +97 -0
- package/resources/ctf.d.ts.map +1 -0
- package/resources/ctf.js +59 -0
- package/resources/ctf.js.map +1 -0
- package/resources/ctf.mjs +55 -0
- package/resources/ctf.mjs.map +1 -0
- package/resources/events.d.mts +84 -12
- package/resources/events.d.mts.map +1 -1
- package/resources/events.d.ts +84 -12
- package/resources/events.d.ts.map +1 -1
- package/resources/events.js +4 -15
- package/resources/events.js.map +1 -1
- package/resources/events.mjs +4 -15
- package/resources/events.mjs.map +1 -1
- package/resources/exchanges.d.mts +2 -1
- package/resources/exchanges.d.mts.map +1 -1
- package/resources/exchanges.d.ts +2 -1
- package/resources/exchanges.d.ts.map +1 -1
- package/resources/fills.d.mts +76 -0
- package/resources/fills.d.mts.map +1 -0
- package/resources/fills.d.ts +76 -0
- package/resources/fills.d.ts.map +1 -0
- package/resources/fills.js +27 -0
- package/resources/fills.js.map +1 -0
- package/resources/fills.mjs +23 -0
- package/resources/fills.mjs.map +1 -0
- package/resources/index.d.mts +8 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +8 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +13 -5
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +7 -3
- package/resources/index.mjs.map +1 -1
- package/resources/markets.d.mts +92 -19
- package/resources/markets.d.mts.map +1 -1
- package/resources/markets.d.ts +92 -19
- package/resources/markets.d.ts.map +1 -1
- package/resources/markets.js +1 -30
- package/resources/markets.js.map +1 -1
- package/resources/markets.mjs +1 -29
- package/resources/markets.mjs.map +1 -1
- package/resources/onboard.d.mts +91 -0
- package/resources/onboard.d.mts.map +1 -0
- package/resources/onboard.d.ts +91 -0
- package/resources/onboard.d.ts.map +1 -0
- package/resources/onboard.js +17 -0
- package/resources/onboard.js.map +1 -0
- package/resources/onboard.mjs +13 -0
- package/resources/onboard.mjs.map +1 -0
- package/resources/orderbook.d.mts +21 -11
- package/resources/orderbook.d.mts.map +1 -1
- package/resources/orderbook.d.ts +21 -11
- package/resources/orderbook.d.ts.map +1 -1
- package/resources/orderbook.js +5 -1
- package/resources/orderbook.js.map +1 -1
- package/resources/orderbook.mjs +5 -1
- package/resources/orderbook.mjs.map +1 -1
- package/resources/orders.d.mts +65 -6
- package/resources/orders.d.mts.map +1 -1
- package/resources/orders.d.ts +65 -6
- package/resources/orders.d.ts.map +1 -1
- package/resources/orders.js +48 -8
- package/resources/orders.js.map +1 -1
- package/resources/orders.mjs +48 -8
- package/resources/orders.mjs.map +1 -1
- package/resources/positions.d.mts +9 -3
- package/resources/positions.d.mts.map +1 -1
- package/resources/positions.d.ts +9 -3
- package/resources/positions.d.ts.map +1 -1
- package/resources/positions.js +13 -2
- package/resources/positions.js.map +1 -1
- package/resources/positions.mjs +13 -2
- package/resources/positions.mjs.map +1 -1
- package/resources/{price-history.d.mts → price.d.mts} +19 -13
- package/resources/price.d.mts.map +1 -0
- package/resources/{price-history.d.ts → price.d.ts} +19 -13
- package/resources/price.d.ts.map +1 -0
- package/resources/{price-history.js → price.js} +6 -5
- package/resources/price.js.map +1 -0
- package/resources/{price-history.mjs → price.mjs} +4 -3
- package/resources/price.mjs.map +1 -0
- package/resources/trades.d.mts +44 -2
- package/resources/trades.d.mts.map +1 -1
- package/resources/trades.d.ts +44 -2
- package/resources/trades.d.ts.map +1 -1
- package/resources/trades.js +2 -1
- package/resources/trades.js.map +1 -1
- package/resources/trades.mjs +2 -1
- package/resources/trades.mjs.map +1 -1
- package/resources/wallet.d.mts +177 -0
- package/resources/wallet.d.mts.map +1 -0
- package/resources/wallet.d.ts +177 -0
- package/resources/wallet.d.ts.map +1 -0
- package/resources/wallet.js +26 -0
- package/resources/wallet.js.map +1 -0
- package/resources/wallet.mjs +22 -0
- package/resources/wallet.mjs.map +1 -0
- package/src/client.ts +55 -73
- package/src/core/error.ts +0 -29
- package/src/index.ts +0 -14
- package/src/internal/utils/query.ts +7 -0
- package/src/internal/utils.ts +1 -0
- package/src/resources/account.ts +99 -44
- package/src/resources/builder/builder.ts +78 -0
- package/src/resources/builder/escrow.ts +62 -0
- package/src/resources/builder/index.ts +15 -0
- package/src/resources/builder/onboard.ts +206 -0
- package/src/resources/builder/users.ts +606 -0
- package/src/resources/builder.ts +3 -0
- package/src/resources/ctf.ts +122 -0
- package/src/resources/events.ts +104 -26
- package/src/resources/exchanges.ts +4 -2
- package/src/resources/fills.ts +107 -0
- package/src/resources/index.ts +13 -20
- package/src/resources/markets.ts +114 -49
- package/src/resources/onboard.ts +116 -0
- package/src/resources/orderbook.ts +23 -12
- package/src/resources/orders.ts +121 -12
- package/src/resources/positions.ts +22 -4
- package/src/resources/{price-history.ts → price.ts} +21 -17
- package/src/resources/trades.ts +54 -3
- package/src/resources/wallet.ts +224 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/resources/approvals.d.mts +0 -74
- package/resources/approvals.d.mts.map +0 -1
- package/resources/approvals.d.ts +0 -74
- package/resources/approvals.d.ts.map +0 -1
- package/resources/approvals.js +0 -22
- package/resources/approvals.js.map +0 -1
- package/resources/approvals.mjs +0 -18
- package/resources/approvals.mjs.map +0 -1
- package/resources/price-history.d.mts.map +0 -1
- package/resources/price-history.d.ts.map +0 -1
- package/resources/price-history.js.map +0 -1
- package/resources/price-history.mjs.map +0 -1
- package/src/resources/approvals.ts +0 -107
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
|
|
7
|
+
export class Wallet extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Returns the current state of the managed wallet, session signer, and linked
|
|
10
|
+
* exchanges.
|
|
11
|
+
*/
|
|
12
|
+
retrieve(options?: RequestOptions): APIPromise<WalletRetrieveResponse> {
|
|
13
|
+
return this._client.get('/api/v1/wallet', options);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Exports the private key for a managed wallet. The key is retrieved via
|
|
18
|
+
* HPKE-encrypted exchange with Privy and returned in hex format.
|
|
19
|
+
*
|
|
20
|
+
* **Security:** Treat the returned key as highly sensitive. Anyone with access to
|
|
21
|
+
* it has full control over the wallet and its funds.
|
|
22
|
+
*/
|
|
23
|
+
exportKey(body: WalletExportKeyParams, options?: RequestOptions): APIPromise<WalletExportKeyResponse> {
|
|
24
|
+
return this._client.post('/api/v1/wallet/export-key', { body, ...options });
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface WalletRetrieveResponse {
|
|
29
|
+
linked_exchanges: Array<WalletRetrieveResponse.LinkedExchange>;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* All wallets associated with this account.
|
|
33
|
+
*/
|
|
34
|
+
wallets: Array<WalletRetrieveResponse.Wallet>;
|
|
35
|
+
|
|
36
|
+
session_signer?: WalletRetrieveResponse.SessionSigner;
|
|
37
|
+
|
|
38
|
+
wallet?: WalletRetrieveResponse.Wallet;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export namespace WalletRetrieveResponse {
|
|
42
|
+
export interface LinkedExchange {
|
|
43
|
+
/**
|
|
44
|
+
* Exchange identifier.
|
|
45
|
+
*/
|
|
46
|
+
exchange: string;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Whether credentials are stored for this exchange.
|
|
50
|
+
*/
|
|
51
|
+
has_credentials: boolean;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface Wallet {
|
|
55
|
+
/**
|
|
56
|
+
* EVM wallet address on Polygon.
|
|
57
|
+
*/
|
|
58
|
+
eoa_address: string;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Privy wallet identifier.
|
|
62
|
+
*/
|
|
63
|
+
privy_wallet_id: string;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Wallet type ("eoa" or "safe").
|
|
67
|
+
*/
|
|
68
|
+
wallet_type: string;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Token balances for this wallet.
|
|
72
|
+
*/
|
|
73
|
+
balances?: Array<Wallet.Balance> | null;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Chain ID for the wallet (e.g. 137 for Polygon).
|
|
77
|
+
*/
|
|
78
|
+
chain_id?: number | null;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Wallet creation timestamp.
|
|
82
|
+
*/
|
|
83
|
+
created_at?: string | null;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Safe wallet address (present when wallet_type is "safe").
|
|
87
|
+
*/
|
|
88
|
+
safe_address?: string | null;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export namespace Wallet {
|
|
92
|
+
export interface Balance {
|
|
93
|
+
/**
|
|
94
|
+
* Token symbol (e.g. "USDC").
|
|
95
|
+
*/
|
|
96
|
+
token: string;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Human-readable balance (e.g. "100.50").
|
|
100
|
+
*/
|
|
101
|
+
balance: string;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Token decimal places.
|
|
105
|
+
*/
|
|
106
|
+
decimals: number;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Raw balance in smallest unit (e.g. "100500000").
|
|
110
|
+
*/
|
|
111
|
+
raw_balance: string;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* ERC-20 contract address. Null for native token.
|
|
115
|
+
*/
|
|
116
|
+
contract_address?: string | null;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface SessionSigner {
|
|
121
|
+
/**
|
|
122
|
+
* Whether the session signer is currently active.
|
|
123
|
+
*/
|
|
124
|
+
active: boolean;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Session signer expiration timestamp.
|
|
128
|
+
*/
|
|
129
|
+
expires_at?: string | null;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Session signer identifier.
|
|
133
|
+
*/
|
|
134
|
+
signer_id?: string | null;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export interface Wallet {
|
|
138
|
+
/**
|
|
139
|
+
* EVM wallet address on Polygon.
|
|
140
|
+
*/
|
|
141
|
+
eoa_address: string;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Privy wallet identifier.
|
|
145
|
+
*/
|
|
146
|
+
privy_wallet_id: string;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Wallet type ("eoa" or "safe").
|
|
150
|
+
*/
|
|
151
|
+
wallet_type: string;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Token balances for this wallet.
|
|
155
|
+
*/
|
|
156
|
+
balances?: Array<Wallet.Balance> | null;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Chain ID for the wallet (e.g. 137 for Polygon).
|
|
160
|
+
*/
|
|
161
|
+
chain_id?: number | null;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Wallet creation timestamp.
|
|
165
|
+
*/
|
|
166
|
+
created_at?: string | null;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Safe wallet address (present when wallet_type is "safe").
|
|
170
|
+
*/
|
|
171
|
+
safe_address?: string | null;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export namespace Wallet {
|
|
175
|
+
export interface Balance {
|
|
176
|
+
/**
|
|
177
|
+
* Token symbol (e.g. "USDC").
|
|
178
|
+
*/
|
|
179
|
+
token: string;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Human-readable balance (e.g. "100.50").
|
|
183
|
+
*/
|
|
184
|
+
balance: string;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Token decimal places.
|
|
188
|
+
*/
|
|
189
|
+
decimals: number;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Raw balance in smallest unit (e.g. "100500000").
|
|
193
|
+
*/
|
|
194
|
+
raw_balance: string;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* ERC-20 contract address. Null for native token.
|
|
198
|
+
*/
|
|
199
|
+
contract_address?: string | null;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export interface WalletExportKeyResponse {
|
|
205
|
+
/**
|
|
206
|
+
* Hex-encoded private key (0x-prefixed).
|
|
207
|
+
*/
|
|
208
|
+
private_key: string;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export interface WalletExportKeyParams {
|
|
212
|
+
/**
|
|
213
|
+
* Type of wallet to export ("eoa" or "safe").
|
|
214
|
+
*/
|
|
215
|
+
wallet_type?: 'eoa' | 'safe';
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export declare namespace Wallet {
|
|
219
|
+
export {
|
|
220
|
+
type WalletRetrieveResponse as WalletRetrieveResponse,
|
|
221
|
+
type WalletExportKeyResponse as WalletExportKeyResponse,
|
|
222
|
+
type WalletExportKeyParams as WalletExportKeyParams,
|
|
223
|
+
};
|
|
224
|
+
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.11.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.11.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.11.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
|
package/version.js
CHANGED
package/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"}
|
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.11.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../core/resource.mjs";
|
|
2
|
-
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
-
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
-
export declare class Approvals extends APIResource {
|
|
5
|
-
/**
|
|
6
|
-
* Polymarket-only helper for checking on-chain allowances required for trading.
|
|
7
|
-
*/
|
|
8
|
-
list(query: ApprovalListParams, options?: RequestOptions): APIPromise<ApprovalListResponse>;
|
|
9
|
-
/**
|
|
10
|
-
* Polymarket-only helper for submitting approval transactions.
|
|
11
|
-
*/
|
|
12
|
-
set(params: ApprovalSetParams, options?: RequestOptions): APIPromise<ApprovalSetResponse>;
|
|
13
|
-
}
|
|
14
|
-
export type ApprovalListResponse = Array<ApprovalListResponse.ApprovalListResponseItem>;
|
|
15
|
-
export declare namespace ApprovalListResponse {
|
|
16
|
-
interface ApprovalListResponseItem {
|
|
17
|
-
token: 'usdc' | 'ctf';
|
|
18
|
-
approved: boolean;
|
|
19
|
-
details: string;
|
|
20
|
-
target: 'ctf_exchange' | 'neg_risk_ctf_exchange' | 'neg_risk_adapter';
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
export interface ApprovalSetResponse {
|
|
24
|
-
all_succeeded: boolean;
|
|
25
|
-
results: Array<ApprovalSetResponse.Result>;
|
|
26
|
-
}
|
|
27
|
-
export declare namespace ApprovalSetResponse {
|
|
28
|
-
interface Result {
|
|
29
|
-
token: 'usdc' | 'ctf';
|
|
30
|
-
success: boolean;
|
|
31
|
-
target: 'ctf_exchange' | 'neg_risk_ctf_exchange' | 'neg_risk_adapter';
|
|
32
|
-
tx_hash: string | null;
|
|
33
|
-
/**
|
|
34
|
-
* Error message, omitted on success.
|
|
35
|
-
*/
|
|
36
|
-
error?: string;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
export interface ApprovalListParams {
|
|
40
|
-
/**
|
|
41
|
-
* Must be "polymarket".
|
|
42
|
-
*/
|
|
43
|
-
exchange: string;
|
|
44
|
-
}
|
|
45
|
-
export interface ApprovalSetParams {
|
|
46
|
-
/**
|
|
47
|
-
* Query param: Must be "polymarket".
|
|
48
|
-
*/
|
|
49
|
-
exchange: string;
|
|
50
|
-
/**
|
|
51
|
-
* Body param
|
|
52
|
-
*/
|
|
53
|
-
all?: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Body param
|
|
56
|
-
*/
|
|
57
|
-
ctf?: boolean;
|
|
58
|
-
/**
|
|
59
|
-
* Body param
|
|
60
|
-
*/
|
|
61
|
-
ctf_neg_risk?: boolean;
|
|
62
|
-
/**
|
|
63
|
-
* Body param
|
|
64
|
-
*/
|
|
65
|
-
usdc?: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Body param
|
|
68
|
-
*/
|
|
69
|
-
usdc_neg_risk?: boolean;
|
|
70
|
-
}
|
|
71
|
-
export declare namespace Approvals {
|
|
72
|
-
export { type ApprovalListResponse as ApprovalListResponse, type ApprovalSetResponse as ApprovalSetResponse, type ApprovalListParams as ApprovalListParams, type ApprovalSetParams as ApprovalSetParams, };
|
|
73
|
-
}
|
|
74
|
-
//# sourceMappingURL=approvals.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"approvals.d.mts","sourceRoot":"","sources":["../src/resources/approvals.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,SAAU,SAAQ,WAAW;IACxC;;OAEG;IACH,IAAI,CAAC,KAAK,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;IAI3F;;OAEG;IACH,GAAG,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;CAI1F;AAED,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,oBAAoB,CAAC,wBAAwB,CAAC,CAAC;AAExF,yBAAiB,oBAAoB,CAAC;IACpC,UAAiB,wBAAw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+0,0 @@
|
|
|
1
|
-
import { APIResource } from "../core/resource.js";
|
|
2
|
-
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
-
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
-
export declare class Approvals extends APIResource {
|
|
5
|
-
/**
|
|
6
|
-
* Polymarket-only helper for checking on-chain allowances required for trading.
|
|
7
|
-
*/
|
|
8
|
-
list(query: ApprovalListParams, options?: RequestOptions): APIPromise<ApprovalListResponse>;
|
|
9
|
-
/**
|
|
10
|
-
* Polymarket-only helper for submitting approval transactions.
|
|
11
|
-
*/
|
|
12
|
-
set(params: ApprovalSetParams, options?: RequestOptions): APIPromise<ApprovalSetResponse>;
|
|
13
|
-
}
|
|
14
|
-
export type ApprovalListResponse = Array<ApprovalListResponse.ApprovalListResponseItem>;
|
|
15
|
-
export declare namespace ApprovalListResponse {
|
|
16
|
-
interface ApprovalListResponseItem {
|
|
17
|
-
token: 'usdc' | 'ctf';
|
|
18
|
-
approved: boolean;
|
|
19
|
-
details: string;
|
|
20
|
-
target: 'ctf_exchange' | 'neg_risk_ctf_exchange' | 'neg_risk_adapter';
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
export interface ApprovalSetResponse {
|
|
24
|
-
all_succeeded: boolean;
|
|
25
|
-
results: Array<ApprovalSetResponse.Result>;
|
|
26
|
-
}
|
|
27
|
-
export declare namespace ApprovalSetResponse {
|
|
28
|
-
interface Result {
|
|
29
|
-
token: 'usdc' | 'ctf';
|
|
30
|
-
success: boolean;
|
|
31
|
-
target: 'ctf_exchange' | 'neg_risk_ctf_exchange' | 'neg_risk_adapter';
|
|
32
|
-
tx_hash: string | null;
|
|
33
|
-
/**
|
|
34
|
-
* Error message, omitted on success.
|
|
35
|
-
*/
|
|
36
|
-
error?: string;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
export interface ApprovalListParams {
|
|
40
|
-
/**
|
|
41
|
-
* Must be "polymarket".
|
|
42
|
-
*/
|
|
43
|
-
exchange: string;
|
|
44
|
-
}
|
|
45
|
-
export interface ApprovalSetParams {
|
|
46
|
-
/**
|
|
47
|
-
* Query param: Must be "polymarket".
|
|
48
|
-
*/
|
|
49
|
-
exchange: string;
|
|
50
|
-
/**
|
|
51
|
-
* Body param
|
|
52
|
-
*/
|
|
53
|
-
all?: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Body param
|
|
56
|
-
*/
|
|
57
|
-
ctf?: boolean;
|
|
58
|
-
/**
|
|
59
|
-
* Body param
|
|
60
|
-
*/
|
|
61
|
-
ctf_neg_risk?: boolean;
|
|
62
|
-
/**
|
|
63
|
-
* Body param
|
|
64
|
-
*/
|
|
65
|
-
usdc?: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Body param
|
|
68
|
-
*/
|
|
69
|
-
usdc_neg_risk?: boolean;
|
|
70
|
-
}
|
|
71
|
-
export declare namespace Approvals {
|
|
72
|
-
export { type ApprovalListResponse as ApprovalListResponse, type ApprovalSetResponse as ApprovalSetResponse, type ApprovalListParams as ApprovalListParams, type ApprovalSetParams as ApprovalSetParams, };
|
|
73
|
-
}
|
|
74
|
-
//# sourceMappingURL=approvals.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"approvals.d.ts","sourceRoot":"","sources":["../src/resources/approvals.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,SAAU,SAAQ,WAAW;IACxC;;OAEG;IACH,IAAI,CAAC,KAAK,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;IAI3F;;OAEG;IACH,GAAG,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;CAI1F;AAED,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,oBAAoB,CAAC,wBAAwB,CAAC,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5C,CAAC;CACH"}
|
package/resources/approvals.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Approvals = void 0;
|
|
5
|
-
const resource_1 = require("../core/resource.js");
|
|
6
|
-
class Approvals extends resource_1.APIResource {
|
|
7
|
-
/**
|
|
8
|
-
* Polymarket-only helper for checking on-chain allowances required for trading.
|
|
9
|
-
*/
|
|
10
|
-
list(query, options) {
|
|
11
|
-
return this._client.get('/api/v1/approvals', { query, ...options });
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Polymarket-only helper for submitting approval transactions.
|
|
15
|
-
*/
|
|
16
|
-
set(params, options) {
|
|
17
|
-
const { exchange, ...body } = params;
|
|
18
|
-
return this._client.post('/api/v1/approvals', { query: { exchange }, body, ...options });
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.Approvals = Approvals;
|
|
22
|
-
//# sourceMappingURL=approvals.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"approvals.js","sourceRoot":"","sources":["../src/resources/approvals.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,SAAU,SAAQ,sBAAW;IACxC;;OAEG;IACH,IAAI,CAAC,KAAyB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,MAAyB,EAAE,OAAwB;QACrD,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACrC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;CACF;AAfD,8BAeC"}
|
package/resources/approvals.mjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../core/resource.mjs";
|
|
3
|
-
export class Approvals extends APIResource {
|
|
4
|
-
/**
|
|
5
|
-
* Polymarket-only helper for checking on-chain allowances required for trading.
|
|
6
|
-
*/
|
|
7
|
-
list(query, options) {
|
|
8
|
-
return this._client.get('/api/v1/approvals', { query, ...options });
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Polymarket-only helper for submitting approval transactions.
|
|
12
|
-
*/
|
|
13
|
-
set(params, options) {
|
|
14
|
-
const { exchange, ...body } = params;
|
|
15
|
-
return this._client.post('/api/v1/approvals', { query: { exchange }, body, ...options });
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=approvals.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"approvals.mjs","sourceRoot":"","sources":["../src/resources/approvals.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;OAEG;IACH,IAAI,CAAC,KAAyB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,MAAyB,EAAE,OAAwB;QACrD,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACrC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,I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AAC;KACxB;CACF;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,QAAQ,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;IAEnD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"price-history.js","sourceRoot":"","sources":["../src/resources/price-history.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;OAEG;IACH,QAAQ,CACN,KAAiC,EACjC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;CACF;AAVD,oCAUC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"price-history.mjs","sourceRoot":"","sources":["../src/resources/price-history.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,QAAQ,CACN,KAAiC,EACjC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;CACF"}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../core/resource';
|
|
4
|
-
import { APIPromise } from '../core/api-promise';
|
|
5
|
-
import { RequestOptions } from '../internal/request-options';
|
|
6
|
-
|
|
7
|
-
export class Approvals extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Polymarket-only helper for checking on-chain allowances required for trading.
|
|
10
|
-
*/
|
|
11
|
-
list(query: ApprovalListParams, options?: RequestOptions): APIPromise<ApprovalListResponse> {
|
|
12
|
-
return this._client.get('/api/v1/approvals', { query, ...options });
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Polymarket-only helper for submitting approval transactions.
|
|
17
|
-
*/
|
|
18
|
-
set(params: ApprovalSetParams, options?: RequestOptions): APIPromise<ApprovalSetResponse> {
|
|
19
|
-
const { exchange, ...body } = params;
|
|
20
|
-
return this._client.post('/api/v1/approvals', { query: { exchange }, body, ...options });
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export type ApprovalListResponse = Array<ApprovalListResponse.ApprovalListResponseItem>;
|
|
25
|
-
|
|
26
|
-
export namespace ApprovalListResponse {
|
|
27
|
-
export interface ApprovalListResponseItem {
|
|
28
|
-
token: 'usdc' | 'ctf';
|
|
29
|
-
|
|
30
|
-
approved: boolean;
|
|
31
|
-
|
|
32
|
-
details: string;
|
|
33
|
-
|
|
34
|
-
target: 'ctf_exchange' | 'neg_risk_ctf_exchange' | 'neg_risk_adapter';
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface ApprovalSetResponse {
|
|
39
|
-
all_succeeded: boolean;
|
|
40
|
-
|
|
41
|
-
results: Array<ApprovalSetResponse.Result>;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export namespace ApprovalSetResponse {
|
|
45
|
-
export interface Result {
|
|
46
|
-
token: 'usdc' | 'ctf';
|
|
47
|
-
|
|
48
|
-
success: boolean;
|
|
49
|
-
|
|
50
|
-
target: 'ctf_exchange' | 'neg_risk_ctf_exchange' | 'neg_risk_adapter';
|
|
51
|
-
|
|
52
|
-
tx_hash: string | null;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Error message, omitted on success.
|
|
56
|
-
*/
|
|
57
|
-
error?: string;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export interface ApprovalListParams {
|
|
62
|
-
/**
|
|
63
|
-
* Must be "polymarket".
|
|
64
|
-
*/
|
|
65
|
-
exchange: string;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export interface ApprovalSetParams {
|
|
69
|
-
/**
|
|
70
|
-
* Query param: Must be "polymarket".
|
|
71
|
-
*/
|
|
72
|
-
exchange: string;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Body param
|
|
76
|
-
*/
|
|
77
|
-
all?: boolean;
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Body param
|
|
81
|
-
*/
|
|
82
|
-
ctf?: boolean;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Body param
|
|
86
|
-
*/
|
|
87
|
-
ctf_neg_risk?: boolean;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Body param
|
|
91
|
-
*/
|
|
92
|
-
usdc?: boolean;
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Body param
|
|
96
|
-
*/
|
|
97
|
-
usdc_neg_risk?: boolean;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export declare namespace Approvals {
|
|
101
|
-
export {
|
|
102
|
-
type ApprovalListResponse as ApprovalListResponse,
|
|
103
|
-
type ApprovalSetResponse as ApprovalSetResponse,
|
|
104
|
-
type ApprovalListParams as ApprovalListParams,
|
|
105
|
-
type ApprovalSetParams as ApprovalSetParams,
|
|
106
|
-
};
|
|
107
|
-
}
|