@meteora-ag/dlmm 1.0.3 → 1.0.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.
package/dist/index.mjs CHANGED
@@ -2086,6 +2086,27 @@ var IDL = {
2086
2086
  "type": "u64"
2087
2087
  }
2088
2088
  ]
2089
+ },
2090
+ {
2091
+ "name": "setActivationSlot",
2092
+ "accounts": [
2093
+ {
2094
+ "name": "lbPair",
2095
+ "isMut": true,
2096
+ "isSigner": false
2097
+ },
2098
+ {
2099
+ "name": "admin",
2100
+ "isMut": true,
2101
+ "isSigner": true
2102
+ }
2103
+ ],
2104
+ "args": [
2105
+ {
2106
+ "name": "activationSlot",
2107
+ "type": "u64"
2108
+ }
2109
+ ]
2089
2110
  }
2090
2111
  ],
2091
2112
  "accounts": [
@@ -2246,7 +2267,7 @@ var IDL = {
2246
2267
  {
2247
2268
  "name": "status",
2248
2269
  "docs": [
2249
- "Status of the pair"
2270
+ "Status of the pair. Check PairStatus enum."
2250
2271
  ],
2251
2272
  "type": "u8"
2252
2273
  },
@@ -2362,6 +2383,13 @@ var IDL = {
2362
2383
  ],
2363
2384
  "type": "publicKey"
2364
2385
  },
2386
+ {
2387
+ "name": "activationSlot",
2388
+ "docs": [
2389
+ "Slot to enable the pair. Only available for permission pair."
2390
+ ],
2391
+ "type": "u64"
2392
+ },
2365
2393
  {
2366
2394
  "name": "reserved",
2367
2395
  "docs": [
@@ -2370,7 +2398,7 @@ var IDL = {
2370
2398
  "type": {
2371
2399
  "array": [
2372
2400
  "u8",
2373
- 88
2401
+ 80
2374
2402
  ]
2375
2403
  }
2376
2404
  }
@@ -8160,6 +8188,37 @@ var DLMM = class {
8160
8188
 
8161
8189
  // src/dlmm/error.ts
8162
8190
  import { AnchorError } from "@coral-xyz/anchor";
8191
+ var DLMMError = class extends Error {
8192
+ errorCode;
8193
+ errorName;
8194
+ errorMessage;
8195
+ constructor(error) {
8196
+ let _errorCode = 0;
8197
+ let _errorName = "Something went wrong";
8198
+ let _errorMessage = "Something went wrong";
8199
+ if (error instanceof Error) {
8200
+ const anchorError = AnchorError.parse(
8201
+ JSON.parse(JSON.stringify(error)).logs
8202
+ );
8203
+ if (anchorError?.program.toBase58() === LBCLMM_PROGRAM_IDS["mainnet-beta"]) {
8204
+ _errorCode = anchorError.error.errorCode.number;
8205
+ _errorName = anchorError.error.errorCode.code;
8206
+ _errorMessage = anchorError.error.errorMessage;
8207
+ }
8208
+ } else {
8209
+ const idlError = IDL.errors.find((err) => err.code === error);
8210
+ if (idlError) {
8211
+ _errorCode = idlError.code;
8212
+ _errorName = idlError.name;
8213
+ _errorMessage = idlError.msg;
8214
+ }
8215
+ }
8216
+ super(_errorMessage);
8217
+ this.errorCode = _errorCode;
8218
+ this.errorName = _errorName;
8219
+ this.errorMessage = _errorMessage;
8220
+ }
8221
+ };
8163
8222
 
8164
8223
  // src/index.ts
8165
8224
  var src_default = DLMM;
@@ -8168,6 +8227,7 @@ export {
8168
8227
  BASIS_POINT_MAX,
8169
8228
  BIN_ARRAY_BITMAP_SIZE,
8170
8229
  BitmapType,
8230
+ DLMMError,
8171
8231
  EXTENSION_BINARRAY_BITMAP_SIZE,
8172
8232
  FEE_PRECISION,
8173
8233
  LBCLMM_PROGRAM_IDS,