@agg-build/sdk 4.21.2 → 4.22.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/server.d.mts +36 -2
- package/dist/server.d.ts +36 -2
- package/package.json +1 -1
package/dist/server.d.mts
CHANGED
|
@@ -100,6 +100,40 @@ interface TradesFilledEvent extends WebhookEventBase {
|
|
|
100
100
|
fillSize?: undefined;
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* A self-custody trade's app fee reached its final state. Sent once per trade,
|
|
105
|
+
* a few seconds after `trades.filled` (the fee needs the user's second
|
|
106
|
+
* signature and an on-chain confirmation).
|
|
107
|
+
*/
|
|
108
|
+
interface TradesFeeReconciledEvent extends WebhookEventBase {
|
|
109
|
+
type: "trades.fee_reconciled";
|
|
110
|
+
data: {
|
|
111
|
+
dagRunId: string;
|
|
112
|
+
quoteId: string;
|
|
113
|
+
userId: string;
|
|
114
|
+
/** Every order in the trade. The fee is charged once across all of them. */
|
|
115
|
+
orders: Array<{
|
|
116
|
+
orderId: string;
|
|
117
|
+
externalId: string | null;
|
|
118
|
+
}>;
|
|
119
|
+
/**
|
|
120
|
+
* `confirmed`, `under_collected`, `failed`, `skipped_zero`, … or `none`
|
|
121
|
+
* when no fee applied to the trade.
|
|
122
|
+
*/
|
|
123
|
+
status: string;
|
|
124
|
+
/** Token-native atomic units. `"0"` when `status` is `none`. */
|
|
125
|
+
feeDueRaw: string;
|
|
126
|
+
feeCollectedRaw: string;
|
|
127
|
+
appShareRaw: string;
|
|
128
|
+
platformShareRaw: string;
|
|
129
|
+
chainId: string | null;
|
|
130
|
+
tokenSymbol: string | null;
|
|
131
|
+
tokenAddress: string | null;
|
|
132
|
+
appTxHash: string | null;
|
|
133
|
+
platformTxHash: string | null;
|
|
134
|
+
timestamp: string;
|
|
135
|
+
};
|
|
136
|
+
}
|
|
103
137
|
interface MarketsResolvedEvent extends WebhookEventBase {
|
|
104
138
|
type: "markets.resolved";
|
|
105
139
|
data: {
|
|
@@ -143,7 +177,7 @@ interface UnknownWebhookEvent extends WebhookEventBase {
|
|
|
143
177
|
type: string;
|
|
144
178
|
data: Record<string, unknown>;
|
|
145
179
|
}
|
|
146
|
-
type KnownWebhookEvent = AccountsCreatedEvent | AccountsLinkedEvent | WalletsReadyEvent | TradesPlacedEvent | TradesFilledEvent | MarketsResolvedEvent | DepositsConfirmedEvent;
|
|
180
|
+
type KnownWebhookEvent = AccountsCreatedEvent | AccountsLinkedEvent | WalletsReadyEvent | TradesPlacedEvent | TradesFilledEvent | TradesFeeReconciledEvent | MarketsResolvedEvent | DepositsConfirmedEvent;
|
|
147
181
|
type WebhookEvent = KnownWebhookEvent | UnknownWebhookEvent;
|
|
148
182
|
interface AggAdminClientOptions {
|
|
149
183
|
baseUrl: string;
|
|
@@ -226,4 +260,4 @@ declare class AggAdminClient {
|
|
|
226
260
|
}>;
|
|
227
261
|
}
|
|
228
262
|
|
|
229
|
-
export { type AccountsCreatedEvent, type AccountsLinkedEvent, AggAdminClient, type AggAdminClientOptions, type DepositsConfirmedEvent, type ExternalIdAssertion, type KnownWebhookEvent, type MarketsResolvedEvent, type TradesFilledEvent, type TradesPlacedEvent, type UnknownWebhookEvent, type VerifyWebhookOptions, type WalletsReadyEvent, type WebhookEvent, WebhookVerificationError, parseWebhookEvent, parseWebhookEventAsync, signExternalId, verifyWebhook, verifyWebhookAsync };
|
|
263
|
+
export { type AccountsCreatedEvent, type AccountsLinkedEvent, AggAdminClient, type AggAdminClientOptions, type DepositsConfirmedEvent, type ExternalIdAssertion, type KnownWebhookEvent, type MarketsResolvedEvent, type TradesFeeReconciledEvent, type TradesFilledEvent, type TradesPlacedEvent, type UnknownWebhookEvent, type VerifyWebhookOptions, type WalletsReadyEvent, type WebhookEvent, WebhookVerificationError, parseWebhookEvent, parseWebhookEventAsync, signExternalId, verifyWebhook, verifyWebhookAsync };
|
package/dist/server.d.ts
CHANGED
|
@@ -100,6 +100,40 @@ interface TradesFilledEvent extends WebhookEventBase {
|
|
|
100
100
|
fillSize?: undefined;
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* A self-custody trade's app fee reached its final state. Sent once per trade,
|
|
105
|
+
* a few seconds after `trades.filled` (the fee needs the user's second
|
|
106
|
+
* signature and an on-chain confirmation).
|
|
107
|
+
*/
|
|
108
|
+
interface TradesFeeReconciledEvent extends WebhookEventBase {
|
|
109
|
+
type: "trades.fee_reconciled";
|
|
110
|
+
data: {
|
|
111
|
+
dagRunId: string;
|
|
112
|
+
quoteId: string;
|
|
113
|
+
userId: string;
|
|
114
|
+
/** Every order in the trade. The fee is charged once across all of them. */
|
|
115
|
+
orders: Array<{
|
|
116
|
+
orderId: string;
|
|
117
|
+
externalId: string | null;
|
|
118
|
+
}>;
|
|
119
|
+
/**
|
|
120
|
+
* `confirmed`, `under_collected`, `failed`, `skipped_zero`, … or `none`
|
|
121
|
+
* when no fee applied to the trade.
|
|
122
|
+
*/
|
|
123
|
+
status: string;
|
|
124
|
+
/** Token-native atomic units. `"0"` when `status` is `none`. */
|
|
125
|
+
feeDueRaw: string;
|
|
126
|
+
feeCollectedRaw: string;
|
|
127
|
+
appShareRaw: string;
|
|
128
|
+
platformShareRaw: string;
|
|
129
|
+
chainId: string | null;
|
|
130
|
+
tokenSymbol: string | null;
|
|
131
|
+
tokenAddress: string | null;
|
|
132
|
+
appTxHash: string | null;
|
|
133
|
+
platformTxHash: string | null;
|
|
134
|
+
timestamp: string;
|
|
135
|
+
};
|
|
136
|
+
}
|
|
103
137
|
interface MarketsResolvedEvent extends WebhookEventBase {
|
|
104
138
|
type: "markets.resolved";
|
|
105
139
|
data: {
|
|
@@ -143,7 +177,7 @@ interface UnknownWebhookEvent extends WebhookEventBase {
|
|
|
143
177
|
type: string;
|
|
144
178
|
data: Record<string, unknown>;
|
|
145
179
|
}
|
|
146
|
-
type KnownWebhookEvent = AccountsCreatedEvent | AccountsLinkedEvent | WalletsReadyEvent | TradesPlacedEvent | TradesFilledEvent | MarketsResolvedEvent | DepositsConfirmedEvent;
|
|
180
|
+
type KnownWebhookEvent = AccountsCreatedEvent | AccountsLinkedEvent | WalletsReadyEvent | TradesPlacedEvent | TradesFilledEvent | TradesFeeReconciledEvent | MarketsResolvedEvent | DepositsConfirmedEvent;
|
|
147
181
|
type WebhookEvent = KnownWebhookEvent | UnknownWebhookEvent;
|
|
148
182
|
interface AggAdminClientOptions {
|
|
149
183
|
baseUrl: string;
|
|
@@ -226,4 +260,4 @@ declare class AggAdminClient {
|
|
|
226
260
|
}>;
|
|
227
261
|
}
|
|
228
262
|
|
|
229
|
-
export { type AccountsCreatedEvent, type AccountsLinkedEvent, AggAdminClient, type AggAdminClientOptions, type DepositsConfirmedEvent, type ExternalIdAssertion, type KnownWebhookEvent, type MarketsResolvedEvent, type TradesFilledEvent, type TradesPlacedEvent, type UnknownWebhookEvent, type VerifyWebhookOptions, type WalletsReadyEvent, type WebhookEvent, WebhookVerificationError, parseWebhookEvent, parseWebhookEventAsync, signExternalId, verifyWebhook, verifyWebhookAsync };
|
|
263
|
+
export { type AccountsCreatedEvent, type AccountsLinkedEvent, AggAdminClient, type AggAdminClientOptions, type DepositsConfirmedEvent, type ExternalIdAssertion, type KnownWebhookEvent, type MarketsResolvedEvent, type TradesFeeReconciledEvent, type TradesFilledEvent, type TradesPlacedEvent, type UnknownWebhookEvent, type VerifyWebhookOptions, type WalletsReadyEvent, type WebhookEvent, WebhookVerificationError, parseWebhookEvent, parseWebhookEventAsync, signExternalId, verifyWebhook, verifyWebhookAsync };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agg-build/sdk",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.22.0",
|
|
4
4
|
"description": "Vanilla TypeScript client for the AGG prediction market aggregator (auth, markets, orderbooks, charts, trading, managed execution, WebSockets). Works in browsers, Node.js, and React Native.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "MIT",
|