@@ -2271,16 +2271,17 @@ where
2271
2271
/// Create a record account containing zero-knowledge proof needed for a
2272
2272
/// confidential transfer.
2273
2273
pub async fn confidential_transfer_create_record_account <
2274
- S : Signer ,
2274
+ S1 : Signer ,
2275
+ S2 : Signer ,
2275
2276
ZK : Pod + ZkProofData < U > ,
2276
2277
U : Pod ,
2277
2278
> (
2278
2279
& self ,
2279
2280
record_account : & Pubkey ,
2280
2281
record_authority : & Pubkey ,
2281
2282
proof_data : & ZK ,
2282
- record_account_signer : & S ,
2283
- record_authority_signer : & S ,
2283
+ record_account_signer : & S1 ,
2284
+ record_authority_signer : & S2 ,
2284
2285
) -> TokenResult < Vec < T :: Output > > {
2285
2286
let proof_data = bytes_of ( proof_data) ;
2286
2287
let space = proof_data
@@ -2326,11 +2327,8 @@ where
2326
2327
} ;
2327
2328
2328
2329
let first_ixs = create_record_instructions ( true , first_chunk, 0 ) ;
2329
- self . process_ixs (
2330
- & first_ixs,
2331
- & [ record_account_signer, record_authority_signer] ,
2332
- )
2333
- . await ?;
2330
+ let first_ixs_signers: [ & dyn Signer ; 2 ] = [ record_account_signer, record_authority_signer] ;
2331
+ self . process_ixs ( & first_ixs, & first_ixs_signers) . await ?;
2334
2332
2335
2333
let subsequent_chunk_size =
2336
2334
calculate_record_max_chunk_size ( create_record_instructions, false ) ;
@@ -2354,28 +2352,28 @@ where
2354
2352
}
2355
2353
2356
2354
/// Close a record account.
2357
- pub async fn confidential_transfer_close_record_account < S : Signer > (
2355
+ pub async fn confidential_transfer_close_record_account < S : Signers > (
2358
2356
& self ,
2359
2357
record_account : & Pubkey ,
2360
2358
record_authority : & Pubkey ,
2361
2359
receiver : & Pubkey ,
2362
- record_authority_signer : & S ,
2360
+ signing_keypairs : & S ,
2363
2361
) -> TokenResult < T :: Output > {
2364
2362
self . process_ixs (
2365
2363
& [ spl_record:: instruction:: close_account (
2366
2364
record_account,
2367
2365
record_authority,
2368
2366
receiver,
2369
2367
) ] ,
2370
- & [ record_authority_signer ] ,
2368
+ signing_keypairs ,
2371
2369
)
2372
2370
. await
2373
2371
}
2374
2372
2375
2373
/// Create a context state account containing zero-knowledge proof needed
2376
2374
/// for a confidential transfer instruction.
2377
2375
pub async fn confidential_transfer_create_context_state_account <
2378
- S : Signer ,
2376
+ S : Signers ,
2379
2377
ZK : Pod + ZkProofData < U > ,
2380
2378
U : Pod ,
2381
2379
> (
@@ -2384,7 +2382,7 @@ where
2384
2382
context_state_authority : & Pubkey ,
2385
2383
proof_data : & ZK ,
2386
2384
split_account_creation_and_proof_verification : bool ,
2387
- signer : & S ,
2385
+ signing_keypairs : & S ,
2388
2386
) -> TokenResult < T :: Output > {
2389
2387
let instruction_type = zk_proof_type_to_instruction ( ZK :: PROOF_TYPE ) ?;
2390
2388
let space = size_of :: < ProofContextState < U > > ( ) ;
@@ -2410,7 +2408,7 @@ where
2410
2408
space as u64 ,
2411
2409
& zk_elgamal_proof_program:: id ( ) ,
2412
2410
) ] ,
2413
- & [ signer ] ,
2411
+ signing_keypairs ,
2414
2412
)
2415
2413
. await ?;
2416
2414
@@ -2443,14 +2441,14 @@ where
2443
2441
) ,
2444
2442
instruction_type. encode_verify_proof ( Some ( context_state_info) , proof_data) ,
2445
2443
] ,
2446
- & [ signer ] ,
2444
+ signing_keypairs ,
2447
2445
)
2448
2446
. await
2449
2447
}
2450
2448
}
2451
2449
2452
2450
/// Close a ZK Token proof program context state
2453
- pub async fn confidential_transfer_close_context_state < S : Signer > (
2451
+ pub async fn confidential_transfer_close_context_state < S : Signers > (
2454
2452
& self ,
2455
2453
context_state_account : & Pubkey ,
2456
2454
lamport_destination_account : & Pubkey ,
@@ -2467,7 +2465,7 @@ where
2467
2465
context_state_info,
2468
2466
lamport_destination_account,
2469
2467
) ] ,
2470
- & [ signing_keypairs] ,
2468
+ signing_keypairs,
2471
2469
)
2472
2470
. await
2473
2471
}
0 commit comments