feat: support creating secp256k1 instructions with eth address (#15626)
This commit is contained in:
15
web3.js/module.d.ts
vendored
15
web3.js/module.d.ts
vendored
@@ -1039,6 +1039,13 @@ declare module '@solana/web3.js' {
|
||||
}
|
||||
|
||||
// === src/secp256k1-program.js ===
|
||||
export type CreateSecp256k1InstructionWithEthAddressParams = {
|
||||
ethAddress: Buffer | Uint8Array | Array<number> | string;
|
||||
message: Buffer | Uint8Array | Array<number>;
|
||||
signature: Buffer | Uint8Array | Array<number>;
|
||||
recoveryId: number;
|
||||
};
|
||||
|
||||
export type CreateSecp256k1InstructionWithPublicKeyParams = {
|
||||
publicKey: Buffer | Uint8Array | Array<number>;
|
||||
message: Buffer | Uint8Array | Array<number>;
|
||||
@@ -1054,6 +1061,14 @@ declare module '@solana/web3.js' {
|
||||
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