@triadxyz/triad-protocol 2.3.6-beta → 2.3.8-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 +14 -0
- package/dist/types/idl_triad_protocol.json +41 -16
- package/dist/types/triad_protocol.d.ts +41 -16
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -191,6 +191,13 @@ class TriadProtocolClient {
|
|
|
191
191
|
userTrade
|
|
192
192
|
})
|
|
193
193
|
.instruction());
|
|
194
|
+
ixs.push(yield this.program.methods
|
|
195
|
+
.createOrderBook(new bn_js_1.default(marketId))
|
|
196
|
+
.accounts({
|
|
197
|
+
signer: this.program.provider.publicKey,
|
|
198
|
+
market: (0, pda_1.getMarketPDA)(this.program.programId, marketId)
|
|
199
|
+
})
|
|
200
|
+
.instruction());
|
|
194
201
|
return (0, sendVersionedTransaction_1.default)(this.program, ixs, options);
|
|
195
202
|
});
|
|
196
203
|
}
|
|
@@ -247,6 +254,13 @@ class TriadProtocolClient {
|
|
|
247
254
|
userTrade
|
|
248
255
|
})
|
|
249
256
|
.instruction());
|
|
257
|
+
ixs.push(yield this.program.methods
|
|
258
|
+
.createOrderBook(new bn_js_1.default(market.marketId))
|
|
259
|
+
.accounts({
|
|
260
|
+
signer: this.program.provider.publicKey,
|
|
261
|
+
market: (0, pda_1.getMarketPDA)(this.program.programId, market.marketId)
|
|
262
|
+
})
|
|
263
|
+
.instruction());
|
|
250
264
|
}
|
|
251
265
|
return (0, sendVersionedTransaction_1.default)(this.program, ixs, options);
|
|
252
266
|
});
|
|
@@ -691,22 +691,6 @@
|
|
|
691
691
|
]
|
|
692
692
|
}
|
|
693
693
|
},
|
|
694
|
-
{
|
|
695
|
-
"name": "order_book",
|
|
696
|
-
"writable": true,
|
|
697
|
-
"pda": {
|
|
698
|
-
"seeds": [
|
|
699
|
-
{
|
|
700
|
-
"kind": "const",
|
|
701
|
-
"value": [111, 114, 100, 101, 114, 95, 98, 111, 111, 107]
|
|
702
|
-
},
|
|
703
|
-
{
|
|
704
|
-
"kind": "arg",
|
|
705
|
-
"path": "args.market_id"
|
|
706
|
-
}
|
|
707
|
-
]
|
|
708
|
-
}
|
|
709
|
-
},
|
|
710
694
|
{
|
|
711
695
|
"name": "mint",
|
|
712
696
|
"writable": true
|
|
@@ -762,6 +746,47 @@
|
|
|
762
746
|
}
|
|
763
747
|
]
|
|
764
748
|
},
|
|
749
|
+
{
|
|
750
|
+
"name": "create_order_book",
|
|
751
|
+
"discriminator": [153, 114, 9, 51, 100, 68, 240, 197],
|
|
752
|
+
"accounts": [
|
|
753
|
+
{
|
|
754
|
+
"name": "signer",
|
|
755
|
+
"writable": true,
|
|
756
|
+
"signer": true
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
"name": "market",
|
|
760
|
+
"writable": true
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
"name": "order_book",
|
|
764
|
+
"writable": true,
|
|
765
|
+
"pda": {
|
|
766
|
+
"seeds": [
|
|
767
|
+
{
|
|
768
|
+
"kind": "const",
|
|
769
|
+
"value": [111, 114, 100, 101, 114, 95, 98, 111, 111, 107]
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
"kind": "arg",
|
|
773
|
+
"path": "market_id"
|
|
774
|
+
}
|
|
775
|
+
]
|
|
776
|
+
}
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
"name": "system_program",
|
|
780
|
+
"address": "11111111111111111111111111111111"
|
|
781
|
+
}
|
|
782
|
+
],
|
|
783
|
+
"args": [
|
|
784
|
+
{
|
|
785
|
+
"name": "market_id",
|
|
786
|
+
"type": "u64"
|
|
787
|
+
}
|
|
788
|
+
]
|
|
789
|
+
},
|
|
765
790
|
{
|
|
766
791
|
"name": "create_pool",
|
|
767
792
|
"discriminator": [233, 146, 209, 142, 207, 104, 64, 188],
|
|
@@ -999,22 +999,6 @@ export type TriadProtocol = {
|
|
|
999
999
|
];
|
|
1000
1000
|
};
|
|
1001
1001
|
},
|
|
1002
|
-
{
|
|
1003
|
-
name: 'orderBook';
|
|
1004
|
-
writable: true;
|
|
1005
|
-
pda: {
|
|
1006
|
-
seeds: [
|
|
1007
|
-
{
|
|
1008
|
-
kind: 'const';
|
|
1009
|
-
value: [111, 114, 100, 101, 114, 95, 98, 111, 111, 107];
|
|
1010
|
-
},
|
|
1011
|
-
{
|
|
1012
|
-
kind: 'arg';
|
|
1013
|
-
path: 'args.market_id';
|
|
1014
|
-
}
|
|
1015
|
-
];
|
|
1016
|
-
};
|
|
1017
|
-
},
|
|
1018
1002
|
{
|
|
1019
1003
|
name: 'mint';
|
|
1020
1004
|
writable: true;
|
|
@@ -1099,6 +1083,47 @@ export type TriadProtocol = {
|
|
|
1099
1083
|
}
|
|
1100
1084
|
];
|
|
1101
1085
|
},
|
|
1086
|
+
{
|
|
1087
|
+
name: 'createOrderBook';
|
|
1088
|
+
discriminator: [153, 114, 9, 51, 100, 68, 240, 197];
|
|
1089
|
+
accounts: [
|
|
1090
|
+
{
|
|
1091
|
+
name: 'signer';
|
|
1092
|
+
writable: true;
|
|
1093
|
+
signer: true;
|
|
1094
|
+
},
|
|
1095
|
+
{
|
|
1096
|
+
name: 'market';
|
|
1097
|
+
writable: true;
|
|
1098
|
+
},
|
|
1099
|
+
{
|
|
1100
|
+
name: 'orderBook';
|
|
1101
|
+
writable: true;
|
|
1102
|
+
pda: {
|
|
1103
|
+
seeds: [
|
|
1104
|
+
{
|
|
1105
|
+
kind: 'const';
|
|
1106
|
+
value: [111, 114, 100, 101, 114, 95, 98, 111, 111, 107];
|
|
1107
|
+
},
|
|
1108
|
+
{
|
|
1109
|
+
kind: 'arg';
|
|
1110
|
+
path: 'marketId';
|
|
1111
|
+
}
|
|
1112
|
+
];
|
|
1113
|
+
};
|
|
1114
|
+
},
|
|
1115
|
+
{
|
|
1116
|
+
name: 'systemProgram';
|
|
1117
|
+
address: '11111111111111111111111111111111';
|
|
1118
|
+
}
|
|
1119
|
+
];
|
|
1120
|
+
args: [
|
|
1121
|
+
{
|
|
1122
|
+
name: 'marketId';
|
|
1123
|
+
type: 'u64';
|
|
1124
|
+
}
|
|
1125
|
+
];
|
|
1126
|
+
},
|
|
1102
1127
|
{
|
|
1103
1128
|
name: 'createPool';
|
|
1104
1129
|
discriminator: [233, 146, 209, 142, 207, 104, 64, 188];
|