Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@cardano-foundation/cardano-connect-with-wallet-core
Advanced tools
Framework-independent CIP-0030 wrapper functions that allow a smooth build of wallet interaction components
This repository aims to provide framework-independent helper and wrapper functions for seamless interaction between Cardano decentralized applications (dApps) and wallets (CIP 8 and CIP 30). If you are looking for React.js components please move on to this repository.
Have fun building on Cardano! 🏗🎉
npm i @cardano-foundation/cardano-connect-with-wallet-core
import { Wallet } from '@cardano-foundation/cardano-connect-with-wallet-core';
<script src="https://cardano-foundation.github.io/cardano-connect-with-wallet/bundle-latest/index.js"></script>
<script>
const wallet = CardanoConnectWithWalletCore.Wallet;
...
</script>
The Wallet
class conatins static helper to simplify the dApp development. Please tale a look into the React hook useCardano to see an example of how you can utilize Wallet
in your module-based project. Get an idea of the usage in a static html, javascript, css context from our html-based wallet button.
/*
Register a function to those events:
'enabled',
'connecting',
'enabledWallet',
'stakeAddress',
'usedAddresses',
'unusedAddresses',
'accountBalance',
'connected',
'lastConnectedWallet',
'meerkatAddress',
'installedWalletExtensions'
*/
Wallet.addEventListener: void;
Wallet.removeEventListener: void;
// Starts a background thread to listen for new wallets in the window.cardano object
Wallet.startInjectWalletListener(): void;
Wallet.stopInjectWalletListener(): void;
// Connect or disconnect a wallet by name e.g. 'yoroi', 'eternl', 'flint', etc.
Wallet.connectToWallet(walletName: string, networkType: NetworkType, retries?: number, retryIntervalInMs?: number): Promise<void>;
Wallet.connect(walletName: string, network: NetworkType, onConnect?: () => void | undefined, onError?: (code: Error) => void): Promise<void>;
Wallet.disconnect(): void;
Wallet.checkEnabled(network: NetworkType): Promise<void>;
Wallet.getInstalledWalletExtensions(supportedWallets?: Array<string>): Array<string>;
Wallet.getRewardAddresses(): Promise<any>;
// sign a message
Wallet.signMessage(message: string, onSignMessage?: (signature: string, key: string | undefined) => void, onSignError?: (error: Error) => void, limitNetwork?: NetworkType): Promise<void>;
Please have a look at our contributing infos to become familiar with our guidelines.
FAQs
Framework-independent CIP-0030 wrapper functions that allow a smooth build of wallet interaction components
The npm package @cardano-foundation/cardano-connect-with-wallet-core receives a total of 63 weekly downloads. As such, @cardano-foundation/cardano-connect-with-wallet-core popularity was classified as not popular.
We found that @cardano-foundation/cardano-connect-with-wallet-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.