🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

deplan-client

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deplan-client

This package allows you to seamlessly integrate your web application with DePlan wallet.

latest
npmnpm
Version
1.1.13
Version published
Weekly downloads
20
122.22%
Maintainers
1
Weekly downloads
 
Created
Source

deplan-client

This package allows you to seamlessly integrate your web application with DePlan wallet.

Installing

# npm
npm install deplan-client

# yarn
yarn add deplan-client

Usage

import { DePlanClient } from 'deplan-client';

const deplanClient = new DePlanClient('PRODUCT_WALLET_ADDRESS');

// Connect
const { address } = await deplanClient.connect();

// Sign In
const { address, signature, message } = await deplanClient.signIn();

signIn returns

address - user wallet address
signature - signature issued by DePlan
message - message that was signed

Then you should pass message and signature to your backend to verify the signIn operation.

import { DePlanClient } from 'deplan-client';

const deplanClient = new DePlanClient('PRODUCT_WALLET_ADDRESS');

deplanClient.verifySignIn(req.body.message, req.body.signature, 'DEPLAN_WALLET_ADDRESS');

PRODUCT_WALLET_ADDRESS - the address of your organization in DePlan Connect.
DEPLAN_WALLET_ADDRESS - the one and only DePlan wallet address which is 7qUPhUmL6nNTWU7yMsWueR778SYbNhBU2B2tqddfns6j.

FAQs

Package last updated on 20 May 2024

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