@exponent-labs/exponent-orderbook-idl 0.9.11 → 0.9.12

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.
@@ -175,6 +175,7 @@ export type ExponentOrderbook = {
175
175
  "docs": [
176
176
  "Links the mint_yt & sy_program together"
177
177
  ];
178
+ "writable": true;
178
179
  },
179
180
  {
180
181
  "name": "tokenEscrowSy";
@@ -820,11 +821,19 @@ export type ExponentOrderbook = {
820
821
  "accounts": [
821
822
  {
822
823
  "name": "adminSigner";
824
+ "writable": true;
823
825
  "signer": true;
824
826
  },
825
827
  {
826
828
  "name": "orderbook";
827
829
  "writable": true;
830
+ },
831
+ {
832
+ "name": "cpiAccountOrderbook";
833
+ "writable": true;
834
+ },
835
+ {
836
+ "name": "systemProgram";
828
837
  }
829
838
  ];
830
839
  "args": [
@@ -1899,88 +1908,73 @@ export type ExponentOrderbook = {
1899
1908
  "errors": [
1900
1909
  {
1901
1910
  "code": 6000;
1902
- "name": "invalidOrderbookOwner";
1903
- "msg": "Orderbook account owner mismatch";
1911
+ "name": "offerIndexOutOfBounds";
1912
+ "msg": "Offer index out of bounds";
1904
1913
  },
1905
1914
  {
1906
1915
  "code": 6001;
1907
- "name": "vaultMismatch";
1908
- "msg": "Vault does not match orderbook.vault";
1916
+ "name": "priceNotFound";
1917
+ "msg": "Price not found";
1909
1918
  },
1910
1919
  {
1911
1920
  "code": 6002;
1912
- "name": "yieldPositionMismatch";
1913
- "msg": "Yield position does not match orderbook.yield_position";
1921
+ "name": "incorrectSeller";
1922
+ "msg": "Incorrect seller";
1914
1923
  },
1915
1924
  {
1916
1925
  "code": 6003;
1917
- "name": "altMismatch";
1918
- "msg": "Address lookup table does not match orderbook.address_lookup_table";
1926
+ "name": "incorrectSellerTokenAccount";
1927
+ "msg": "Incorrect seller token account";
1919
1928
  },
1920
1929
  {
1921
1930
  "code": 6004;
1922
- "name": "syEscrowMismatch";
1923
- "msg": "SY escrow does not match orderbook.token_escrow_sy";
1931
+ "name": "invalidOrderType";
1932
+ "msg": "Invalid Order Type";
1924
1933
  },
1925
1934
  {
1926
1935
  "code": 6005;
1927
- "name": "ytEscrowMismatch";
1928
- "msg": "YT escrow does not match orderbook.token_escrow_yt";
1936
+ "name": "fillOrKillOrderNotFilled";
1937
+ "msg": "Fill or Kill order not filled";
1929
1938
  },
1930
1939
  {
1931
1940
  "code": 6006;
1932
- "name": "ptEscrowMismatch";
1933
- "msg": "PT escrow does not match orderbook.token_escrow_pt";
1941
+ "name": "orderbookFull";
1942
+ "msg": "Orderbook full";
1934
1943
  },
1935
1944
  {
1936
1945
  "code": 6007;
1937
- "name": "cpiAccountsMismatch";
1938
- "msg": "CPI accounts orderbook does not match orderbook.cpi_account_orderbook";
1946
+ "name": "priceNodeFull";
1947
+ "msg": "Price Node Full";
1939
1948
  },
1940
1949
  {
1941
1950
  "code": 6008;
1942
- "name": "wrongAdmin";
1943
- "msg": "Wrong admin for orderbook";
1951
+ "name": "exponentOrderbookDiscriminatorMismatch";
1952
+ "msg": "Exponent Orderbook discriminator mismatch";
1944
1953
  },
1945
1954
  {
1946
1955
  "code": 6009;
1947
- "name": "syExchangeRateExpectedToBeGreater";
1948
- "msg": "Current sy exchange rate is smaller than the previous one";
1956
+ "name": "incorrectPriceNodeForOfferIdx";
1957
+ "msg": "Incorrect price node for offer idx";
1949
1958
  },
1950
1959
  {
1951
1960
  "code": 6010;
1952
- "name": "syProgramMismatch";
1953
- "msg": "SY program does not match orderbook.sy_program";
1961
+ "name": "insufficientOutputAmount";
1962
+ "msg": "Insufficient output amount";
1954
1963
  },
1955
1964
  {
1956
1965
  "code": 6011;
1957
- "name": "exponentCoreProgramMismatch";
1958
- "msg": "Exponent Core program does not match orderbook.exponent_core";
1966
+ "name": "orderbookExpired";
1967
+ "msg": "Orderbook is expired";
1959
1968
  },
1960
1969
  {
1961
1970
  "code": 6012;
1962
- "name": "emissionOrderbookMismatch";
1963
- "msg": "Emission orderbook does not match out token account";
1971
+ "name": "exponentOrderbookAlreadyHaveLamports";
1972
+ "msg": "Exponent Orderbook already have lamports";
1964
1973
  },
1965
1974
  {
1966
1975
  "code": 6013;
1967
- "name": "tokenAccountAlreadyInUse";
1968
- "msg": "Token account already in use";
1969
- },
1970
- {
1971
- "code": 6014;
1972
- "name": "priceApyOverflow";
1973
- "msg": "Price APY causes overflow when converted to u32 with given decimals";
1974
- },
1975
- {
1976
- "code": 6015;
1977
- "name": "invalidFeeRate";
1978
- "msg": "Fee rate configuration must produce a fee between 0% and 100%";
1979
- },
1980
- {
1981
- "code": 6016;
1982
- "name": "offerIdxMismatch";
1983
- "msg": "Offer index mismatch";
1976
+ "name": "maxFilledOffersLimitReached";
1977
+ "msg": "Max filled offers limit reached with remaining counter offers available";
1984
1978
  }
1985
1979
  ];
1986
1980
  "types": [
@@ -2918,6 +2912,33 @@ export type ExponentOrderbook = {
2918
2912
  "fields": [
2919
2913
  "f64"
2920
2914
  ];
2915
+ },
2916
+ {
2917
+ "name": "changeCpiAccounts";
2918
+ "fields": [
2919
+ {
2920
+ "name": "cpiAccounts";
2921
+ "type": {
2922
+ "defined": {
2923
+ "name": "cpiAccounts";
2924
+ };
2925
+ };
2926
+ },
2927
+ {
2928
+ "name": "exponentCoreCpiAccounts";
2929
+ "type": {
2930
+ "defined": {
2931
+ "name": "exponentCoreCpiAccounts";
2932
+ };
2933
+ };
2934
+ }
2935
+ ];
2936
+ },
2937
+ {
2938
+ "name": "addressLookupTable";
2939
+ "fields": [
2940
+ "pubkey"
2941
+ ];
2921
2942
  }
2922
2943
  ];
2923
2944
  };
@@ -168,7 +168,8 @@
168
168
  "name": "vault",
169
169
  "docs": [
170
170
  "Links the mint_yt & sy_program together"
171
- ]
171
+ ],
172
+ "writable": true
172
173
  },
173
174
  {
174
175
  "name": "token_escrow_sy",
@@ -814,11 +815,19 @@
814
815
  "accounts": [
815
816
  {
816
817
  "name": "admin_signer",
818
+ "writable": true,
817
819
  "signer": true
818
820
  },
819
821
  {
820
822
  "name": "orderbook",
821
823
  "writable": true
824
+ },
825
+ {
826
+ "name": "cpi_account_orderbook",
827
+ "writable": true
828
+ },
829
+ {
830
+ "name": "system_program"
822
831
  }
823
832
  ],
824
833
  "args": [
@@ -1893,88 +1902,73 @@
1893
1902
  "errors": [
1894
1903
  {
1895
1904
  "code": 6000,
1896
- "name": "InvalidOrderbookOwner",
1897
- "msg": "Orderbook account owner mismatch"
1905
+ "name": "OfferIndexOutOfBounds",
1906
+ "msg": "Offer index out of bounds"
1898
1907
  },
1899
1908
  {
1900
1909
  "code": 6001,
1901
- "name": "VaultMismatch",
1902
- "msg": "Vault does not match orderbook.vault"
1910
+ "name": "PriceNotFound",
1911
+ "msg": "Price not found"
1903
1912
  },
1904
1913
  {
1905
1914
  "code": 6002,
1906
- "name": "YieldPositionMismatch",
1907
- "msg": "Yield position does not match orderbook.yield_position"
1915
+ "name": "IncorrectSeller",
1916
+ "msg": "Incorrect seller"
1908
1917
  },
1909
1918
  {
1910
1919
  "code": 6003,
1911
- "name": "AltMismatch",
1912
- "msg": "Address lookup table does not match orderbook.address_lookup_table"
1920
+ "name": "IncorrectSellerTokenAccount",
1921
+ "msg": "Incorrect seller token account"
1913
1922
  },
1914
1923
  {
1915
1924
  "code": 6004,
1916
- "name": "SyEscrowMismatch",
1917
- "msg": "SY escrow does not match orderbook.token_escrow_sy"
1925
+ "name": "InvalidOrderType",
1926
+ "msg": "Invalid Order Type"
1918
1927
  },
1919
1928
  {
1920
1929
  "code": 6005,
1921
- "name": "YtEscrowMismatch",
1922
- "msg": "YT escrow does not match orderbook.token_escrow_yt"
1930
+ "name": "FillOrKillOrderNotFilled",
1931
+ "msg": "Fill or Kill order not filled"
1923
1932
  },
1924
1933
  {
1925
1934
  "code": 6006,
1926
- "name": "PtEscrowMismatch",
1927
- "msg": "PT escrow does not match orderbook.token_escrow_pt"
1935
+ "name": "OrderbookFull",
1936
+ "msg": "Orderbook full"
1928
1937
  },
1929
1938
  {
1930
1939
  "code": 6007,
1931
- "name": "CpiAccountsMismatch",
1932
- "msg": "CPI accounts orderbook does not match orderbook.cpi_account_orderbook"
1940
+ "name": "PriceNodeFull",
1941
+ "msg": "Price Node Full"
1933
1942
  },
1934
1943
  {
1935
1944
  "code": 6008,
1936
- "name": "WrongAdmin",
1937
- "msg": "Wrong admin for orderbook"
1945
+ "name": "ExponentOrderbookDiscriminatorMismatch",
1946
+ "msg": "Exponent Orderbook discriminator mismatch"
1938
1947
  },
1939
1948
  {
1940
1949
  "code": 6009,
1941
- "name": "SyExchangeRateExpectedToBeGreater",
1942
- "msg": "Current sy exchange rate is smaller than the previous one"
1950
+ "name": "IncorrectPriceNodeForOfferIdx",
1951
+ "msg": "Incorrect price node for offer idx"
1943
1952
  },
1944
1953
  {
1945
1954
  "code": 6010,
1946
- "name": "SyProgramMismatch",
1947
- "msg": "SY program does not match orderbook.sy_program"
1955
+ "name": "InsufficientOutputAmount",
1956
+ "msg": "Insufficient output amount"
1948
1957
  },
1949
1958
  {
1950
1959
  "code": 6011,
1951
- "name": "ExponentCoreProgramMismatch",
1952
- "msg": "Exponent Core program does not match orderbook.exponent_core"
1960
+ "name": "OrderbookExpired",
1961
+ "msg": "Orderbook is expired"
1953
1962
  },
1954
1963
  {
1955
1964
  "code": 6012,
1956
- "name": "EmissionOrderbookMismatch",
1957
- "msg": "Emission orderbook does not match out token account"
1965
+ "name": "ExponentOrderbookAlreadyHaveLamports",
1966
+ "msg": "Exponent Orderbook already have lamports"
1958
1967
  },
1959
1968
  {
1960
1969
  "code": 6013,
1961
- "name": "TokenAccountAlreadyInUse",
1962
- "msg": "Token account already in use"
1963
- },
1964
- {
1965
- "code": 6014,
1966
- "name": "PriceApyOverflow",
1967
- "msg": "Price APY causes overflow when converted to u32 with given decimals"
1968
- },
1969
- {
1970
- "code": 6015,
1971
- "name": "InvalidFeeRate",
1972
- "msg": "Fee rate configuration must produce a fee between 0% and 100%"
1973
- },
1974
- {
1975
- "code": 6016,
1976
- "name": "OfferIdxMismatch",
1977
- "msg": "Offer index mismatch"
1970
+ "name": "MaxFilledOffersLimitReached",
1971
+ "msg": "Max filled offers limit reached with remaining counter offers available"
1978
1972
  }
1979
1973
  ],
1980
1974
  "types": [
@@ -2912,6 +2906,33 @@
2912
2906
  "fields": [
2913
2907
  "f64"
2914
2908
  ]
2909
+ },
2910
+ {
2911
+ "name": "ChangeCpiAccounts",
2912
+ "fields": [
2913
+ {
2914
+ "name": "cpi_accounts",
2915
+ "type": {
2916
+ "defined": {
2917
+ "name": "CpiAccounts"
2918
+ }
2919
+ }
2920
+ },
2921
+ {
2922
+ "name": "exponent_core_cpi_accounts",
2923
+ "type": {
2924
+ "defined": {
2925
+ "name": "ExponentCoreCpiAccounts"
2926
+ }
2927
+ }
2928
+ }
2929
+ ]
2930
+ },
2931
+ {
2932
+ "name": "AddressLookupTable",
2933
+ "fields": [
2934
+ "pubkey"
2935
+ ]
2915
2936
  }
2916
2937
  ]
2917
2938
  }
package/build/index.d.ts CHANGED
@@ -240,12 +240,16 @@ export declare const IDL: {
240
240
  discriminator: number[];
241
241
  accounts: ({
242
242
  name: string;
243
+ writable: boolean;
243
244
  signer: boolean;
244
- writable?: undefined;
245
245
  } | {
246
246
  name: string;
247
247
  writable: boolean;
248
248
  signer?: undefined;
249
+ } | {
250
+ name: string;
251
+ writable?: undefined;
252
+ signer?: undefined;
249
253
  })[];
250
254
  args: {
251
255
  name: string;
@@ -422,6 +426,28 @@ export declare const IDL: {
422
426
  };
423
427
  docs?: undefined;
424
428
  repr?: undefined;
429
+ } | {
430
+ name: string;
431
+ type: {
432
+ kind: string;
433
+ variants: ({
434
+ name: string;
435
+ fields: string[];
436
+ } | {
437
+ name: string;
438
+ fields: {
439
+ name: string;
440
+ type: {
441
+ defined: {
442
+ name: string;
443
+ };
444
+ };
445
+ }[];
446
+ })[];
447
+ fields?: undefined;
448
+ };
449
+ docs?: undefined;
450
+ repr?: undefined;
425
451
  } | {
426
452
  name: string;
427
453
  type: {
package/build/index.js CHANGED
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
19
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
20
  };
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.PROGRAM_ID = exports.IDL = void 0;
30
40
  __exportStar(require("./exponent_orderbook"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAoC;AACpC,+DAAgD;AACnC,QAAA,GAAG,GAAG,GAAG,CAAA;AACT,QAAA,UAAU,GAAU,GAAG,CAAC,OAAO,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAoC;AACpC,+DAAgD;AACnC,QAAA,GAAG,GAAG,GAAG,CAAA;AACT,QAAA,UAAU,GAAU,GAAG,CAAC,OAAO,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exponent-labs/exponent-orderbook-idl",
3
- "version": "0.9.11",
3
+ "version": "0.9.12",
4
4
  "main": "build/index.js",
5
5
  "types": "build/index.d.ts",
6
6
  "license": "AGPL-3.0",
@@ -168,7 +168,8 @@
168
168
  "name": "vault",
169
169
  "docs": [
170
170
  "Links the mint_yt & sy_program together"
171
- ]
171
+ ],
172
+ "writable": true
172
173
  },
173
174
  {
174
175
  "name": "token_escrow_sy",
@@ -814,11 +815,19 @@
814
815
  "accounts": [
815
816
  {
816
817
  "name": "admin_signer",
818
+ "writable": true,
817
819
  "signer": true
818
820
  },
819
821
  {
820
822
  "name": "orderbook",
821
823
  "writable": true
824
+ },
825
+ {
826
+ "name": "cpi_account_orderbook",
827
+ "writable": true
828
+ },
829
+ {
830
+ "name": "system_program"
822
831
  }
823
832
  ],
824
833
  "args": [
@@ -1893,88 +1902,73 @@
1893
1902
  "errors": [
1894
1903
  {
1895
1904
  "code": 6000,
1896
- "name": "InvalidOrderbookOwner",
1897
- "msg": "Orderbook account owner mismatch"
1905
+ "name": "OfferIndexOutOfBounds",
1906
+ "msg": "Offer index out of bounds"
1898
1907
  },
1899
1908
  {
1900
1909
  "code": 6001,
1901
- "name": "VaultMismatch",
1902
- "msg": "Vault does not match orderbook.vault"
1910
+ "name": "PriceNotFound",
1911
+ "msg": "Price not found"
1903
1912
  },
1904
1913
  {
1905
1914
  "code": 6002,
1906
- "name": "YieldPositionMismatch",
1907
- "msg": "Yield position does not match orderbook.yield_position"
1915
+ "name": "IncorrectSeller",
1916
+ "msg": "Incorrect seller"
1908
1917
  },
1909
1918
  {
1910
1919
  "code": 6003,
1911
- "name": "AltMismatch",
1912
- "msg": "Address lookup table does not match orderbook.address_lookup_table"
1920
+ "name": "IncorrectSellerTokenAccount",
1921
+ "msg": "Incorrect seller token account"
1913
1922
  },
1914
1923
  {
1915
1924
  "code": 6004,
1916
- "name": "SyEscrowMismatch",
1917
- "msg": "SY escrow does not match orderbook.token_escrow_sy"
1925
+ "name": "InvalidOrderType",
1926
+ "msg": "Invalid Order Type"
1918
1927
  },
1919
1928
  {
1920
1929
  "code": 6005,
1921
- "name": "YtEscrowMismatch",
1922
- "msg": "YT escrow does not match orderbook.token_escrow_yt"
1930
+ "name": "FillOrKillOrderNotFilled",
1931
+ "msg": "Fill or Kill order not filled"
1923
1932
  },
1924
1933
  {
1925
1934
  "code": 6006,
1926
- "name": "PtEscrowMismatch",
1927
- "msg": "PT escrow does not match orderbook.token_escrow_pt"
1935
+ "name": "OrderbookFull",
1936
+ "msg": "Orderbook full"
1928
1937
  },
1929
1938
  {
1930
1939
  "code": 6007,
1931
- "name": "CpiAccountsMismatch",
1932
- "msg": "CPI accounts orderbook does not match orderbook.cpi_account_orderbook"
1940
+ "name": "PriceNodeFull",
1941
+ "msg": "Price Node Full"
1933
1942
  },
1934
1943
  {
1935
1944
  "code": 6008,
1936
- "name": "WrongAdmin",
1937
- "msg": "Wrong admin for orderbook"
1945
+ "name": "ExponentOrderbookDiscriminatorMismatch",
1946
+ "msg": "Exponent Orderbook discriminator mismatch"
1938
1947
  },
1939
1948
  {
1940
1949
  "code": 6009,
1941
- "name": "SyExchangeRateExpectedToBeGreater",
1942
- "msg": "Current sy exchange rate is smaller than the previous one"
1950
+ "name": "IncorrectPriceNodeForOfferIdx",
1951
+ "msg": "Incorrect price node for offer idx"
1943
1952
  },
1944
1953
  {
1945
1954
  "code": 6010,
1946
- "name": "SyProgramMismatch",
1947
- "msg": "SY program does not match orderbook.sy_program"
1955
+ "name": "InsufficientOutputAmount",
1956
+ "msg": "Insufficient output amount"
1948
1957
  },
1949
1958
  {
1950
1959
  "code": 6011,
1951
- "name": "ExponentCoreProgramMismatch",
1952
- "msg": "Exponent Core program does not match orderbook.exponent_core"
1960
+ "name": "OrderbookExpired",
1961
+ "msg": "Orderbook is expired"
1953
1962
  },
1954
1963
  {
1955
1964
  "code": 6012,
1956
- "name": "EmissionOrderbookMismatch",
1957
- "msg": "Emission orderbook does not match out token account"
1965
+ "name": "ExponentOrderbookAlreadyHaveLamports",
1966
+ "msg": "Exponent Orderbook already have lamports"
1958
1967
  },
1959
1968
  {
1960
1969
  "code": 6013,
1961
- "name": "TokenAccountAlreadyInUse",
1962
- "msg": "Token account already in use"
1963
- },
1964
- {
1965
- "code": 6014,
1966
- "name": "PriceApyOverflow",
1967
- "msg": "Price APY causes overflow when converted to u32 with given decimals"
1968
- },
1969
- {
1970
- "code": 6015,
1971
- "name": "InvalidFeeRate",
1972
- "msg": "Fee rate configuration must produce a fee between 0% and 100%"
1973
- },
1974
- {
1975
- "code": 6016,
1976
- "name": "OfferIdxMismatch",
1977
- "msg": "Offer index mismatch"
1970
+ "name": "MaxFilledOffersLimitReached",
1971
+ "msg": "Max filled offers limit reached with remaining counter offers available"
1978
1972
  }
1979
1973
  ],
1980
1974
  "types": [
@@ -2912,6 +2906,33 @@
2912
2906
  "fields": [
2913
2907
  "f64"
2914
2908
  ]
2909
+ },
2910
+ {
2911
+ "name": "ChangeCpiAccounts",
2912
+ "fields": [
2913
+ {
2914
+ "name": "cpi_accounts",
2915
+ "type": {
2916
+ "defined": {
2917
+ "name": "CpiAccounts"
2918
+ }
2919
+ }
2920
+ },
2921
+ {
2922
+ "name": "exponent_core_cpi_accounts",
2923
+ "type": {
2924
+ "defined": {
2925
+ "name": "ExponentCoreCpiAccounts"
2926
+ }
2927
+ }
2928
+ }
2929
+ ]
2930
+ },
2931
+ {
2932
+ "name": "AddressLookupTable",
2933
+ "fields": [
2934
+ "pubkey"
2935
+ ]
2915
2936
  }
2916
2937
  ]
2917
2938
  }
@@ -3446,4 +3467,4 @@
3446
3467
  }
3447
3468
  }
3448
3469
  ]
