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

@stellar/typescript-wallet-sdk-km

Package Overview
Dependencies
Maintainers
8
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stellar/typescript-wallet-sdk-km

The Typescript Wallet Key Manager SDK is a library that allows developers to use key managing functionality in their wallet applications. It works in conjuction with the main [Typescript Wallet SDK](https://github.com/stellar/typescript-wallet-sdk) to hol

  • 1.5.0
  • npm
  • Socket score

Version published
Maintainers
8
Created
Source

Stellar Typescript Wallet Key Manager SDK npm version

The Typescript Wallet Key Manager SDK is a library that allows developers to use key managing functionality in their wallet applications. It works in conjuction with the main Typescript Wallet SDK to hold all the functionality a developer would need to create a wallet for the stellar network.

Dependency

The library is available via npm. To import typescript-wallet-sdk-km you need to add it as a dependency to your code:

yarn:

yarn add @stellar/typescript-wallet-sdk-km

npm:

npm install @stellar/typescript-wallet-sdk-km

Introduction

Here's a small example on how to use the KeyManager to store and retrieve a key:

Import the package:

import { KeyManager, MemoryKeyStore } from "@stellar/typescript-wallet-sdk-km";

Creating a KeyManager class using simple memory key storage:

const testStore = new MemoryKeyStore();
const testKeyManager = new KeyManager({ keyStore: testStore });

Store an encrypted key:

const id = "this is a my test id";
testKeyManager.registerEncrypter(IdentityEncrypter);
await testKeyManager.storeKey({
  key: {
    id,
    type: KeyType.plaintextKey,
    publicKey: "TestPublicKey",
    privateKey: "TestPrivateKey",
  },
  password: "test",
  encrypterName: "IdentityEncrypter",
});

Retrieve the stored key:

const keyData = await testKeyManager.loadKey(id, password);

FAQs

Package last updated on 20 May 2024

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