@exponent-labs/exponent-orderbook-idl 0.9.18 → 0.9.20

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.
@@ -1930,88 +1930,73 @@ export type ExponentOrderbook = {
1930
1930
  "errors": [
1931
1931
  {
1932
1932
  "code": 6000;
1933
- "name": "invalidOrderbookOwner";
1934
- "msg": "Orderbook account owner mismatch";
1933
+ "name": "offerIndexOutOfBounds";
1934
+ "msg": "Offer index out of bounds";
1935
1935
  },
1936
1936
  {
1937
1937
  "code": 6001;
1938
- "name": "vaultMismatch";
1939
- "msg": "Vault does not match orderbook.vault";
1938
+ "name": "priceNotFound";
1939
+ "msg": "Price not found";
1940
1940
  },
1941
1941
  {
1942
1942
  "code": 6002;
1943
- "name": "yieldPositionMismatch";
1944
- "msg": "Yield position does not match orderbook.yield_position";
1943
+ "name": "incorrectSeller";
1944
+ "msg": "Incorrect seller";
1945
1945
  },
1946
1946
  {
1947
1947
  "code": 6003;
1948
- "name": "altMismatch";
1949
- "msg": "Address lookup table does not match orderbook.address_lookup_table";
1948
+ "name": "incorrectSellerTokenAccount";
1949
+ "msg": "Incorrect seller token account";
1950
1950
  },
1951
1951
  {
1952
1952
  "code": 6004;
1953
- "name": "syEscrowMismatch";
1954
- "msg": "SY escrow does not match orderbook.token_escrow_sy";
1953
+ "name": "invalidOrderType";
1954
+ "msg": "Invalid Order Type";
1955
1955
  },
1956
1956
  {
1957
1957
  "code": 6005;
1958
- "name": "ytEscrowMismatch";
1959
- "msg": "YT escrow does not match orderbook.token_escrow_yt";
1958
+ "name": "fillOrKillOrderNotFilled";
1959
+ "msg": "Fill or Kill order not filled";
1960
1960
  },
1961
1961
  {
1962
1962
  "code": 6006;
1963
- "name": "ptEscrowMismatch";
1964
- "msg": "PT escrow does not match orderbook.token_escrow_pt";
1963
+ "name": "orderbookFull";
1964
+ "msg": "Orderbook full";
1965
1965
  },
1966
1966
  {
1967
1967
  "code": 6007;
1968
- "name": "cpiAccountsMismatch";
1969
- "msg": "CPI accounts orderbook does not match orderbook.cpi_account_orderbook";
1968
+ "name": "priceNodeFull";
1969
+ "msg": "Price Node Full";
1970
1970
  },
1971
1971
  {
1972
1972
  "code": 6008;
1973
- "name": "wrongAdmin";
1974
- "msg": "Wrong admin for orderbook";
1973
+ "name": "exponentOrderbookDiscriminatorMismatch";
1974
+ "msg": "Exponent Orderbook discriminator mismatch";
1975
1975
  },
1976
1976
  {
1977
1977
  "code": 6009;
1978
- "name": "syExchangeRateExpectedToBeGreater";
1979
- "msg": "Current sy exchange rate is smaller than the previous one";
1978
+ "name": "incorrectPriceNodeForOfferIdx";
1979
+ "msg": "Incorrect price node for offer idx";
1980
1980
  },
1981
1981
  {
1982
1982
  "code": 6010;
1983
- "name": "syProgramMismatch";
1984
- "msg": "SY program does not match orderbook.sy_program";
1983
+ "name": "insufficientOutputAmount";
1984
+ "msg": "Insufficient output amount";
1985
1985
  },
1986
1986
  {
1987
1987
  "code": 6011;
1988
- "name": "exponentCoreProgramMismatch";
1989
- "msg": "Exponent Core program does not match orderbook.exponent_core";
1988
+ "name": "orderbookExpired";
1989
+ "msg": "Orderbook is expired";
1990
1990
  },
1991
1991
  {
1992
1992
  "code": 6012;
1993
- "name": "emissionOrderbookMismatch";
1994
- "msg": "Emission orderbook does not match out token account";
1993
+ "name": "exponentOrderbookAlreadyHaveLamports";
1994
+ "msg": "Exponent Orderbook already have lamports";
1995
1995
  },
1996
1996
  {
1997
1997
  "code": 6013;
1998
- "name": "tokenAccountAlreadyInUse";
1999
- "msg": "Token account already in use";
2000
- },
2001
- {
2002
- "code": 6014;
2003
- "name": "priceApyOverflow";
2004
- "msg": "Price APY causes overflow when converted to u32 with given decimals";
2005
- },
2006
- {
2007
- "code": 6015;
2008
- "name": "invalidFeeRate";
2009
- "msg": "Fee rate configuration must not exceed 5% annualized";
2010
- },
2011
- {
2012
- "code": 6016;
2013
- "name": "offerIdxMismatch";
2014
- "msg": "Offer index mismatch";
1998
+ "name": "maxFilledOffersLimitReached";
1999
+ "msg": "Max filled offers limit reached with remaining counter offers available";
2015
2000
  }
2016
2001
  ];
2017
2002
  "types": [
@@ -1924,88 +1924,73 @@
1924
1924
  "errors": [
1925
1925
  {
1926
1926
  "code": 6000,
1927
- "name": "InvalidOrderbookOwner",
1928
- "msg": "Orderbook account owner mismatch"
1927
+ "name": "OfferIndexOutOfBounds",
1928
+ "msg": "Offer index out of bounds"
1929
1929
  },
1930
1930
  {
1931
1931
  "code": 6001,
1932
- "name": "VaultMismatch",
1933
- "msg": "Vault does not match orderbook.vault"
1932
+ "name": "PriceNotFound",
1933
+ "msg": "Price not found"
1934
1934
  },
1935
1935
  {
1936
1936
  "code": 6002,
1937
- "name": "YieldPositionMismatch",
1938
- "msg": "Yield position does not match orderbook.yield_position"
1937
+ "name": "IncorrectSeller",
1938
+ "msg": "Incorrect seller"
1939
1939
  },
1940
1940
  {
1941
1941
  "code": 6003,
1942
- "name": "AltMismatch",
1943
- "msg": "Address lookup table does not match orderbook.address_lookup_table"
1942
+ "name": "IncorrectSellerTokenAccount",
1943
+ "msg": "Incorrect seller token account"
1944
1944
  },
1945
1945
  {
1946
1946
  "code": 6004,
1947
- "name": "SyEscrowMismatch",
1948
- "msg": "SY escrow does not match orderbook.token_escrow_sy"
1947
+ "name": "InvalidOrderType",
1948
+ "msg": "Invalid Order Type"
1949
1949
  },
1950
1950
  {
1951
1951
  "code": 6005,
1952
- "name": "YtEscrowMismatch",
1953
- "msg": "YT escrow does not match orderbook.token_escrow_yt"
1952
+ "name": "FillOrKillOrderNotFilled",
1953
+ "msg": "Fill or Kill order not filled"
1954
1954
  },
1955
1955
  {
1956
1956
  "code": 6006,
1957
- "name": "PtEscrowMismatch",
1958
- "msg": "PT escrow does not match orderbook.token_escrow_pt"
1957
+ "name": "OrderbookFull",
1958
+ "msg": "Orderbook full"
1959
1959
  },
1960
1960
  {
1961
1961
  "code": 6007,
1962
- "name": "CpiAccountsMismatch",
1963
- "msg": "CPI accounts orderbook does not match orderbook.cpi_account_orderbook"
1962
+ "name": "PriceNodeFull",
1963
+ "msg": "Price Node Full"
1964
1964
  },
1965
1965
  {
1966
1966
  "code": 6008,
1967
- "name": "WrongAdmin",
1968
- "msg": "Wrong admin for orderbook"
1967
+ "name": "ExponentOrderbookDiscriminatorMismatch",
1968
+ "msg": "Exponent Orderbook discriminator mismatch"
1969
1969
  },
1970
1970
  {
1971
1971
  "code": 6009,
1972
- "name": "SyExchangeRateExpectedToBeGreater",
1973
- "msg": "Current sy exchange rate is smaller than the previous one"
1972
+ "name": "IncorrectPriceNodeForOfferIdx",
1973
+ "msg": "Incorrect price node for offer idx"
1974
1974
  },
1975
1975
  {
1976
1976
  "code": 6010,
1977
- "name": "SyProgramMismatch",
1978
- "msg": "SY program does not match orderbook.sy_program"
1977
+ "name": "InsufficientOutputAmount",
1978
+ "msg": "Insufficient output amount"
1979
1979
  },
1980
1980
  {
1981
1981
  "code": 6011,
1982
- "name": "ExponentCoreProgramMismatch",
1983
- "msg": "Exponent Core program does not match orderbook.exponent_core"
1982
+ "name": "OrderbookExpired",
1983
+ "msg": "Orderbook is expired"
1984
1984
  },
1985
1985
  {
1986
1986
  "code": 6012,
1987
- "name": "EmissionOrderbookMismatch",
1988
- "msg": "Emission orderbook does not match out token account"
1987
+ "name": "ExponentOrderbookAlreadyHaveLamports",
1988
+ "msg": "Exponent Orderbook already have lamports"
1989
1989
  },
1990
1990
  {
1991
1991
  "code": 6013,
1992
- "name": "TokenAccountAlreadyInUse",
1993
- "msg": "Token account already in use"
1994
- },
1995
- {
1996
- "code": 6014,
1997
- "name": "PriceApyOverflow",
1998
- "msg": "Price APY causes overflow when converted to u32 with given decimals"
1999
- },
2000
- {
2001
- "code": 6015,
2002
- "name": "InvalidFeeRate",
2003
- "msg": "Fee rate configuration must not exceed 5% annualized"
2004
- },
2005
- {
2006
- "code": 6016,
2007
- "name": "OfferIdxMismatch",
2008
- "msg": "Offer index mismatch"
1992
+ "name": "MaxFilledOffersLimitReached",
1993
+ "msg": "Max filled offers limit reached with remaining counter offers available"
2009
1994
  }
2010
1995
  ],
2011
1996
  "types": [
package/build/index.js CHANGED
@@ -18,23 +18,13 @@ 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 () {
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
- })();
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
+ };
38
28
  Object.defineProperty(exports, "__esModule", { value: true });
39
29
  exports.PROGRAM_ID = exports.IDL = void 0;
40
30
  __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.18",
3
+ "version": "0.9.20",
4
4
  "main": "build/index.js",
5
5
  "types": "build/index.d.ts",
6
6
  "license": "AGPL-3.0",
@@ -9,6 +9,5 @@
9
9
  },
