Socket
Book a DemoInstallSign in
Socket

@coolwallet/kas

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@coolwallet/kas

Coolwallet Kaspa sdk

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

CoolWallet Kaspa SDK

Typescript library with support for the integration of Kaspa for third party application, include the functionalities of generation of addresses and signed transactions.

Install

npm i @coolwallet/kas

Usage

import KAS from '@coolwallet/kas';
import { crypto } from '@coolwallet/core';
import { createTransport } from '@coolwallet/transport-web-ble';

const kas = new KAS();

const transport = await createTransport();

const { privateKey: appPrivateKey } = crypto.key.generateKeyPair();

const appId = 'appId that had been registered by wallet';

const addressIndex = 0;

const address = await kas.getAddress(transport, appPrivateKey, appId, scriptType, 0);

// TODO implement

Methods

getAddress

Description

Get address by address index.

The KAS address generated is compatible to BIP44 and Base32 with account and change set to 0, which means calling getAddress with addressIndex = i will get the address of folllowing path:

m/44'/111111'/0'/0/{i}

In the design of current hardware, we only support path m/44'/111111'/0'/0/{i} for speed optimization. This might change in the future and we will then open a more general interface to deal with custom path.

async getAddress(
    transport: Transport, 
    appPrivateKey: string, 
    appId: string, 
    scriptType: ScriptType, 
    addressIndex: number
): Promise<string> 

Acknowledgements

This project includes code from the following open source projects:

  • js-wallet-sdk - Licensed under the MIT License

Keywords

kas

FAQs

Package last updated on 05 May 2025

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