@triadxyz/triad-protocol 2.4.7-beta → 2.4.9-beta
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.js +3 -1
- package/dist/types/idl_triad_protocol.json +51 -52
- package/dist/types/triad_protocol.d.ts +51 -52
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -827,11 +827,13 @@ class TriadProtocolClient {
|
|
|
827
827
|
.marketAskOrder({
|
|
828
828
|
shares: new bn_js_1.default(sharesToSell),
|
|
829
829
|
orderDirection: direction,
|
|
830
|
-
bidOrderId: new bn_js_1.default(bidOrderId)
|
|
830
|
+
bidOrderId: new bn_js_1.default(bidOrderId),
|
|
831
|
+
bookOrderBidId: new bn_js_1.default(order.id)
|
|
831
832
|
})
|
|
832
833
|
.accounts({
|
|
833
834
|
signer: this.program.provider.publicKey,
|
|
834
835
|
market: marketPDA,
|
|
836
|
+
buyerAuthority: new web3_js_1.PublicKey(order.authority),
|
|
835
837
|
buyerTrade: this.getUserPDA(new web3_js_1.PublicKey(order.authority), Number(order.userNonce)),
|
|
836
838
|
orderBook: (0, pda_1.getOrderBookPDA)(this.program.programId, marketId),
|
|
837
839
|
mint,
|
|
@@ -2059,12 +2059,12 @@
|
|
|
2059
2059
|
"discriminator": [175, 216, 61, 224, 98, 215, 181, 62]
|
|
2060
2060
|
},
|
|
2061
2061
|
{
|
|
2062
|
-
"name": "
|
|
2063
|
-
"discriminator": [
|
|
2062
|
+
"name": "BookOrderFilledEvent",
|
|
2063
|
+
"discriminator": [143, 95, 119, 33, 30, 15, 222, 175]
|
|
2064
2064
|
},
|
|
2065
2065
|
{
|
|
2066
|
-
"name": "
|
|
2067
|
-
"discriminator": [
|
|
2066
|
+
"name": "MarketEvent",
|
|
2067
|
+
"discriminator": [212, 67, 145, 23, 58, 104, 52, 83]
|
|
2068
2068
|
},
|
|
2069
2069
|
{
|
|
2070
2070
|
"name": "OrderEvent",
|
|
@@ -2206,26 +2206,21 @@
|
|
|
2206
2206
|
},
|
|
2207
2207
|
{
|
|
2208
2208
|
"code": 6024,
|
|
2209
|
-
"name": "Overflow",
|
|
2210
|
-
"msg": "Overflow"
|
|
2211
|
-
},
|
|
2212
|
-
{
|
|
2213
|
-
"code": 6025,
|
|
2214
2209
|
"name": "LinkedBidOrderNotFound",
|
|
2215
2210
|
"msg": "Linked bid order not found"
|
|
2216
2211
|
},
|
|
2217
2212
|
{
|
|
2218
|
-
"code":
|
|
2213
|
+
"code": 6025,
|
|
2219
2214
|
"name": "CurrentFastPoolMarketStillActive",
|
|
2220
2215
|
"msg": "Current fast pool market still active"
|
|
2221
2216
|
},
|
|
2222
2217
|
{
|
|
2223
|
-
"code":
|
|
2218
|
+
"code": 6026,
|
|
2224
2219
|
"name": "MarketAlreadyAggregated",
|
|
2225
2220
|
"msg": "Market already aggregated"
|
|
2226
2221
|
},
|
|
2227
2222
|
{
|
|
2228
|
-
"code":
|
|
2223
|
+
"code": 6027,
|
|
2229
2224
|
"name": "MarketAlreadyPaidOut",
|
|
2230
2225
|
"msg": "Market already paid out"
|
|
2231
2226
|
}
|
|
@@ -2415,6 +2410,46 @@
|
|
|
2415
2410
|
]
|
|
2416
2411
|
}
|
|
2417
2412
|
},
|
|
2413
|
+
{
|
|
2414
|
+
"name": "BookOrderFilledEvent",
|
|
2415
|
+
"type": {
|
|
2416
|
+
"kind": "struct",
|
|
2417
|
+
"fields": [
|
|
2418
|
+
{
|
|
2419
|
+
"name": "market_id",
|
|
2420
|
+
"type": "u64"
|
|
2421
|
+
},
|
|
2422
|
+
{
|
|
2423
|
+
"name": "authority",
|
|
2424
|
+
"type": "pubkey"
|
|
2425
|
+
},
|
|
2426
|
+
{
|
|
2427
|
+
"name": "shares",
|
|
2428
|
+
"type": "u64"
|
|
2429
|
+
},
|
|
2430
|
+
{
|
|
2431
|
+
"name": "price",
|
|
2432
|
+
"type": "u64"
|
|
2433
|
+
},
|
|
2434
|
+
{
|
|
2435
|
+
"name": "order_direction",
|
|
2436
|
+
"type": {
|
|
2437
|
+
"defined": {
|
|
2438
|
+
"name": "OrderDirection"
|
|
2439
|
+
}
|
|
2440
|
+
}
|
|
2441
|
+
},
|
|
2442
|
+
{
|
|
2443
|
+
"name": "rewards",
|
|
2444
|
+
"type": "u64"
|
|
2445
|
+
},
|
|
2446
|
+
{
|
|
2447
|
+
"name": "timestamp",
|
|
2448
|
+
"type": "i64"
|
|
2449
|
+
}
|
|
2450
|
+
]
|
|
2451
|
+
}
|
|
2452
|
+
},
|
|
2418
2453
|
{
|
|
2419
2454
|
"name": "CancelOrderArgs",
|
|
2420
2455
|
"type": {
|
|
@@ -2624,6 +2659,10 @@
|
|
|
2624
2659
|
"name": "bid_order_id",
|
|
2625
2660
|
"type": "u64"
|
|
2626
2661
|
},
|
|
2662
|
+
{
|
|
2663
|
+
"name": "book_order_bid_id",
|
|
2664
|
+
"type": "u64"
|
|
2665
|
+
},
|
|
2627
2666
|
{
|
|
2628
2667
|
"name": "order_direction",
|
|
2629
2668
|
"type": {
|
|
@@ -3096,46 +3135,6 @@
|
|
|
3096
3135
|
]
|
|
3097
3136
|
}
|
|
3098
3137
|
},
|
|
3099
|
-
{
|
|
3100
|
-
"name": "OrderBookFilledEvent",
|
|
3101
|
-
"type": {
|
|
3102
|
-
"kind": "struct",
|
|
3103
|
-
"fields": [
|
|
3104
|
-
{
|
|
3105
|
-
"name": "market_id",
|
|
3106
|
-
"type": "u64"
|
|
3107
|
-
},
|
|
3108
|
-
{
|
|
3109
|
-
"name": "authority",
|
|
3110
|
-
"type": "pubkey"
|
|
3111
|
-
},
|
|
3112
|
-
{
|
|
3113
|
-
"name": "shares",
|
|
3114
|
-
"type": "u64"
|
|
3115
|
-
},
|
|
3116
|
-
{
|
|
3117
|
-
"name": "price",
|
|
3118
|
-
"type": "u64"
|
|
3119
|
-
},
|
|
3120
|
-
{
|
|
3121
|
-
"name": "order_direction",
|
|
3122
|
-
"type": {
|
|
3123
|
-
"defined": {
|
|
3124
|
-
"name": "OrderDirection"
|
|
3125
|
-
}
|
|
3126
|
-
}
|
|
3127
|
-
},
|
|
3128
|
-
{
|
|
3129
|
-
"name": "rewards",
|
|
3130
|
-
"type": "u64"
|
|
3131
|
-
},
|
|
3132
|
-
{
|
|
3133
|
-
"name": "timestamp",
|
|
3134
|
-
"type": "i64"
|
|
3135
|
-
}
|
|
3136
|
-
]
|
|
3137
|
-
}
|
|
3138
|
-
},
|
|
3139
3138
|
{
|
|
3140
3139
|
"name": "OrderDirection",
|
|
3141
3140
|
"type": {
|
|
@@ -2838,12 +2838,12 @@ export type TriadProtocol = {
|
|
|
2838
2838
|
discriminator: [175, 216, 61, 224, 98, 215, 181, 62];
|
|
2839
2839
|
},
|
|
2840
2840
|
{
|
|
2841
|
-
name: '
|
|
2842
|
-
discriminator: [
|
|
2841
|
+
name: 'bookOrderFilledEvent';
|
|
2842
|
+
discriminator: [143, 95, 119, 33, 30, 15, 222, 175];
|
|
2843
2843
|
},
|
|
2844
2844
|
{
|
|
2845
|
-
name: '
|
|
2846
|
-
discriminator: [
|
|
2845
|
+
name: 'marketEvent';
|
|
2846
|
+
discriminator: [212, 67, 145, 23, 58, 104, 52, 83];
|
|
2847
2847
|
},
|
|
2848
2848
|
{
|
|
2849
2849
|
name: 'orderEvent';
|
|
@@ -2985,26 +2985,21 @@ export type TriadProtocol = {
|
|
|
2985
2985
|
},
|
|
2986
2986
|
{
|
|
2987
2987
|
code: 6024;
|
|
2988
|
-
name: 'overflow';
|
|
2989
|
-
msg: 'overflow';
|
|
2990
|
-
},
|
|
2991
|
-
{
|
|
2992
|
-
code: 6025;
|
|
2993
2988
|
name: 'linkedBidOrderNotFound';
|
|
2994
2989
|
msg: 'Linked bid order not found';
|
|
2995
2990
|
},
|
|
2996
2991
|
{
|
|
2997
|
-
code:
|
|
2992
|
+
code: 6025;
|
|
2998
2993
|
name: 'currentFastPoolMarketStillActive';
|
|
2999
2994
|
msg: 'Current fast pool market still active';
|
|
3000
2995
|
},
|
|
3001
2996
|
{
|
|
3002
|
-
code:
|
|
2997
|
+
code: 6026;
|
|
3003
2998
|
name: 'marketAlreadyAggregated';
|
|
3004
2999
|
msg: 'Market already aggregated';
|
|
3005
3000
|
},
|
|
3006
3001
|
{
|
|
3007
|
-
code:
|
|
3002
|
+
code: 6027;
|
|
3008
3003
|
name: 'marketAlreadyPaidOut';
|
|
3009
3004
|
msg: 'Market already paid out';
|
|
3010
3005
|
}
|
|
@@ -3194,6 +3189,46 @@ export type TriadProtocol = {
|
|
|
3194
3189
|
];
|
|
3195
3190
|
};
|
|
3196
3191
|
},
|
|
3192
|
+
{
|
|
3193
|
+
name: 'bookOrderFilledEvent';
|
|
3194
|
+
type: {
|
|
3195
|
+
kind: 'struct';
|
|
3196
|
+
fields: [
|
|
3197
|
+
{
|
|
3198
|
+
name: 'marketId';
|
|
3199
|
+
type: 'u64';
|
|
3200
|
+
},
|
|
3201
|
+
{
|
|
3202
|
+
name: 'authority';
|
|
3203
|
+
type: 'pubkey';
|
|
3204
|
+
},
|
|
3205
|
+
{
|
|
3206
|
+
name: 'shares';
|
|
3207
|
+
type: 'u64';
|
|
3208
|
+
},
|
|
3209
|
+
{
|
|
3210
|
+
name: 'price';
|
|
3211
|
+
type: 'u64';
|
|
3212
|
+
},
|
|
3213
|
+
{
|
|
3214
|
+
name: 'orderDirection';
|
|
3215
|
+
type: {
|
|
3216
|
+
defined: {
|
|
3217
|
+
name: 'orderDirection';
|
|
3218
|
+
};
|
|
3219
|
+
};
|
|
3220
|
+
},
|
|
3221
|
+
{
|
|
3222
|
+
name: 'rewards';
|
|
3223
|
+
type: 'u64';
|
|
3224
|
+
},
|
|
3225
|
+
{
|
|
3226
|
+
name: 'timestamp';
|
|
3227
|
+
type: 'i64';
|
|
3228
|
+
}
|
|
3229
|
+
];
|
|
3230
|
+
};
|
|
3231
|
+
},
|
|
3197
3232
|
{
|
|
3198
3233
|
name: 'cancelOrderArgs';
|
|
3199
3234
|
type: {
|
|
@@ -3403,6 +3438,10 @@ export type TriadProtocol = {
|
|
|
3403
3438
|
name: 'bidOrderId';
|
|
3404
3439
|
type: 'u64';
|
|
3405
3440
|
},
|
|
3441
|
+
{
|
|
3442
|
+
name: 'bookOrderBidId';
|
|
3443
|
+
type: 'u64';
|
|
3444
|
+
},
|
|
3406
3445
|
{
|
|
3407
3446
|
name: 'orderDirection';
|
|
3408
3447
|
type: {
|
|
@@ -3875,46 +3914,6 @@ export type TriadProtocol = {
|
|
|
3875
3914
|
];
|
|
3876
3915
|
};
|
|
3877
3916
|
},
|
|
3878
|
-
{
|
|
3879
|
-
name: 'orderBookFilledEvent';
|
|
3880
|
-
type: {
|
|
3881
|
-
kind: 'struct';
|
|
3882
|
-
fields: [
|
|
3883
|
-
{
|
|
3884
|
-
name: 'marketId';
|
|
3885
|
-
type: 'u64';
|
|
3886
|
-
},
|
|
3887
|
-
{
|
|
3888
|
-
name: 'authority';
|
|
3889
|
-
type: 'pubkey';
|
|
3890
|
-
},
|
|
3891
|
-
{
|
|
3892
|
-
name: 'shares';
|
|
3893
|
-
type: 'u64';
|
|
3894
|
-
},
|
|
3895
|
-
{
|
|
3896
|
-
name: 'price';
|
|
3897
|
-
type: 'u64';
|
|
3898
|
-
},
|
|
3899
|
-
{
|
|
3900
|
-
name: 'orderDirection';
|
|
3901
|
-
type: {
|
|
3902
|
-
defined: {
|
|
3903
|
-
name: 'orderDirection';
|
|
3904
|
-
};
|
|
3905
|
-
};
|
|
3906
|
-
},
|
|
3907
|
-
{
|
|
3908
|
-
name: 'rewards';
|
|
3909
|
-
type: 'u64';
|
|
3910
|
-
},
|
|
3911
|
-
{
|
|
3912
|
-
name: 'timestamp';
|
|
3913
|
-
type: 'i64';
|
|
3914
|
-
}
|
|
3915
|
-
];
|
|
3916
|
-
};
|
|
3917
|
-
},
|
|
3918
3917
|
{
|
|
3919
3918
|
name: 'orderDirection';
|
|
3920
3919
|
type: {
|