Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cardano-foundation/cardano-connect-with-wallet-core

Package Overview
Dependencies
Maintainers
6
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cardano-foundation/cardano-connect-with-wallet-core

Framework-independent CIP-0030 wrapper functions that allow a smooth build of wallet interaction components

  • 0.2.0
  • npm
  • Socket score

Version published
Maintainers
6
Created
Source

Cardano Connect with Wallet Core

Release conventionalcommits Discord

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! 🏗🎉

🚀 Getting Started

npm i @cardano-foundation/cardano-connect-with-wallet-core
import { Wallet } from '@cardano-foundation/cardano-connect-with-wallet-core';

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 project.

Wallet.isConnecting: Observable<boolean>;
Wallet.lastConnectedWallet: Observable<string>;
Wallet.isConnected: Observable<boolean>;
Wallet.enabledObserver: Observable<boolean>;
Wallet.isConnectingObserver: Observable<boolean>;
Wallet.enabledWalletObserver: Observable<string | null>;
Wallet.stakeAddressObserver: Observable<string | null>;
Wallet.installedWalletExtensionsObserver: Observable<string[]>;
Wallet.usedAddressesObserver: Observable<string[]>;
Wallet.unusedAddressesObserver: Observable<string[]>;
Wallet.accountBalanceObserver: Observable<number>;
Wallet.meerkatAddressObserver: Observable<string>;
Wallet.injectWalletListener: InjectWalletListener;

Wallet.disconnect(): void;
Wallet.clearLocalStorage(): void;

Wallet.startInjectWalletListener(): void;
Wallet.stopInjectWalletListener(): void;
Wallet.checkEnabled(network: NetworkType): Promise<void>;
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.getInstalledWalletExtensions(supportedWallets?: Array<string>): Array<string>;

Wallet.getRewardAddresses(): Promise<any>;
Wallet.signMessage(message: string, onSignMessage?: (signature: string, key: string | undefined) => void, onSignError?: (error: Error) => void, limitNetwork?: NetworkType): Promise<void>;

💪 Contributing

Please have a look at our contributing infos to become familiar with our guidelines.

Keywords

FAQs

Package last updated on 08 Jul 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc