Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@cod3x/viem
Advanced tools
The @cod3x/viem
package is a utility package that allows for the creation of a local account using the CodexSDK from the @cod3x/sdk
package. This local account can be used with the viem
library for signing messages, transactions, and typed data.=
To utilize the Codex Viem package, first install it to the desired directory of the project:
{% tabs %} {% tab title="npm" %}
npm install @cod3x/viem
{% endtab %}
{% tab title="yarn" %}
yarn install @cod3x/viem
{% endtab %}
{% tab title="pnpm" %}
pnpm add @cod3x/viem
{% endtab %} {% endtabs %}
Here's a basic example of how to use the createCodexAccount
function:
import { CodexSDK } from '@cod3x/sdk';
import { createCodexAccount } from '@cod3x/viem';
const sdk = new CodexSDK({ /* your configuration */ });
const ethereumAddress = '0xYourEthereumAddress';
const account = await createCodexAccount({ sdk, ethereumAddress });
// Now you can use the account with viem
createCodexAccount
Creates a local account using the CodexSDK.
Parameters
input
(Object)
sdk
(CodexSDK): An instance of the CodexSDK.ethereumAddress
(string): The Ethereum address of the account.Returns
A promise that resolves to a LocalAccount
object.
Example
const account = await createCodexAccount({ sdk, ethereumAddress });
We welcome contributions to the @cod3x/viem package! Here's how you can help:
If you find a bug or have a suggestion for improving the package:
main
.npm install
npm test
npm run lint:fix
npm run prettier:fix
main
branch.npm run build
: Build the packagenpm run dev
: Build and watch for changesnpm test
: Run testsnpm run coverage
: Run tests with coverage reportnpm run lint
: Check for linting errorsnpm run lint:fix
: Fix linting errorsnpm run prettier
: Check code formattingnpm run prettier:fix
: Fix code formattingnpm run verify
: Run linter and prettier checksnpm run verify:fix
: Fix linter and prettier issuesPlease follow the existing coding style. We use ESLint and Prettier to maintain code quality and consistency.
By contributing to @cod3x/viem, you agree that your contributions will be licensed under its MIT License.
Thank you for your interest in improving @cod3x/viem!
FAQs
## @cod3x/viem Package Documentation
We found that @cod3x/viem 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.