![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@civic/prove-ethereum-wallet
Advanced tools
Library for providing a standard proof creation and verification for ethereum wallets
This library proves ownership of an Ethereum wallet to off-chain verifiers. To create proof of ownership, a signing function must be provided that allows the user to sign some typed-data with their private key, thus proving they own the wallet. The verifier will check that the signature of the signer matches the wallet address to check, and that the contents of the signed typed-message are valid. The proof consists of a string of a base64 version of the message concatenated with a '.' and the base64 version of the signature.
npm install @civic/prove-ethereum-wallet
or
yarn add @civic/prove-ethereum-wallet
Prove ownership of an Ethereum wallet
Prover side:
const { create } = require('@civic/prove-ethereum-wallet');
const ownerWallet = Wallet.createRandom();
const proof = await create((domain, types, message) => wallet._signTypedData(domain, types, message), { message: '<verifierUrl>' });
Verifier side:
const { verify } = require('@civic/prove-ethereum-wallet');
const success = await verify(expectedOwnerAddress, proof, { message: '<verifierUrl>' });
The prove() function generates some typed-data, including an expiry timestamp and message and signs it with the wallet private key. For the transaction to be verified by the verify() function, it must:
The prove and verify functions can be configured as follows:
domain
Optionally set the domain for the signed dataOptional Default:
export const defaultDomain: TypedDataDomain = {
name: "Proof Of Ethereum Wallet Ownership",
version: "1",
};
types
Optionally set the types to be used in the signed dataOptional Default:
export const defaultTypes: Record<string, Array<TypedDataField>> = {
PoWo: [
{ name: "expires", type: "string" },
{ name: "message", type: "string" },
],
};
message
Optional Default: empty
The message passed to check against the proof. This would normally be a nonce, or single use message to prevent the POWO from being re-used in a replay-attack.
FAQs
Library for providing a standard proof creation and verification for ethereum wallets
The npm package @civic/prove-ethereum-wallet receives a total of 415 weekly downloads. As such, @civic/prove-ethereum-wallet popularity was classified as not popular.
We found that @civic/prove-ethereum-wallet 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.