@glamsystems/glam-sdk 1.1.0-alpha.0 → 1.1.0-alpha.2

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.
Files changed (85) hide show
  1. package/index.cjs.js +4898 -1183
  2. package/index.esm.js +4890 -1172
  3. package/package.json +2 -2
  4. package/target/idl/glam_mint-staging.json +236 -0
  5. package/target/idl/glam_protocol-staging.json +5 -0
  6. package/target/idl/glam_protocol.json +5 -0
  7. package/target/types/glam_mint-staging.ts +236 -0
  8. package/target/types/glam_protocol-staging.ts +5 -0
  9. package/target/types/glam_protocol.ts +5 -0
  10. package/src/assets.d.ts +0 -39
  11. package/src/client/access.d.ts +0 -57
  12. package/src/client/base.d.ts +0 -184
  13. package/src/client/bridge.d.ts +0 -183
  14. package/src/client/bridgeRegistry.d.ts +0 -32
  15. package/src/client/cctp.d.ts +0 -156
  16. package/src/client/epi.d.ts +0 -78
  17. package/src/client/fees.d.ts +0 -33
  18. package/src/client/invest.d.ts +0 -37
  19. package/src/client/jupiter.d.ts +0 -45
  20. package/src/client/kamino/farm.d.ts +0 -39
  21. package/src/client/kamino/index.d.ts +0 -4
  22. package/src/client/kamino/lending.d.ts +0 -86
  23. package/src/client/kamino/types.d.ts +0 -56
  24. package/src/client/kamino/vaults.d.ts +0 -31
  25. package/src/client/loopscale.d.ts +0 -84
  26. package/src/client/marinade.d.ts +0 -42
  27. package/src/client/mint.d.ts +0 -127
  28. package/src/client/neutral.d.ts +0 -111
  29. package/src/client/price.d.ts +0 -137
  30. package/src/client/stake-pool.d.ts +0 -39
  31. package/src/client/stake.d.ts +0 -34
  32. package/src/client/state.d.ts +0 -56
  33. package/src/client/timelock.d.ts +0 -31
  34. package/src/client/vault.d.ts +0 -90
  35. package/src/client.d.ts +0 -68
  36. package/src/clientConfig.d.ts +0 -29
  37. package/src/constants.d.ts +0 -84
  38. package/src/deser/base.d.ts +0 -18
  39. package/src/deser/index.d.ts +0 -3
  40. package/src/deser/integrationPolicies.d.ts +0 -120
  41. package/src/deser/kaminoLayouts.d.ts +0 -264
  42. package/src/deser/tokenAclLayouts.d.ts +0 -67
  43. package/src/error.d.ts +0 -29
  44. package/src/glamExports.d.ts +0 -5116
  45. package/src/globalConfig.d.ts +0 -27
  46. package/src/index.d.ts +0 -20
  47. package/src/models/acl.d.ts +0 -43
  48. package/src/models/index.d.ts +0 -8
  49. package/src/models/mint.d.ts +0 -64
  50. package/src/models/state.d.ts +0 -104
  51. package/src/models/types.d.ts +0 -28
  52. package/src/react/cluster-provider.d.ts +0 -22
  53. package/src/react/glam.d.ts +0 -47
  54. package/src/react/index.d.ts +0 -5
  55. package/src/react/query-keys.d.ts +0 -38
  56. package/src/react/useVaultBalanceSubscription.d.ts +0 -17
  57. package/src/utils/accounts.d.ts +0 -72
  58. package/src/utils/bitmask.d.ts +0 -53
  59. package/src/utils/blockhash.d.ts +0 -11
  60. package/src/utils/common.d.ts +0 -37
  61. package/src/utils/computeBudget.d.ts +0 -15
  62. package/src/utils/evm.d.ts +0 -10
  63. package/src/utils/fraction.d.ts +0 -29
  64. package/src/utils/glamPDAs.d.ts +0 -15
  65. package/src/utils/index.d.ts +0 -16
  66. package/src/utils/jupiterApi.d.ts +0 -89
  67. package/src/utils/lookupTables.d.ts +0 -53
  68. package/src/utils/pkmap.d.ts +0 -87
  69. package/src/utils/pkset.d.ts +0 -73
  70. package/src/utils/positionCategorizer.d.ts +0 -36
  71. package/src/utils/rpc.d.ts +0 -33
  72. package/src/utils/timelock.d.ts +0 -52
  73. package/src/utils/transaction.d.ts +0 -13
  74. package/target/types/ext_bridge.d.ts +0 -2385
  75. package/target/types/ext_cctp.d.ts +0 -1268
  76. package/target/types/ext_epi.d.ts +0 -2175
  77. package/target/types/ext_kamino.d.ts +0 -3433
  78. package/target/types/ext_loopscale.d.ts +0 -3547
  79. package/target/types/ext_marinade.d.ts +0 -1593
  80. package/target/types/ext_neutral.d.ts +0 -1786
  81. package/target/types/ext_spl.d.ts +0 -1274
  82. package/target/types/ext_stake_pool.d.ts +0 -1622
  83. package/target/types/glam_config.d.ts +0 -755
  84. package/target/types/glam_mint.d.ts +0 -6106
  85. package/target/types/glam_protocol.d.ts +0 -2708
