parsec-api 0.9.0 → 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 +38 -0
- package/README.md +0 -117
- package/client.d.mts +18 -25
- package/client.d.mts.map +1 -1
- package/client.d.ts +18 -25
- package/client.d.ts.map +1 -1
- package/client.js +18 -38
- package/client.js.map +1 -1
- package/client.mjs +18 -38
- 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 +63 -39
- package/resources/account.d.mts.map +1 -1
- package/resources/account.d.ts +63 -39
- package/resources/account.d.ts.map +1 -1
- package/resources/account.js +5 -13
- package/resources/account.js.map +1 -1
- package/resources/account.mjs +5 -13
- 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 +1 -1
- package/resources/exchanges.d.mts.map +1 -1
- package/resources/exchanges.d.ts +1 -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 +7 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +7 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +11 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +6 -2
- 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 +5 -11
- package/resources/orderbook.d.mts.map +1 -1
- package/resources/orderbook.d.ts +5 -11
- package/resources/orderbook.d.ts.map +1 -1
- package/resources/orderbook.js +2 -1
- package/resources/orderbook.js.map +1 -1
- package/resources/orderbook.mjs +2 -1
- package/resources/orderbook.mjs.map +1 -1
- package/resources/price.d.mts +1 -0
- package/resources/price.d.mts.map +1 -1
- package/resources/price.d.ts +1 -0
- package/resources/price.d.ts.map +1 -1
- package/resources/price.js +1 -0
- package/resources/price.js.map +1 -1
- package/resources/price.mjs +1 -0
- package/resources/price.mjs.map +1 -1
- package/resources/trades.d.mts +12 -2
- package/resources/trades.d.mts.map +1 -1
- package/resources/trades.d.ts +12 -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 +49 -63
- 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 +78 -55
- 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 +2 -2
- package/src/resources/fills.ts +107 -0
- package/src/resources/index.ts +12 -15
- package/src/resources/markets.ts +114 -49
- package/src/resources/onboard.ts +116 -0
- package/src/resources/orderbook.ts +4 -12
- package/src/resources/price.ts +1 -0
- package/src/resources/trades.ts +14 -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/src/resources/approvals.ts +0 -107
package/resources/price.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { RequestOptions } from "../internal/request-options.js";
|
|
|
4
4
|
export declare class Price extends APIResource {
|
|
5
5
|
/**
|
|
6
6
|
* Returns an array of candlesticks with timestamps at period start (UTC).
|
|
7
|
+
* Historical data is tier-gated: Free=5d, Pro=30d, Scale=unlimited.
|
|
7
8
|
*/
|
|
8
9
|
retrieve(query: PriceRetrieveParams, options?: RequestOptions): APIPromise<PriceRetrieveResponse>;
|
|
9
10
|
}
|
package/resources/price.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"price.d.ts","sourceRoot":"","sources":["../src/resources/price.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,KAAM,SAAQ,WAAW;IACpC
|
|
1
|
+
{"version":3,"file":"price.d.ts","sourceRoot":"","sources":["../src/resources/price.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;CAGlG;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,KAAK,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAE7C,QAAQ,EAAE,MAAM,CAAC;IAEjB,QAAQ,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;IAEnD,OAAO,EAAE,MAAM,CAAC;IAEhB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,yBAAiB,qBAAqB,CAAC;IACrC,UAAiB,MAAM;QACrB;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,GAAG,EAAE,MAAM,CAAC;QAEZ;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB;CACF;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;IAEpD;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
package/resources/price.js
CHANGED
|
@@ -6,6 +6,7 @@ const resource_1 = require("../core/resource.js");
|
|
|
6
6
|
class Price extends resource_1.APIResource {
|
|
7
7
|
/**
|
|
8
8
|
* Returns an array of candlesticks with timestamps at period start (UTC).
|
|
9
|
+
* Historical data is tier-gated: Free=5d, Pro=30d, Scale=unlimited.
|
|
9
10
|
*/
|
|
10
11
|
retrieve(query, options) {
|
|
11
12
|
return this._client.get('/api/v1/price', { query, ...options });
|
package/resources/price.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"price.js","sourceRoot":"","sources":["../src/resources/price.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,KAAM,SAAQ,sBAAW;IACpC
|
|
1
|
+
{"version":3,"file":"price.js","sourceRoot":"","sources":["../src/resources/price.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;OAGG;IACH,QAAQ,CAAC,KAA0B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;CACF;AARD,sBAQC"}
|
package/resources/price.mjs
CHANGED
|
@@ -3,6 +3,7 @@ import { APIResource } from "../core/resource.mjs";
|
|
|
3
3
|
export class Price extends APIResource {
|
|
4
4
|
/**
|
|
5
5
|
* Returns an array of candlesticks with timestamps at period start (UTC).
|
|
6
|
+
* Historical data is tier-gated: Free=5d, Pro=30d, Scale=unlimited.
|
|
6
7
|
*/
|
|
7
8
|
retrieve(query, options) {
|
|
8
9
|
return this._client.get('/api/v1/price', { query, ...options });
|
package/resources/price.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"price.mjs","sourceRoot":"","sources":["../src/resources/price.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC
|
|
1
|
+
{"version":3,"file":"price.mjs","sourceRoot":"","sources":["../src/resources/price.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;OAGG;IACH,QAAQ,CAAC,KAA0B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;CACF"}
|
package/resources/trades.d.mts
CHANGED
|
@@ -4,7 +4,8 @@ import { RequestOptions } from "../internal/request-options.mjs";
|
|
|
4
4
|
export declare class Trades extends APIResource {
|
|
5
5
|
/**
|
|
6
6
|
* Returns an array of recent trades for the requested market+outcome (normalized
|
|
7
|
-
* prices 0.0-1.0).
|
|
7
|
+
* prices 0.0-1.0). Historical data is tier-gated: Free=5d, Pro=30d,
|
|
8
|
+
* Scale=unlimited.
|
|
8
9
|
*/
|
|
9
10
|
list(query: TradeListParams, options?: RequestOptions): APIPromise<TradeListResponse>;
|
|
10
11
|
}
|
|
@@ -13,13 +14,22 @@ export interface TradeListResponse {
|
|
|
13
14
|
market_id: string;
|
|
14
15
|
outcome: string;
|
|
15
16
|
parsec_id: string;
|
|
16
|
-
token_id: string;
|
|
17
17
|
trades: Array<TradeListResponse.Trade>;
|
|
18
18
|
/**
|
|
19
19
|
* True if there are more results available
|
|
20
20
|
*/
|
|
21
21
|
has_more?: boolean;
|
|
22
22
|
next_cursor?: string | null;
|
|
23
|
+
/**
|
|
24
|
+
* Explanatory field for empty results. Values: null (normal), "no_data_yet"
|
|
25
|
+
* (market exists but has no trade data for the requested range).
|
|
26
|
+
*/
|
|
27
|
+
reason?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
* Exchange-specific token/asset identifier. Null for exchanges that do not use
|
|
30
|
+
* token IDs (e.g., Kalshi).
|
|
31
|
+
*/
|
|
32
|
+
token_id?: string | null;
|
|
23
33
|
}
|
|
24
34
|
export declare namespace TradeListResponse {
|
|
25
35
|
interface Trade {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trades.d.mts","sourceRoot":"","sources":["../src/resources/trades.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"trades.d.mts","sourceRoot":"","sources":["../src/resources/trades.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;OAIG;IACH,IAAI,CAAC,KAAK,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;CAGtF;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IAEjB,SAAS,EAAE,MAAM,CAAC;IAElB,OAAO,EAAE,MAAM,CAAC;IAEhB,SAAS,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAEvC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,KAAK;QACpB;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb,cAAc,EAAE,MAAM,CAAC;QAEvB,SAAS,EAAE,MAAM,CAAC;QAElB,EAAE,CAAC,EAAE,MAAM,CAAC;QAEZ;;WAEG;QACH,cAAc,CAAC,EAAE,MAAM,CAAC;QAExB;;;WAGG;QACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAEzB;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAExB;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd;;;WAGG;QACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAE9B;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAExB;;;WAGG;QACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC3B;CACF;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,CAAC;CACjG"}
|
package/resources/trades.d.ts
CHANGED
|
@@ -4,7 +4,8 @@ import { RequestOptions } from "../internal/request-options.js";
|
|
|
4
4
|
export declare class Trades extends APIResource {
|
|
5
5
|
/**
|
|
6
6
|
* Returns an array of recent trades for the requested market+outcome (normalized
|
|
7
|
-
* prices 0.0-1.0).
|
|
7
|
+
* prices 0.0-1.0). Historical data is tier-gated: Free=5d, Pro=30d,
|
|
8
|
+
* Scale=unlimited.
|
|
8
9
|
*/
|
|
9
10
|
list(query: TradeListParams, options?: RequestOptions): APIPromise<TradeListResponse>;
|
|
10
11
|
}
|
|
@@ -13,13 +14,22 @@ export interface TradeListResponse {
|
|
|
13
14
|
market_id: string;
|
|
14
15
|
outcome: string;
|
|
15
16
|
parsec_id: string;
|
|
16
|
-
token_id: string;
|
|
17
17
|
trades: Array<TradeListResponse.Trade>;
|
|
18
18
|
/**
|
|
19
19
|
* True if there are more results available
|
|
20
20
|
*/
|
|
21
21
|
has_more?: boolean;
|
|
22
22
|
next_cursor?: string | null;
|
|
23
|
+
/**
|
|
24
|
+
* Explanatory field for empty results. Values: null (normal), "no_data_yet"
|
|
25
|
+
* (market exists but has no trade data for the requested range).
|
|
26
|
+
*/
|
|
27
|
+
reason?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
* Exchange-specific token/asset identifier. Null for exchanges that do not use
|
|
30
|
+
* token IDs (e.g., Kalshi).
|
|
31
|
+
*/
|
|
32
|
+
token_id?: string | null;
|
|
23
33
|
}
|
|
24
34
|
export declare namespace TradeListResponse {
|
|
25
35
|
interface Trade {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trades.d.ts","sourceRoot":"","sources":["../src/resources/trades.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"trades.d.ts","sourceRoot":"","sources":["../src/resources/trades.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;OAIG;IACH,IAAI,CAAC,KAAK,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;CAGtF;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IAEjB,SAAS,EAAE,MAAM,CAAC;IAElB,OAAO,EAAE,MAAM,CAAC;IAEhB,SAAS,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE,KAAK,CAAC,i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AED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,CAAC;CACjG"}
|
package/resources/trades.js
CHANGED
|
@@ -6,7 +6,8 @@ const resource_1 = require("../core/resource.js");
|
|
|
6
6
|
class Trades extends resource_1.APIResource {
|
|
7
7
|
/**
|
|
8
8
|
* Returns an array of recent trades for the requested market+outcome (normalized
|
|
9
|
-
* prices 0.0-1.0).
|
|
9
|
+
* prices 0.0-1.0). Historical data is tier-gated: Free=5d, Pro=30d,
|
|
10
|
+
* Scale=unlimited.
|
|
10
11
|
*/
|
|
11
12
|
list(query, options) {
|
|
12
13
|
return this._client.get('/api/v1/trades', { query, ...options });
|
package/resources/trades.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trades.js","sourceRoot":"","sources":["../src/resources/trades.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,MAAO,SAAQ,sBAAW;IACrC
|
|
1
|
+
{"version":3,"file":"trades.js","sourceRoot":"","sources":["../src/resources/trades.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;OAIG;IACH,IAAI,CAAC,KAAsB,EAAE,OAAwB;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;CACF;AATD,wBASC"}
|
package/resources/trades.mjs
CHANGED
|
@@ -3,7 +3,8 @@ import { APIResource } from "../core/resource.mjs";
|
|
|
3
3
|
export class Trades extends APIResource {
|
|
4
4
|
/**
|
|
5
5
|
* Returns an array of recent trades for the requested market+outcome (normalized
|
|
6
|
-
* prices 0.0-1.0).
|
|
6
|
+
* prices 0.0-1.0). Historical data is tier-gated: Free=5d, Pro=30d,
|
|
7
|
+
* Scale=unlimited.
|
|
7
8
|
*/
|
|
8
9
|
list(query, options) {
|
|
9
10
|
return this._client.get('/api/v1/trades', { query, ...options });
|
package/resources/trades.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trades.mjs","sourceRoot":"","sources":["../src/resources/trades.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"trades.mjs","sourceRoot":"","sources":["../src/resources/trades.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;OAIG;IACH,IAAI,CAAC,KAAsB,EAAE,OAAwB;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;CACF"}
|
|
@@ -0,0 +1,177 @@
|
|
|
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 Wallet extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Returns the current state of the managed wallet, session signer, and linked
|
|
7
|
+
* exchanges.
|
|
8
|
+
*/
|
|
9
|
+
retrieve(options?: RequestOptions): APIPromise<WalletRetrieveResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Exports the private key for a managed wallet. The key is retrieved via
|
|
12
|
+
* HPKE-encrypted exchange with Privy and returned in hex format.
|
|
13
|
+
*
|
|
14
|
+
* **Security:** Treat the returned key as highly sensitive. Anyone with access to
|
|
15
|
+
* it has full control over the wallet and its funds.
|
|
16
|
+
*/
|
|
17
|
+
exportKey(body: WalletExportKeyParams, options?: RequestOptions): APIPromise<WalletExportKeyResponse>;
|
|
18
|
+
}
|
|
19
|
+
export interface WalletRetrieveResponse {
|
|
20
|
+
linked_exchanges: Array<WalletRetrieveResponse.LinkedExchange>;
|
|
21
|
+
/**
|
|
22
|
+
* All wallets associated with this account.
|
|
23
|
+
*/
|
|
24
|
+
wallets: Array<WalletRetrieveResponse.Wallet>;
|
|
25
|
+
session_signer?: WalletRetrieveResponse.SessionSigner;
|
|
26
|
+
wallet?: WalletRetrieveResponse.Wallet;
|
|
27
|
+
}
|
|
28
|
+
export declare namespace WalletRetrieveResponse {
|
|
29
|
+
interface LinkedExchange {
|
|
30
|
+
/**
|
|
31
|
+
* Exchange identifier.
|
|
32
|
+
*/
|
|
33
|
+
exchange: string;
|
|
34
|
+
/**
|
|
35
|
+
* Whether credentials are stored for this exchange.
|
|
36
|
+
*/
|
|
37
|
+
has_credentials: boolean;
|
|
38
|
+
}
|
|
39
|
+
interface Wallet {
|
|
40
|
+
/**
|
|
41
|
+
* EVM wallet address on Polygon.
|
|
42
|
+
*/
|
|
43
|
+
eoa_address: string;
|
|
44
|
+
/**
|
|
45
|
+
* Privy wallet identifier.
|
|
46
|
+
*/
|
|
47
|
+
privy_wallet_id: string;
|
|
48
|
+
/**
|
|
49
|
+
* Wallet type ("eoa" or "safe").
|
|
50
|
+
*/
|
|
51
|
+
wallet_type: string;
|
|
52
|
+
/**
|
|
53
|
+
* Token balances for this wallet.
|
|
54
|
+
*/
|
|
55
|
+
balances?: Array<Wallet.Balance> | null;
|
|
56
|
+
/**
|
|
57
|
+
* Chain ID for the wallet (e.g. 137 for Polygon).
|
|
58
|
+
*/
|
|
59
|
+
chain_id?: number | null;
|
|
60
|
+
/**
|
|
61
|
+
* Wallet creation timestamp.
|
|
62
|
+
*/
|
|
63
|
+
created_at?: string | null;
|
|
64
|
+
/**
|
|
65
|
+
* Safe wallet address (present when wallet_type is "safe").
|
|
66
|
+
*/
|
|
67
|
+
safe_address?: string | null;
|
|
68
|
+
}
|
|
69
|
+
namespace Wallet {
|
|
70
|
+
interface Balance {
|
|
71
|
+
/**
|
|
72
|
+
* Token symbol (e.g. "USDC").
|
|
73
|
+
*/
|
|
74
|
+
token: string;
|
|
75
|
+
/**
|
|
76
|
+
* Human-readable balance (e.g. "100.50").
|
|
77
|
+
*/
|
|
78
|
+
balance: string;
|
|
79
|
+
/**
|
|
80
|
+
* Token decimal places.
|
|
81
|
+
*/
|
|
82
|
+
decimals: number;
|
|
83
|
+
/**
|
|
84
|
+
* Raw balance in smallest unit (e.g. "100500000").
|
|
85
|
+
*/
|
|
86
|
+
raw_balance: string;
|
|
87
|
+
/**
|
|
88
|
+
* ERC-20 contract address. Null for native token.
|
|
89
|
+
*/
|
|
90
|
+
contract_address?: string | null;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
interface SessionSigner {
|
|
94
|
+
/**
|
|
95
|
+
* Whether the session signer is currently active.
|
|
96
|
+
*/
|
|
97
|
+
active: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Session signer expiration timestamp.
|
|
100
|
+
*/
|
|
101
|
+
expires_at?: string | null;
|
|
102
|
+
/**
|
|
103
|
+
* Session signer identifier.
|
|
104
|
+
*/
|
|
105
|
+
signer_id?: string | null;
|
|
106
|
+
}
|
|
107
|
+
interface Wallet {
|
|
108
|
+
/**
|
|
109
|
+
* EVM wallet address on Polygon.
|
|
110
|
+
*/
|
|
111
|
+
eoa_address: string;
|
|
112
|
+
/**
|
|
113
|
+
* Privy wallet identifier.
|
|
114
|
+
*/
|
|
115
|
+
privy_wallet_id: string;
|
|
116
|
+
/**
|
|
117
|
+
* Wallet type ("eoa" or "safe").
|
|
118
|
+
*/
|
|
119
|
+
wallet_type: string;
|
|
120
|
+
/**
|
|
121
|
+
* Token balances for this wallet.
|
|
122
|
+
*/
|
|
123
|
+
balances?: Array<Wallet.Balance> | null;
|
|
124
|
+
/**
|
|
125
|
+
* Chain ID for the wallet (e.g. 137 for Polygon).
|
|
126
|
+
*/
|
|
127
|
+
chain_id?: number | null;
|
|
128
|
+
/**
|
|
129
|
+
* Wallet creation timestamp.
|
|
130
|
+
*/
|
|
131
|
+
created_at?: string | null;
|
|
132
|
+
/**
|
|
133
|
+
* Safe wallet address (present when wallet_type is "safe").
|
|
134
|
+
*/
|
|
135
|
+
safe_address?: string | null;
|
|
136
|
+
}
|
|
137
|
+
namespace Wallet {
|
|
138
|
+
interface Balance {
|
|
139
|
+
/**
|
|
140
|
+
* Token symbol (e.g. "USDC").
|
|
141
|
+
*/
|
|
142
|
+
token: string;
|
|
143
|
+
/**
|
|
144
|
+
* Human-readable balance (e.g. "100.50").
|
|
145
|
+
*/
|
|
146
|
+
balance: string;
|
|
147
|
+
/**
|
|
148
|
+
* Token decimal places.
|
|
149
|
+
*/
|
|
150
|
+
decimals: number;
|
|
151
|
+
/**
|
|
152
|
+
* Raw balance in smallest unit (e.g. "100500000").
|
|
153
|
+
*/
|
|
154
|
+
raw_balance: string;
|
|
155
|
+
/**
|
|
156
|
+
* ERC-20 contract address. Null for native token.
|
|
157
|
+
*/
|
|
158
|
+
contract_address?: string | null;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
export interface WalletExportKeyResponse {
|
|
163
|
+
/**
|
|
164
|
+
* Hex-encoded private key (0x-prefixed).
|
|
165
|
+
*/
|
|
166
|
+
private_key: string;
|
|
167
|
+
}
|
|
168
|
+
export interface WalletExportKeyParams {
|
|
169
|
+
/**
|
|
170
|
+
* Type of wallet to export ("eoa" or "safe").
|
|
171
|
+
*/
|
|
172
|
+
wallet_type?: 'eoa' | 'safe';
|
|
173
|
+
}
|
|
174
|
+
export declare namespace Wallet {
|
|
175
|
+
export { type WalletRetrieveResponse as WalletRetrieveResponse, type WalletExportKeyResponse as WalletExportKeyResponse, type WalletExportKeyParams as WalletExportKeyParams, };
|
|
176
|
+
}
|
|
177
|
+
//# sourceMappingURL=wallet.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version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C;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CAC9B;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
|
@@ -0,0 +1,177 @@
|
|
|
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 Wallet extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Returns the current state of the managed wallet, session signer, and linked
|
|
7
|
+
* exchanges.
|
|
8
|
+
*/
|
|
9
|
+
retrieve(options?: RequestOptions): APIPromise<WalletRetrieveResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Exports the private key for a managed wallet. The key is retrieved via
|
|
12
|
+
* HPKE-encrypted exchange with Privy and returned in hex format.
|
|
13
|
+
*
|
|
14
|
+
* **Security:** Treat the returned key as highly sensitive. Anyone with access to
|
|
15
|
+
* it has full control over the wallet and its funds.
|
|
16
|
+
*/
|
|
17
|
+
exportKey(body: WalletExportKeyParams, options?: RequestOptions): APIPromise<WalletExportKeyResponse>;
|
|
18
|
+
}
|
|
19
|
+
export interface WalletRetrieveResponse {
|
|
20
|
+
linked_exchanges: Array<WalletRetrieveResponse.LinkedExchange>;
|
|
21
|
+
/**
|
|
22
|
+
* All wallets associated with this account.
|
|
23
|
+
*/
|
|
24
|
+
wallets: Array<WalletRetrieveResponse.Wallet>;
|
|
25
|
+
session_signer?: WalletRetrieveResponse.SessionSigner;
|
|
26
|
+
wallet?: WalletRetrieveResponse.Wallet;
|
|
27
|
+
}
|
|
28
|
+
export declare namespace WalletRetrieveResponse {
|
|
29
|
+
interface LinkedExchange {
|
|
30
|
+
/**
|
|
31
|
+
* Exchange identifier.
|
|
32
|
+
*/
|
|
33
|
+
exchange: string;
|
|
34
|
+
/**
|
|
35
|
+
* Whether credentials are stored for this exchange.
|
|
36
|
+
*/
|
|
37
|
+
has_credentials: boolean;
|
|
38
|
+
}
|
|
39
|
+
interface Wallet {
|
|
40
|
+
/**
|
|
41
|
+
* EVM wallet address on Polygon.
|
|
42
|
+
*/
|
|
43
|
+
eoa_address: string;
|
|
44
|
+
/**
|
|
45
|
+
* Privy wallet identifier.
|
|
46
|
+
*/
|
|
47
|
+
privy_wallet_id: string;
|
|
48
|
+
/**
|
|
49
|
+
* Wallet type ("eoa" or "safe").
|
|
50
|
+
*/
|
|
51
|
+
wallet_type: string;
|
|
52
|
+
/**
|
|
53
|
+
* Token balances for this wallet.
|
|
54
|
+
*/
|
|
55
|
+
balances?: Array<Wallet.Balance> | null;
|
|
56
|
+
/**
|
|
57
|
+
* Chain ID for the wallet (e.g. 137 for Polygon).
|
|
58
|
+
*/
|
|
59
|
+
chain_id?: number | null;
|
|
60
|
+
/**
|
|
61
|
+
* Wallet creation timestamp.
|
|
62
|
+
*/
|
|
63
|
+
created_at?: string | null;
|
|
64
|
+
/**
|
|
65
|
+
* Safe wallet address (present when wallet_type is "safe").
|
|
66
|
+
*/
|
|
67
|
+
safe_address?: string | null;
|
|
68
|
+
}
|
|
69
|
+
namespace Wallet {
|
|
70
|
+
interface Balance {
|
|
71
|
+
/**
|
|
72
|
+
* Token symbol (e.g. "USDC").
|
|
73
|
+
*/
|
|
74
|
+
token: string;
|
|
75
|
+
/**
|
|
76
|
+
* Human-readable balance (e.g. "100.50").
|
|
77
|
+
*/
|
|
78
|
+
balance: string;
|
|
79
|
+
/**
|
|
80
|
+
* Token decimal places.
|
|
81
|
+
*/
|
|
82
|
+
decimals: number;
|
|
83
|
+
/**
|
|
84
|
+
* Raw balance in smallest unit (e.g. "100500000").
|
|
85
|
+
*/
|
|
86
|
+
raw_balance: string;
|
|
87
|
+
/**
|
|
88
|
+
* ERC-20 contract address. Null for native token.
|
|
89
|
+
*/
|
|
90
|
+
contract_address?: string | null;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
interface SessionSigner {
|
|
94
|
+
/**
|
|
95
|
+
* Whether the session signer is currently active.
|
|
96
|
+
*/
|
|
97
|
+
active: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Session signer expiration timestamp.
|
|
100
|
+
*/
|
|
101
|
+
expires_at?: string | null;
|
|
102
|
+
/**
|
|
103
|
+
* Session signer identifier.
|
|
104
|
+
*/
|
|
105
|
+
signer_id?: string | null;
|
|
106
|
+
}
|
|
107
|
+
interface Wallet {
|
|
108
|
+
/**
|
|
109
|
+
* EVM wallet address on Polygon.
|
|
110
|
+
*/
|
|
111
|
+
eoa_address: string;
|
|
112
|
+
/**
|
|
113
|
+
* Privy wallet identifier.
|
|
114
|
+
*/
|
|
115
|
+
privy_wallet_id: string;
|
|
116
|
+
/**
|
|
117
|
+
* Wallet type ("eoa" or "safe").
|
|
118
|
+
*/
|
|
119
|
+
wallet_type: string;
|
|
120
|
+
/**
|
|
121
|
+
* Token balances for this wallet.
|
|
122
|
+
*/
|
|
123
|
+
balances?: Array<Wallet.Balance> | null;
|
|
124
|
+
/**
|
|
125
|
+
* Chain ID for the wallet (e.g. 137 for Polygon).
|
|
126
|
+
*/
|
|
127
|
+
chain_id?: number | null;
|
|
128
|
+
/**
|
|
129
|
+
* Wallet creation timestamp.
|
|
130
|
+
*/
|
|
131
|
+
created_at?: string | null;
|
|
132
|
+
/**
|
|
133
|
+
* Safe wallet address (present when wallet_type is "safe").
|
|
134
|
+
*/
|
|
135
|
+
safe_address?: string | null;
|
|
136
|
+
}
|
|
137
|
+
namespace Wallet {
|
|
138
|
+
interface Balance {
|
|
139
|
+
/**
|
|
140
|
+
* Token symbol (e.g. "USDC").
|
|
141
|
+
*/
|
|
142
|
+
token: string;
|
|
143
|
+
/**
|
|
144
|
+
* Human-readable balance (e.g. "100.50").
|
|
145
|
+
*/
|
|
146
|
+
balance: string;
|
|
147
|
+
/**
|
|
148
|
+
* Token decimal places.
|
|
149
|
+
*/
|
|
150
|
+
decimals: number;
|
|
151
|
+
/**
|
|
152
|
+
* Raw balance in smallest unit (e.g. "100500000").
|
|
153
|
+
*/
|
|
154
|
+
raw_balance: string;
|
|
155
|
+
/**
|
|
156
|
+
* ERC-20 contract address. Null for native token.
|
|
157
|
+
*/
|
|
158
|
+
contract_address?: string | null;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
export interface WalletExportKeyResponse {
|
|
163
|
+
/**
|
|
164
|
+
* Hex-encoded private key (0x-prefixed).
|
|
165
|
+
*/
|
|
166
|
+
private_key: string;
|
|
167
|
+
}
|
|
168
|
+
export interface WalletExportKeyParams {
|
|
169
|
+
/**
|
|
170
|
+
* Type of wallet to export ("eoa" or "safe").
|
|
171
|
+
*/
|
|
172
|
+
wallet_type?: 'eoa' | 'safe';
|
|
173
|
+
}
|
|
174
|
+
export declare namespace Wallet {
|
|
175
|
+
export { type WalletRetrieveResponse as WalletRetrieveResponse, type WalletExportKeyResponse as WalletExportKeyResponse, type WalletExportKeyParams as WalletExportKeyParams, };
|
|
176
|
+
}
|
|
177
|
+
//# sourceMappingURL=wallet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../src/resources/wallet.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;IAItE;;;;;;OAMG;IACH,SAAS,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CA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";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Wallet = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
class Wallet extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Returns the current state of the managed wallet, session signer, and linked
|
|
9
|
+
* exchanges.
|
|
10
|
+
*/
|
|
11
|
+
retrieve(options) {
|
|
12
|
+
return this._client.get('/api/v1/wallet', options);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Exports the private key for a managed wallet. The key is retrieved via
|
|
16
|
+
* HPKE-encrypted exchange with Privy and returned in hex format.
|
|
17
|
+
*
|
|
18
|
+
* **Security:** Treat the returned key as highly sensitive. Anyone with access to
|
|
19
|
+
* it has full control over the wallet and its funds.
|
|
20
|
+
*/
|
|
21
|
+
exportKey(body, options) {
|
|
22
|
+
return this._client.post('/api/v1/wallet/export-key', { body, ...options });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.Wallet = Wallet;
|
|
26
|
+
//# sourceMappingURL=wallet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallet.js","sourceRoot":"","sources":["../src/resources/wallet.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;OAGG;IACH,QAAQ,CAAC,OAAwB;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACrD,CAAC;IAED;;;;;;OAMG;IACH,SAAS,CAAC,IAA2B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;CACF;AAnBD,wBAmBC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
export class Wallet extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Returns the current state of the managed wallet, session signer, and linked
|
|
6
|
+
* exchanges.
|
|
7
|
+
*/
|
|
8
|
+
retrieve(options) {
|
|
9
|
+
return this._client.get('/api/v1/wallet', options);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Exports the private key for a managed wallet. The key is retrieved via
|
|
13
|
+
* HPKE-encrypted exchange with Privy and returned in hex format.
|
|
14
|
+
*
|
|
15
|
+
* **Security:** Treat the returned key as highly sensitive. Anyone with access to
|
|
16
|
+
* it has full control over the wallet and its funds.
|
|
17
|
+
*/
|
|
18
|
+
exportKey(body, options) {
|
|
19
|
+
return this._client.post('/api/v1/wallet/export-key', { body, ...options });
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=wallet.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallet.mjs","sourceRoot":"","sources":["../src/resources/wallet.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;OAGG;IACH,QAAQ,CAAC,OAAwB;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACrD,CAAC;IAED;;;;;;OAMG;IACH,SAAS,CAAC,IAA2B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;CACF"}
|