42
42
self , account_info:: WithheldTokensInfo , ConfidentialTransferFeeAmount ,
43
43
ConfidentialTransferFeeConfig ,
44
44
} ,
45
- cpi_guard, default_account_state, group_pointer , interest_bearing_mint , memo_transfer ,
46
- metadata_pointer , transfer_fee , transfer_hook , BaseStateWithExtensions , Extension ,
47
- ExtensionType , StateWithExtensionsOwned ,
45
+ cpi_guard, default_account_state, group_member_pointer , group_pointer ,
46
+ interest_bearing_mint , memo_transfer , metadata_pointer , transfer_fee , transfer_hook ,
47
+ BaseStateWithExtensions , Extension , ExtensionType , StateWithExtensionsOwned ,
48
48
} ,
49
49
instruction, offchain,
50
50
proof:: ProofLocation ,
@@ -176,6 +176,10 @@ pub enum ExtensionInitializationParams {
176
176
authority : Option < Pubkey > ,
177
177
group_address : Option < Pubkey > ,
178
178
} ,
179
+ GroupMemberPointer {
180
+ authority : Option < Pubkey > ,
181
+ member_address : Option < Pubkey > ,
182
+ } ,
179
183
}
180
184
impl ExtensionInitializationParams {
181
185
/// Get the extension type associated with the init params
@@ -194,6 +198,7 @@ impl ExtensionInitializationParams {
194
198
ExtensionType :: ConfidentialTransferFeeConfig
195
199
}
196
200
Self :: GroupPointer { .. } => ExtensionType :: GroupPointer ,
201
+ Self :: GroupMemberPointer { .. } => ExtensionType :: GroupMemberPointer ,
197
202
}
198
203
}
199
204
/// Generate an appropriate initialization instruction for the given mint
@@ -294,6 +299,15 @@ impl ExtensionInitializationParams {
294
299
authority,
295
300
group_address,
296
301
) ,
302
+ Self :: GroupMemberPointer {
303
+ authority,
304
+ member_address,
305
+ } => group_member_pointer:: instruction:: initialize (
306
+ token_program_id,
307
+ mint,
308
+ authority,
309
+ member_address,
310
+ ) ,
297
311
}
298
312
}
299
313
}
@@ -1700,6 +1714,29 @@ where
1700
1714
. await
1701
1715
}
1702
1716
1717
+ /// Update group member pointer address
1718
+ pub async fn update_group_member_address < S : Signers > (
1719
+ & self ,
1720
+ authority : & Pubkey ,
1721
+ new_member_address : Option < Pubkey > ,
1722
+ signing_keypairs : & S ,
1723
+ ) -> TokenResult < T :: Output > {
1724
+ let signing_pubkeys = signing_keypairs. pubkeys ( ) ;
1725
+ let multisig_signers = self . get_multisig_signers ( authority, & signing_pubkeys) ;
1726
+
1727
+ self . process_ixs (
1728
+ & [ group_member_pointer:: instruction:: update (
1729
+ & self . program_id ,
1730
+ self . get_address ( ) ,
1731
+ authority,
1732
+ & multisig_signers,
1733
+ new_member_address,
1734
+ ) ?] ,
1735
+ signing_keypairs,
1736
+ )
1737
+ . await
1738
+ }
1739
+
1703
1740
/// Update confidential transfer mint
1704
1741
pub async fn confidential_transfer_update_mint < S : Signers > (
1705
1742
& self ,
0 commit comments