3449
- }
3470
+ }
@@ -174,7 +174,8 @@ export type ExponentOrderbook = {
174
174
  "name": "vault",
175
175
  "docs": [
176
176
  "Links the mint_yt & sy_program together"
177
- ]
177
+ ],
178
+ "writable": true
178
179
  },
179
180
  {
180
181
  "name": "tokenEscrowSy",
@@ -820,11 +821,19 @@ export type ExponentOrderbook = {
820
821
  "accounts": [
821
822
  {
822
823
  "name": "adminSigner",
824
+ "writable": true,
823
825
  "signer": true
824
826
  },
825
827
  {
826
828
  "name": "orderbook",
827
829
  "writable": true
830
+ },
831
+ {
832
+ "name": "cpiAccountOrderbook",
833
+ "writable": true
834
+ },
835
+ {
836
+ "name": "systemProgram"
828
837
  }
829
838
  ],
830
839
  "args": [
@@ -1899,88 +1908,73 @@ export type ExponentOrderbook = {
1899
1908
  "errors": [
1900
1909
  {
1901
1910
  "code": 6000,
1902
- "name": "invalidOrderbookOwner",
1903
- "msg": "Orderbook account owner mismatch"
1911
+ "name": "offerIndexOutOfBounds",
1912
+ "msg": "Offer index out of bounds"
1904
1913
  },
1905
1914
  {
1906
1915
  "code": 6001,
1907
- "name": "vaultMismatch",
1908
- "msg": "Vault does not match orderbook.vault"
1916
+ "name": "priceNotFound",
1917
+ "msg": "Price not found"
1909
1918
  },
1910
1919
  {
1911
1920
  "code": 6002,
1912
- "name": "yieldPositionMismatch",
1913
- "msg": "Yield position does not match orderbook.yield_position"
1921
+ "name": "incorrectSeller",
1922
+ "msg": "Incorrect seller"
1914
1923
  },
1915
1924
  {
1916
1925
  "code": 6003,
1917
- "name": "altMismatch",
1918
- "msg": "Address lookup table does not match orderbook.address_lookup_table"
1926
+ "name": "incorrectSellerTokenAccount",
1927
+ "msg": "Incorrect seller token account"
1919
1928
  },
1920
1929
  {
1921
1930
  "code": 6004,
1922
- "name": "syEscrowMismatch",
1923
- "msg": "SY escrow does not match orderbook.token_escrow_sy"
1931
+ "name": "invalidOrderType",
1932
+ "msg": "Invalid Order Type"
1924
1933
  },
1925
1934
  {
1926
1935
  "code": 6005,
1927
- "name": "ytEscrowMismatch",
1928
- "msg": "YT escrow does not match orderbook.token_escrow_yt"
1936
+ "name": "fillOrKillOrderNotFilled",
1937
+ "msg": "Fill or Kill order not filled"
1929
1938
  },
1930
1939
  {
1931
1940
  "code": 6006,
1932
- "name": "ptEscrowMismatch",
1933
- "msg": "PT escrow does not match orderbook.token_escrow_pt"
1941
+ "name": "orderbookFull",
1942
+ "msg": "Orderbook full"
1934
1943
  },
1935
1944
  {
1936
1945
  "code": 6007,
1937
- "name": "cpiAccountsMismatch",
1938
- "msg": "CPI accounts orderbook does not match orderbook.cpi_account_orderbook"
1946
+ "name": "priceNodeFull",
1947
+ "msg": "Price Node Full"
1939
1948
  },
1940
1949
  {
1941
1950
  "code": 6008,
1942
- "name": "wrongAdmin",
1943
- "msg": "Wrong admin for orderbook"
1951
+ "name": "exponentOrderbookDiscriminatorMismatch",
1952
+ "msg": "Exponent Orderbook discriminator mismatch"
1944
1953
  },
1945
1954
  {
1946
1955
  "code": 6009,
1947
- "name": "syExchangeRateExpectedToBeGreater",
1948
- "msg": "Current sy exchange rate is smaller than the previous one"
1956
+ "name": "incorrectPriceNodeForOfferIdx",
1957
+ "msg": "Incorrect price node for offer idx"
1949
1958
  },
1950
1959
  {
1951
1960
  "code": 6010,
1952
- "name": "syProgramMismatch",
1953
- "msg": "SY program does not match orderbook.sy_program"
1961
+ "name": "insufficientOutputAmount",
1962
+ "msg": "Insufficient output amount"
1954
1963
  },
1955
1964
  {
1956
1965
  "code": 6011,
1957
- "name": "exponentCoreProgramMismatch",
1958
- "msg": "Exponent Core program does not match orderbook.exponent_core"
1966
+ "name": "orderbookExpired",
1967
+ "msg": "Orderbook is expired"
1959
1968
  },
1960
1969
  {
1961
1970
  "code": 6012,
1962
- "name": "emissionOrderbookMismatch",
1963
- "msg": "Emission orderbook does not match out token account"
1971
+ "name": "exponentOrderbookAlreadyHaveLamports",
1972
+ "msg": "Exponent Orderbook already have lamports"
1964
1973
  },
1965
1974
  {
1966
1975
  "code": 6013,
1967
- "name": "tokenAccountAlreadyInUse",
1968
- "msg": "Token account already in use"
1969
- },
1970
- {
1971
- "code": 6014,
1972
- "name": "priceApyOverflow",
1973
- "msg": "Price APY causes overflow when converted to u32 with given decimals"
1974
- },
1975
- {
1976
- "code": 6015,
1977
- "name": "invalidFeeRate",
1978
- "msg": "Fee rate configuration must produce a fee between 0% and 100%"
1979
- },
1980
- {
1981
- "code": 6016,
1982
- "name": "offerIdxMismatch",
1983
- "msg": "Offer index mismatch"
1976
+ "name": "maxFilledOffersLimitReached",
1977
+ "msg": "Max filled offers limit reached with remaining counter offers available"
1984
1978
  }
1985
1979
  ],
1986
1980
  "types": [
@@ -2918,6 +2912,33 @@ export type ExponentOrderbook = {
2918
2912
  "fields": [
2919
2913
  "f64"
2920
2914
  ]
2915
+ },
2916
+ {
2917
+ "name": "changeCpiAccounts",
2918
+ "fields": [
2919
+ {
2920
+ "name": "cpiAccounts",
2921
+ "type": {
2922
+ "defined": {
2923
+ "name": "cpiAccounts"
2924
+ }
2925
+ }
2926
+ },
2927
+ {
2928
+ "name": "exponentCoreCpiAccounts",
2929
+ "type": {
2930
+ "defined": {
2931
+ "name": "exponentCoreCpiAccounts"
2932
+ }
2933
+ }
2934
+ }
2935
+ ]
2936
+ },
2937
+ {
2938
+ "name": "addressLookupTable",
2939
+ "fields": [
2940
+ "pubkey"
2941
+ ]
2921
2942
  }
2922
2943
  ]
2923
2944
  }