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,32 @@
|
|
|
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.Builder = void 0;
|
|
5
|
+
const tslib_1 = require("../../internal/tslib.js");
|
|
6
|
+
const resource_1 = require("../../core/resource.js");
|
|
7
|
+
const EscrowAPI = tslib_1.__importStar(require("./escrow.js"));
|
|
8
|
+
const escrow_1 = require("./escrow.js");
|
|
9
|
+
const OnboardAPI = tslib_1.__importStar(require("./onboard.js"));
|
|
10
|
+
const onboard_1 = require("./onboard.js");
|
|
11
|
+
const UsersAPI = tslib_1.__importStar(require("./users.js"));
|
|
12
|
+
const users_1 = require("./users.js");
|
|
13
|
+
class Builder extends resource_1.APIResource {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.users = new UsersAPI.Users(this._client);
|
|
17
|
+
this.onboard = new OnboardAPI.Onboard(this._client);
|
|
18
|
+
this.escrow = new EscrowAPI.Escrow(this._client);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Returns the builder's QPS pool allocation, end-user count, and total allocated
|
|
22
|
+
* QPS.
|
|
23
|
+
*/
|
|
24
|
+
pool(options) {
|
|
25
|
+
return this._client.get('/api/v1/builder/pool', options);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.Builder = Builder;
|
|
29
|
+
Builder.Users = users_1.Users;
|
|
30
|
+
Builder.Onboard = onboard_1.Onboard;
|
|
31
|
+
Builder.Escrow = escrow_1.Escrow;
|
|
32
|
+
//# sourceMappingURL=builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder.js","sourceRoot":"","sources":["../../src/resources/builder/builder.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,+DAAsC;AACtC,wCAAwD;AACxD,iEAAwC;AACxC,0CAAgF;AAChF,6DAAoC;AACpC,sCASiB;AAIjB,MAAa,OAAQ,SAAQ,sBAAW;IAAxC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAShE,CAAC;IAPC;;;OAGG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;CACF;AAZD,0BAYC;AAmBD,OAAO,CAAC,KAAK,GAAG,aAAK,CAAC;AACtB,OAAO,CAAC,OAAO,GAAG,iBAAO,CAAC;AAC1B,OAAO,CAAC,MAAM,GAAG,eAAM,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import * as EscrowAPI from "./escrow.mjs";
|
|
4
|
+
import { Escrow } from "./escrow.mjs";
|
|
5
|
+
import * as OnboardAPI from "./onboard.mjs";
|
|
6
|
+
import { Onboard } from "./onboard.mjs";
|
|
7
|
+
import * as UsersAPI from "./users.mjs";
|
|
8
|
+
import { Users, } from "./users.mjs";
|
|
9
|
+
export class Builder extends APIResource {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.users = new UsersAPI.Users(this._client);
|
|
13
|
+
this.onboard = new OnboardAPI.Onboard(this._client);
|
|
14
|
+
this.escrow = new EscrowAPI.Escrow(this._client);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Returns the builder's QPS pool allocation, end-user count, and total allocated
|
|
18
|
+
* QPS.
|
|
19
|
+
*/
|
|
20
|
+
pool(options) {
|
|
21
|
+
return this._client.get('/api/v1/builder/pool', options);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
Builder.Users = Users;
|
|
25
|
+
Builder.Onboard = Onboard;
|
|
26
|
+
Builder.Escrow = Escrow;
|
|
27
|
+
//# sourceMappingURL=builder.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder.mjs","sourceRoot":"","sources":["../../src/resources/builder/builder.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,MAAM,EAAwB;OAChC,KAAK,UAAU;OACf,EAAE,OAAO,EAA8C;OACvD,KAAK,QAAQ;OACb,EAQL,KAAK,GACN;AAID,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAShE,CAAC;IAPC;;;OAGG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;CACF;AAmBD,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;AACtB,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;AAC1B,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
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 Escrow extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Returns the builder's fee escrow configuration including contract address, fee
|
|
7
|
+
* rates, and treasury address. Read-only — fee escrow is configured by Parsec
|
|
8
|
+
* admins during onboarding.
|
|
9
|
+
*/
|
|
10
|
+
config(options?: RequestOptions): APIPromise<EscrowConfigResponse>;
|
|
11
|
+
}
|
|
12
|
+
export interface EscrowConfigResponse {
|
|
13
|
+
/**
|
|
14
|
+
* Affiliate fee rate in basis points.
|
|
15
|
+
*/
|
|
16
|
+
affiliate_fee_bps: number;
|
|
17
|
+
/**
|
|
18
|
+
* Escrow smart contract address.
|
|
19
|
+
*/
|
|
20
|
+
escrow_contract_address: string;
|
|
21
|
+
/**
|
|
22
|
+
* Whether fee escrow is enabled for this builder.
|
|
23
|
+
*/
|
|
24
|
+
fee_escrow_enabled: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Minimum fee in basis points.
|
|
27
|
+
*/
|
|
28
|
+
min_fee_bps: number;
|
|
29
|
+
/**
|
|
30
|
+
* Minimum fee in USDC (human-readable).
|
|
31
|
+
*/
|
|
32
|
+
min_fee_usdc: string;
|
|
33
|
+
/**
|
|
34
|
+
* Treasury address for fee distribution.
|
|
35
|
+
*/
|
|
36
|
+
treasury_address: string;
|
|
37
|
+
/**
|
|
38
|
+
* Affiliate fee recipient address.
|
|
39
|
+
*/
|
|
40
|
+
affiliate_address?: string | null;
|
|
41
|
+
/**
|
|
42
|
+
* Fee rate in basis points.
|
|
43
|
+
*/
|
|
44
|
+
fee_bps?: number | null;
|
|
45
|
+
}
|
|
46
|
+
export declare namespace Escrow {
|
|
47
|
+
export { type EscrowConfigResponse as EscrowConfigResponse };
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=escrow.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"escrow.d.mts","sourceRoot":"","sources":["../../src/resources/builder/escrow.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;CAGnE;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,uBAAuB,EAAE,MAAM,CAAC;IAEhC;;OAEG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAE5B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAElC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,oBAAoB,IAAI,oBAAoB,EAAE,CAAC;CAC9D"}
|
|
@@ -0,0 +1,49 @@
|
|
|
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 Escrow extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Returns the builder's fee escrow configuration including contract address, fee
|
|
7
|
+
* rates, and treasury address. Read-only — fee escrow is configured by Parsec
|
|
8
|
+
* admins during onboarding.
|
|
9
|
+
*/
|
|
10
|
+
config(options?: RequestOptions): APIPromise<EscrowConfigResponse>;
|
|
11
|
+
}
|
|
12
|
+
export interface EscrowConfigResponse {
|
|
13
|
+
/**
|
|
14
|
+
* Affiliate fee rate in basis points.
|
|
15
|
+
*/
|
|
16
|
+
affiliate_fee_bps: number;
|
|
17
|
+
/**
|
|
18
|
+
* Escrow smart contract address.
|
|
19
|
+
*/
|
|
20
|
+
escrow_contract_address: string;
|
|
21
|
+
/**
|
|
22
|
+
* Whether fee escrow is enabled for this builder.
|
|
23
|
+
*/
|
|
24
|
+
fee_escrow_enabled: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Minimum fee in basis points.
|
|
27
|
+
*/
|
|
28
|
+
min_fee_bps: number;
|
|
29
|
+
/**
|
|
30
|
+
* Minimum fee in USDC (human-readable).
|
|
31
|
+
*/
|
|
32
|
+
min_fee_usdc: string;
|
|
33
|
+
/**
|
|
34
|
+
* Treasury address for fee distribution.
|
|
35
|
+
*/
|
|
36
|
+
treasury_address: string;
|
|
37
|
+
/**
|
|
38
|
+
* Affiliate fee recipient address.
|
|
39
|
+
*/
|
|
40
|
+
affiliate_address?: string | null;
|
|
41
|
+
/**
|
|
42
|
+
* Fee rate in basis points.
|
|
43
|
+
*/
|
|
44
|
+
fee_bps?: number | null;
|
|
45
|
+
}
|
|
46
|
+
export declare namespace Escrow {
|
|
47
|
+
export { type EscrowConfigResponse as EscrowConfigResponse };
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=escrow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"escrow.d.ts","sourceRoot":"","sources":["../../src/resources/builder/escrow.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;CAGnE;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,uBAAuB,EAAE,MAAM,CAAC;IAEhC;;OAEG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAE5B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAElC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,oBAAoB,IAAI,oBAAoB,EAAE,CAAC;CAC9D"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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.Escrow = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
class Escrow extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Returns the builder's fee escrow configuration including contract address, fee
|
|
9
|
+
* rates, and treasury address. Read-only — fee escrow is configured by Parsec
|
|
10
|
+
* admins during onboarding.
|
|
11
|
+
*/
|
|
12
|
+
config(options) {
|
|
13
|
+
return this._client.get('/api/v1/builder/escrow/config', options);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.Escrow = Escrow;
|
|
17
|
+
//# sourceMappingURL=escrow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"escrow.js","sourceRoot":"","sources":["../../src/resources/builder/escrow.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;OAIG;IACH,MAAM,CAAC,OAAwB;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;CACF;AATD,wBASC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
export class Escrow extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Returns the builder's fee escrow configuration including contract address, fee
|
|
6
|
+
* rates, and treasury address. Read-only — fee escrow is configured by Parsec
|
|
7
|
+
* admins during onboarding.
|
|
8
|
+
*/
|
|
9
|
+
config(options) {
|
|
10
|
+
return this._client.get('/api/v1/builder/escrow/config', options);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=escrow.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"escrow.mjs","sourceRoot":"","sources":["../../src/resources/builder/escrow.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;OAIG;IACH,MAAM,CAAC,OAAwB;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;CACF"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { Builder, type BuilderPoolResponse } from "./builder.mjs";
|
|
2
|
+
export { Escrow, type EscrowConfigResponse } from "./escrow.mjs";
|
|
3
|
+
export { Onboard, type OnboardCreateResponse, type OnboardCreateParams } from "./onboard.mjs";
|
|
4
|
+
export { Users, type UserCreateResponse, type UserRetrieveResponse, type UserUpdateResponse, type UserListResponse, type UserCreateParams, type UserUpdateParams, type UserListParams, } from "./users.mjs";
|
|
5
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/builder/index.ts"],"names":[],"mappings":"OAEO,EAAE,OAAO,EAAE,KAAK,mBAAmB,EAAE;OACrC,EAAE,MAAM,EAAE,KAAK,oBAAoB,EAAE;OACrC,EAAE,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,mBAAmB,EAAE;OACjE,EACL,KAAK,EACL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,cAAc,GACpB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { Builder, type BuilderPoolResponse } from "./builder.js";
|
|
2
|
+
export { Escrow, type EscrowConfigResponse } from "./escrow.js";
|
|
3
|
+
export { Onboard, type OnboardCreateResponse, type OnboardCreateParams } from "./onboard.js";
|
|
4
|
+
export { Users, type UserCreateResponse, type UserRetrieveResponse, type UserUpdateResponse, type UserListResponse, type UserCreateParams, type UserUpdateParams, type UserListParams, } from "./users.js";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/builder/index.ts"],"names":[],"mappings":"OAEO,EAAE,OAAO,EAAE,KAAK,mBAAmB,EAAE;OACrC,EAAE,MAAM,EAAE,KAAK,oBAAoB,EAAE;OACrC,EAAE,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,mBAAmB,EAAE;OACjE,EACL,KAAK,EACL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,cAAc,GACpB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
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.Users = exports.Onboard = exports.Escrow = exports.Builder = void 0;
|
|
5
|
+
var builder_1 = require("./builder.js");
|
|
6
|
+
Object.defineProperty(exports, "Builder", { enumerable: true, get: function () { return builder_1.Builder; } });
|
|
7
|
+
var escrow_1 = require("./escrow.js");
|
|
8
|
+
Object.defineProperty(exports, "Escrow", { enumerable: true, get: function () { return escrow_1.Escrow; } });
|
|
9
|
+
var onboard_1 = require("./onboard.js");
|
|
10
|
+
Object.defineProperty(exports, "Onboard", { enumerable: true, get: function () { return onboard_1.Onboard; } });
|
|
11
|
+
var users_1 = require("./users.js");
|
|
12
|
+
Object.defineProperty(exports, "Users", { enumerable: true, get: function () { return users_1.Users; } });
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/builder/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAA8D;AAArD,kGAAA,OAAO,OAAA;AAChB,sCAA6D;AAApD,gGAAA,MAAM,OAAA;AACf,wCAA0F;AAAjF,kGAAA,OAAO,OAAA;AAChB,oCASiB;AARf,8FAAA,KAAK,OAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
export { Builder } from "./builder.mjs";
|
|
3
|
+
export { Escrow } from "./escrow.mjs";
|
|
4
|
+
export { Onboard } from "./onboard.mjs";
|
|
5
|
+
export { Users, } from "./users.mjs";
|
|
6
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/builder/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,OAAO,EAA4B;OACrC,EAAE,MAAM,EAA6B;OACrC,EAAE,OAAO,EAAwD;OACjE,EACL,KAAK,GAQN"}
|
|
@@ -0,0 +1,163 @@
|
|
|
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 Onboard extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Sets up an end-user for trading on a specific exchange. Managed mode creates
|
|
7
|
+
* wallet + exchange credentials. Self mode stores user-provided credentials.
|
|
8
|
+
*/
|
|
9
|
+
create(body: OnboardCreateParams, options?: RequestOptions): APIPromise<OnboardCreateResponse>;
|
|
10
|
+
}
|
|
11
|
+
export interface OnboardCreateResponse {
|
|
12
|
+
/**
|
|
13
|
+
* Parsec customer ID of the onboarded user.
|
|
14
|
+
*/
|
|
15
|
+
customer_id: string;
|
|
16
|
+
/**
|
|
17
|
+
* Exchange that was onboarded.
|
|
18
|
+
*/
|
|
19
|
+
exchange: string;
|
|
20
|
+
/**
|
|
21
|
+
* Whether fee escrow is enabled for this user.
|
|
22
|
+
*/
|
|
23
|
+
fee_escrow_enabled: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* All exchanges linked to this user.
|
|
26
|
+
*/
|
|
27
|
+
linked_exchanges: Array<string>;
|
|
28
|
+
/**
|
|
29
|
+
* Onboard mode used ("managed" or "self").
|
|
30
|
+
*/
|
|
31
|
+
mode: string;
|
|
32
|
+
/**
|
|
33
|
+
* Onboard status ("complete").
|
|
34
|
+
*/
|
|
35
|
+
status: string;
|
|
36
|
+
/**
|
|
37
|
+
* Steps completed during this call.
|
|
38
|
+
*/
|
|
39
|
+
steps_completed: Array<string>;
|
|
40
|
+
/**
|
|
41
|
+
* Affiliate fee recipient address.
|
|
42
|
+
*/
|
|
43
|
+
affiliate_address?: string | null;
|
|
44
|
+
/**
|
|
45
|
+
* EOA wallet address (managed mode only).
|
|
46
|
+
*/
|
|
47
|
+
eoa_address?: string | null;
|
|
48
|
+
/**
|
|
49
|
+
* Fee rate in basis points.
|
|
50
|
+
*/
|
|
51
|
+
fee_bps?: number | null;
|
|
52
|
+
/**
|
|
53
|
+
* Safe wallet address (present when wallet_type is "safe").
|
|
54
|
+
*/
|
|
55
|
+
safe_address?: string | null;
|
|
56
|
+
wallet?: OnboardCreateResponse.Wallet;
|
|
57
|
+
}
|
|
58
|
+
export declare namespace OnboardCreateResponse {
|
|
59
|
+
interface Wallet {
|
|
60
|
+
/**
|
|
61
|
+
* EVM wallet address on Polygon.
|
|
62
|
+
*/
|
|
63
|
+
eoa_address: string;
|
|
64
|
+
/**
|
|
65
|
+
* Privy wallet identifier.
|
|
66
|
+
*/
|
|
67
|
+
privy_wallet_id: string;
|
|
68
|
+
/**
|
|
69
|
+
* Wallet type ("eoa" or "safe").
|
|
70
|
+
*/
|
|
71
|
+
wallet_type: string;
|
|
72
|
+
/**
|
|
73
|
+
* Token balances for this wallet.
|
|
74
|
+
*/
|
|
75
|
+
balances?: Array<Wallet.Balance> | null;
|
|
76
|
+
/**
|
|
77
|
+
* Chain ID for the wallet (e.g. 137 for Polygon).
|
|
78
|
+
*/
|
|
79
|
+
chain_id?: number | null;
|
|
80
|
+
/**
|
|
81
|
+
* Wallet creation timestamp.
|
|
82
|
+
*/
|
|
83
|
+
created_at?: string | null;
|
|
84
|
+
/**
|
|
85
|
+
* Safe wallet address (present when wallet_type is "safe").
|
|
86
|
+
*/
|
|
87
|
+
safe_address?: string | null;
|
|
88
|
+
}
|
|
89
|
+
namespace Wallet {
|
|
90
|
+
interface Balance {
|
|
91
|
+
/**
|
|
92
|
+
* Token symbol (e.g. "USDC").
|
|
93
|
+
*/
|
|
94
|
+
token: string;
|
|
95
|
+
/**
|
|
96
|
+
* Human-readable balance (e.g. "100.50").
|
|
97
|
+
*/
|
|
98
|
+
balance: string;
|
|
99
|
+
/**
|
|
100
|
+
* Token decimal places.
|
|
101
|
+
*/
|
|
102
|
+
decimals: number;
|
|
103
|
+
/**
|
|
104
|
+
* Raw balance in smallest unit (e.g. "100500000").
|
|
105
|
+
*/
|
|
106
|
+
raw_balance: string;
|
|
107
|
+
/**
|
|
108
|
+
* ERC-20 contract address. Null for native token.
|
|
109
|
+
*/
|
|
110
|
+
contract_address?: string | null;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
export interface OnboardCreateParams {
|
|
115
|
+
/**
|
|
116
|
+
* Parsec customer ID of the end-user to onboard.
|
|
117
|
+
*/
|
|
118
|
+
customer_id: string;
|
|
119
|
+
/**
|
|
120
|
+
* Exchange to onboard ("polymarket" or "kalshi").
|
|
121
|
+
*/
|
|
122
|
+
exchange: string;
|
|
123
|
+
/**
|
|
124
|
+
* Managed = Parsec creates wallet + credentials. Self = you provide credentials.
|
|
125
|
+
*/
|
|
126
|
+
mode: 'managed' | 'self';
|
|
127
|
+
/**
|
|
128
|
+
* Kalshi API key ID (self mode).
|
|
129
|
+
*/
|
|
130
|
+
api_key_id?: string;
|
|
131
|
+
/**
|
|
132
|
+
* Chain ID for Safe wallet creation.
|
|
133
|
+
*/
|
|
134
|
+
chain_id?: number;
|
|
135
|
+
/**
|
|
136
|
+
* Polymarket CLOB API key (self mode).
|
|
137
|
+
*/
|
|
138
|
+
clob_api_key?: string;
|
|
139
|
+
/**
|
|
140
|
+
* Polymarket CLOB API passphrase (self mode).
|
|
141
|
+
*/
|
|
142
|
+
clob_api_passphrase?: string;
|
|
143
|
+
/**
|
|
144
|
+
* Polymarket CLOB API secret (self mode).
|
|
145
|
+
*/
|
|
146
|
+
clob_api_secret?: string;
|
|
147
|
+
/**
|
|
148
|
+
* External wallet address (required when wallet_type is "safe").
|
|
149
|
+
*/
|
|
150
|
+
eoa_address?: string;
|
|
151
|
+
/**
|
|
152
|
+
* Kalshi RSA private key in PEM format (self mode).
|
|
153
|
+
*/
|
|
154
|
+
private_key?: string;
|
|
155
|
+
/**
|
|
156
|
+
* Wallet type for managed mode ("eoa" or "safe").
|
|
157
|
+
*/
|
|
158
|
+
wallet_type?: string;
|
|
159
|
+
}
|
|
160
|
+
export declare namespace Onboard {
|
|
161
|
+
export { type OnboardCreateResponse as OnboardCreateResponse, type OnboardCreateParams as OnboardCreateParams, };
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=onboard.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onboard.d.mts","sourceRoot":"","sources":["../../src/resources/builder/onboard.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,163 @@
|
|
|
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 Onboard extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Sets up an end-user for trading on a specific exchange. Managed mode creates
|
|
7
|
+
* wallet + exchange credentials. Self mode stores user-provided credentials.
|
|
8
|
+
*/
|
|
9
|
+
create(body: OnboardCreateParams, options?: RequestOptions): APIPromise<OnboardCreateResponse>;
|
|
10
|
+
}
|
|
11
|
+
export interface OnboardCreateResponse {
|
|
12
|
+
/**
|
|
13
|
+
* Parsec customer ID of the onboarded user.
|
|
14
|
+
*/
|
|
15
|
+
customer_id: string;
|
|
16
|
+
/**
|
|
17
|
+
* Exchange that was onboarded.
|
|
18
|
+
*/
|
|
19
|
+
exchange: string;
|
|
20
|
+
/**
|
|
21
|
+
* Whether fee escrow is enabled for this user.
|
|
22
|
+
*/
|
|
23
|
+
fee_escrow_enabled: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* All exchanges linked to this user.
|
|
26
|
+
*/
|
|
27
|
+
linked_exchanges: Array<string>;
|
|
28
|
+
/**
|
|
29
|
+
* Onboard mode used ("managed" or "self").
|
|
30
|
+
*/
|
|
31
|
+
mode: string;
|
|
32
|
+
/**
|
|
33
|
+
* Onboard status ("complete").
|
|
34
|
+
*/
|
|
35
|
+
status: string;
|
|
36
|
+
/**
|
|
37
|
+
* Steps completed during this call.
|
|
38
|
+
*/
|
|
39
|
+
steps_completed: Array<string>;
|
|
40
|
+
/**
|
|
41
|
+
* Affiliate fee recipient address.
|
|
42
|
+
*/
|
|
43
|
+
affiliate_address?: string | null;
|
|
44
|
+
/**
|
|
45
|
+
* EOA wallet address (managed mode only).
|
|
46
|
+
*/
|
|
47
|
+
eoa_address?: string | null;
|
|
48
|
+
/**
|
|
49
|
+
* Fee rate in basis points.
|
|
50
|
+
*/
|
|
51
|
+
fee_bps?: number | null;
|
|
52
|
+
/**
|
|
53
|
+
* Safe wallet address (present when wallet_type is "safe").
|
|
54
|
+
*/
|
|
55
|
+
safe_address?: string | null;
|
|
56
|
+
wallet?: OnboardCreateResponse.Wallet;
|
|
57
|
+
}
|
|
58
|
+
export declare namespace OnboardCreateResponse {
|
|
59
|
+
interface Wallet {
|
|
60
|
+
/**
|
|
61
|
+
* EVM wallet address on Polygon.
|
|
62
|
+
*/
|
|
63
|
+
eoa_address: string;
|
|
64
|
+
/**
|
|
65
|
+
* Privy wallet identifier.
|
|
66
|
+
*/
|
|
67
|
+
privy_wallet_id: string;
|
|
68
|
+
/**
|
|
69
|
+
* Wallet type ("eoa" or "safe").
|
|
70
|
+
*/
|
|
71
|
+
wallet_type: string;
|
|
72
|
+
/**
|
|
73
|
+
* Token balances for this wallet.
|
|
74
|
+
*/
|
|
75
|
+
balances?: Array<Wallet.Balance> | null;
|
|
76
|
+
/**
|
|
77
|
+
* Chain ID for the wallet (e.g. 137 for Polygon).
|
|
78
|
+
*/
|
|
79
|
+
chain_id?: number | null;
|
|
80
|
+
/**
|
|
81
|
+
* Wallet creation timestamp.
|
|
82
|
+
*/
|
|
83
|
+
created_at?: string | null;
|
|
84
|
+
/**
|
|
85
|
+
* Safe wallet address (present when wallet_type is "safe").
|
|
86
|
+
*/
|
|
87
|
+
safe_address?: string | null;
|
|
88
|
+
}
|
|
89
|
+
namespace Wallet {
|
|
90
|
+
interface Balance {
|
|
91
|
+
/**
|
|
92
|
+
* Token symbol (e.g. "USDC").
|
|
93
|
+
*/
|
|
94
|
+
token: string;
|
|
95
|
+
/**
|
|
96
|
+
* Human-readable balance (e.g. "100.50").
|
|
97
|
+
*/
|
|
98
|
+
balance: string;
|
|
99
|
+
/**
|
|
100
|
+
* Token decimal places.
|
|
101
|
+
*/
|
|
102
|
+
decimals: number;
|
|
103
|
+
/**
|
|
104
|
+
* Raw balance in smallest unit (e.g. "100500000").
|
|
105
|
+
*/
|
|
106
|
+
raw_balance: string;
|
|
107
|
+
/**
|
|
108
|
+
* ERC-20 contract address. Null for native token.
|
|
109
|
+
*/
|
|
110
|
+
contract_address?: string | null;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
export interface OnboardCreateParams {
|
|
115
|
+
/**
|
|
116
|
+
* Parsec customer ID of the end-user to onboard.
|
|
117
|
+
*/
|
|
118
|
+
customer_id: string;
|
|
119
|
+
/**
|
|
120
|
+
* Exchange to onboard ("polymarket" or "kalshi").
|
|
121
|
+
*/
|
|
122
|
+
exchange: string;
|
|
123
|
+
/**
|
|
124
|
+
* Managed = Parsec creates wallet + credentials. Self = you provide credentials.
|
|
125
|
+
*/
|
|
126
|
+
mode: 'managed' | 'self';
|
|
127
|
+
/**
|
|
128
|
+
* Kalshi API key ID (self mode).
|
|
129
|
+
*/
|
|
130
|
+
api_key_id?: string;
|
|
131
|
+
/**
|
|
132
|
+
* Chain ID for Safe wallet creation.
|
|
133
|
+
*/
|
|
134
|
+
chain_id?: number;
|
|
135
|
+
/**
|
|
136
|
+
* Polymarket CLOB API key (self mode).
|
|
137
|
+
*/
|
|
138
|
+
clob_api_key?: string;
|
|
139
|
+
/**
|
|
140
|
+
* Polymarket CLOB API passphrase (self mode).
|
|
141
|
+
*/
|
|
142
|
+
clob_api_passphrase?: string;
|
|
143
|
+
/**
|
|
144
|
+
* Polymarket CLOB API secret (self mode).
|
|
145
|
+
*/
|
|
146
|
+
clob_api_secret?: string;
|
|
147
|
+
/**
|
|
148
|
+
* External wallet address (required when wallet_type is "safe").
|
|
149
|
+
*/
|
|
150
|
+
eoa_address?: string;
|
|
151
|
+
/**
|
|
152
|
+
* Kalshi RSA private key in PEM format (self mode).
|
|
153
|
+
*/
|
|
154
|
+
private_key?: string;
|
|
155
|
+
/**
|
|
156
|
+
* Wallet type for managed mode ("eoa" or "safe").
|
|
157
|
+
*/
|
|
158
|
+
wallet_type?: string;
|
|
159
|
+
}
|
|
160
|
+
export declare namespace Onboard {
|
|
161
|
+
export { type OnboardCreateResponse as OnboardCreateResponse, type OnboardCreateParams as OnboardCreateParams, };
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=onboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onboard.d.ts","sourceRoot":"","sources":["../../src/resources/builder/onboard.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
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.Onboard = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
class Onboard extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Sets up an end-user for trading on a specific exchange. Managed mode creates
|
|
9
|
+
* wallet + exchange credentials. Self mode stores user-provided credentials.
|
|
10
|
+
*/
|
|
11
|
+
create(body, options) {
|
|
12
|
+
return this._client.post('/api/v1/builder/onboard', { body, ...options });
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.Onboard = Onboard;
|
|
16
|
+
//# sourceMappingURL=onboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onboard.js","sourceRoot":"","sources":["../../src/resources/builder/onboard.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;OAGG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;CACF;AARD,0BAQC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
export class Onboard extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Sets up an end-user for trading on a specific exchange. Managed mode creates
|
|
6
|
+
* wallet + exchange credentials. Self mode stores user-provided credentials.
|
|
7
|
+
*/
|
|
8
|
+
create(body, options) {
|
|
9
|
+
return this._client.post('/api/v1/builder/onboard', { body, ...options });
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=onboard.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onboard.mjs","sourceRoot":"","sources":["../../src/resources/builder/onboard.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;OAGG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;CACF"}
|