0.0.1 • Published 9 months ago

@infinex/wallet-sdk v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

@infinex/wallet-sdk

SDK to create and communicate with an instance of the @infinex/wallet.

Example

const sdk = new WalletSDK("#sdk", {
  url: "http://my-key-app/",
});

// Unlock with a JWT
const jwt = "eyJhbG...";
const { address } = await sdk.unlock(jwt);

// Get an ethers wallet/signer
const provider = getEthersProvider();
const signer = sdk.ethersSigner(provider);

// Sign a message string with the wallet
const signature = await signer.signMessage(`A message from ${address}`);

// Lock the wallet
await lock();

console.log(address, signature);
0.0.1

9 months ago