Secp256k1Program
Static Member Summary
Static Public Members | ||
public static get |
Public key that identifies the secp256k1 program |
Static Method Summary
Static Public Methods | ||
public static |
createInstructionWithEthAddress(params: CreateSecp256k1InstructionWithEthAddressParams): TransactionInstruction Create an secp256k1 instruction with an Ethereum address. |
|
public static |
createInstructionWithPrivateKey(params: CreateSecp256k1InstructionWithPrivateKeyParams): TransactionInstruction Create an secp256k1 instruction with a private key. |
|
public static |
createInstructionWithPublicKey(params: CreateSecp256k1InstructionWithPublicKeyParams): TransactionInstruction Create an secp256k1 instruction with a public key. |
|
public static |
publicKeyToEthAddress(publicKey: Buffer): Buffer Construct an Ethereum address from a secp256k1 public key buffer. |
Static Public Members
Static Public Methods
public static createInstructionWithEthAddress(params: CreateSecp256k1InstructionWithEthAddressParams): TransactionInstruction source
Create an secp256k1 instruction with an Ethereum address. The address must be a hex string or a buffer that is 20 bytes long.
Params:
Name | Type | Attribute | Description |
params | CreateSecp256k1InstructionWithEthAddressParams |
public static createInstructionWithPrivateKey(params: CreateSecp256k1InstructionWithPrivateKeyParams): TransactionInstruction source
Create an secp256k1 instruction with a private key. The private key must be a buffer that is 32 bytes long.
Params:
Name | Type | Attribute | Description |
params | CreateSecp256k1InstructionWithPrivateKeyParams |
public static createInstructionWithPublicKey(params: CreateSecp256k1InstructionWithPublicKeyParams): TransactionInstruction source
Create an secp256k1 instruction with a public key. The public key must be a buffer that is 64 bytes long.
Params:
Name | Type | Attribute | Description |
params | CreateSecp256k1InstructionWithPublicKeyParams |
public static publicKeyToEthAddress(publicKey: Buffer): Buffer source
Construct an Ethereum address from a secp256k1 public key buffer.
Params:
Name | Type | Attribute | Description |
publicKey | Buffer | a 64 byte secp256k1 public key buffer |
Return:
Buffer |