@glamsystems/glam-sdk 1.0.14-alpha.4 → 1.0.14-alpha.6

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 (91) hide show
  1. package/index.cjs.js +50322 -20832
  2. package/index.esm.js +50167 -20833
  3. package/package.json +3 -3
  4. package/target/idl/ext_jupiter-staging.json +1960 -0
  5. package/target/idl/ext_jupiter.json +1960 -0
  6. package/target/idl/ext_orca-staging.json +2797 -0
  7. package/target/idl/ext_orca.json +2797 -0
  8. package/target/idl/glam_mint-staging.json +1452 -80
  9. package/target/idl/glam_mint.json +256 -1
  10. package/target/idl/glam_protocol-staging.json +22 -2
  11. package/target/idl/glam_protocol.json +584 -0
  12. package/target/types/ext_jupiter-staging.ts +1966 -0
  13. package/target/types/ext_jupiter.ts +1966 -0
  14. package/target/types/ext_orca-staging.ts +2803 -0
  15. package/target/types/ext_orca.ts +2803 -0
  16. package/target/types/glam_mint-staging.ts +1452 -80
  17. package/target/types/glam_mint.ts +256 -1
  18. package/target/types/glam_protocol-staging.ts +22 -2
  19. package/target/types/glam_protocol.ts +584 -0
  20. package/src/assets.d.ts +0 -40
  21. package/src/client/access.d.ts +0 -57
  22. package/src/client/base.d.ts +0 -180
  23. package/src/client/bridge.d.ts +0 -185
  24. package/src/client/bridgeRegistry.d.ts +0 -32
  25. package/src/client/cctp.d.ts +0 -156
  26. package/src/client/epi.d.ts +0 -78
  27. package/src/client/fees.d.ts +0 -33
  28. package/src/client/invest.d.ts +0 -37
  29. package/src/client/jupiter.d.ts +0 -45
  30. package/src/client/kamino/farm.d.ts +0 -39
  31. package/src/client/kamino/index.d.ts +0 -4
  32. package/src/client/kamino/lending.d.ts +0 -86
  33. package/src/client/kamino/types.d.ts +0 -56
  34. package/src/client/kamino/vaults.d.ts +0 -31
  35. package/src/client/marinade.d.ts +0 -42
  36. package/src/client/mint.d.ts +0 -127
  37. package/src/client/price.d.ts +0 -128
  38. package/src/client/stake-pool.d.ts +0 -39
  39. package/src/client/stake.d.ts +0 -34
  40. package/src/client/state.d.ts +0 -56
  41. package/src/client/timelock.d.ts +0 -31
  42. package/src/client/vault.d.ts +0 -90
  43. package/src/client.d.ts +0 -62
  44. package/src/clientConfig.d.ts +0 -29
  45. package/src/constants.d.ts +0 -82
  46. package/src/deser/base.d.ts +0 -18
  47. package/src/deser/index.d.ts +0 -3
  48. package/src/deser/integrationPolicies.d.ts +0 -106
  49. package/src/deser/kaminoLayouts.d.ts +0 -264
  50. package/src/deser/tokenAclLayouts.d.ts +0 -67
  51. package/src/error.d.ts +0 -29
  52. package/src/glamExports.d.ts +0 -5563
  53. package/src/globalConfig.d.ts +0 -22
  54. package/src/index.d.ts +0 -18
  55. package/src/models/acl.d.ts +0 -43
  56. package/src/models/index.d.ts +0 -8
  57. package/src/models/mint.d.ts +0 -64
  58. package/src/models/state.d.ts +0 -104
  59. package/src/models/types.d.ts +0 -28
  60. package/src/react/cluster-provider.d.ts +0 -22
  61. package/src/react/glam.d.ts +0 -47
  62. package/src/react/index.d.ts +0 -5
  63. package/src/react/query-keys.d.ts +0 -38
  64. package/src/react/useVaultBalanceSubscription.d.ts +0 -17
  65. package/src/utils/accounts.d.ts +0 -72
  66. package/src/utils/bitmask.d.ts +0 -53
  67. package/src/utils/blockhash.d.ts +0 -11
  68. package/src/utils/common.d.ts +0 -37
  69. package/src/utils/computeBudget.d.ts +0 -15
  70. package/src/utils/evm.d.ts +0 -10
  71. package/src/utils/fraction.d.ts +0 -29
  72. package/src/utils/glamPDAs.d.ts +0 -14
  73. package/src/utils/index.d.ts +0 -16
  74. package/src/utils/jupiterApi.d.ts +0 -89
  75. package/src/utils/lookupTables.d.ts +0 -53
  76. package/src/utils/pkmap.d.ts +0 -82
  77. package/src/utils/pkset.d.ts +0 -73
  78. package/src/utils/positionCategorizer.d.ts +0 -36
  79. package/src/utils/rpc.d.ts +0 -33
  80. package/src/utils/timelock.d.ts +0 -52
  81. package/src/utils/transaction.d.ts +0 -13
  82. package/target/types/ext_bridge.d.ts +0 -2385
  83. package/target/types/ext_cctp.d.ts +0 -1268
  84. package/target/types/ext_epi.d.ts +0 -2175
  85. package/target/types/ext_kamino.d.ts +0 -3433
  86. package/target/types/ext_marinade.d.ts +0 -1593
  87. package/target/types/ext_spl.d.ts +0 -1274
  88. package/target/types/ext_stake_pool.d.ts +0 -1622
  89. package/target/types/glam_config.d.ts +0 -755
  90. package/target/types/glam_mint.d.ts +0 -6094
  91. package/target/types/glam_protocol.d.ts +0 -2708
