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 - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

2

package.json
{
"name": "sdk-connect-js",
"version": "1.0.3",
"version": "1.0.4",
"description": "SDK Connect for VChain",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

# SDK Connect
- [SDK Connect](#sdk-connect)
- [Install package](#install-package)
- [Usage](#usage)
- [Import pkg](#import-pkg)
- [Connect](#connect)
- [Sign Transaction](#sign-transaction)
## Install package
```
npm install @v-chain/sdk-connect-js
npm install sdk-connect-js
```

@@ -11,4 +18,44 @@

### Import pkg
```js
import SDK from "sdk-connect-js";
```
### Connect
```js
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
```js
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);
```
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