@infinex/wallet-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

@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);

Readme

Keywords

none

Package Sidebar

Install

npm i @infinex/wallet-sdk

Weekly Downloads

5

Version

0.0.1

License

MIT

Unpacked Size

158 kB

Total Files

7

Last publish

Collaborators

  • yingli42o
  • halfbakedsneed
  • fejesus
  • clementbalestrat
  • jedwatson