@triadxyz/triad-protocol 2.3.7-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 CHANGED
@@ -188,10 +188,16 @@ class TriadProtocolClient {
188
188
  tokenProgram: (0, helpers_1.getTokenProgram)(mint),
189
189
  customer,
190
190
  pool: poolPDA,
191
- orderBook: (0, pda_1.getOrderBookPDA)(this.program.programId, marketId),
192
191
  userTrade
193
192
  })
194
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());
195
201
  return (0, sendVersionedTransaction_1.default)(this.program, ixs, options);
196
202
  });
197
203
  }
@@ -244,11 +250,17 @@ class TriadProtocolClient {
244
250
  mint,
245
251
  tokenProgram: (0, helpers_1.getTokenProgram)(mint),
246
252
  pool: poolPDA,
247
- orderBook: (0, pda_1.getOrderBookPDA)(this.program.programId, market.marketId),
248
253
  customer,
249
254
  userTrade
250
255
  })
251
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());
252
264
  }
253
265
  return (0, sendVersionedTransaction_1.default)(this.program, ixs, options);
254
266
  });
@@ -691,11 +691,6 @@
691
691
  ]
692
692
  }
693
693
  },
694
- {
695
- "name": "order_book",
696
- "writable": true,
697
- "signer": true
698
- },
699
694
  {
700
695
  "name": "mint",
701
696
  "writable": true
@@ -751,6 +746,47 @@
751
746
  }
752
747
  ]
753
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
+ },
754
790
  {
755
791
  "name": "create_pool",
756
792
  "discriminator": [233, 146, 209, 142, 207, 104, 64, 188],
@@ -999,11 +999,6 @@ export type TriadProtocol = {
999
999
  ];
1000
1000
  };
1001
1001
  },
1002
- {
1003
- name: 'orderBook';
1004
- writable: true;
1005
- signer: true;
1006
- },
1007
1002
  {
1008
1003
  name: 'mint';
1009
1004
  writable: true;
@@ -1088,6 +1083,47 @@ export type TriadProtocol = {
1088
1083
  }
1089
1084
  ];
1090
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
+ },
1091
1127
  {
1092
1128
  name: 'createPool';
1093
1129
  discriminator: [233, 146, 209, 142, 207, 104, 64, 188];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triadxyz/triad-protocol",
3
- "version": "2.3.7-beta",
3
+ "version": "2.3.8-beta",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",