@exponent-labs/exponent-orderbook-idl 0.9.3 → 0.9.4

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.
@@ -1899,73 +1899,88 @@ export type ExponentOrderbook = {
1899
1899
  "errors": [
1900
1900
  {
1901
1901
  "code": 6000;
1902
- "name": "offerIndexOutOfBounds";
1903
- "msg": "Offer index out of bounds";
1902
+ "name": "invalidOrderbookOwner";
1903
+ "msg": "Orderbook account owner mismatch";
1904
1904
  },
1905
1905
  {
1906
1906
  "code": 6001;
1907
- "name": "priceNotFound";
1908
- "msg": "Price not found";
1907
+ "name": "vaultMismatch";
1908
+ "msg": "Vault does not match orderbook.vault";
1909
1909
  },
1910
1910
  {
1911
1911
  "code": 6002;
1912
- "name": "incorrectSeller";
1913
- "msg": "Incorrect seller";
1912
+ "name": "yieldPositionMismatch";
1913
+ "msg": "Yield position does not match orderbook.yield_position";
1914
1914
  },
1915
1915
  {
1916
1916
  "code": 6003;
1917
- "name": "incorrectSellerTokenAccount";
1918
- "msg": "Incorrect seller token account";
1917
+ "name": "altMismatch";
1918
+ "msg": "Address lookup table does not match orderbook.address_lookup_table";
1919
1919
  },
1920
1920
  {
1921
1921
  "code": 6004;
1922
- "name": "invalidOrderType";
1923
- "msg": "Invalid Order Type";
1922
+ "name": "syEscrowMismatch";
1923
+ "msg": "SY escrow does not match orderbook.token_escrow_sy";
1924
1924
  },
1925
1925
  {
1926
1926
  "code": 6005;
1927
- "name": "fillOrKillOrderNotFilled";
1928
- "msg": "Fill or Kill order not filled";
1927
+ "name": "ytEscrowMismatch";
1928
+ "msg": "YT escrow does not match orderbook.token_escrow_yt";
1929
1929
  },
1930
1930
  {
1931
1931
  "code": 6006;
1932
- "name": "orderbookFull";
1933
- "msg": "Orderbook full";
1932
+ "name": "ptEscrowMismatch";
1933
+ "msg": "PT escrow does not match orderbook.token_escrow_pt";
1934
1934
  },
1935
1935
  {
1936
1936
  "code": 6007;
1937
- "name": "priceNodeFull";
1938
- "msg": "Price Node Full";
1937
+ "name": "cpiAccountsMismatch";
1938
+ "msg": "CPI accounts orderbook does not match orderbook.cpi_account_orderbook";
1939
1939
  },
1940
1940
  {
1941
1941
  "code": 6008;
1942
- "name": "exponentOrderbookDiscriminatorMismatch";
1943
- "msg": "Exponent Orderbook discriminator mismatch";
1942
+ "name": "wrongAdmin";
1943
+ "msg": "Wrong admin for orderbook";
1944
1944
  },
1945
1945
  {
1946
1946
  "code": 6009;
1947
- "name": "incorrectPriceNodeForOfferIdx";
1948
- "msg": "Incorrect price node for offer idx";
1947
+ "name": "syExchangeRateExpectedToBeGreater";
1948
+ "msg": "Current sy exchange rate is smaller than the previous one";
1949
1949
  },
1950
1950
  {
1951
1951
  "code": 6010;
1952
- "name": "insufficientOutputAmount";
1953
- "msg": "Insufficient output amount";
1952
+ "name": "syProgramMismatch";
1953
+ "msg": "SY program does not match orderbook.sy_program";
1954
1954
  },
1955
1955
  {
1956
1956
  "code": 6011;
1957
- "name": "orderbookExpired";
1958
- "msg": "Orderbook is expired";
1957
+ "name": "exponentCoreProgramMismatch";
1958
+ "msg": "Exponent Core program does not match orderbook.exponent_core";
1959
1959
  },
1960
1960
  {
1961
1961
  "code": 6012;
1962
- "name": "exponentOrderbookAlreadyHaveLamports";
1963
- "msg": "Exponent Orderbook already have lamports";
1962
+ "name": "emissionOrderbookMismatch";
1963
+ "msg": "Emission orderbook does not match out token account";
1964
1964
  },
1965
1965
  {
1966
1966
  "code": 6013;
1967
- "name": "maxFilledOffersLimitReached";
1968
- "msg": "Max filled offers limit reached with remaining counter offers available";
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";
1969
1984
  }
1970
1985
  ];
1971
1986
  "types": [
@@ -1893,73 +1893,88 @@
1893
1893
  "errors": [
1894
1894
  {
1895
1895
  "code": 6000,
1896
- "name": "OfferIndexOutOfBounds",
1897
- "msg": "Offer index out of bounds"
1896
+ "name": "InvalidOrderbookOwner",
1897
+ "msg": "Orderbook account owner mismatch"
1898
1898
  },
1899
1899
  {
1900
1900
  "code": 6001,
1901
- "name": "PriceNotFound",
1902
- "msg": "Price not found"
1901
+ "name": "VaultMismatch",
1902
+ "msg": "Vault does not match orderbook.vault"
1903
1903
  },
1904
1904
  {
1905
1905
  "code": 6002,
1906
- "name": "IncorrectSeller",
1907
- "msg": "Incorrect seller"
1906
+ "name": "YieldPositionMismatch",
1907
+ "msg": "Yield position does not match orderbook.yield_position"
1908
1908
  },
1909
1909
  {
1910
1910
  "code": 6003,
1911
- "name": "IncorrectSellerTokenAccount",
1912
- "msg": "Incorrect seller token account"
1911
+ "name": "AltMismatch",
1912
+ "msg": "Address lookup table does not match orderbook.address_lookup_table"
1913
1913
  },
1914
1914
  {
1915
1915
  "code": 6004,
1916
- "name": "InvalidOrderType",
1917
- "msg": "Invalid Order Type"
1916
+ "name": "SyEscrowMismatch",
1917
+ "msg": "SY escrow does not match orderbook.token_escrow_sy"
1918
1918
  },
1919
1919
  {
1920
1920
  "code": 6005,
1921
- "name": "FillOrKillOrderNotFilled",
1922
- "msg": "Fill or Kill order not filled"
1921
+ "name": "YtEscrowMismatch",
1922
+ "msg": "YT escrow does not match orderbook.token_escrow_yt"
1923
1923
  },
1924
1924
  {
1925
1925
  "code": 6006,
1926
- "name": "OrderbookFull",
1927
- "msg": "Orderbook full"
1926
+ "name": "PtEscrowMismatch",
1927
+ "msg": "PT escrow does not match orderbook.token_escrow_pt"
1928
1928
  },
1929
1929
  {
1930
1930
  "code": 6007,
1931
- "name": "PriceNodeFull",
1932
- "msg": "Price Node Full"
1931
+ "name": "CpiAccountsMismatch",
1932
+ "msg": "CPI accounts orderbook does not match orderbook.cpi_account_orderbook"
1933
1933
  },
1934
1934
  {
1935
1935
  "code": 6008,
1936
- "name": "ExponentOrderbookDiscriminatorMismatch",
1937
- "msg": "Exponent Orderbook discriminator mismatch"
1936
+ "name": "WrongAdmin",
1937
+ "msg": "Wrong admin for orderbook"
1938
1938
  },
1939
1939
  {
1940
1940
  "code": 6009,
1941
- "name": "IncorrectPriceNodeForOfferIdx",
1942
- "msg": "Incorrect price node for offer idx"
1941
+ "name": "SyExchangeRateExpectedToBeGreater",
1942
+ "msg": "Current sy exchange rate is smaller than the previous one"
1943
1943
  },
1944
1944
  {
1945
1945
  "code": 6010,
1946
- "name": "InsufficientOutputAmount",
1947
- "msg": "Insufficient output amount"
1946
+ "name": "SyProgramMismatch",
1947
+ "msg": "SY program does not match orderbook.sy_program"
1948
1948
  },
1949
1949
  {
1950
1950
  "code": 6011,
1951
- "name": "OrderbookExpired",
1952
- "msg": "Orderbook is expired"
1951
+ "name": "ExponentCoreProgramMismatch",
1952
+ "msg": "Exponent Core program does not match orderbook.exponent_core"
1953
1953
  },
1954
1954
  {
1955
1955
  "code": 6012,
1956
- "name": "ExponentOrderbookAlreadyHaveLamports",
1957
- "msg": "Exponent Orderbook already have lamports"
1956
+ "name": "EmissionOrderbookMismatch",
1957
+ "msg": "Emission orderbook does not match out token account"
1958
1958
  },
1959
1959
  {
1960
1960
  "code": 6013,
1961
- "name": "MaxFilledOffersLimitReached",
1962
- "msg": "Max filled offers limit reached with remaining counter offers available"
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"
1963
1978
  }
1964
1979
  ],
1965
1980
  "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.3",
3
+ "version": "0.9.4",
4
4
  "main": "build/index.js",
5
5
  "types": "build/index.d.ts",
6
6
  "license": "AGPL-3.0",
@@ -1893,73 +1893,88 @@
1893
1893
  "errors": [
1894
1894
  {
1895
1895
  "code": 6000,
1896
- "name": "OfferIndexOutOfBounds",
1897
- "msg": "Offer index out of bounds"
1896
+ "name": "InvalidOrderbookOwner",
1897
+ "msg": "Orderbook account owner mismatch"
1898
1898
  },
1899
1899
  {
1900
1900
  "code": 6001,
1901
- "name": "PriceNotFound",
1902
- "msg": "Price not found"
1901
+ "name": "VaultMismatch",
1902
+ "msg": "Vault does not match orderbook.vault"
1903
1903
  },
1904
1904
  {
1905
1905
  "code": 6002,
1906
- "name": "IncorrectSeller",
1907
- "msg": "Incorrect seller"
1906
+ "name": "YieldPositionMismatch",
1907
+ "msg": "Yield position does not match orderbook.yield_position"
1908
1908
  },
1909
1909
  {
1910
1910
  "code": 6003,
1911
- "name": "IncorrectSellerTokenAccount",
1912
- "msg": "Incorrect seller token account"
1911
+ "name": "AltMismatch",
1912
+ "msg": "Address lookup table does not match orderbook.address_lookup_table"
1913
1913
  },
1914
1914
  {
1915
1915
  "code": 6004,
1916
- "name": "InvalidOrderType",
1917
- "msg": "Invalid Order Type"
1916
+ "name": "SyEscrowMismatch",
1917
+ "msg": "SY escrow does not match orderbook.token_escrow_sy"
1918
1918
  },
1919
1919
  {
1920
1920
  "code": 6005,
1921
- "name": "FillOrKillOrderNotFilled",
1922
- "msg": "Fill or Kill order not filled"
1921
+ "name": "YtEscrowMismatch",
1922
+ "msg": "YT escrow does not match orderbook.token_escrow_yt"
1923
1923
  },
1924
1924
  {
1925
1925
  "code": 6006,
1926
- "name": "OrderbookFull",
1927
- "msg": "Orderbook full"
1926
+ "name": "PtEscrowMismatch",
1927
+ "msg": "PT escrow does not match orderbook.token_escrow_pt"
1928
1928
  },
1929
1929
  {
1930
1930
  "code": 6007,
1931
- "name": "PriceNodeFull",
1932
- "msg": "Price Node Full"
1931
+ "name": "CpiAccountsMismatch",
1932
+ "msg": "CPI accounts orderbook does not match orderbook.cpi_account_orderbook"
1933
1933
  },
1934
1934
  {
1935
1935
  "code": 6008,
1936
- "name": "ExponentOrderbookDiscriminatorMismatch",
1937
- "msg": "Exponent Orderbook discriminator mismatch"
1936
+ "name": "WrongAdmin",
1937
+ "msg": "Wrong admin for orderbook"
1938
1938
  },
1939
1939
  {
1940
1940
  "code": 6009,
1941
- "name": "IncorrectPriceNodeForOfferIdx",
1942
- "msg": "Incorrect price node for offer idx"
1941
+ "name": "SyExchangeRateExpectedToBeGreater",
1942
+ "msg": "Current sy exchange rate is smaller than the previous one"
1943
1943
  },
1944
1944
  {
1945
1945
  "code": 6010,
1946
- "name": "InsufficientOutputAmount",
1947
- "msg": "Insufficient output amount"
1946
+ "name": "SyProgramMismatch",
1947
+ "msg": "SY program does not match orderbook.sy_program"
1948
1948
  },
1949
1949
  {
1950
1950
  "code": 6011,
1951
- "name": "OrderbookExpired",
1952
- "msg": "Orderbook is expired"
1951
+ "name": "ExponentCoreProgramMismatch",
1952
+ "msg": "Exponent Core program does not match orderbook.exponent_core"
1953
1953
  },
1954
1954
  {
1955
1955
  "code": 6012,
1956
- "name": "ExponentOrderbookAlreadyHaveLamports",
1957
- "msg": "Exponent Orderbook already have lamports"
1956
+ "name": "EmissionOrderbookMismatch",
1957
+ "msg": "Emission orderbook does not match out token account"
1958
1958
  },
1959
1959
  {
1960
1960
  "code": 6013,
1961
- "name": "MaxFilledOffersLimitReached",
1962
- "msg": "Max filled offers limit reached with remaining counter offers available"
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"
1963
1978
  }
1964
1979
  ],
1965
1980
  "types": [
@@ -1899,73 +1899,88 @@ export type ExponentOrderbook = {
1899
1899
  "errors": [
1900
1900
  {
1901
1901
  "code": 6000,
1902
- "name": "offerIndexOutOfBounds",
1903
- "msg": "Offer index out of bounds"
1902
+ "name": "invalidOrderbookOwner",
1903
+ "msg": "Orderbook account owner mismatch"
1904
1904
  },
1905
1905
  {
1906
1906
  "code": 6001,
1907
- "name": "priceNotFound",
1908
- "msg": "Price not found"
1907
+ "name": "vaultMismatch",
1908
+ "msg": "Vault does not match orderbook.vault"
1909
1909
  },
1910
1910
  {
1911
1911
  "code": 6002,
1912
- "name": "incorrectSeller",
1913
- "msg": "Incorrect seller"
1912
+ "name": "yieldPositionMismatch",
1913
+ "msg": "Yield position does not match orderbook.yield_position"
1914
1914
  },
1915
1915
  {
1916
1916
  "code": 6003,
1917
- "name": "incorrectSellerTokenAccount",
1918
- "msg": "Incorrect seller token account"
1917
+ "name": "altMismatch",
1918
+ "msg": "Address lookup table does not match orderbook.address_lookup_table"
1919
1919
  },
1920
1920
  {
1921
1921
  "code": 6004,
1922
- "name": "invalidOrderType",
1923
- "msg": "Invalid Order Type"
1922
+ "name": "syEscrowMismatch",
1923
+ "msg": "SY escrow does not match orderbook.token_escrow_sy"
1924
1924
  },
1925
1925
  {
1926
1926
  "code": 6005,
1927
- "name": "fillOrKillOrderNotFilled",
1928
- "msg": "Fill or Kill order not filled"
1927
+ "name": "ytEscrowMismatch",
1928
+ "msg": "YT escrow does not match orderbook.token_escrow_yt"
1929
1929
  },
1930
1930
  {
1931
1931
  "code": 6006,
1932
- "name": "orderbookFull",
1933
- "msg": "Orderbook full"
1932
+ "name": "ptEscrowMismatch",
1933
+ "msg": "PT escrow does not match orderbook.token_escrow_pt"
1934
1934
  },
1935
1935
  {
1936
1936
  "code": 6007,
1937
- "name": "priceNodeFull",
1938
- "msg": "Price Node Full"
1937
+ "name": "cpiAccountsMismatch",
1938
+ "msg": "CPI accounts orderbook does not match orderbook.cpi_account_orderbook"
1939
1939
  },
1940
1940
  {
1941
1941
  "code": 6008,
1942
- "name": "exponentOrderbookDiscriminatorMismatch",
1943
- "msg": "Exponent Orderbook discriminator mismatch"
1942
+ "name": "wrongAdmin",
1943
+ "msg": "Wrong admin for orderbook"
1944
1944
  },
1945
1945
  {
1946
1946
  "code": 6009,
1947
- "name": "incorrectPriceNodeForOfferIdx",
1948
- "msg": "Incorrect price node for offer idx"
1947
+ "name": "syExchangeRateExpectedToBeGreater",
1948
+ "msg": "Current sy exchange rate is smaller than the previous one"
1949
1949
  },
1950
1950
  {
1951
1951
  "code": 6010,
1952
- "name": "insufficientOutputAmount",
1953
- "msg": "Insufficient output amount"
1952
+ "name": "syProgramMismatch",
1953
+ "msg": "SY program does not match orderbook.sy_program"
1954
1954
  },
1955
1955
  {
1956
1956
  "code": 6011,
1957
- "name": "orderbookExpired",
1958
- "msg": "Orderbook is expired"
1957
+ "name": "exponentCoreProgramMismatch",
1958
+ "msg": "Exponent Core program does not match orderbook.exponent_core"
1959
1959
  },
1960
1960
  {
1961
1961
  "code": 6012,
1962
- "name": "exponentOrderbookAlreadyHaveLamports",
1963
- "msg": "Exponent Orderbook already have lamports"
1962
+ "name": "emissionOrderbookMismatch",
1963
+ "msg": "Emission orderbook does not match out token account"
1964
1964
  },
1965
1965
  {
1966
1966
  "code": 6013,
1967
- "name": "maxFilledOffersLimitReached",
1968
- "msg": "Max filled offers limit reached with remaining counter offers available"
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"
1969
1984
  }
1970
1985
  ],
1971
1986
  "types": [