🌐
Typescript / Javascript SDK
  • 👋Phantasma - TS
  • 🎆Quick Start
  • Setup
    • 🛠️Setup
  • Shared Methods
    • ☁️PhantasmaAPI
    • 🔗PhantasmaLink
    • 📝ScriptBuilder
      • Create a Script
  • Backend
    • ⚙️Backend
    • 📄Examples
      • Creating a new Address
      • Importing a Wallet
      • Create Script Call
      • Create a Transaction
      • Sign a Transaction
      • Send a Transaction
      • Get a Transaction
      • Invoke a Script
      • Get User Balances
      • Transfer Tokens
      • Decode Transfer Events
      • Get a Block by Height
      • Get data from new Blocks
  • Frontend
    • 🖥️Frontend
    • 📄Examples
      • Connect to the wallet
      • Invoking a Script
      • Sending a transaction
  • Resources
    • 👻Getting Started
    • 👻About Phantasma
    • 🧑‍🤝‍🧑For new Soldiers
    • 👨‍💻For Developers
Powered by GitBook
On this page
  1. Frontend
  2. Examples

Connect to the wallet

Using PhantasmaLink

This is a simple example on how to connect to a wallet.

let dappID = "Dapp Name";   //This is just the name you want to give the connection
let consoleLogging = true;  //This is if you want console logging for Debugging Purposes [Default is set to true]

let Link = new PhantasmaLink(dappID, consoleLogging); 

Link.login(
    function(success){
        // Handle in case of success.
    }, 
    function(error){
        // Handle in case of error
    }, providerHint);  //Provider Hint can be 'ecto' or 'poltergeist' (It's the name of the wallet the user wants to use to connect.
PreviousExamplesNextInvoking a Script

Last updated 1 year ago

📄