fix: add Buffer to loader elf data arg type
This commit is contained in:
		
				
					committed by
					
						
						Michael Vines
					
				
			
			
				
	
			
			
			
						parent
						
							e8ca68043a
						
					
				
				
					commit
					7073310e2b
				
			
							
								
								
									
										4
									
								
								web3.js/module.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								web3.js/module.d.ts
									
									
									
									
										vendored
									
									
								
							@@ -443,7 +443,7 @@ declare module '@solana/web3.js' {
 | 
				
			|||||||
      payer: Account,
 | 
					      payer: Account,
 | 
				
			||||||
      program: Account,
 | 
					      program: Account,
 | 
				
			||||||
      programId: PublicKey,
 | 
					      programId: PublicKey,
 | 
				
			||||||
      data: Array<number>,
 | 
					      data: Buffer | Array<number>,
 | 
				
			||||||
    ): Promise<PublicKey>;
 | 
					    ): Promise<PublicKey>;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -454,7 +454,7 @@ declare module '@solana/web3.js' {
 | 
				
			|||||||
    static load(
 | 
					    static load(
 | 
				
			||||||
      connection: Connection,
 | 
					      connection: Connection,
 | 
				
			||||||
      payer: Account,
 | 
					      payer: Account,
 | 
				
			||||||
      elfBytes: Array<number>,
 | 
					      elfBytes: Buffer | Array<number>,
 | 
				
			||||||
    ): Promise<PublicKey>;
 | 
					    ): Promise<PublicKey>;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -457,7 +457,7 @@ declare module '@solana/web3.js' {
 | 
				
			|||||||
      payer: Account,
 | 
					      payer: Account,
 | 
				
			||||||
      program: Account,
 | 
					      program: Account,
 | 
				
			||||||
      programId: PublicKey,
 | 
					      programId: PublicKey,
 | 
				
			||||||
      data: Array<number>,
 | 
					      data: Buffer | Array<number>,
 | 
				
			||||||
    ): Promise<PublicKey>;
 | 
					    ): Promise<PublicKey>;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -468,7 +468,7 @@ declare module '@solana/web3.js' {
 | 
				
			|||||||
    static load(
 | 
					    static load(
 | 
				
			||||||
      connection: Connection,
 | 
					      connection: Connection,
 | 
				
			||||||
      payer: Account,
 | 
					      payer: Account,
 | 
				
			||||||
      elfBytes: Array<number>,
 | 
					      elfBytes: Buffer | Array<number>,
 | 
				
			||||||
    ): Promise<PublicKey>;
 | 
					    ): Promise<PublicKey>;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -36,7 +36,7 @@ export class BpfLoader {
 | 
				
			|||||||
  static load(
 | 
					  static load(
 | 
				
			||||||
    connection: Connection,
 | 
					    connection: Connection,
 | 
				
			||||||
    payer: Account,
 | 
					    payer: Account,
 | 
				
			||||||
    elf: Array<number>,
 | 
					    elf: Buffer | Array<number>,
 | 
				
			||||||
  ): Promise<PublicKey> {
 | 
					  ): Promise<PublicKey> {
 | 
				
			||||||
    const program = new Account();
 | 
					    const program = new Account();
 | 
				
			||||||
    return Loader.load(connection, payer, program, BpfLoader.programId, elf);
 | 
					    return Loader.load(connection, payer, program, BpfLoader.programId, elf);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -52,7 +52,7 @@ export class Loader {
 | 
				
			|||||||
    payer: Account,
 | 
					    payer: Account,
 | 
				
			||||||
    program: Account,
 | 
					    program: Account,
 | 
				
			||||||
    programId: PublicKey,
 | 
					    programId: PublicKey,
 | 
				
			||||||
    data: Array<number>,
 | 
					    data: Buffer | Array<number>,
 | 
				
			||||||
  ): Promise<PublicKey> {
 | 
					  ): Promise<PublicKey> {
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      const balanceNeeded = await connection.getMinimumBalanceForRentExemption(
 | 
					      const balanceNeeded = await connection.getMinimumBalanceForRentExemption(
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user