@glamsystems/glam-sdk 1.0.12 → 1.0.14-alpha.0
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/README.md +1 -1
- package/index.cjs.js +23827 -26772
- package/index.esm.js +23795 -26716
- package/package.json +2 -2
- package/src/assets.d.ts +9 -15
- package/src/client/access.d.ts +13 -0
- package/src/client/base.d.ts +27 -6
- package/src/client/bridge.d.ts +184 -0
- package/src/client/bridgeRegistry.d.ts +32 -0
- package/src/client/epi.d.ts +78 -0
- package/src/client/fees.d.ts +4 -0
- package/src/client/invest.d.ts +1 -1
- package/src/client/jupiter.d.ts +22 -18
- package/src/client/mint.d.ts +54 -1
- package/src/client/price.d.ts +13 -37
- package/src/client.d.ts +6 -5
- package/src/constants.d.ts +10 -7
- package/src/deser/index.d.ts +1 -1
- package/src/deser/integrationPolicies.d.ts +23 -20
- package/src/deser/tokenAclLayouts.d.ts +67 -0
- package/src/error.d.ts +2 -1
- package/src/glamExports.d.ts +2344 -1758
- package/src/globalConfig.d.ts +22 -0
- package/src/index.d.ts +4 -1
- package/src/react/glam.d.ts +0 -4
- package/src/react/query-keys.d.ts +1 -3
- package/src/utils/accounts.d.ts +9 -1
- package/src/utils/bitmask.d.ts +3 -0
- package/src/utils/common.d.ts +2 -0
- package/src/utils/glamPDAs.d.ts +5 -0
- package/src/utils/index.d.ts +0 -1
- package/src/utils/positionCategorizer.d.ts +3 -21
- package/target/idl/ext_cctp.json +1 -1
- package/target/idl/ext_kamino-staging.json +1 -1
- package/target/idl/ext_kamino.json +109 -1
- package/target/idl/ext_spl-staging.json +1 -1
- package/target/idl/ext_spl.json +1 -1
- package/target/idl/glam_config.json +78 -9
- package/target/idl/glam_mint-staging.json +865 -0
- package/target/idl/glam_mint.json +227 -8
- package/target/idl/glam_policies.json +2 -7
- package/target/idl/glam_protocol-staging.json +176 -275
- package/target/idl/glam_protocol.json +212 -114
- package/target/types/ext_bridge.d.ts +2397 -0
- package/target/types/ext_cctp.d.ts +1 -1
- package/target/types/ext_cctp.ts +1 -1
- package/target/types/ext_epi.d.ts +2175 -0
- package/target/types/ext_kamino-staging.ts +1 -1
- package/target/types/ext_kamino.d.ts +109 -1
- package/target/types/ext_kamino.ts +109 -1
- package/target/types/ext_spl-staging.ts +1 -1
- package/target/types/ext_spl.d.ts +1 -1
- package/target/types/ext_spl.ts +1 -1
- package/target/types/glam_config.d.ts +78 -9
- package/target/types/glam_config.ts +78 -9
- package/target/types/glam_mint-staging.ts +865 -0
- package/target/types/glam_mint.d.ts +227 -8
- package/target/types/glam_mint.ts +227 -8
- package/target/types/glam_policies.ts +2 -7
- package/target/types/glam_protocol-staging.ts +176 -275
- package/target/types/glam_protocol.d.ts +212 -114
- package/target/types/glam_protocol.ts +212 -114
- package/src/client/drift/index.d.ts +0 -2
- package/src/client/drift/protocol-v2.d.ts +0 -93
- package/src/client/drift/vaults.d.ts +0 -60
- package/src/deser/driftLayouts.d.ts +0 -217
- package/src/utils/drift/index.d.ts +0 -2
- package/src/utils/drift/orderParams.d.ts +0 -28
- package/src/utils/drift/types.d.ts +0 -522
- package/target/idl/ext_drift-staging.json +0 -3993
- package/target/idl/ext_drift.json +0 -3993
- package/target/types/ext_drift-staging.ts +0 -3999
- package/target/types/ext_drift.d.ts +0 -3999
- package/target/types/ext_drift.ts +0 -3999
- package/target/types/ext_offchain.d.ts +0 -1074
package/src/client/price.d.ts
CHANGED
|
@@ -3,9 +3,8 @@ import { BN } from "@coral-xyz/anchor";
|
|
|
3
3
|
import { KaminoLendingClient, KaminoVaultsClient } from "./kamino";
|
|
4
4
|
import { BaseClient } from "./base";
|
|
5
5
|
import { StateModel } from "../models";
|
|
6
|
-
import { DriftProtocolClient, DriftVaultsClient } from "./drift";
|
|
7
6
|
import { PkMap, PkSet } from "../utils";
|
|
8
|
-
import {
|
|
7
|
+
import { KVaultState, Reserve } from "../deser";
|
|
9
8
|
import { JupiterApiClient, TokenListItem } from "../utils/jupiterApi";
|
|
10
9
|
/**
|
|
11
10
|
* Represents a single asset holding within a vault.
|
|
@@ -31,7 +30,7 @@ export declare class Holding {
|
|
|
31
30
|
}
|
|
32
31
|
/**
|
|
33
32
|
* Aggregates all holdings for a GLAM vault.
|
|
34
|
-
* Includes token balances
|
|
33
|
+
* Includes token balances and supported DeFi positions.
|
|
35
34
|
*
|
|
36
35
|
* @param vaultState - The vault's state account address (stores vault configuration)
|
|
37
36
|
* @param vaultPda - The vault's PDA that holds tokens and positions
|
|
@@ -56,13 +55,12 @@ export declare class PriceClient {
|
|
|
56
55
|
readonly base: BaseClient;
|
|
57
56
|
readonly klend: KaminoLendingClient;
|
|
58
57
|
readonly kvaults: KaminoVaultsClient;
|
|
59
|
-
readonly drift: DriftProtocolClient;
|
|
60
|
-
readonly dvaults: DriftVaultsClient;
|
|
61
58
|
private readonly getJupiterApi;
|
|
62
59
|
private _stateModel;
|
|
63
60
|
private _lookupTables;
|
|
64
61
|
private _kaminoVaults;
|
|
65
|
-
|
|
62
|
+
private _priceVaultIxsQueue;
|
|
63
|
+
constructor(base: BaseClient, klend: KaminoLendingClient, kvaults: KaminoVaultsClient, getJupiterApi: () => JupiterApiClient);
|
|
66
64
|
get jupiterApi(): JupiterApiClient;
|
|
67
65
|
get cachedStateModel(): StateModel | null;
|
|
68
66
|
set cachedStateModel(stateModel: StateModel);
|
|
@@ -73,8 +71,6 @@ export declare class PriceClient {
|
|
|
73
71
|
*
|
|
74
72
|
* The source of truth for external positions is the `externalPositions` array
|
|
75
73
|
* from the state account, which tracks:
|
|
76
|
-
* - Drift user PDAs (direct trading positions)
|
|
77
|
-
* - Drift vault depositor accounts (shares in drift vaults)
|
|
78
74
|
* - Kamino obligation accounts (lending positions)
|
|
79
75
|
* - Kamino vault share ATAs (shares in kamino vaults)
|
|
80
76
|
*
|
|
@@ -85,12 +81,6 @@ export declare class PriceClient {
|
|
|
85
81
|
*/
|
|
86
82
|
getVaultHoldings(commitment: Commitment, priceBaseAssetMint?: PublicKey): Promise<VaultHoldings>;
|
|
87
83
|
getPubkeysForTokenHoldings(externalPositionsSet: PkSet, commitment?: Commitment): Promise<PublicKey[]>;
|
|
88
|
-
getPubkeysForSpotHoldings(driftUserPdas: PublicKey[], commitment?: Commitment): Promise<PkMap<PkSet>>;
|
|
89
|
-
getPubkeysForPerpHoldings(driftUserPdas: PublicKey[], commitment?: Commitment): Promise<PkMap<PkSet>>;
|
|
90
|
-
/**
|
|
91
|
-
* Parses drift vault depositors from known pubkeys.
|
|
92
|
-
*/
|
|
93
|
-
getDepositorsAndDriftVaults(depositorPubkeys: PublicKey[], commitment?: Commitment): Promise<PkMap<DriftVault>>;
|
|
94
84
|
/**
|
|
95
85
|
* Gets kamino obligation reserves from known obligation pubkeys.
|
|
96
86
|
*/
|
|
@@ -106,8 +96,6 @@ export declare class PriceClient {
|
|
|
106
96
|
*/
|
|
107
97
|
private getTokenPrice;
|
|
108
98
|
getTokenHoldings(tokenAccountPubkeys: PublicKey[], accountsDataMap: PkMap<Buffer>, tokenPricesMap: PkMap<TokenListItem>, priceSource: string): Promise<Holding[]>;
|
|
109
|
-
getDriftHoldings(userPubkeys: Iterable<PublicKey>, spotMarketsMap: PkMap<DriftSpotMarket>, perpMarketsMap: PkMap<DriftPerpMarket>, accountsDataMap: PkMap<Buffer>, tokenPricesMap: PkMap<TokenListItem>, priceSource: string): Promise<Holding[]>;
|
|
110
|
-
getDriftVaultsHoldings(dvaultDepositorsAndVaults: PkMap<DriftVault>, dvaultDepositorsMap: PkMap<DriftVaultDepositor>, spotMarketsMap: PkMap<DriftSpotMarket>, perpMarketsMap: PkMap<DriftPerpMarket>, accountsDataMap: PkMap<Buffer>, tokenPricesMap: PkMap<TokenListItem>, priceSource: string): Promise<Holding[]>;
|
|
111
99
|
getKaminoLendHoldings(obligationPubkeys: Iterable<PublicKey>, reservesMap: PkMap<Reserve>, accountsDataMap: PkMap<Buffer>, tokenPricesMap: PkMap<TokenListItem>, priceSource: string): Promise<Holding[]>;
|
|
112
100
|
getKaminoVaultsHoldings(kvaultAtasAndStates: PkMap<KVaultState>, reservesMap: PkMap<Reserve>, accountsDataMap: PkMap<Buffer>, tokenPricesMap: PkMap<TokenListItem>, priceSource: string): Promise<Holding[]>;
|
|
113
101
|
/**
|
|
@@ -116,35 +104,23 @@ export declare class PriceClient {
|
|
|
116
104
|
*/
|
|
117
105
|
priceKaminoObligationsIxs(): Promise<TransactionInstruction[]>;
|
|
118
106
|
priceKaminoVaultSharesIx(): Promise<TransactionInstruction[] | null>;
|
|
119
|
-
/**
|
|
120
|
-
* Returns an instruction that prices all Drift users (aka sub-accounts) controlled by the GLAM vault.
|
|
121
|
-
*/
|
|
122
|
-
priceDriftUsersIx(): Promise<TransactionInstruction | null>;
|
|
123
|
-
/**
|
|
124
|
-
* Returns an instruction that prices a drift vault depositor.
|
|
125
|
-
* If there are no vault depositor accounts, returns null.
|
|
126
|
-
*/
|
|
127
|
-
priceDriftVaultDepositorsIx(): Promise<TransactionInstruction | null>;
|
|
128
107
|
/**
|
|
129
108
|
* Returns an instruction that prices vault balance and tokens
|
|
130
109
|
*/
|
|
131
|
-
priceVaultTokensIx(): Promise<TransactionInstruction>;
|
|
110
|
+
priceVaultTokensIx(): Promise<TransactionInstruction[]>;
|
|
132
111
|
/**
|
|
133
112
|
* Returns an instruction that prices stake accounts.
|
|
134
113
|
* If there are no stake accounts, returns null.
|
|
135
114
|
*/
|
|
136
115
|
priceStakeAccountsIx(): Promise<TransactionInstruction | null>;
|
|
137
116
|
priceVaultIxs(): Promise<TransactionInstruction[]>;
|
|
117
|
+
private enqueuePriceVaultIxs;
|
|
118
|
+
private priceEpiValidatedPositionsIx;
|
|
119
|
+
private _priceVaultIxsImpl;
|
|
138
120
|
validateAumIx(): Promise<TransactionInstruction>;
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}[]): Promise<{
|
|
145
|
-
remainingAccounts: AccountMeta[];
|
|
146
|
-
numSpotMarkets: number;
|
|
147
|
-
numPerpMarkets: number;
|
|
148
|
-
}>;
|
|
149
|
-
remainingAccountsForPricingVaultAssets(): Promise<AccountMeta[]>;
|
|
121
|
+
getBaseAssetOracle(): Promise<PublicKey>;
|
|
122
|
+
remainingAccountsForPricingVaultAssets(): Promise<[
|
|
123
|
+
AccountMeta[],
|
|
124
|
+
PublicKey[]
|
|
125
|
+
]>;
|
|
150
126
|
}
|
package/src/client.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { GlamClientConfig } from "./clientConfig";
|
|
2
2
|
import { BaseClient } from "./client/base";
|
|
3
|
-
import { DriftProtocolClient, DriftVaultsClient } from "./client/drift";
|
|
4
3
|
import { JupiterSwapClient } from "./client/jupiter";
|
|
5
4
|
import { MarinadeClient } from "./client/marinade";
|
|
6
5
|
import { VaultClient } from "./client/vault";
|
|
@@ -15,14 +14,14 @@ import { TimelockClient } from "./client/timelock";
|
|
|
15
14
|
import { StakeClient } from "./client/stake";
|
|
16
15
|
import { StakePoolClient } from "./client/stake-pool";
|
|
17
16
|
import { CctpClient } from "./client/cctp";
|
|
17
|
+
import { BridgeClient } from "./client/bridge";
|
|
18
|
+
import { EpiClient } from "./client/epi";
|
|
18
19
|
/**
|
|
19
20
|
* Main entrypoint for the GLAM SDK
|
|
20
21
|
*
|
|
21
22
|
* Lazy loads each client/module at first use
|
|
22
23
|
*/
|
|
23
24
|
export declare class GlamClient extends BaseClient {
|
|
24
|
-
private _drift?;
|
|
25
|
-
private _driftVaults?;
|
|
26
25
|
private _invest?;
|
|
27
26
|
private _jupiterSwap?;
|
|
28
27
|
private _marinade?;
|
|
@@ -39,9 +38,9 @@ export declare class GlamClient extends BaseClient {
|
|
|
39
38
|
private _fees?;
|
|
40
39
|
private _timelock?;
|
|
41
40
|
private _cctp?;
|
|
41
|
+
private _bridge?;
|
|
42
|
+
private _epi?;
|
|
42
43
|
constructor(config?: GlamClientConfig);
|
|
43
|
-
get drift(): DriftProtocolClient;
|
|
44
|
-
get driftVaults(): DriftVaultsClient;
|
|
45
44
|
get invest(): InvestClient;
|
|
46
45
|
get fees(): FeesClient;
|
|
47
46
|
get jupiterSwap(): JupiterSwapClient;
|
|
@@ -58,4 +57,6 @@ export declare class GlamClient extends BaseClient {
|
|
|
58
57
|
get kaminoVaults(): KaminoVaultsClient;
|
|
59
58
|
get timelock(): TimelockClient;
|
|
60
59
|
get cctp(): CctpClient;
|
|
60
|
+
get bridge(): BridgeClient;
|
|
61
|
+
get epi(): EpiClient;
|
|
61
62
|
}
|
package/src/constants.d.ts
CHANGED
|
@@ -9,12 +9,15 @@ export declare const SEED_ACCOUNT_POLICY = "account-policy";
|
|
|
9
9
|
export declare const SEED_EXTRA_ACCOUNT_METAS = "extra-account-metas";
|
|
10
10
|
export declare const SEED_GLOBAL_CONFIG = "global-config";
|
|
11
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";
|
|
12
16
|
export declare const STAKE_ACCOUNT_SIZE = 200;
|
|
13
17
|
export declare const METEORA_POSITION_SIZE = 8120;
|
|
14
18
|
export declare const KAMINO_OBTRIGATION_SIZE = 3344;
|
|
15
19
|
export declare const KAMINO_RESERVE_SIZE = 8624;
|
|
16
20
|
export declare const KAMINO_VAULT_STATE_SIZE = 62552;
|
|
17
|
-
export declare const DRIFT_VAULT_DEPOSITOR_SIZE = 272;
|
|
18
21
|
export declare const JITO_TIP_DEFAULT: PublicKey;
|
|
19
22
|
export declare const MARINADE_NATIVE_STAKE_AUTHORITY: PublicKey;
|
|
20
23
|
/**
|
|
@@ -26,13 +29,12 @@ export declare const WSOL: PublicKey;
|
|
|
26
29
|
export declare const MSOL: PublicKey;
|
|
27
30
|
export declare const USDC: PublicKey;
|
|
28
31
|
export declare const USDC_DEVNET: PublicKey;
|
|
32
|
+
export declare const USDT: PublicKey;
|
|
29
33
|
export declare const JUP: PublicKey;
|
|
30
34
|
/**
|
|
31
35
|
* Program IDs
|
|
32
36
|
*/
|
|
33
37
|
export declare const MARINADE_PROGRAM_ID: PublicKey;
|
|
34
|
-
export declare const DRIFT_PROGRAM_ID: PublicKey;
|
|
35
|
-
export declare const DRIFT_VAULTS_PROGRAM_ID: PublicKey;
|
|
36
38
|
export declare const JUPITER_PROGRAM_ID: PublicKey;
|
|
37
39
|
export declare const SANCTUM_STAKE_POOL_PROGRAM_ID: PublicKey;
|
|
38
40
|
export declare const KAMINO_LENDING_PROGRAM: PublicKey;
|
|
@@ -42,6 +44,11 @@ export declare const MEMO_PROGRAM: PublicKey;
|
|
|
42
44
|
export declare const ALT_PROGRAM_ID: PublicKey;
|
|
43
45
|
export declare const TOKEN_MESSENGER_MINTER_V2: PublicKey;
|
|
44
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;
|
|
45
52
|
/**
|
|
46
53
|
* GLAM programs
|
|
47
54
|
*/
|
|
@@ -55,10 +62,6 @@ export declare const GLAM_REFERRER: PublicKey;
|
|
|
55
62
|
* CCTP domain to chain name mapping
|
|
56
63
|
*/
|
|
57
64
|
export declare const CCTP_DOMAIN_MAPPING: Record<number, string>;
|
|
58
|
-
/**
|
|
59
|
-
* Pool ID to lending pool name mapping for Drift Protocol policies
|
|
60
|
-
*/
|
|
61
|
-
export declare const DRIFT_POOL_MAPPING: Record<number, string>;
|
|
62
65
|
/**
|
|
63
66
|
* Get protocol and permission mappings at runtime to ensure correct program IDs based on environment.
|
|
64
67
|
*
|
package/src/deser/index.d.ts
CHANGED
|
@@ -16,8 +16,8 @@ export declare class MintPolicy {
|
|
|
16
16
|
export declare class JupiterSwapPolicy {
|
|
17
17
|
maxSlippageBps: number;
|
|
18
18
|
swapAllowlist: PublicKey[] | null;
|
|
19
|
-
|
|
20
|
-
constructor(maxSlippageBps: number, swapAllowlist: PublicKey[] | null);
|
|
19
|
+
maxDeviationBps: number;
|
|
20
|
+
constructor(maxSlippageBps: number, swapAllowlist: PublicKey[] | null, maxDeviationBps?: number);
|
|
21
21
|
static decode(buffer: Buffer<ArrayBufferLike>): JupiterSwapPolicy;
|
|
22
22
|
encode(): Buffer;
|
|
23
23
|
}
|
|
@@ -28,24 +28,6 @@ export declare class TransferPolicy {
|
|
|
28
28
|
static decode(buffer: Buffer<ArrayBufferLike>): TransferPolicy;
|
|
29
29
|
encode(): Buffer;
|
|
30
30
|
}
|
|
31
|
-
export declare class DriftVaultsPolicy {
|
|
32
|
-
vaultsAllowlist: PublicKey[];
|
|
33
|
-
static _layout: any;
|
|
34
|
-
constructor(allowlist: PublicKey[]);
|
|
35
|
-
static decode(buffer: Buffer<ArrayBufferLike>): DriftVaultsPolicy;
|
|
36
|
-
encode(): Buffer;
|
|
37
|
-
}
|
|
38
|
-
export declare class DriftProtocolPolicy {
|
|
39
|
-
spotMarketsAllowlist: number[];
|
|
40
|
-
perpMarketsAllowlist: number[];
|
|
41
|
-
borrowAllowlist: PublicKey[];
|
|
42
|
-
orderPriceToleranceBps: number;
|
|
43
|
-
static _layout: any;
|
|
44
|
-
static _stagingLayout: any;
|
|
45
|
-
constructor(spotMarketsAllowlist: number[], perpMarketsAllowlist: number[], borrowAllowlist: PublicKey[], orderPriceToleranceBps?: number);
|
|
46
|
-
static decode(buffer: Buffer<ArrayBufferLike>, staging?: boolean): DriftProtocolPolicy;
|
|
47
|
-
encode(staging?: boolean): Buffer;
|
|
48
|
-
}
|
|
49
31
|
export declare class KaminoLendingPolicy {
|
|
50
32
|
marketsAllowlist: PublicKey[];
|
|
51
33
|
borrowAllowlist: PublicKey[];
|
|
@@ -75,6 +57,27 @@ export declare class CctpPolicy {
|
|
|
75
57
|
encode(): Buffer;
|
|
76
58
|
get domainToAddressesMap(): Map<number, PublicKey[]>;
|
|
77
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
|
+
}
|
|
78
81
|
export declare enum PeriodType {
|
|
79
82
|
Day = 0,
|
|
80
83
|
Week = 1,
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { BN } from "@coral-xyz/anchor";
|
|
2
|
+
import { PublicKey } from "@solana/web3.js";
|
|
3
|
+
import { Decodable } from "./base";
|
|
4
|
+
/**
|
|
5
|
+
* Token ACL Gate ListConfig account layout.
|
|
6
|
+
*
|
|
7
|
+
* Onchain repr(C):
|
|
8
|
+
* discriminator: u8
|
|
9
|
+
* authority: Pubkey
|
|
10
|
+
* seed: Pubkey
|
|
11
|
+
* mode: u8
|
|
12
|
+
* wallets_count: u64 (LE)
|
|
13
|
+
*
|
|
14
|
+
* PDA seeds: ["list_config", authority, seed]
|
|
15
|
+
* Program: Token ACL Gate
|
|
16
|
+
*/
|
|
17
|
+
export declare class TokenAclListConfig extends Decodable {
|
|
18
|
+
discriminator: number;
|
|
19
|
+
authority: PublicKey;
|
|
20
|
+
seed: PublicKey;
|
|
21
|
+
mode: number;
|
|
22
|
+
walletsCount: BN;
|
|
23
|
+
static _layout: any;
|
|
24
|
+
get modeName(): string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Token ACL Gate WalletEntry account layout.
|
|
28
|
+
*
|
|
29
|
+
* Onchain repr(C):
|
|
30
|
+
* discriminator: u8
|
|
31
|
+
* wallet_address: Pubkey
|
|
32
|
+
* list_config: Pubkey
|
|
33
|
+
*
|
|
34
|
+
* PDA seeds: ["wallet_entry", list_config, wallet]
|
|
35
|
+
* Program: Token ACL Gate
|
|
36
|
+
*/
|
|
37
|
+
export declare class TokenAclWalletEntry extends Decodable {
|
|
38
|
+
discriminator: number;
|
|
39
|
+
wallet: PublicKey;
|
|
40
|
+
listConfig: PublicKey;
|
|
41
|
+
static _layout: any;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Token ACL MintConfig account layout.
|
|
45
|
+
*
|
|
46
|
+
* Onchain repr(C):
|
|
47
|
+
* discriminator: u8
|
|
48
|
+
* bump: u8
|
|
49
|
+
* enable_permissionless_thaw: PodBool (u8)
|
|
50
|
+
* enable_permissionless_freeze: PodBool (u8)
|
|
51
|
+
* mint: Pubkey
|
|
52
|
+
* freeze_authority: Pubkey
|
|
53
|
+
* gating_program: Pubkey
|
|
54
|
+
*
|
|
55
|
+
* PDA seeds: ["MINT_CONFIG", mint]
|
|
56
|
+
* Program: Token ACL
|
|
57
|
+
*/
|
|
58
|
+
export declare class TokenAclMintConfig extends Decodable {
|
|
59
|
+
discriminator: number;
|
|
60
|
+
bump: number;
|
|
61
|
+
enablePermissionlessThaw: number;
|
|
62
|
+
enablePermissionlessFreeze: number;
|
|
63
|
+
mint: PublicKey;
|
|
64
|
+
freezeAuthority: PublicKey;
|
|
65
|
+
gatingProgram: PublicKey;
|
|
66
|
+
static _layout: any;
|
|
67
|
+
}
|
package/src/error.d.ts
CHANGED
|
@@ -7,7 +7,8 @@ export declare class GlamError extends Error {
|
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* Extract the program ID that failed from transaction logs.
|
|
10
|
-
* Looks for "Program <ID> failed:" log lines
|
|
10
|
+
* Looks for "Program <ID> failed:" log lines and returns the first match,
|
|
11
|
+
* which corresponds to the innermost CPI that produced the root cause.
|
|
11
12
|
*/
|
|
12
13
|
export declare function extractFailedProgramId(logs?: string[] | null): string | undefined;
|
|
13
14
|
/**
|