Skip to content

a package that makes easier to interact with wallets on cardano

License

Notifications You must be signed in to change notification settings

xptodevx/cardano-wallet-interface

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cardano-wallet-interface

Contents

Prerequisites

make sure to enable web-assembly if not configured by default.

You may find some help at documentation/known_issues/allowing_webassembly.md

Installation

make sure you have a folder called node_modules in your project

run the following in your project directory

npm install https://github.com/cheffnft/cardano-wallet-interface

Usage

basic delegation functionality

using Nami
/*... other imports ...*/
import Wallet, { WalletName } from "@harmonicpool/cardano-wallet-interface";

/*...*/

if( Wallet.has( WalletName.Nami ) )
{
    if( !Wallet.isEnabled( WalletName.Nami ) )
    {
        Wallet.enable( WalletName.Nami )
        .then(
            () => {
                Wallet.Nami.delegateTo(
                    "<your pool id>",
                    "<your blockforst api key>"
                );
            }
        );
    }
    else
    {
        Wallet.Nami.delegateTo(
            "<your pool id>",
            "<your blockforst api key>"
        );
    }
}

/*...*/

other examples

check the documentation/examples folder for more

Documentation

a more in depth documentation can be found in the documentation folder

Docs Index

About

a package that makes easier to interact with wallets on cardano

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • JavaScript 100.0%