10
10
  "devDependencies": {
11
11
  "typescript": "5.4.5"
12
- },
13
- "gitHead": "209b8847e9a0fadb5b5ec96b9b47f0ace4a3bf9d"
12
+ }
14
13
  }
@@ -1924,88 +1924,73 @@
1924
1924
  "errors": [
1925
1925
  {
1926
1926
  "code": 6000,
1927
- "name": "InvalidOrderbookOwner",
1928
- "msg": "Orderbook account owner mismatch"
1927
+ "name": "OfferIndexOutOfBounds",
1928
+ "msg": "Offer index out of bounds"
1929
1929
  },
1930
1930
  {
1931
1931
  "code": 6001,
1932
- "name": "VaultMismatch",
1933
- "msg": "Vault does not match orderbook.vault"
1932
+ "name": "PriceNotFound",
1933
+ "msg": "Price not found"
1934
1934
  },
1935
1935
  {
1936
1936
  "code": 6002,
1937
- "name": "YieldPositionMismatch",
1938
- "msg": "Yield position does not match orderbook.yield_position"
1937
+ "name": "IncorrectSeller",
1938
+ "msg": "Incorrect seller"
1939
1939
  },
1940
1940
  {
1941
1941
  "code": 6003,
1942
- "name": "AltMismatch",
1943
- "msg": "Address lookup table does not match orderbook.address_lookup_table"
1942
+ "name": "IncorrectSellerTokenAccount",
1943
+ "msg": "Incorrect seller token account"
1944
1944
  },
1945
1945
  {
1946
1946
  "code": 6004,
1947
- "name": "SyEscrowMismatch",
1948
- "msg": "SY escrow does not match orderbook.token_escrow_sy"
1947
+ "name": "InvalidOrderType",
1948
+ "msg": "Invalid Order Type"
1949
1949
  },
1950
1950
  {
1951
1951
  "code": 6005,
1952
- "name": "YtEscrowMismatch",
1953
- "msg": "YT escrow does not match orderbook.token_escrow_yt"
1952
+ "name": "FillOrKillOrderNotFilled",
1953
+ "msg": "Fill or Kill order not filled"
1954
1954
  },
1955
1955
  {
1956
1956
  "code": 6006,
1957
- "name": "PtEscrowMismatch",
1958
- "msg": "PT escrow does not match orderbook.token_escrow_pt"
1957
+ "name": "OrderbookFull",
1958
+ "msg": "Orderbook full"
1959
1959
  },
1960
1960
  {
1961
1961
  "code": 6007,
1962
- "name": "CpiAccountsMismatch",
1963
- "msg": "CPI accounts orderbook does not match orderbook.cpi_account_orderbook"
1962
+ "name": "PriceNodeFull",
1963
+ "msg": "Price Node Full"
1964
1964
  },
1965
1965
  {
1966
1966
  "code": 6008,
1967
- "name": "WrongAdmin",
1968
- "msg": "Wrong admin for orderbook"
1967
+ "name": "ExponentOrderbookDiscriminatorMismatch",
1968
+ "msg": "Exponent Orderbook discriminator mismatch"
1969
1969
  },
1970
1970
  {
1971
1971
  "code": 6009,
1972
- "name": "SyExchangeRateExpectedToBeGreater",
1973
- "msg": "Current sy exchange rate is smaller than the previous one"
1972
+ "name": "IncorrectPriceNodeForOfferIdx",
1973
+ "msg": "Incorrect price node for offer idx"
1974
1974
  },
1975
1975
  {
1976
1976
  "code": 6010,
1977
- "name": "SyProgramMismatch",
1978
- "msg": "SY program does not match orderbook.sy_program"
1977
+ "name": "InsufficientOutputAmount",
1978
+ "msg": "Insufficient output amount"
1979
1979
  },
1980
1980
  {
1981
1981
  "code": 6011,
1982
- "name": "ExponentCoreProgramMismatch",
1983
- "msg": "Exponent Core program does not match orderbook.exponent_core"
1982
+ "name": "OrderbookExpired",
1983
+ "msg": "Orderbook is expired"
1984
1984
  },
1985
1985
  {
1986
1986
  "code": 6012,
1987
- "name": "EmissionOrderbookMismatch",
1988
- "msg": "Emission orderbook does not match out token account"
1987
+ "name": "ExponentOrderbookAlreadyHaveLamports",
1988
+ "msg": "Exponent Orderbook already have lamports"
1989
1989
  },
1990
1990
  {
1991
1991
  "code": 6013,
1992
- "name": "TokenAccountAlreadyInUse",
1993
- "msg": "Token account already in use"
1994
- },
1995
- {
1996
- "code": 6014,
1997
- "name": "PriceApyOverflow",
1998
- "msg": "Price APY causes overflow when converted to u32 with given decimals"
1999
- },
2000
- {
2001
- "code": 6015,
2002
- "name": "InvalidFeeRate",
2003
- "msg": "Fee rate configuration must not exceed 5% annualized"
2004
- },
2005
- {
2006
- "code": 6016,
2007
- "name": "OfferIdxMismatch",
2008
- "msg": "Offer index mismatch"
1992
+ "name": "MaxFilledOffersLimitReached",
1993
+ "msg": "Max filled offers limit reached with remaining counter offers available"
2009
1994
  }
2010
1995
  ],
2011
1996
  "types": [
@@ -1930,88 +1930,73 @@ export type ExponentOrderbook = {
1930
1930
  "errors": [
1931
1931
  {
1932
1932
  "code": 6000,
1933
- "name": "invalidOrderbookOwner",
1934
- "msg": "Orderbook account owner mismatch"
1933
+ "name": "offerIndexOutOfBounds",
1934
+ "msg": "Offer index out of bounds"
1935
1935
  },
1936
1936
  {
1937
1937
  "code": 6001,
1938
- "name": "vaultMismatch",
1939
- "msg": "Vault does not match orderbook.vault"
1938
+ "name": "priceNotFound",
1939
+ "msg": "Price not found"
1940
1940
  },
1941
1941
  {
1942
1942
  "code": 6002,
1943
- "name": "yieldPositionMismatch",
1944
- "msg": "Yield position does not match orderbook.yield_position"
1943
+ "name": "incorrectSeller",
1944
+ "msg": "Incorrect seller"
1945
1945
  },
1946
1946
  {
1947
1947
  "code": 6003,
1948
- "name": "altMismatch",
1949
- "msg": "Address lookup table does not match orderbook.address_lookup_table"
1948
+ "name": "incorrectSellerTokenAccount",
1949
+ "msg": "Incorrect seller token account"
1950
1950
  },
1951
1951
  {
1952
1952
  "code": 6004,
1953
- "name": "syEscrowMismatch",
1954
- "msg": "SY escrow does not match orderbook.token_escrow_sy"
1953
+ "name": "invalidOrderType",
1954
+ "msg": "Invalid Order Type"
1955
1955
  },
1956
1956
  {
1957
1957
  "code": 6005,
1958
- "name": "ytEscrowMismatch",
1959
- "msg": "YT escrow does not match orderbook.token_escrow_yt"
1958
+ "name": "fillOrKillOrderNotFilled",
1959
+ "msg": "Fill or Kill order not filled"
1960
1960
  },
1961
1961
  {
1962
1962
  "code": 6006,
1963
- "name": "ptEscrowMismatch",
1964
- "msg": "PT escrow does not match orderbook.token_escrow_pt"
1963
+ "name": "orderbookFull",
1964
+ "msg": "Orderbook full"
1965
1965
  },
1966
1966
  {
1967
1967
  "code": 6007,
1968
- "name": "cpiAccountsMismatch",
1969
- "msg": "CPI accounts orderbook does not match orderbook.cpi_account_orderbook"
1968
+ "name": "priceNodeFull",
1969
+ "msg": "Price Node Full"
1970
1970
  },
1971
1971
  {
1972
1972
  "code": 6008,
1973
- "name": "wrongAdmin",
1974
- "msg": "Wrong admin for orderbook"
1973
+ "name": "exponentOrderbookDiscriminatorMismatch",
1974
+ "msg": "Exponent Orderbook discriminator mismatch"
1975
1975
  },
1976
1976
  {
1977
1977
  "code": 6009,
1978
- "name": "syExchangeRateExpectedToBeGreater",
1979
- "msg": "Current sy exchange rate is smaller than the previous one"
1978
+ "name": "incorrectPriceNodeForOfferIdx",
1979
+ "msg": "Incorrect price node for offer idx"
1980
1980
  },
1981
1981
  {
1982
1982
  "code": 6010,
1983
- "name": "syProgramMismatch",
1984
- "msg": "SY program does not match orderbook.sy_program"
1983
+ "name": "insufficientOutputAmount",
1984
+ "msg": "Insufficient output amount"
1985
1985
  },
1986
1986
  {
1987
1987
  "code": 6011,
1988
- "name": "exponentCoreProgramMismatch",
1989
- "msg": "Exponent Core program does not match orderbook.exponent_core"
1988
+ "name": "orderbookExpired",
1989
+ "msg": "Orderbook is expired"
1990
1990
  },
1991
1991
  {
1992
1992
  "code": 6012,
1993
- "name": "emissionOrderbookMismatch",
1994
- "msg": "Emission orderbook does not match out token account"
1993
+ "name": "exponentOrderbookAlreadyHaveLamports",
1994
+ "msg": "Exponent Orderbook already have lamports"
1995
1995
  },
1996
1996
  {
1997
1997
  "code": 6013,
1998
- "name": "tokenAccountAlreadyInUse",
1999
- "msg": "Token account already in use"
2000
- },
2001
- {
2002
- "code": 6014,
2003
- "name": "priceApyOverflow",
2004
- "msg": "Price APY causes overflow when converted to u32 with given decimals"
2005
- },
2006
- {
2007
- "code": 6015,
2008
- "name": "invalidFeeRate",
2009
- "msg": "Fee rate configuration must not exceed 5% annualized"
2010
- },
2011
- {
2012
- "code": 6016,
2013
- "name": "offerIdxMismatch",
2014
- "msg": "Offer index mismatch"
1998
+ "name": "maxFilledOffersLimitReached",
1999
+ "msg": "Max filled offers limit reached with remaining counter offers available"
2015
2000
  }
2016
2001
  ],
2017
2002
  "types": [