@taphubhq/sdk-core 0.23.1 → 0.23.2
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 +4 -2
- package/dist/index.d.mts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +4 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -472,6 +472,8 @@ function normaliseBid(node) {
|
|
|
472
472
|
price2: node.price2,
|
|
473
473
|
status: coerceStatus(node.status),
|
|
474
474
|
payout: node.payout || null,
|
|
475
|
+
refundRate: node.refund_rate ?? null,
|
|
476
|
+
refundAmount: node.refund_amount ?? null,
|
|
475
477
|
slippage: node.slippage,
|
|
476
478
|
createdAt: node.created_at || null,
|
|
477
479
|
meta: parseMeta(node.meta)
|
|
@@ -494,12 +496,12 @@ var PLACE_BID_MUTATION = `mutation PlaceBid($input: PlaceBidInput!) {
|
|
|
494
496
|
}`;
|
|
495
497
|
var MY_BIDS_QUERY = `query MyBids($statuses: [BidStatus!], $limit: Int, $offset: Int, $pairId: ID) {
|
|
496
498
|
myBids(statuses: $statuses, limit: $limit, offset: $offset, pairId: $pairId) {
|
|
497
|
-
id user_id pair_id currency amount coefficient time1 time2 price1 price2 status payout slippage created_at meta
|
|
499
|
+
id user_id pair_id currency amount coefficient time1 time2 price1 price2 status payout refund_rate refund_amount slippage created_at meta
|
|
498
500
|
}
|
|
499
501
|
}`;
|
|
500
502
|
var CANCEL_BID_MUTATION = `mutation CancelBid($input: CancelBidInput!) {
|
|
501
503
|
cancelBid(input: $input) {
|
|
502
|
-
bid { id user_id pair_id currency amount coefficient time1 time2 price1 price2 status cancelled payout slippage created_at meta }
|
|
504
|
+
bid { id user_id pair_id currency amount coefficient time1 time2 price1 price2 status cancelled payout refund_rate refund_amount slippage created_at meta }
|
|
503
505
|
refund_amount
|
|
504
506
|
new_balance
|
|
505
507
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -211,6 +211,16 @@ interface Bid {
|
|
|
211
211
|
status: BidStatus;
|
|
212
212
|
payout: string | null;
|
|
213
213
|
slippage: number;
|
|
214
|
+
/**
|
|
215
|
+
* Refund terms frozen at cancel time. Present only on cancelled bids — absent
|
|
216
|
+
* (or null) on pending/won/lost bids, and on bids reconstructed from realtime
|
|
217
|
+
* store state which doesn't carry per-bid refund. `refundRate` is the rate
|
|
218
|
+
* applied (0.0–1.0); `refundAmount` is the credited amount. Prefer
|
|
219
|
+
* `refundAmount` for display — it's the exact value the server returned, so
|
|
220
|
+
* it needs no recompute from a config rate.
|
|
221
|
+
*/
|
|
222
|
+
refundRate?: string | null;
|
|
223
|
+
refundAmount?: string | null;
|
|
214
224
|
/** ISO-8601 string passthrough from the server. */
|
|
215
225
|
createdAt: string | null;
|
|
216
226
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -211,6 +211,16 @@ interface Bid {
|
|
|
211
211
|
status: BidStatus;
|
|
212
212
|
payout: string | null;
|
|
213
213
|
slippage: number;
|
|
214
|
+
/**
|
|
215
|
+
* Refund terms frozen at cancel time. Present only on cancelled bids — absent
|
|
216
|
+
* (or null) on pending/won/lost bids, and on bids reconstructed from realtime
|
|
217
|
+
* store state which doesn't carry per-bid refund. `refundRate` is the rate
|
|
218
|
+
* applied (0.0–1.0); `refundAmount` is the credited amount. Prefer
|
|
219
|
+
* `refundAmount` for display — it's the exact value the server returned, so
|
|
220
|
+
* it needs no recompute from a config rate.
|
|
221
|
+
*/
|
|
222
|
+
refundRate?: string | null;
|
|
223
|
+
refundAmount?: string | null;
|
|
214
224
|
/** ISO-8601 string passthrough from the server. */
|
|
215
225
|
createdAt: string | null;
|
|
216
226
|
/**
|
package/dist/index.js
CHANGED
|
@@ -407,6 +407,8 @@ function normaliseBid(node) {
|
|
|
407
407
|
price2: node.price2,
|
|
408
408
|
status: coerceStatus(node.status),
|
|
409
409
|
payout: node.payout || null,
|
|
410
|
+
refundRate: node.refund_rate ?? null,
|
|
411
|
+
refundAmount: node.refund_amount ?? null,
|
|
410
412
|
slippage: node.slippage,
|
|
411
413
|
createdAt: node.created_at || null,
|
|
412
414
|
meta: parseMeta(node.meta)
|
|
@@ -429,12 +431,12 @@ var PLACE_BID_MUTATION = `mutation PlaceBid($input: PlaceBidInput!) {
|
|
|
429
431
|
}`;
|
|
430
432
|
var MY_BIDS_QUERY = `query MyBids($statuses: [BidStatus!], $limit: Int, $offset: Int, $pairId: ID) {
|
|
431
433
|
myBids(statuses: $statuses, limit: $limit, offset: $offset, pairId: $pairId) {
|
|
432
|
-
id user_id pair_id currency amount coefficient time1 time2 price1 price2 status payout slippage created_at meta
|
|
434
|
+
id user_id pair_id currency amount coefficient time1 time2 price1 price2 status payout refund_rate refund_amount slippage created_at meta
|
|
433
435
|
}
|
|
434
436
|
}`;
|
|
435
437
|
var CANCEL_BID_MUTATION = `mutation CancelBid($input: CancelBidInput!) {
|
|
436
438
|
cancelBid(input: $input) {
|
|
437
|
-
bid { id user_id pair_id currency amount coefficient time1 time2 price1 price2 status cancelled payout slippage created_at meta }
|
|
439
|
+
bid { id user_id pair_id currency amount coefficient time1 time2 price1 price2 status cancelled payout refund_rate refund_amount slippage created_at meta }
|
|
438
440
|
refund_amount
|
|
439
441
|
new_balance
|
|
440
442
|
}
|