
Product
Introducing Scala and Kotlin Support in Socket
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
The following documents the method to work with EAS attestations via Ethereum Account Abstraction.
Generates 12 words phrase (BIP39) for wallet creation.
static generateMnemonic(): string[]
Derives the private key from the 12-word mnemonic.
static getPrivateKeyFromMnemonic(mnemonic: string[]): string
Derives the Ethereum address from the provided private key.
static getAddressFromPrivateKey(privateKey: string): string
Load the EAS schema to an address.
static async loadEASSchema(schema: string): Promise<void>
Creates an abstract account for the wallet using the provided address. Throws an error on fail.
static async createAbstractAccount(address: string): Promise<void>
Prepares an EAS transaction by signing it with the provided private key.
static prepareEASTx(data: any, privateKey: string): string
Prepares a batch of EAS transactions by signing each transaction in the batch.
static prepareEASBatchTx(dataArray: any[], privateKey: string): string
Sends the transaction to the network.
static async sendEASTx(signedTx: string): Promise<string>
Returns the EAS explorer link for the given UID.
static getEASExplorerLink(uid: string): string
async function main() {
// Generate 12 words
const mnemonic: string[] = WalletLibrary.generate12Words()
// Derive private key from mnemonic
const privateKey: string = WalletLibrary.derivePrivateKeyFrom12Words(mnemonic)
// Derive public key and address from private key
const keyInfo = WalletLibrary.derivePublicKeyAndAddress(privateKey)
const address: string = keyInfo.address
// Create abstract account for wallet
await WalletLibrary.createAbstractAccount(address)
// Prepare EAS transaction
const easTransaction: string = WalletLibrary.prepareEASTx({ data: 'sample' }, privateKey)
// Prepare batch of EAS transactions
const easBatchTransaction: string = WalletLibrary.prepareEASBatchTx(
[{ data: 'sample1' }, { data: 'sample2' }],
privateKey
)
// Get EAS explorer link from UID
const explorerLink: string = WalletLibrary.getEASExplorerLink('uid123')
}
FAQs
EAS attestations via Ethereum Account Abstraction
The npm package eas-lib receives a total of 1 weekly downloads. As such, eas-lib popularity was classified as not popular.
We found that eas-lib demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
Application Security
/Security News
Socket CEO Feross Aboukhadijeh and a16z partner Joel de la Garza discuss vibe coding, AI-driven software development, and how the rise of LLMs, despite their risks, still points toward a more secure and innovative future.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.