@predictasiax/api 2.2.0 → 2.4.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/dist/index.cjs +52 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.js +0 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -999,6 +999,48 @@ declare class ApplyResource extends Resource {
|
|
|
999
999
|
declare class SandboxResource extends Resource {
|
|
1000
1000
|
}
|
|
1001
1001
|
|
|
1002
|
+
/**
|
|
1003
|
+
* Settle resource — claim accrued fee revenue (v2.4+).
|
|
1004
|
+
*
|
|
1005
|
+
* Three surfaces:
|
|
1006
|
+
* - `me()` — builder self-serve claim of their own execution +
|
|
1007
|
+
* acquisition builder fees. Uses api-key auth.
|
|
1008
|
+
* - `adminBuilder()` — admin claim of a specific builder's accrued fees.
|
|
1009
|
+
* Requires X-Admin-Key header.
|
|
1010
|
+
* - `adminCreator()` — admin claim of a market creator's FEE_MARKET_CREATOR
|
|
1011
|
+
* fees. Requires X-Admin-Key header.
|
|
1012
|
+
*
|
|
1013
|
+
* All three insert a `withdrawal_state` row with the appropriate source tag
|
|
1014
|
+
* and mark the underlying `financial_event` rows settled. The existing
|
|
1015
|
+
* withdrawal pipeline delivers USDT to the provided address.
|
|
1016
|
+
*/
|
|
1017
|
+
interface SettleParams {
|
|
1018
|
+
address: string;
|
|
1019
|
+
asset?: string;
|
|
1020
|
+
network?: string;
|
|
1021
|
+
min_amount?: number;
|
|
1022
|
+
}
|
|
1023
|
+
interface SettleResult {
|
|
1024
|
+
withdrawal_state_id: string;
|
|
1025
|
+
user_id: string;
|
|
1026
|
+
asset: string;
|
|
1027
|
+
amount: number;
|
|
1028
|
+
event_count: number;
|
|
1029
|
+
network: string;
|
|
1030
|
+
address: string;
|
|
1031
|
+
status: string;
|
|
1032
|
+
note?: string;
|
|
1033
|
+
}
|
|
1034
|
+
declare class SettleResource extends Resource {
|
|
1035
|
+
/** Builder self-serve settle — POST /v1/builders/me/settle. */
|
|
1036
|
+
me(params: SettleParams, opts?: RequestOptions): APIPromise<SettleResult>;
|
|
1037
|
+
/** Admin settle a specific builder's fees — POST /v1/admin/builders/{userId}/settle.
|
|
1038
|
+
* Requires X-Admin-Key header. */
|
|
1039
|
+
adminBuilder(userId: string, params: SettleParams, adminKey: string, opts?: RequestOptions): APIPromise<SettleResult>;
|
|
1040
|
+
/** Admin settle a market creator's fees — POST /v1/admin/creators/{userId}/settle. */
|
|
1041
|
+
adminCreator(userId: string, params: SettleParams, adminKey: string, opts?: RequestOptions): APIPromise<SettleResult>;
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1002
1044
|
/**
|
|
1003
1045
|
* Templates resource — parameterized market blueprints.
|
|
1004
1046
|
*
|
|
@@ -1064,6 +1106,7 @@ declare class PaxClient {
|
|
|
1064
1106
|
readonly grants: GrantsResource;
|
|
1065
1107
|
readonly fees: FeesResource;
|
|
1066
1108
|
readonly audit: AuditResource;
|
|
1109
|
+
readonly settle: SettleResource;
|
|
1067
1110
|
constructor(opts: PaxClientOptions);
|
|
1068
1111
|
get baseUrl(): string;
|
|
1069
1112
|
get userAgent(): string;
|
package/dist/index.d.ts
CHANGED
|
@@ -999,6 +999,48 @@ declare class ApplyResource extends Resource {
|
|
|
999
999
|
declare class SandboxResource extends Resource {
|
|
1000
1000
|
}
|
|
1001
1001
|
|
|
1002
|
+
/**
|
|
1003
|
+
* Settle resource — claim accrued fee revenue (v2.4+).
|
|
1004
|
+
*
|
|
1005
|
+
* Three surfaces:
|
|
1006
|
+
* - `me()` — builder self-serve claim of their own execution +
|
|
1007
|
+
* acquisition builder fees. Uses api-key auth.
|
|
1008
|
+
* - `adminBuilder()` — admin claim of a specific builder's accrued fees.
|
|
1009
|
+
* Requires X-Admin-Key header.
|
|
1010
|
+
* - `adminCreator()` — admin claim of a market creator's FEE_MARKET_CREATOR
|
|
1011
|
+
* fees. Requires X-Admin-Key header.
|
|
1012
|
+
*
|
|
1013
|
+
* All three insert a `withdrawal_state` row with the appropriate source tag
|
|
1014
|
+
* and mark the underlying `financial_event` rows settled. The existing
|
|
1015
|
+
* withdrawal pipeline delivers USDT to the provided address.
|
|
1016
|
+
*/
|
|
1017
|
+
interface SettleParams {
|
|
1018
|
+
address: string;
|
|
1019
|
+
asset?: string;
|
|
1020
|
+
network?: string;
|
|
1021
|
+
min_amount?: number;
|
|
1022
|
+
}
|
|
1023
|
+
interface SettleResult {
|
|
1024
|
+
withdrawal_state_id: string;
|
|
1025
|
+
user_id: string;
|
|
1026
|
+
asset: string;
|
|
1027
|
+
amount: number;
|
|
1028
|
+
event_count: number;
|
|
1029
|
+
network: string;
|
|
1030
|
+
address: string;
|
|
1031
|
+
status: string;
|
|
1032
|
+
note?: string;
|
|
1033
|
+
}
|
|
1034
|
+
declare class SettleResource extends Resource {
|
|
1035
|
+
/** Builder self-serve settle — POST /v1/builders/me/settle. */
|
|
1036
|
+
me(params: SettleParams, opts?: RequestOptions): APIPromise<SettleResult>;
|
|
1037
|
+
/** Admin settle a specific builder's fees — POST /v1/admin/builders/{userId}/settle.
|
|
1038
|
+
* Requires X-Admin-Key header. */
|
|
1039
|
+
adminBuilder(userId: string, params: SettleParams, adminKey: string, opts?: RequestOptions): APIPromise<SettleResult>;
|
|
1040
|
+
/** Admin settle a market creator's fees — POST /v1/admin/creators/{userId}/settle. */
|
|
1041
|
+
adminCreator(userId: string, params: SettleParams, adminKey: string, opts?: RequestOptions): APIPromise<SettleResult>;
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1002
1044
|
/**
|
|
1003
1045
|
* Templates resource — parameterized market blueprints.
|
|
1004
1046
|
*
|
|
@@ -1064,6 +1106,7 @@ declare class PaxClient {
|
|
|
1064
1106
|
readonly grants: GrantsResource;
|
|
1065
1107
|
readonly fees: FeesResource;
|
|
1066
1108
|
readonly audit: AuditResource;
|
|
1109
|
+
readonly settle: SettleResource;
|
|
1067
1110
|
constructor(opts: PaxClientOptions);
|
|
1068
1111
|
get baseUrl(): string;
|
|
1069
1112
|
get userAgent(): string;
|
package/dist/index.js
CHANGED
|
Binary file
|