@@ -1,15 +0,0 @@
1
- import { PublicKey } from "@solana/web3.js";
2
- export declare function getStatePda(initKey: Uint8Array | number[], owner: PublicKey, programId: PublicKey): PublicKey;
3
- export declare function getVaultPda(statePda: PublicKey, programId: PublicKey): PublicKey;
4
- export declare function getMintPda(statePda: PublicKey, mintIdx: number, programId: PublicKey): PublicKey;
5
- export declare function getEscrowPda(mintPda: PublicKey, programId: PublicKey): PublicKey;
6
- export declare function getRequestQueuePda(glamMint: PublicKey, programId: PublicKey): PublicKey;
7
- export declare function getExtraMetasPda(mint: PublicKey): PublicKey;
8
- export declare function getAccountPolicyPda(tokenAccount: PublicKey): PublicKey;
9
- export declare function getTokenAclMintConfigPda(mint: PublicKey): PublicKey;
10
- export declare function getTokenAclFlagAccountPda(tokenAccount: PublicKey): PublicKey;
11
- export declare function getTokenAclGateListConfigPda(authority: PublicKey, seed: Buffer): PublicKey;
12
- export declare function getTokenAclGateWalletEntryPda(listConfig: PublicKey, wallet: PublicKey): PublicKey;
13
- export declare function getTokenAclGateExtraMetasPda(mint: PublicKey): PublicKey;
14
- export declare function getGlobalConfigPda(): PublicKey;
15
- export declare function getIntegrationAuthorityPda(integrationProgram: PublicKey): PublicKey;
@@ -1,16 +0,0 @@
1
- export * from "./accounts";
2
- export * from "./bitmask";
3
- export * from "./blockhash";
4
- export * from "./computeBudget";
5
- export * from "./evm";
6
- export * from "./common";
7
- export * from "./glamPDAs";
8
- export * from "./lookupTables";
9
- export * from "./rpc";
10
- export * from "./timelock";
11
- export * from "./transaction";
12
- export * from "./pkmap";
13
- export * from "./pkset";
14
- export * from "./fraction";
15
- export * from "./jupiterApi";
16
- export * from "./positionCategorizer";
@@ -1,89 +0,0 @@
1
- import { PublicKey } from "@solana/web3.js";
2
- export type QuoteParams = {
3
- inputMint: string;
4
- outputMint: string;
5
- amount: number;
6
- slippageBps?: number;
7
- swapMode?: string;
8
- onlyDirectRoutes?: boolean;
9
- asLegacyTransaction?: boolean;
10
- maxAccounts?: number;
11
- dexes?: string[];
12
- excludeDexes?: string[];
13
- instructionVersion: "V1" | "V2";
14
- };
15
- export type QuoteResponse = {
16
- inputMint: string;
17
- inAmount: string;
18
- outputMint: string;
19
- outAmount: string;
20
- otherAmountThreshold: string;
21
- swapMode: string;
22
- slippageBps: number;
23
- platformFee: any;
24
- priceImpactPct: string;
25
- routePlan: any[];
26
- contextSlot: number;
27
- timeTaken: number;
28
- };
29
- export type TokenListItem = {
30
- address: string;
31
- name: string;
32
- symbol: string;
33
- decimals: number;
34
- logoURI: string;
35
- tags: string[];
36
- usdPrice: number;
37
- slot: number;
38
- };
39
- export declare class JupTokenList {
40
- readonly tokens: TokenListItem[];
41
- readonly mintMap: Map<string, TokenListItem>;
42
- constructor(tokens: TokenListItem[]);
43
- getByMint(mintAddress: string | PublicKey): TokenListItem | undefined;
44
- getBySymbol(symbol: string): TokenListItem | undefined;
45
- }
46
- export type JupiterInstruction = {
47
- programId: string;
48
- accounts: {
49
- pubkey: string;
50
- isSigner: boolean;
51
- isWritable: boolean;
52
- }[];
53
- data: string;
54
- };
55
- export type SwapInstructions = {
56
- tokenLedgerInstruction?: JupiterInstruction | null;
57
- otherInstructions?: JupiterInstruction[];
58
- computeBudgetInstructions: JupiterInstruction[];
59
- setupInstructions?: JupiterInstruction[];
60
- swapInstruction: JupiterInstruction;
61
- cleanupInstruction?: JupiterInstruction;
62
- addressLookupTableAddresses: string[];
63
- };
64
- export declare const JUPITER_API_DEFAULT = "https://api.jup.ag";
65
- export type TokenPrice = {
66
- mint: string;
67
- usdPrice: number;
68
- decimals: number;
69
- blockId: number;
70
- };
71
- export declare class JupiterApiClient {
72
- swapApiBaseUrl: string;
73
- isCustomSwapApi: boolean;
74
- apiKey: string | null;
75
- private tokenListCache;
76
- private tokenListCacheTtl;
77
- constructor(options?: {
78
- apiKey?: string;
79
- swapApiBaseUrl?: string;
80
- cacheTtl?: number;
81
- });
82
- fetchTokenPrices(mints: string[]): Promise<TokenPrice[]>;
83
- fetchTokensList(forceRefresh?: boolean): Promise<JupTokenList>;
84
- fetchProgramLabels(): Promise<{
85
- [key: string]: string;
86
- }>;
87
- getQuoteResponse(quoteParams: QuoteParams): Promise<any>;
88
- getSwapInstructions(quoteResponse: any, from: PublicKey, trackingAccount?: PublicKey): Promise<SwapInstructions>;
89
- }
@@ -1,53 +0,0 @@
1
- import { AddressLookupTableAccount, Connection, PublicKey, TransactionInstruction } from "@solana/web3.js";
2
- /**
3
- * Fetches multiple address lookup table accounts
4
- *
5
- * @param connection Solana connection
6
- * @param pubkeys Array of lookup table public keys
7
- * @returns Array of address lookup table accounts
8
- */
9
- export declare function fetchAddressLookupTableAccounts(connection: Connection, pubkeys?: string[] | PublicKey[]): Promise<AddressLookupTableAccount[]>;
10
- export interface VaultAccountsInfo {
11
- statePda: PublicKey;
12
- vaultPda: PublicKey;
13
- mintPda: PublicKey;
14
- escrowPda: PublicKey;
15
- requestQueuePda: PublicKey;
16
- extraMetasPda: PublicKey;
17
- protocolProgramId: PublicKey;
18
- mintProgramId: PublicKey;
19
- connection: Connection;
20
- stateAccount: {
21
- mint: PublicKey;
22
- baseAssetMint: PublicKey;
23
- assets: PublicKey[];
24
- externalPositions: PublicKey[];
25
- integrationAcls: {
26
- integrationProgram: PublicKey;
27
- }[];
28
- };
29
- borrowable?: PublicKey[];
30
- }
31
- /**
32
- * Collects all pubkeys that should be included in a vault's Address Lookup Table.
33
- *
34
- * The first 3 entries are fixed (statePda, vaultPda, GLAM_CONFIG_PROGRAM) to
35
- * match the ALT discovery filter offsets used by findGlamLookupTables().
36
- */
37
- export declare function collectVaultLookupTableAddresses(info: VaultAccountsInfo): Promise<PublicKey[]>;
38
- export interface CreateAltResult {
39
- createIx: TransactionInstruction;
40
- lookupTableAddress: PublicKey;
41
- extendIxBatches: TransactionInstruction[];
42
- }
43
- /**
44
- * Builds instructions to create an ALT and extend it with the given addresses.
45
- * Returns the create instruction, the derived lookup table address, and batched
46
- * extend instructions (each batch fits within a single transaction).
47
- */
48
- export declare function buildCreateAltInstructions(addresses: PublicKey[], authority: PublicKey, payer: PublicKey, recentSlot: number): CreateAltResult;
49
- /**
50
- * Builds batched extend instructions for an existing ALT.
51
- * Each instruction extends the table with up to 20 addresses.
52
- */
53
- export declare function buildExtendAltInstructions(lookupTableAddress: PublicKey, newAddresses: PublicKey[], authority: PublicKey, payer: PublicKey): TransactionInstruction[];
@@ -1,87 +0,0 @@
1
- import { PublicKey } from "@solana/web3.js";
2
- type PkMapKey = PublicKey | string;
3
- /**
4
- * A Map implementation that uses PublicKey-compatible keys.
5
- *
6
- * This class extends the standard Map and allows using PublicKey objects
7
- * or base58 strings as keys by converting them to base58 strings internally.
8
- * This solves the problem of PublicKey object reference equality - two
9
- * PublicKey objects with the same address would normally be considered
10
- * different keys in a Map.
11
- *
12
- * @example
13
- * ```typescript
14
- * // Create empty map
15
- * const map = new PkMap<string>();
16
- * const key = new PublicKey("11111111111111111111111111111111");
17
- * map.set(key, "value");
18
- *
19
- * // Create with initial entries
20
- * const map2 = new PkMap<string>([
21
- * ["11111111111111111111111111111111", "value1"],
22
- * [new PublicKey("22222222222222222222222222222222"), "value2"]
23
- * ]);
24
- *
25
- * // Can retrieve with a different PublicKey object with same address
26
- * const sameKey = new PublicKey("11111111111111111111111111111111");
27
- * console.log(map.get(sameKey)); // "value"
28
- * ```
29
- */
30
- export declare class PkMap<V> {
31
- private readonly _map;
32
- /**
33
- * Creates a new PkMap instance.
34
- * @param entries - Optional initial entries as [PublicKey|string, V] pairs
35
- */
36
- constructor();
37
- constructor(entries?: readonly (readonly [PkMapKey, V])[] | null);
38
- constructor(entries?: Iterable<readonly [PkMapKey, V]> | null);
39
- /**
40
- * Associates the specified value with the specified PublicKey in this map.
41
- * @param key - The PublicKey or base58 string to use as the key
42
- * @param value - The value to associate with the key
43
- * @returns This PkMap instance for chaining
44
- */
45
- set(key: PkMapKey, value: V): this;
46
- /**
47
- * Returns the value associated with the specified key, or undefined if not found.
48
- * @param key - The PublicKey or base58 string whose associated value is to be returned
49
- * @returns The value associated with the specified key, or undefined
50
- */
51
- get(key: PkMapKey): V | undefined;
52
- /**
53
- * Returns true if this map contains a mapping for the specified key.
54
- * @param key - The PublicKey or base58 string whose presence in this map is to be tested
55
- * @returns true if this map contains a mapping for the specified key
56
- */
57
- has(key: PkMapKey): boolean;
58
- /**
59
- * Removes the mapping for the specified key from this map if present.
60
- * @param key - The PublicKey or base58 string whose mapping is to be removed
61
- * @returns true if the element was removed, false otherwise
62
- */
63
- delete(key: PkMapKey): boolean;
64
- /**
65
- * Returns an iterator of all PublicKey keys in this map.
66
- * Note: This reconstructs PublicKey objects from the stored base58 strings.
67
- * @returns An iterator of PublicKey objects
68
- */
69
- pkKeys(): IterableIterator<PublicKey>;
70
- /**
71
- * Returns an iterator of [PublicKey, value] pairs for every entry in the map.
72
- * Note: This reconstructs PublicKey objects from the stored base58 strings.
73
- * @returns An iterator of [PublicKey, V] tuples
74
- */
75
- pkEntries(): IterableIterator<[PublicKey, V]>;
76
- /**
77
- * Executes a provided function once per each PublicKey/value pair in the Map.
78
- * @param callbackfn - Function to execute for each entry
79
- * @param thisArg - Value to use as this when executing callback
80
- */
81
- forEach(callbackfn: (value: V, key: PublicKey, map: PkMap<V>) => void, thisArg?: any): void;
82
- get size(): number;
83
- clear(): void;
84
- values(): IterableIterator<V>;
85
- [Symbol.iterator](): IterableIterator<[PublicKey, V]>;
86
- }
87
- export {};
@@ -1,73 +0,0 @@
1
- import { PublicKey } from "@solana/web3.js";
2
- /**
3
- * A Set implementation that uses PublicKey as values.
4
- *
5
- * This class extends the standard Set and allows using PublicKey objects
6
- * as values by converting them to base58 strings internally. This solves the
7
- * problem of PublicKey object reference equality - two PublicKey objects
8
- * with the same address would normally be considered different values in a Set.
9
- *
10
- * @example
11
- * ```typescript
12
- * // Create empty set
13
- * const set = new PkSet();
14
- * const key = new PublicKey("11111111111111111111111111111111");
15
- * set.add(key);
16
- *
17
- * // Create with initial values
18
- * const set2 = new PkSet([
19
- * new PublicKey("11111111111111111111111111111111"),
20
- * new PublicKey("22222222222222222222222222222222")
21
- * ]);
22
- *
23
- * // Can check with a different PublicKey object with same address
24
- * const sameKey = new PublicKey("11111111111111111111111111111111");
25
- * console.log(set.has(sameKey)); // true
26
- * ```
27
- */
28
- export declare class PkSet {
29
- private readonly _set;
30
- /**
31
- * Creates a new PkSet instance.
32
- * @param values - Optional initial values as PublicKey array
33
- */
34
- constructor(values?: readonly PublicKey[] | null);
35
- /**
36
- * Adds the specified PublicKey to this set.
37
- * @param value - The PublicKey to add to the set
38
- * @returns This PkSet instance for chaining
39
- */
40
- add(value: PublicKey): this;
41
- /**
42
- * Returns true if this set contains the specified PublicKey.
43
- * @param value - The PublicKey whose presence in this set is to be tested
44
- * @returns true if this set contains the specified PublicKey
45
- */
46
- has(value: PublicKey): boolean;
47
- /**
48
- * Removes the specified PublicKey from this set if present.
49
- * @param value - The PublicKey to be removed
50
- * @returns true if the element was removed, false otherwise
51
- */
52
- delete(value: PublicKey): boolean;
53
- /**
54
- * Returns an iterator of all PublicKey values in this set.
55
- * Note: This reconstructs PublicKey objects from the stored base58 strings.
56
- * @returns An iterator of PublicKey objects
57
- */
58
- pkValues(): IterableIterator<PublicKey>;
59
- /**
60
- * Executes a provided function once per each PublicKey in the Set.
61
- * @param callbackfn - Function to execute for each value
62
- * @param thisArg - Value to use as this when executing callback
63
- */
64
- forEach(callbackfn: (value: PublicKey, value2: PublicKey, set: PkSet) => void, thisArg?: any): void;
65
- get size(): number;
66
- clear(): void;
67
- [Symbol.iterator](): IterableIterator<PublicKey>;
68
- equals(other: PkSet): boolean;
69
- /**
70
- * @returns true if this set contains all the PublicKeys in the other set
71
- */
72
- includes(other: PkSet): boolean;
73
- }
@@ -1,36 +0,0 @@
1
- import { Commitment, Connection, PublicKey } from "@solana/web3.js";
2
- /**
3
- * Categorized external positions by protocol type.
4
- */
5
- export interface CategorizedPositions {
6
- /** Kamino lending obligation accounts */
7
- kaminoObligations: PublicKey[];
8
- /** Kamino vault share token accounts */
9
- kaminoVaultShareAtas: PublicKey[];
10
- /** Positions that couldn't be categorized */
11
- unknown: PublicKey[];
12
- }
13
- /**
14
- * Utility class for categorizing external positions by protocol type.
15
- *
16
- * External positions in GLAM vaults can be:
17
- * - Kamino obligation accounts (lending positions)
18
- * - Kamino vault share ATAs (shares in kamino vaults)
19
- *
20
- * This class determines the type of each position to enable proper pricing.
21
- */
22
- export declare class PositionCategorizer {
23
- private readonly connection;
24
- constructor(connection: Connection, _vaultPda?: PublicKey);
25
- /**
26
- * Categorizes external positions by protocol type.
27
- *
28
- * Algorithm:
29
- * 1. Batch fetch positions
30
- * 2. Categorize based on account owner and size
31
- *
32
- * @param externalPositions - Array of external position pubkeys from state account
33
- * @returns Categorized positions by protocol type
34
- */
35
- categorizePositions(externalPositions: PublicKey[], commitment: Commitment): Promise<CategorizedPositions>;
36
- }
@@ -1,33 +0,0 @@
1
- import { Connection, Finality, GetProgramAccountsConfig, GetProgramAccountsResponse, PublicKey, SignaturesForAddressOptions, VersionedTransaction, VersionedTransactionResponse } from "@solana/web3.js";
2
- /**
3
- * Fetches program accounts using Helius getProgramAccountsV2 if available.
4
- * Otherwise falls back to standard getProgramAccounts with retry logic.
5
- */
6
- export declare function getProgramAccounts(connection: Connection, programId: PublicKey, config: GetProgramAccountsConfig & HeliusGetProgramAccountsV2Config): Promise<GetProgramAccountsResponse>;
7
- export type HeliusGetProgramAccountsV2Config = {
8
- limit?: number;
9
- changedSinceSlot?: number;
10
- };
11
- /**
12
- * Standard getProgramAccounts with retry logic for transient errors.
13
- */
14
- export declare function getProgramAccountsWithRetry(connection: Connection, programId: PublicKey, config: GetProgramAccountsConfig): Promise<GetProgramAccountsResponse>;
15
- export interface GetTransactionsOptions {
16
- commitment?: Finality;
17
- sinceSlot?: number;
18
- transactionDetails?: "full" | "signatures";
19
- }
20
- /**
21
- * Fetches transactions for an address using Helius getTransactionsForAddress if available.
22
- * Otherwise falls back to getSignaturesForAddress + getTransaction.
23
- */
24
- export declare function getTransactionsForAddress(connection: Connection, address: PublicKey, options?: SignaturesForAddressOptions & GetTransactionsOptions): Promise<VersionedTransactionResponse[]>;
25
- export type PriorityLevel = "Recommended" | "Min" | "Low" | "Medium" | "High" | "VeryHigh" | "UnsafeMax" | "Default";
26
- type GetPriorityFeeEstimateOptions = {
27
- heliusApiKey?: string;
28
- tx?: VersionedTransaction;
29
- accountKeys?: string[];
30
- priorityLevel?: PriorityLevel;
31
- };
32
- export declare function getPriorityFeeEstimate(options: GetPriorityFeeEstimateOptions): Promise<number>;
33
- export {};
@@ -1,52 +0,0 @@
1
- import { PublicKey } from "@solana/web3.js";
2
- import { BN } from "@coral-xyz/anchor";
3
- import { IntegrationAcl, DelegateAcl } from "../models";
4
- /**
5
- * Get protocol names from a bitmask for a given integration program
6
- * Uses the SDK's parseProtocolsBitmask function
7
- */
8
- export declare function getProtocolNamesFromBitmask(integrationProgram: PublicKey, bitmask: number, staging: boolean): string[];
9
- /**
10
- * Get permission names from a permissions bitmask for a protocol
11
- * Uses the SDK's parseProtocolPermissionsBitmask function
12
- */
13
- export declare function getPermissionNamesFromBitmask(integrationProgram: PublicKey, protocolBitflag: number, permissionsBitmask: BN, staging: boolean): string[];
14
- /**
15
- * Compare current and staged PublicKey arrays and return added/removed keys
16
- */
17
- export declare function comparePublicKeyArrays(current: PublicKey[] | null, staged: PublicKey[]): {
18
- added: PublicKey[];
19
- removed: PublicKey[];
20
- };
21
- /**
22
- * Compare current and staged integrationAcls and return the differences
23
- */
24
- export declare function compareIntegrationAcls(current: IntegrationAcl[] | null, staged: IntegrationAcl[] | null, staging: boolean): {
25
- added: IntegrationAcl[];
26
- removed: IntegrationAcl[];
27
- modified: Array<{
28
- integrationProgram: PublicKey;
29
- currentBitmask: number;
30
- stagedBitmask: number;
31
- enabledProtocols: string[];
32
- disabledProtocols: string[];
33
- }>;
34
- };
35
- /**
36
- * Compare current and staged delegateAcls and return the differences
37
- */
38
- export declare function compareDelegateAcls(current: DelegateAcl[] | null, staged: DelegateAcl[] | null, staging: boolean): {
39
- added: DelegateAcl[];
40
- removed: DelegateAcl[];
41
- modified: Array<{
42
- pubkey: PublicKey;
43
- currentExpiresAt: BN;
44
- stagedExpiresAt: BN;
45
- permissionChanges: Array<{
46
- integrationProgram: PublicKey;
47
- protocolName: string;
48
- addedPermissions: string[];
49
- removedPermissions: string[];
50
- }>;
51
- }>;
52
- };
@@ -1,13 +0,0 @@
1
- import { Connection, PublicKey, TransactionInstruction, AddressLookupTableAccount } from "@solana/web3.js";
2
- /**
3
- * Parses program logs to extract error message.
4
- * Checks in order: Anchor "Error Message:", insufficient funds/lamports,
5
- * and custom program error codes (resolved via IDL when possible).
6
- * Returns "Unknown error" if no recognizable error pattern is found.
7
- */
8
- export declare function parseProgramLogs(logs: string[], staging: boolean): string;
9
- export declare const getSimulationResult: (connection: Connection, instructions: Array<TransactionInstruction>, payer: PublicKey, lookupTables?: Array<AddressLookupTableAccount>, staging?: boolean) => Promise<{
10
- unitsConsumed?: number;
11
- error?: Error;
12
- serializedTx?: String;
13
- }>;