@glamsystems/glam-sdk 1.0.12 → 1.0.13
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/index.cjs.js +9309 -4898
- package/index.esm.js +9299 -4900
- package/package.json +1 -1
- package/src/assets.d.ts +3 -0
- package/src/client/access.d.ts +13 -0
- package/src/client/base.d.ts +3 -1
- package/src/client/drift/protocol-v2.d.ts +37 -0
- package/src/client/fees.d.ts +3 -0
- package/src/client/invest.d.ts +1 -1
- package/src/client/mint.d.ts +54 -1
- package/src/constants.d.ts +5 -0
- package/src/deser/index.d.ts +1 -0
- package/src/deser/tokenAclLayouts.d.ts +67 -0
- package/src/glamExports.d.ts +210 -260
- package/src/index.d.ts +1 -0
- package/src/utils/accounts.d.ts +5 -0
- package/src/utils/bitmask.d.ts +3 -0
- package/src/utils/glamPDAs.d.ts +5 -0
- package/target/idl/ext_drift-staging.json +1598 -149
- package/target/idl/ext_drift.json +1096 -127
- package/target/idl/glam_config.json +3 -0
- package/target/idl/glam_mint-staging.json +865 -0
- package/target/idl/glam_mint.json +25 -0
- package/target/idl/glam_protocol-staging.json +305 -0
- package/target/idl/glam_protocol.json +15 -0
- package/target/types/ext_drift-staging.ts +1598 -149
- package/target/types/ext_drift.d.ts +1102 -133
- package/target/types/ext_drift.ts +1096 -127
- package/target/types/glam_config.d.ts +3 -0
- package/target/types/glam_config.ts +3 -0
- package/target/types/glam_mint-staging.ts +865 -0
- package/target/types/glam_mint.d.ts +25 -0
- package/target/types/glam_mint.ts +25 -0
- package/target/types/glam_protocol-staging.ts +305 -0
- package/target/types/glam_protocol.d.ts +15 -0
- package/target/types/glam_protocol.ts +15 -0
package/package.json
CHANGED
package/src/assets.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export declare const STAKE_POOLS: {
|
|
|
8
8
|
logoURI: string;
|
|
9
9
|
tokenProgram: PublicKey;
|
|
10
10
|
poolState: PublicKey;
|
|
11
|
+
isMarinade: boolean;
|
|
11
12
|
}[];
|
|
12
13
|
export declare const STAKE_POOLS_MAP: Map<string, {
|
|
13
14
|
name: string;
|
|
@@ -17,6 +18,7 @@ export declare const STAKE_POOLS_MAP: Map<string, {
|
|
|
17
18
|
logoURI: string;
|
|
18
19
|
tokenProgram: PublicKey;
|
|
19
20
|
poolState: PublicKey;
|
|
21
|
+
isMarinade: boolean;
|
|
20
22
|
}>;
|
|
21
23
|
/**
|
|
22
24
|
* Metadata for an asset for pricing
|
|
@@ -26,6 +28,7 @@ export interface AssetMeta {
|
|
|
26
28
|
oracle: PublicKey;
|
|
27
29
|
programId?: PublicKey;
|
|
28
30
|
aggIndex?: number;
|
|
31
|
+
oracleSource?: string;
|
|
29
32
|
}
|
|
30
33
|
/**
|
|
31
34
|
* Asset-Oracle mapping supported by the protocol. This map is a mirror of onchain mapping stored in `global_config` https://solscan.io/account/6avract7PxKqoq6hdmpAgGKgJWoJWdiXPPzzFZ62Hck6
|
package/src/client/access.d.ts
CHANGED
|
@@ -9,6 +9,10 @@ declare class TxBuilder extends BaseTxBuilder<AccessClient> {
|
|
|
9
9
|
enableDisableProtocolsTx(integrationProgram: PublicKey, protocolBitmask: number, setEnabled: boolean, txOptions: TxOptions): Promise<VersionedTransaction>;
|
|
10
10
|
grantRevokeDelegatePermissionsIx(delegate: PublicKey, integrationProgram: PublicKey, protocolBitflag: number, permissionsBitmask: BN, setGranted: boolean, signer?: PublicKey): Promise<TransactionInstruction>;
|
|
11
11
|
grantRevokeDelegatePermissionsTx(delegate: PublicKey, integrationProgram: PublicKey, protocolBitflag: number, permissionsBitmask: BN, setGranted: boolean, txOptions: TxOptions): Promise<VersionedTransaction>;
|
|
12
|
+
addAssetsIx(assets: PublicKey[], signer?: PublicKey): Promise<TransactionInstruction>;
|
|
13
|
+
addAssetsTx(assets: PublicKey[], txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
14
|
+
deleteAssetsIx(assets: PublicKey[], signer?: PublicKey): Promise<TransactionInstruction>;
|
|
15
|
+
deleteAssetsTx(assets: PublicKey[], txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
12
16
|
setProtocolPolicyIx(integrationProgram: PublicKey, protocolBitflag: number, data: Buffer, glamSigner: PublicKey): Promise<TransactionInstruction>;
|
|
13
17
|
setProtocolPolicyTx(integrationProgram: PublicKey, protocolBitflag: number, data: Buffer, txOptions: TxOptions): Promise<VersionedTransaction>;
|
|
14
18
|
}
|
|
@@ -16,6 +20,15 @@ export declare class AccessClient {
|
|
|
16
20
|
readonly base: BaseClient;
|
|
17
21
|
txBuilder: TxBuilder;
|
|
18
22
|
constructor(base: BaseClient);
|
|
23
|
+
/**
|
|
24
|
+
* Add assets to the vault allowlist
|
|
25
|
+
*/
|
|
26
|
+
addAssets(assets: PublicKey[], txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
27
|
+
/**
|
|
28
|
+
* Delete assets from the vault allowlist.
|
|
29
|
+
* Assets must have zero vault balance (ATA empty or non-existent).
|
|
30
|
+
*/
|
|
31
|
+
deleteAssets(assets: PublicKey[], txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
19
32
|
/**
|
|
20
33
|
* Emergency access update - bypasses timelock for critical access control changes
|
|
21
34
|
*/
|
package/src/client/base.d.ts
CHANGED
|
@@ -118,7 +118,9 @@ export declare class BaseClient {
|
|
|
118
118
|
}>;
|
|
119
119
|
isLockupEnabled(): Promise<boolean>;
|
|
120
120
|
fetchStateAccount(statePda?: PublicKey): Promise<StateAccount>;
|
|
121
|
-
|
|
121
|
+
private getMintProgramIdForStateAccount;
|
|
122
|
+
private getMintProgramForStateAccount;
|
|
123
|
+
fetchRequestQueue(requestQueuePda?: PublicKey, mintProgram?: GlamMintProgram): Promise<RequestQueue>;
|
|
122
124
|
/**
|
|
123
125
|
* Builds a StateModel from onchain accounts (state, mint, etc)
|
|
124
126
|
*
|
|
@@ -3,6 +3,7 @@ import { PublicKey, VersionedTransaction, TransactionSignature, TransactionInstr
|
|
|
3
3
|
import { MarketType, OrderParams, PositionDirection, ModifyOrderParams } from "../../utils/drift/types";
|
|
4
4
|
import { DriftPerpMarket, DriftSpotMarket, DriftUser } from "../../deser/driftLayouts";
|
|
5
5
|
import { BaseClient, BaseTxBuilder, TxOptions } from "../base";
|
|
6
|
+
import { BN } from "@coral-xyz/anchor";
|
|
6
7
|
import { VaultClient } from "../vault";
|
|
7
8
|
export declare const DRIFT_SIGNER: anchor.web3.PublicKey;
|
|
8
9
|
export declare const DRIFT_MARGIN_PRECISION = 10000;
|
|
@@ -44,8 +45,32 @@ declare class TxBuilder extends BaseTxBuilder<DriftProtocolClient> {
|
|
|
44
45
|
cancelOrdersTx(marketType: MarketType, marketIndex: number, direction: PositionDirection, subAccountId?: number, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
45
46
|
cancelOrdersByIdsIx(orderIds: number[], subAccountId: number, glamSigner: PublicKey): Promise<TransactionInstruction>;
|
|
46
47
|
cancelOrdersByIdsTx(orderIds: number[], subAccountId?: number, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
48
|
+
cancelOrderIx(orderId: number | null, subAccountId: number, glamSigner: PublicKey): Promise<TransactionInstruction>;
|
|
49
|
+
cancelOrderTx(orderId: number | null, subAccountId?: number, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
47
50
|
settlePnlIx(marketIndex: number, subAccountId: number, glamSigner: PublicKey): Promise<TransactionInstruction>;
|
|
48
51
|
settlePnlTx(marketIndex: number, subAccountId?: number, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
52
|
+
placePerpOrderIx(orderParams: OrderParams, subAccountId: number, glamSigner: PublicKey): Promise<TransactionInstruction>;
|
|
53
|
+
placePerpOrderTx(orderParams: OrderParams, subAccountId: number, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
54
|
+
placeSpotOrderIx(orderParams: OrderParams, subAccountId: number, glamSigner: PublicKey): Promise<TransactionInstruction>;
|
|
55
|
+
placeSpotOrderTx(orderParams: OrderParams, subAccountId: number, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
56
|
+
placeAndTakePerpOrderIx(orderParams: OrderParams, successCondition: number | null, subAccountId: number, glamSigner: PublicKey): Promise<TransactionInstruction>;
|
|
57
|
+
placeAndTakePerpOrderTx(orderParams: OrderParams, successCondition: number | null, subAccountId: number, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
58
|
+
cancelOrderByUserIdIx(userOrderId: number, subAccountId: number, glamSigner: PublicKey): Promise<TransactionInstruction>;
|
|
59
|
+
cancelOrderByUserIdTx(userOrderId: number, subAccountId?: number, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
60
|
+
modifyOrderByUserIdIx(userOrderId: number, modifyOrderParams: ModifyOrderParams, subAccountId: number, glamSigner: PublicKey): Promise<TransactionInstruction>;
|
|
61
|
+
modifyOrderByUserIdTx(userOrderId: number, modifyOrderParams: ModifyOrderParams, subAccountId?: number, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
62
|
+
fillPerpOrderIx(orderId: number | null, makerOrderId: number | null, fillerSubAccountId: number, userKey: PublicKey, userStatsKey: PublicKey, glamSigner: PublicKey): Promise<TransactionInstruction>;
|
|
63
|
+
fillPerpOrderTx(orderId: number | null, makerOrderId: number | null, fillerSubAccountId: number, userKey: PublicKey, userStatsKey: PublicKey, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
64
|
+
fillSpotOrderIx(orderId: number | null, fulfillmentType: any | null, makerOrderId: number | null, fillerSubAccountId: number, userKey: PublicKey, userStatsKey: PublicKey, glamSigner: PublicKey): Promise<TransactionInstruction>;
|
|
65
|
+
fillSpotOrderTx(orderId: number | null, fulfillmentType: any | null, makerOrderId: number | null, fillerSubAccountId: number, userKey: PublicKey, userStatsKey: PublicKey, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
66
|
+
forceCancelOrdersIx(fillerSubAccountId: number, userKey: PublicKey, glamSigner: PublicKey): Promise<TransactionInstruction>;
|
|
67
|
+
forceCancelOrdersTx(fillerSubAccountId: number, userKey: PublicKey, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
68
|
+
revertFillIx(fillerSubAccountId: number, glamSigner: PublicKey): Promise<TransactionInstruction>;
|
|
69
|
+
revertFillTx(fillerSubAccountId?: number, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
70
|
+
liquidatePerpIx(marketIndex: number, liquidatorMaxBaseAssetAmount: BN, limitPrice: BN | null, liquidatorSubAccountId: number, userKey: PublicKey, userStatsKey: PublicKey, glamSigner: PublicKey): Promise<TransactionInstruction>;
|
|
71
|
+
liquidatePerpTx(marketIndex: number, liquidatorMaxBaseAssetAmount: BN, limitPrice: BN | null, liquidatorSubAccountId: number, userKey: PublicKey, userStatsKey: PublicKey, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
72
|
+
liquidateSpotIx(assetMarketIndex: number, liabilityMarketIndex: number, liquidatorMaxLiabilityTransfer: BN, limitPrice: BN | null, liquidatorSubAccountId: number, userKey: PublicKey, userStatsKey: PublicKey, glamSigner: PublicKey): Promise<TransactionInstruction>;
|
|
73
|
+
liquidateSpotTx(assetMarketIndex: number, liabilityMarketIndex: number, liquidatorMaxLiabilityTransfer: BN, limitPrice: BN | null, liquidatorSubAccountId: number, userKey: PublicKey, userStatsKey: PublicKey, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
49
74
|
}
|
|
50
75
|
export declare class DriftProtocolClient {
|
|
51
76
|
readonly base: BaseClient;
|
|
@@ -64,9 +89,21 @@ export declare class DriftProtocolClient {
|
|
|
64
89
|
withdraw(amount: anchor.BN, marketIndex?: number, subAccountId?: number, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
65
90
|
placeOrder(orderParams: OrderParams, subAccountId?: number, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
66
91
|
modifyOrder(modifyOrderParams: ModifyOrderParams, orderId: number, marketIndex: number, marketType: MarketType, subAccountId?: number, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
92
|
+
cancelOrder(orderId: number | null, subAccountId?: number, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
67
93
|
cancelOrders(marketType: MarketType, marketIndex: number, direction: PositionDirection, subAccountId?: number, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
68
94
|
cancelOrdersByIds(orderIds: number[], subAccountId?: number, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
69
95
|
settlePnl(marketIndex: number, subAccountId?: number, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
96
|
+
placePerpOrder(orderParams: OrderParams, subAccountId?: number, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
97
|
+
placeSpotOrder(orderParams: OrderParams, subAccountId?: number, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
98
|
+
placeAndTakePerpOrder(orderParams: OrderParams, successCondition?: number | null, subAccountId?: number, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
99
|
+
cancelOrderByUserId(userOrderId: number, subAccountId?: number, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
100
|
+
modifyOrderByUserId(userOrderId: number, modifyOrderParams: ModifyOrderParams, subAccountId?: number, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
101
|
+
fillPerpOrder(orderId: number | null, makerOrderId: number | null, fillerSubAccountId: number, userKey: PublicKey, userStatsKey: PublicKey, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
102
|
+
fillSpotOrder(orderId: number | null, fulfillmentType: any | null, makerOrderId: number | null, fillerSubAccountId: number, userKey: PublicKey, userStatsKey: PublicKey, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
103
|
+
forceCancelOrders(fillerSubAccountId: number, userKey: PublicKey, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
104
|
+
revertFill(fillerSubAccountId?: number, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
105
|
+
liquidatePerp(marketIndex: number, liquidatorMaxBaseAssetAmount: BN, limitPrice: BN | null, liquidatorSubAccountId: number, userKey: PublicKey, userStatsKey: PublicKey, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
106
|
+
liquidateSpot(assetMarketIndex: number, liabilityMarketIndex: number, liquidatorMaxLiabilityTransfer: BN, limitPrice: BN | null, liquidatorSubAccountId: number, userKey: PublicKey, userStatsKey: PublicKey, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
70
107
|
getMarketPda: (marketType: MarketType, marketIndex: number) => anchor.web3.PublicKey;
|
|
71
108
|
getUserPda: (authority: PublicKey, subAccountId?: number) => anchor.web3.PublicKey;
|
|
72
109
|
getUserStatsPda: (authority: PublicKey) => PublicKey;
|
package/src/client/fees.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ declare class TxBuilder extends BaseTxBuilder<FeesClient> {
|
|
|
6
6
|
crystallizeFeesTx(txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
7
7
|
claimFeesIxs(glamSigner: PublicKey): Promise<TransactionInstruction[]>;
|
|
8
8
|
claimFeesTx(txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
9
|
+
chargeProtocolFeeIxs(glamSigner: PublicKey, protocolFeeAuthority: PublicKey): Promise<TransactionInstruction[]>;
|
|
10
|
+
chargeProtocolFeeTx(protocolFeeAuthority: PublicKey, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
9
11
|
setProtocolFeesIx(baseFeeBps: number, flowFeeBps: number, signer?: PublicKey): Promise<TransactionInstruction>;
|
|
10
12
|
setProtocolFeesTx(baseFeeBps: number, flowFeeBps: number, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
11
13
|
}
|
|
@@ -24,6 +26,7 @@ export declare class FeesClient {
|
|
|
24
26
|
getClaimedFees(): Promise<any>;
|
|
25
27
|
crystallizeFees(txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
26
28
|
claimFees(txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
29
|
+
chargeProtocolFee(protocolFeeAuthority: PublicKey, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
27
30
|
setProtocolFees(baseFeeBps: number, flowFeeBps: number, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
28
31
|
}
|
|
29
32
|
export {};
|
package/src/client/invest.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ declare class TxBuilder extends BaseTxBuilder<InvestClient> {
|
|
|
13
13
|
cancelTx(pubkey: PublicKey | null, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
14
14
|
fulfillIx(limit: number | null, signer: PublicKey): Promise<TransactionInstruction>;
|
|
15
15
|
fulfillTx(limit: number | null, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
16
|
-
|
|
16
|
+
claimIxs(user: PublicKey | null, signer: PublicKey): Promise<TransactionInstruction[]>;
|
|
17
17
|
claimTx(user: PublicKey | null, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
18
18
|
}
|
|
19
19
|
export declare class InvestClient {
|
package/src/client/mint.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BN } from "@coral-xyz/anchor";
|
|
2
|
-
import { PublicKey, TransactionInstruction, VersionedTransaction } from "@solana/web3.js";
|
|
2
|
+
import { Connection, PublicKey, TransactionInstruction, VersionedTransaction } from "@solana/web3.js";
|
|
3
3
|
import { BaseClient, BaseTxBuilder, TokenAccount, TxOptions } from "./base";
|
|
4
4
|
import { PriceClient } from "./price";
|
|
5
5
|
import { MintIdlModel, RequestType, StateAccountType } from "../models";
|
|
@@ -22,6 +22,23 @@ export type UpdateMintParams = {
|
|
|
22
22
|
allowlist?: PublicKey[];
|
|
23
23
|
blocklist?: PublicKey[];
|
|
24
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* Resolves the list config + wallet entry pairs needed for permissionless thaw.
|
|
27
|
+
* Returns empty array if Token ACL is not enabled or no matching pairs found.
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolveThawAccounts(connection: Connection, mintPda: PublicKey, wallet: PublicKey): Promise<{
|
|
30
|
+
listConfig: PublicKey;
|
|
31
|
+
walletEntry: PublicKey;
|
|
32
|
+
}[]>;
|
|
33
|
+
/**
|
|
34
|
+
* Builds a permissionless thaw instruction for the Token ACL program.
|
|
35
|
+
* Standalone version of TxBuilder.thawPermissionlessIx for use outside
|
|
36
|
+
* the MintClient context (e.g., in invest.ts).
|
|
37
|
+
*/
|
|
38
|
+
export declare function buildThawPermissionlessIx(mintPda: PublicKey, wallet: PublicKey, listAndWalletPairs: {
|
|
39
|
+
listConfig: PublicKey;
|
|
40
|
+
walletEntry: PublicKey;
|
|
41
|
+
}[], signer: PublicKey): TransactionInstruction;
|
|
25
42
|
declare class TxBuilder extends BaseTxBuilder<MintClient> {
|
|
26
43
|
setTokenAccountsStatesIx(tokenAccounts: PublicKey[], frozen: boolean, glamSigner: PublicKey): Promise<TransactionInstruction>;
|
|
27
44
|
setTokenAccountsStatesTx(tokenAccounts: PublicKey[], frozen: boolean, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
@@ -45,6 +62,30 @@ declare class TxBuilder extends BaseTxBuilder<MintClient> {
|
|
|
45
62
|
unpauseRedemptionTx(txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
46
63
|
closeMintIx(signer?: PublicKey): Promise<TransactionInstruction>;
|
|
47
64
|
closeMintTx(txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
65
|
+
enableTokenAclIx(gatingProgram: PublicKey | undefined, glamSigner: PublicKey): Promise<TransactionInstruction>;
|
|
66
|
+
enableTokenAclTx(gatingProgram: PublicKey | undefined, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
67
|
+
aclGateCreateListIx(seed: Buffer, mode: number, glamSigner: PublicKey): Promise<TransactionInstruction>;
|
|
68
|
+
aclGateCreateListTx(seed: Buffer, mode: number, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
69
|
+
aclGateAddWalletIx(listConfig: PublicKey, wallet: PublicKey, glamSigner: PublicKey): Promise<TransactionInstruction>;
|
|
70
|
+
aclGateAddWalletTx(listConfig: PublicKey, wallet: PublicKey, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
71
|
+
aclGateRemoveWalletIx(listConfig: PublicKey, walletEntry: PublicKey, glamSigner: PublicKey): Promise<TransactionInstruction>;
|
|
72
|
+
aclGateRemoveWalletTx(listConfig: PublicKey, walletEntry: PublicKey, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
73
|
+
aclGateDeleteListIx(listConfig: PublicKey, glamSigner: PublicKey): Promise<TransactionInstruction>;
|
|
74
|
+
aclGateDeleteListTx(listConfig: PublicKey, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
75
|
+
aclGateSetupExtraMetasIx(listConfigs: PublicKey[], glamSigner: PublicKey): Promise<TransactionInstruction>;
|
|
76
|
+
aclGateSetupExtraMetasTx(listConfigs: PublicKey[], txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
77
|
+
tokenAclFreezeIx(tokenAccounts: PublicKey[], glamSigner: PublicKey): Promise<TransactionInstruction>;
|
|
78
|
+
tokenAclFreezeTx(tokenAccounts: PublicKey[], txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
79
|
+
tokenAclThawIx(tokenAccounts: PublicKey[], glamSigner: PublicKey): Promise<TransactionInstruction>;
|
|
80
|
+
tokenAclThawTx(tokenAccounts: PublicKey[], txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
81
|
+
thawPermissionlessIx(wallet: PublicKey, listAndWalletPairs: {
|
|
82
|
+
listConfig: PublicKey;
|
|
83
|
+
walletEntry: PublicKey;
|
|
84
|
+
}[], signer: PublicKey): TransactionInstruction;
|
|
85
|
+
thawPermissionlessTx(wallet: PublicKey, listAndWalletPairs: {
|
|
86
|
+
listConfig: PublicKey;
|
|
87
|
+
walletEntry: PublicKey;
|
|
88
|
+
}[], txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
48
89
|
}
|
|
49
90
|
export declare class MintClient {
|
|
50
91
|
readonly base: BaseClient;
|
|
@@ -69,6 +110,18 @@ export declare class MintClient {
|
|
|
69
110
|
burn(from: PublicKey, amount: BN | number, unfreeze?: boolean, txOptions?: TxOptions): Promise<string>;
|
|
70
111
|
createTokenAccount(owner: PublicKey, setFrozen: boolean, txOptions?: TxOptions): Promise<string>;
|
|
71
112
|
setTokenAccountsStates(tokenAccounts: PublicKey[], frozen: boolean, txOptions?: TxOptions): Promise<string>;
|
|
113
|
+
enableTokenAcl(gatingProgram?: PublicKey, txOptions?: TxOptions): Promise<string>;
|
|
72
114
|
forceTransfer(from: PublicKey, to: PublicKey, amount: BN | number, unfreeze?: boolean, txOptions?: TxOptions): Promise<string>;
|
|
115
|
+
tokenAclFreeze(tokenAccounts: PublicKey[], txOptions?: TxOptions): Promise<string>;
|
|
116
|
+
tokenAclThaw(tokenAccounts: PublicKey[], txOptions?: TxOptions): Promise<string>;
|
|
117
|
+
aclGateCreateList(seed: Buffer, mode?: number, txOptions?: TxOptions): Promise<string>;
|
|
118
|
+
aclGateAddWallet(listConfig: PublicKey, wallet: PublicKey, txOptions?: TxOptions): Promise<string>;
|
|
119
|
+
aclGateRemoveWallet(listConfig: PublicKey, walletEntry: PublicKey, txOptions?: TxOptions): Promise<string>;
|
|
120
|
+
aclGateDeleteList(listConfig: PublicKey, txOptions?: TxOptions): Promise<string>;
|
|
121
|
+
aclGateSetupExtraMetas(listConfigs: PublicKey[], txOptions?: TxOptions): Promise<string>;
|
|
122
|
+
thawPermissionless(wallet: PublicKey, listAndWalletPairs: {
|
|
123
|
+
listConfig: PublicKey;
|
|
124
|
+
walletEntry: PublicKey;
|
|
125
|
+
}[], txOptions?: TxOptions): Promise<string>;
|
|
73
126
|
}
|
|
74
127
|
export {};
|
package/src/constants.d.ts
CHANGED
|
@@ -42,6 +42,11 @@ export declare const MEMO_PROGRAM: PublicKey;
|
|
|
42
42
|
export declare const ALT_PROGRAM_ID: PublicKey;
|
|
43
43
|
export declare const TOKEN_MESSENGER_MINTER_V2: PublicKey;
|
|
44
44
|
export declare const MESSAGE_TRANSMITTER_V2: PublicKey;
|
|
45
|
+
/**
|
|
46
|
+
* Token ACL (sRFC-37)
|
|
47
|
+
*/
|
|
48
|
+
export declare const TOKEN_ACL_PROGRAM: PublicKey;
|
|
49
|
+
export declare const TOKEN_ACL_GATE_PROGRAM: PublicKey;
|
|
45
50
|
/**
|
|
46
51
|
* GLAM programs
|
|
47
52
|
*/
|
package/src/deser/index.d.ts
CHANGED
|
@@ -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
|
+
}
|