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);
var connectionId = await sdk.createConnection();
var embeddedLink = await sdk.getConnectionEmbeddedLink(connectionId);
var qrCodeLink = await sdk.getConnectionQrCodeLink(connectionId);
var connection = await sdk.submitConnectionAddress(
connectionId,
"0x52ec083d30192691872b60334bfdd1450c1826d9"
);
var connectionAddress = await sdk.getConnectionAddress(connectionId);
Sign Transaction
const sdk = new SDK(SDK_ENDPOINT);
const txUuid = await sdk.submitTx();
const embeddedLink = await sdk.getEmbeddedLink(txUuid);
const qrCodeLink = await sdk.getQrCodeLink(txUuid);
const rawTx = await sdk.getRawTx(txUuid);
await sdk.submitSignedTx(txUuid, "0x123456789abcdef");
const signedTx = await sdk.getSignedTx(txUuid);