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

sdk-connect-js

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sdk-connect-js

SDK Connect for VChain

  • 1.0.8
  • npm
  • Socket score

Version published
Weekly downloads
9
Maintainers
1
Weekly downloads
 
Created
Source

SDK Connect

  • SDK Connect

Install package

npm install sdk-connect-js

Usage

Import pkg

import SDK from "sdk-connect-js";

Connect

const sdk = new SDK(SDK_ENDPOINT);

// dApp: create connection
var connectionId = await sdk.createConnection();
var embeddedLink = await sdk.getConnectionEmbeddedLink(connectionId);
var qrCodeLink = await sdk.getConnectionQrCodeLink(connectionId);

// Wallet: update connection address
var connection = await sdk.submitConnectionAddress(
  connectionId,
  "0x52ec083d30192691872b60334bfdd1450c1826d9"
);

// dApp: get connection address
var connectionAddress = await sdk.getConnectionAddress(connectionId);

Sign Transaction

const sdk = new SDK(SDK_ENDPOINT);

// dApp: create Tx
const txUuid = await sdk.submitTx(/* RawTx */);
const embeddedLink = await sdk.getEmbeddedLink(txUuid);
const qrCodeLink = await sdk.getQrCodeLink(txUuid);

// Wallet: sign Tx
const rawTx = await sdk.getRawTx(txUuid);
await sdk.submitSignedTx(txUuid, "0x123456789abcdef");

// dApp: continue process signed Tx
const signedTx = await sdk.getSignedTx(txUuid);

Keywords

FAQs

Package last updated on 16 Sep 2022

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