feat: support creating secp256k1 instructions with eth address (#15626)
This commit is contained in:
@@ -1045,6 +1045,13 @@ declare module '@solana/web3.js' {
|
||||
}
|
||||
|
||||
// === src/secp256k1-program.js ===
|
||||
declare export type CreateSecp256k1InstructionWithEthAddressParams = {|
|
||||
ethAddress: Buffer | Uint8Array | Array<number> | string,
|
||||
message: Buffer | Uint8Array | Array<number>,
|
||||
signature: Buffer | Uint8Array | Array<number>,
|
||||
recoveryId: number,
|
||||
|};
|
||||
|
||||
declare export type CreateSecp256k1InstructionWithPublicKeyParams = {|
|
||||
publicKey: Buffer | Uint8Array | Array<number>,
|
||||
message: Buffer | Uint8Array | Array<number>,
|
||||
@@ -1060,6 +1067,14 @@ declare module '@solana/web3.js' {
|
||||
declare export class Secp256k1Program {
|
||||
static get programId(): PublicKey;
|
||||
|
||||
static publicKeyToEthAddress(
|
||||
publicKey: Buffer | Uint8Array | Array<number>,
|
||||
): Buffer;
|
||||
|
||||
static createInstructionWithEthAddress(
|
||||
params: CreateSecp256k1InstructionWithEthAddressParams,
|
||||
): TransactionInstruction;
|
||||
|
||||
static createInstructionWithPublicKey(
|
||||
params: CreateSecp256k1InstructionWithPublicKeyParams,
|
||||
): TransactionInstruction;
|
||||
|
Reference in New Issue
Block a user