ワンクリックで
mvx-sdk-js-wallets
Wallet and key management for MultiversX TypeScript/JavaScript SDK.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Wallet and key management for MultiversX TypeScript/JavaScript SDK.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Guidelines for establishing context before an audit.
Perform a comprehensive on-chain security audit of a deployed MultiversX smart contract. Use when reviewing a contract's security posture, permissions, state, and economic safety without source code.
Read on-chain state in MultiversX smart contracts. Use when accessing caller info, account balances, block timestamps, ESDT token metadata, local roles, code metadata, or any data from self.blockchain().
Gas-optimized cache patterns for MultiversX smart contracts using Drop-based write-back caches. Use when building contracts that read/write multiple storage values per transaction, DeFi protocols, or any gas-sensitive contract.
Identify ambiguous requirements and ask targeted clarifying questions for MultiversX development. Use when user requests are vague, missing technical constraints, or have conflicting requirements.
Comprehensive code analysis toolkit for MultiversX smart contracts. Covers differential review (version comparison, upgrade safety), fix verification (validate patches, regression testing), and variant analysis (find similar bugs across codebase). Use when reviewing PRs, verifying security patches, or hunting for bug variants.
| name | mvx-sdk-js-wallets |
| description | Wallet and key management for MultiversX TypeScript/JavaScript SDK. |
This skill covers account management, key derivation, and transaction signing.
import { Account, Address, Mnemonic, UserWallet, UserPem } from "@multiversx/sdk-core";
// From PEM file (testing only - not secure)
const account = await Account.newFromPem("wallet.pem");
// From keystore (production)
const account = await Account.newFromKeystore("wallet.json", "password");
// From entrypoint (generates new)
const account = entrypoint.createAccount();
// Generate new mnemonic (24 words)
const mnemonic = Mnemonic.generate();
const words = mnemonic.getWords();
// Derive keys
const secretKey = mnemonic.deriveKey(0); // First account
const publicKey = secretKey.generatePublicKey();
const address = publicKey.toAddress();
// Save mnemonic to keystore
const wallet = UserWallet.fromMnemonic({
mnemonic: mnemonic.toString(),
password: "secure-password"
});
wallet.save("wallet.json");
// Save secret key to keystore
const wallet = UserWallet.fromSecretKey({
secretKey: secretKey,
password: "secure-password"
});
wallet.save("wallet.json");
// Save to PEM (testing only)
const pem = new UserPem(address.toBech32(), secretKey);
pem.save("wallet.pem");
// Controller-created transactions are auto-signed
const tx = await controller.createTransactionForTransfer(account, nonce, options);
// tx.signature is already set
// Factory-created transactions need manual signing
const tx = await factory.createTransactionForTransfer(sender, options);
tx.nonce = account.getNonceThenIncrement();
tx.signature = await account.signTransaction(tx);
// Sign arbitrary message
const message = new SignableMessage({ message: Buffer.from("Hello") });
const signature = await account.signMessage(message);
// Verify signature
import { MessageSigner } from "@multiversx/sdk-core";
const isValid = MessageSigner.verify(message, signature, publicKey);
// Ledger requires MultiversX app installed
import { LedgerAccount } from "@multiversx/sdk-hw-provider";
const ledger = new LedgerAccount();
await ledger.init();
const address = await ledger.getAddress(0);
| Practice | Reason |
|---|---|
| Use keystore files | Encrypted with password |
| Never commit PEM files | Plain text private keys |
| Use Ledger for mainnet | Hardware security |
| Validate addresses | Prevent typos |