@@ -1,34 +0,0 @@
1
- import { BN } from "@coral-xyz/anchor";
2
- import { PublicKey, VersionedTransaction, TransactionSignature, TransactionInstruction } from "@solana/web3.js";
3
- import { BaseClient, BaseTxBuilder, TxOptions } from "./base";
4
- declare class TxBuilder extends BaseTxBuilder<StakeClient> {
5
- initializeAndDelegateStakeIxs(vote: PublicKey, amount: BN, glamSigner: PublicKey): Promise<[TransactionInstruction[], PublicKey]>;
6
- initializeAndDelegateStakeTx(vote: PublicKey, amount: BN, txOptions?: TxOptions): Promise<[VersionedTransaction, PublicKey]>;
7
- deactivateStakesIx(stakeAccounts: PublicKey[], glamSigner: PublicKey): Promise<TransactionInstruction>;
8
- deactivateStakesTx(stakeAccounts: PublicKey[], txOptions?: TxOptions): Promise<VersionedTransaction>;
9
- withdrawStakesIx(stakeAccounts: PublicKey[], glamSigner: PublicKey): Promise<TransactionInstruction>;
10
- withdrawStakesTx(stakeAccounts: PublicKey[], txOptions?: TxOptions): Promise<VersionedTransaction>;
11
- mergeStakeIx(destinationStake: PublicKey, sourceStake: PublicKey, glamSigner: PublicKey): Promise<TransactionInstruction>;
12
- mergeStakeTx(destinationStake: PublicKey, sourceStake: PublicKey, txOptions?: TxOptions): Promise<VersionedTransaction>;
13
- splitStakeIxs(existingStake: PublicKey, lamports: BN, glamSigner: PublicKey): Promise<[TransactionInstruction[], PublicKey]>;
14
- splitStakeTx(existingStake: PublicKey, lamports: BN, txOptions?: TxOptions): Promise<[VersionedTransaction, PublicKey]>;
15
- moveStakeIx(sourceStake: PublicKey, destinationStake: PublicKey, amount: BN, glamSigner: PublicKey): Promise<any>;
16
- moveStakeTx(sourceStake: PublicKey, destinationStake: PublicKey, amount: BN, txOptions?: TxOptions): Promise<VersionedTransaction>;
17
- }
18
- export declare class StakeClient {
19
- readonly base: BaseClient;
20
- readonly txBuilder: TxBuilder;
21
- constructor(base: BaseClient);
22
- initializeAndDelegateStake(vote: PublicKey, amount: BN, txOptions?: TxOptions): Promise<TransactionSignature>;
23
- deactivate(stakeAccounts: PublicKey[], txOptions?: TxOptions): Promise<TransactionSignature>;
24
- withdraw(stakeAccounts: PublicKey[], txOptions?: TxOptions): Promise<TransactionSignature>;
25
- merge(destinationStake: PublicKey, sourceStake: PublicKey, txOptions?: TxOptions): Promise<TransactionSignature>;
26
- split(existingStake: PublicKey, lamports: BN, txOptions?: TxOptions): Promise<{
27
- newStake: PublicKey;
28
- txSig: TransactionSignature;
29
- }>;
30
- move(sourceStake: PublicKey, destinationStake: PublicKey, amount: BN, txOptions?: TxOptions): Promise<TransactionSignature>;
31
- getStakeAccountVoter(stakeAccount: PublicKey): Promise<PublicKey | null>;
32
- createStakeAccount(signer: PublicKey): Promise<[PublicKey, TransactionInstruction]>;
33
- }
34
- export {};
@@ -1,56 +0,0 @@
1
- import { VersionedTransaction, TransactionSignature, PublicKey, TransactionInstruction } from "@solana/web3.js";
2
- import { BaseClient, BaseTxBuilder, TxOptions } from "./base";
3
- import { StateIdlModel, StateAccountType } from "../models";
4
- export type InitStateParams = {
5
- accountType: StateAccountType;
6
- name: number[];
7
- baseAssetMint: PublicKey;
8
- } & Partial<StateIdlModel>;
9
- /**
10
- * A subset of StateIdlModel fields that are updatable using updateState instruction
11
- */
12
- export type UpdateStateParams = {
13
- name?: number[];
14
- owner?: PublicKey;
15
- portfolioManagerName?: number[];
16
- timelockDuration?: number;
17
- assets?: PublicKey[];
18
- borrowable?: PublicKey[];
19
- };
20
- declare class TxBuilder extends BaseTxBuilder<StateClient> {
21
- initializeIx(params: InitStateParams, glamSigner: PublicKey): Promise<[TransactionInstruction, PublicKey]>;
22
- initializeTx(params: InitStateParams, txOptions?: TxOptions): Promise<[VersionedTransaction, PublicKey]>;
23
- updateIx(params: UpdateStateParams, glamSigner: PublicKey): Promise<TransactionInstruction>;
24
- updateTx(params: UpdateStateParams, txOptions: TxOptions): Promise<VersionedTransaction>;
25
- extendIx(newBytes: number, glamSigner: PublicKey): Promise<TransactionInstruction>;
26
- extendTx(newBytes: number, txOptions?: TxOptions): Promise<VersionedTransaction>;
27
- closeIx(glamSigner: PublicKey): Promise<TransactionInstruction>;
28
- closeTx(txOptions?: TxOptions): Promise<VersionedTransaction>;
29
- }
30
- export declare class StateClient {
31
- readonly base: BaseClient;
32
- readonly txBuilder: TxBuilder;
33
- constructor(base: BaseClient);
34
- /**
35
- * Creates a new GLAM state
36
- */
37
- initialize(params: InitStateParams, txOptions?: TxOptions): Promise<TransactionSignature>;
38
- /**
39
- * Updates the GLAM state account.
40
- *
41
- * If no timelock , the updates will be applied immediately.
42
- * If timelock is enabled, the updates will be staged and can be applied after the timelock period.
43
- *
44
- * Only the fields provided in `params` will be updated; omitted fields remain unchanged.
45
- */
46
- update(params: UpdateStateParams, txOptions?: TxOptions): Promise<TransactionSignature>;
47
- /**
48
- * Extends GLAM state account size
49
- */
50
- extend(newBytes: number, txOptions?: TxOptions): Promise<TransactionSignature>;
51
- /**
52
- * Closes GLAM state account
53
- */
54
- close(txOptions?: TxOptions): Promise<TransactionSignature>;
55
- }
56
- export {};
@@ -1,31 +0,0 @@
1
- import { VersionedTransaction, TransactionSignature, PublicKey, TransactionInstruction } from "@solana/web3.js";
2
- import { BaseClient, BaseTxBuilder, TxOptions } from "./base";
3
- import { StateClient } from "./state";
4
- declare class TxBuilder extends BaseTxBuilder<TimelockClient> {
5
- applyStateTimelockIx(glamSigner: PublicKey): Promise<TransactionInstruction>;
6
- applyStateTimelockTx(txOptions?: TxOptions): Promise<VersionedTransaction>;
7
- applyMintTimelockIx(glamSigner: PublicKey): Promise<TransactionInstruction>;
8
- applyMintTimelockTx(txOptions?: TxOptions): Promise<VersionedTransaction>;
9
- cancelTimelockIx(glamSigner: PublicKey): Promise<TransactionInstruction>;
10
- cancelTimelockTx(txOptions?: TxOptions): Promise<VersionedTransaction>;
11
- }
12
- export declare class TimelockClient {
13
- readonly base: BaseClient;
14
- readonly stateClient: StateClient;
15
- readonly txBuilder: TxBuilder;
16
- constructor(base: BaseClient, stateClient: StateClient);
17
- /**
18
- * Sets the timelock duration in seconds
19
- * @param durationSeconds Duration in seconds for timelock period
20
- */
21
- set(durationSeconds: number, txOptions?: TxOptions): Promise<TransactionSignature>;
22
- /**
23
- * Applies pending timelock updates after timelock expires.
24
- */
25
- apply(txOptions?: TxOptions): Promise<TransactionSignature>;
26
- /**
27
- * Cancels pending timelock updates
28
- */
29
- cancel(txOptions?: TxOptions): Promise<TransactionSignature>;
30
- }
31
- export {};
@@ -1,90 +0,0 @@
1
- import { BN } from "@coral-xyz/anchor";
2
- import { PublicKey, VersionedTransaction, TransactionSignature, TransactionInstruction } from "@solana/web3.js";
3
- import { BaseClient, BaseTxBuilder, TxOptions } from "./base";
4
- declare class TxBuilder extends BaseTxBuilder<VaultClient> {
5
- wrapIxs(amount: BN, glamSigner: PublicKey): Promise<TransactionInstruction[]>;
6
- wrapTx(amount: BN, txOptions: TxOptions): Promise<VersionedTransaction>;
7
- unwrapIx(glamSigner: PublicKey): Promise<TransactionInstruction>;
8
- unwrapTx(txOptions: TxOptions): Promise<VersionedTransaction>;
9
- systemTransferIx(amount: BN, to: PublicKey, glamSigner: PublicKey): Promise<TransactionInstruction>;
10
- systemTransferTx(amount: BN, to: PublicKey, txOptions: TxOptions): Promise<VersionedTransaction>;
11
- /**
12
- * Returns an instruction that closes the specified vault token account
13
- */
14
- closeTokenAccountIx(tokenAccount: PublicKey, tokenProgram: PublicKey, signer?: PublicKey): Promise<TransactionInstruction>;
15
- closeTokenAccountsTx(pubkeys: PublicKey[], txOptions: TxOptions): Promise<VersionedTransaction>;
16
- depositSolIxs(lamports: number | BN, wrap: boolean, glamSigner: PublicKey): Promise<TransactionInstruction[]>;
17
- depositSolTx(lamports: number | BN, wrap?: boolean, txOptions?: TxOptions): Promise<VersionedTransaction>;
18
- depositIxs(asset: PublicKey, amount: number | BN, glamSigner: PublicKey): Promise<TransactionInstruction[]>;
19
- depositTx(asset: PublicKey, amount: number | BN, txOptions: TxOptions): Promise<VersionedTransaction>;
20
- /**
21
- * Transfers tokens held by the vault to the specified recipient
22
- */
23
- tokenTransferIxs(mint: PublicKey, amount: number | BN, to: PublicKey, glamSigner: PublicKey): Promise<TransactionInstruction[]>;
24
- tokenTransferTx(mint: PublicKey, amount: number | BN, to: PublicKey, txOptions: TxOptions): Promise<VersionedTransaction>;
25
- }
26
- export declare class VaultClient {
27
- readonly base: BaseClient;
28
- readonly txBuilder: TxBuilder;
29
- constructor(base: BaseClient);
30
- /**
31
- * Wraps vault SOL to wSOL
32
- *
33
- * @param amount
34
- * @param txOptions
35
- */
36
- wrap(amount: BN | number, txOptions?: TxOptions): Promise<TransactionSignature>;
37
- /**
38
- * Unwraps vault wSOL to SOL
39
- *
40
- * @param txOptions
41
- */
42
- unwrap(txOptions?: TxOptions): Promise<TransactionSignature>;
43
- /**
44
- * Transfers SOL from vault to another account
45
- *
46
- * @param amount
47
- * @param to
48
- * @param txOptions
49
- */
50
- systemTransfer(amount: BN | number, to: PublicKey | string, txOptions?: TxOptions): Promise<TransactionSignature>;
51
- /**
52
- * Transfers token from vault to another account
53
- *
54
- * @param mint
55
- * @param amount
56
- * @param txOptions
57
- */
58
- tokenTransfer(mint: PublicKey | string, amount: number | BN, to: PublicKey | string, txOptions?: TxOptions): Promise<TransactionSignature>;
59
- /**
60
- * Closes multiple vault token accounts
61
- *
62
- * @param tokenAccounts
63
- * @param txOptions
64
- */
65
- closeTokenAccounts(tokenAccounts: PublicKey[] | string[], txOptions?: TxOptions): Promise<TransactionSignature>;
66
- /**
67
- * Deposits token to vault
68
- *
69
- * @param mint Token mint
70
- * @param amount
71
- * @param txOptions
72
- */
73
- deposit(mint: PublicKey | string, amount: number | BN, txOptions?: TxOptions): Promise<TransactionSignature>;
74
- /**
75
- * Deposits SOL to vault
76
- *
77
- * @param lamports
78
- * @param wrap Whether to wrap SOL to wSOL or not
79
- * @param txOptions
80
- */
81
- depositSol(lamports: number | BN, wrap?: boolean, txOptions?: TxOptions): Promise<TransactionSignature>;
82
- /**
83
- * Generates instructions to wrap SOL into wSOL if the vault doesn't have enough wSOL
84
- *
85
- * @param lamports Desired amount of wSOL
86
- * @returns Array of instructions, empty if wSOL is sufficient
87
- */
88
- maybeWrapSol(lamports: number | BN, signer?: PublicKey): Promise<TransactionInstruction[]>;
89
- }
90
- export {};
package/src/client.d.ts DELETED
@@ -1,62 +0,0 @@
1
- import { GlamClientConfig } from "./clientConfig";
2
- import { BaseClient } from "./client/base";
3
- import { JupiterSwapClient } from "./client/jupiter";
4
- import { MarinadeClient } from "./client/marinade";
5
- import { VaultClient } from "./client/vault";
6
- import { StateClient } from "./client/state";
7
- import { KaminoLendingClient, KaminoFarmClient, KaminoVaultsClient } from "./client/kamino";
8
- import { InvestClient } from "./client/invest";
9
- import { PriceClient } from "./client/price";
10
- import { FeesClient } from "./client/fees";
11
- import { MintClient } from "./client/mint";
12
- import { AccessClient } from "./client/access";
13
- import { TimelockClient } from "./client/timelock";
14
- import { StakeClient } from "./client/stake";
15
- import { StakePoolClient } from "./client/stake-pool";
16
- import { CctpClient } from "./client/cctp";
17
- import { BridgeClient } from "./client/bridge";
18
- import { EpiClient } from "./client/epi";
19
- /**
20
- * Main entrypoint for the GLAM SDK
21
- *
22
- * Lazy loads each client/module at first use
23
- */
24
- export declare class GlamClient extends BaseClient {
25
- private _invest?;
26
- private _jupiterSwap?;
27
- private _marinade?;
28
- private _vault?;
29
- private _price?;
30
- private _stake?;
31
- private _stakePool?;
32
- private _state?;
33
- private _mint?;
34
- private _access?;
35
- private _kaminoLending?;
36
- private _kaminoFarm?;
37
- private _kaminoVaults?;
38
- private _fees?;
39
- private _timelock?;
40
- private _cctp?;
41
- private _bridge?;
42
- private _epi?;
43
- constructor(config?: GlamClientConfig);
44
- get invest(): InvestClient;
45
- get fees(): FeesClient;
46
- get jupiterSwap(): JupiterSwapClient;
47
- get marinade(): MarinadeClient;
48
- get vault(): VaultClient;
49
- get stake(): StakeClient;
50
- get stakePool(): StakePoolClient;
51
- get price(): PriceClient;
52
- get state(): StateClient;
53
- get access(): AccessClient;
54
- get mint(): MintClient;
55
- get kaminoLending(): KaminoLendingClient;
56
- get kaminoFarm(): KaminoFarmClient;
57
- get kaminoVaults(): KaminoVaultsClient;
58
- get timelock(): TimelockClient;
59
- get cctp(): CctpClient;
60
- get bridge(): BridgeClient;
61
- get epi(): EpiClient;
62
- }
@@ -1,29 +0,0 @@
1
- import { Provider, Wallet } from "@coral-xyz/anchor";
2
- import { PublicKey } from "@solana/web3.js";
3
- import { JupiterApiClient } from "./utils";
4
- export declare enum ClusterNetwork {
5
- Mainnet = "mainnet-beta",
6
- Testnet = "testnet",
7
- Devnet = "devnet",
8
- Localnet = "localnet",
9
- Custom = "custom"
10
- }
11
- export declare namespace ClusterNetwork {
12
- function fromStr(cluster: string): ClusterNetwork;
13
- /**
14
- * Detects the Solana cluster network from an RPC endpoint URL
15
- *
16
- * @param rpcUrl The RPC endpoint URL
17
- * @returns The detected cluster network
18
- */
19
- function fromUrl(rpcUrl: string): ClusterNetwork;
20
- }
21
- export type GlamClientConfig = {
22
- provider?: Provider;
23
- wallet?: Wallet;
24
- cluster?: ClusterNetwork;
25
- statePda?: PublicKey;
26
- jupiterApiKey?: string;
27
- jupiterApiClient?: JupiterApiClient;
28
- useStaging?: boolean;
29
- };
@@ -1,82 +0,0 @@
1
- import { PublicKey } from "@solana/web3.js";
2
- export declare const SEED_STATE = "state";
3
- export declare const SEED_VAULT = "vault";
4
- export declare const SEED_METADATA = "metadata";
5
- export declare const SEED_MINT = "mint";
6
- export declare const SEED_ESCROW = "escrow";
7
- export declare const SEED_REQUEST_QUEUE = "request-queue";
8
- export declare const SEED_ACCOUNT_POLICY = "account-policy";
9
- export declare const SEED_EXTRA_ACCOUNT_METAS = "extra-account-metas";
10
- export declare const SEED_GLOBAL_CONFIG = "global-config";
11
- export declare const SEED_INTEGRATION_AUTHORITY = "integration-authority";
12
- export declare const SEED_OBSERVATION_STATE = "observation-state";
13
- export declare const SEED_BRIDGE_REGISTRY = "bridge-registry";
14
- export declare const SEED_BRIDGE_SESSION = "bridge-session";
15
- export declare const SEED_BRIDGE_TRANSFER_RECORD = "bridge-transfer-record";
16
- export declare const STAKE_ACCOUNT_SIZE = 200;
17
- export declare const METEORA_POSITION_SIZE = 8120;
18
- export declare const KAMINO_OBTRIGATION_SIZE = 3344;
19
- export declare const KAMINO_RESERVE_SIZE = 8624;
20
- export declare const KAMINO_VAULT_STATE_SIZE = 62552;
21
- export declare const JITO_TIP_DEFAULT: PublicKey;
22
- export declare const MARINADE_NATIVE_STAKE_AUTHORITY: PublicKey;
23
- /**
24
- * Token mints. If no devnet version is defined, assume mainnet and devnet addresses are the same.
25
- *
26
- * Unless otherwise noted, all mints have 9 decimals.
27
- */
28
- export declare const WSOL: PublicKey;
29
- export declare const MSOL: PublicKey;
30
- export declare const USDC: PublicKey;
31
- export declare const USDC_DEVNET: PublicKey;
32
- export declare const USDT: PublicKey;
33
- export declare const JUP: PublicKey;
34
- /**
35
- * Program IDs
36
- */
37
- export declare const MARINADE_PROGRAM_ID: PublicKey;
38
- export declare const JUPITER_PROGRAM_ID: PublicKey;
39
- export declare const SANCTUM_STAKE_POOL_PROGRAM_ID: PublicKey;
40
- export declare const KAMINO_LENDING_PROGRAM: PublicKey;
41
- export declare const KAMINO_VAULTS_PROGRAM: PublicKey;
42
- export declare const KAMINO_FARM_PROGRAM: PublicKey;
43
- export declare const MEMO_PROGRAM: PublicKey;
44
- export declare const ALT_PROGRAM_ID: PublicKey;
45
- export declare const TOKEN_MESSENGER_MINTER_V2: PublicKey;
46
- export declare const MESSAGE_TRANSMITTER_V2: PublicKey;
47
- /**
48
- * Token ACL (sRFC-37)
49
- */
50
- export declare const TOKEN_ACL_PROGRAM: PublicKey;
51
- export declare const TOKEN_ACL_GATE_PROGRAM: PublicKey;
52
- /**
53
- * GLAM programs
54
- */
55
- export declare const TRANSFER_HOOK_PROGRAM: PublicKey;
56
- export declare const GLAM_CONFIG_PROGRAM: PublicKey;
57
- /**
58
- * Referrers
59
- */
60
- export declare const GLAM_REFERRER: PublicKey;
61
- /**
62
- * CCTP domain to chain name mapping
63
- */
64
- export declare const CCTP_DOMAIN_MAPPING: Record<number, string>;
65
- /**
66
- * Get protocol and permission mappings at runtime to ensure correct program IDs based on environment.
67
- *
68
- * This method provides the source of truth for protocol and permission mappings and staging status in SDK.
69
- */
70
- export declare const getProtocolsAndPermissions: (staging: boolean) => Record<string, Record<string, {
71
- name: string;
72
- staging: boolean;
73
- permissions: Record<number, string>;
74
- }>>;
75
- /**
76
- * (Program ID, Bitflag) -> Protocol Name
77
- */
78
- export declare const getProtocolNameByProgramAndBitflag: (staging: boolean) => Record<string, Record<string, string>>;
79
- /**
80
- * Protocol Name -> (Program ID, Bitflag)
81
- */
82
- export declare const getProgramAndBitflagByProtocolName: (staging: boolean) => Record<string, [string, string]>;
@@ -1,18 +0,0 @@
1
- import { struct } from "@coral-xyz/borsh";
2
- import { PublicKey } from "@solana/web3.js";
3
- /**
4
- * Base class for decodable on-chain account structures.
5
- *
6
- * This class provides a generic decode method that can be inherited by all
7
- * account deserializer classes, eliminating the need to implement the same
8
- * decode logic in each class.
9
- */
10
- export declare abstract class Decodable {
11
- readonly _address: PublicKey;
12
- static _layout: ReturnType<typeof struct>;
13
- static decode<T extends Decodable>(this: {
14
- new (): T;
15
- _layout: ReturnType<typeof struct>;
16
- }, address: PublicKey, buffer: Buffer): T;
17
- getAddress(): PublicKey;
18
- }
@@ -1,3 +0,0 @@
1
- export { Decodable } from "./base";
2
- export * from "./kaminoLayouts";
3
- export * from "./tokenAclLayouts";
@@ -1,106 +0,0 @@
1
- import { BN } from "@coral-xyz/anchor";
2
- import { PublicKey } from "@solana/web3.js";
3
- export declare class MintPolicy {
4
- lockupPeriod: number;
5
- maxCap: BN;
6
- minSubscription: BN;
7
- minRedemption: BN;
8
- reserved: BN;
9
- allowlist: PublicKey[] | null;
10
- blocklist: PublicKey[] | null;
11
- static _layout: any;
12
- constructor(lockupPeriod: number, maxCap: BN, minSubscription: BN, minRedemption: BN, reserved: BN, allowlist: PublicKey[] | null, blocklist: PublicKey[] | null);
13
- static decode(buffer: Buffer): MintPolicy;
14
- encode(): Buffer;
15
- }
16
- export declare class JupiterSwapPolicy {
17
- maxSlippageBps: number;
18
- swapAllowlist: PublicKey[] | null;
19
- maxDeviationBps: number;
20
- constructor(maxSlippageBps: number, swapAllowlist: PublicKey[] | null, maxDeviationBps?: number);
21
- static decode(buffer: Buffer<ArrayBufferLike>): JupiterSwapPolicy;
22
- encode(): Buffer;
23
- }
24
- export declare class TransferPolicy {
25
- allowlist: PublicKey[];
26
- static _layout: any;
27
- constructor(allowlist: PublicKey[]);
28
- static decode(buffer: Buffer<ArrayBufferLike>): TransferPolicy;
29
- encode(): Buffer;
30
- }
31
- export declare class KaminoLendingPolicy {
32
- marketsAllowlist: PublicKey[];
33
- borrowAllowlist: PublicKey[];
34
- static _layout: any;
35
- constructor(marketsAllowlist: PublicKey[], borrowAllowlist: PublicKey[]);
36
- static decode(buffer: Buffer<ArrayBufferLike>): KaminoLendingPolicy;
37
- encode(): Buffer;
38
- }
39
- export declare class KaminoVaultsPolicy {
40
- vaultsAllowlist: PublicKey[];
41
- static _layout: any;
42
- constructor(vaultsAllowlist: PublicKey[]);
43
- static decode(buffer: Buffer<ArrayBufferLike>): KaminoVaultsPolicy;
44
- encode(): Buffer;
45
- }
46
- export declare class CctpPolicy {
47
- allowedDestinations: {
48
- domain: number;
49
- address: PublicKey;
50
- }[];
51
- static _layout: any;
52
- constructor(allowedDestinations: {
53
- domain: number;
54
- address: PublicKey;
55
- }[]);
56
- static decode(buffer: Buffer<ArrayBufferLike>): CctpPolicy;
57
- encode(): Buffer;
58
- get domainToAddressesMap(): Map<number, PublicKey[]>;
59
- }
60
- export declare enum RouteManagementMode {
61
- UnmanagedOnly = 0,
62
- ManagedOnly = 1,
63
- Either = 2
64
- }
65
- export type LayerzeroOftRoute = {
66
- sourceMint: PublicKey;
67
- destinationChain: number;
68
- destinationRecipient: PublicKey;
69
- providerProgram: PublicKey;
70
- managementMode: RouteManagementMode;
71
- minAmount: BN;
72
- maxAmount: BN;
73
- };
74
- export declare class LayerzeroOftPolicy {
75
- routes: LayerzeroOftRoute[];
76
- static _layout: any;
77
- constructor(routes: LayerzeroOftRoute[]);
78
- static decode(buffer: Buffer<ArrayBufferLike>, _staging?: boolean): LayerzeroOftPolicy;
79
- encode(): Buffer;
80
- }
81
- export declare enum PeriodType {
82
- Day = 0,
83
- Week = 1,
84
- Month = 2
85
- }
86
- export interface AssetRateLimit {
87
- mint: PublicKey;
88
- periodType: number;
89
- amount: BN;
90
- }
91
- export interface DelegateRateLimit {
92
- delegate: PublicKey;
93
- limits: AssetRateLimit[];
94
- }
95
- export declare class TransferRateLimitPolicy {
96
- vaultDefaults: AssetRateLimit[];
97
- delegateOverrides: DelegateRateLimit[];
98
- static _layout: any;
99
- constructor(vaultDefaults: AssetRateLimit[], delegateOverrides: DelegateRateLimit[]);
100
- static decode(buffer: Buffer<ArrayBufferLike>): TransferRateLimitPolicy;
101
- encode(): Buffer;
102
- /**
103
- * Derive the TransferTracker PDA address for a given vault state, signer, and mint.
104
- */
105
- static getTransferTrackerPda(glamState: PublicKey, signer: PublicKey, mint: PublicKey, programId: PublicKey): [PublicKey, number];
106
- }