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

@usecapsule/web-sdk

Package Overview
Dependencies
Maintainers
7
Versions
340
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@usecapsule/web-sdk - npm Package Compare versions

Comparing version 1.9.0 to 1.10.0

dist/wallet/privateKey.d.ts

1

dist/WebUtils.d.ts

@@ -7,2 +7,3 @@ /// <reference types="node" />

export declare class WebUtils implements PlatformUtils {
getPrivateKey(ctx: Ctx, userId: string, walletId: string, share: string, sessionCookie: string): Promise<string>;
keygen(ctx: Ctx, userId: string, secretKey: string | null, // should be acceptable as null in RN as we don't pre-gen them

@@ -9,0 +10,0 @@ sessionCookie: string, emailProps?: BackupKitEmailProps): Promise<{

@@ -5,2 +5,3 @@ import { LocalStorage } from './LocalStorage.js';

import { signMessage, sendTransaction, signTransaction } from './wallet/signing.js';
import { getPrivateKey } from './wallet/privateKey.js';
export class WebUtils {

@@ -14,2 +15,5 @@ constructor() {

}
getPrivateKey(ctx, userId, walletId, share, sessionCookie) {
return getPrivateKey(ctx, userId, walletId, share, sessionCookie);
}
keygen(ctx, userId, secretKey, // should be acceptable as null in RN as we don't pre-gen them

@@ -16,0 +20,0 @@ sessionCookie, emailProps = {}) {

@@ -14,1 +14,2 @@ import { Ctx, SignatureRes } from '@usecapsule/core-sdk';

export declare function refresh(ctx: Ctx, share: string, walletId: string, userId: string): Promise<string>;
export declare function getPrivateKey(ctx: Ctx, share: string, walletId: string, userId: string): Promise<string>;

@@ -182,1 +182,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

}
export function getPrivateKey(ctx, share, walletId, userId) {
return __awaiter(this, void 0, void 0, function* () {
const capsuleShare = yield ctx.capsuleClient.getCapsuleShare(userId, walletId);
if (!capsuleShare) {
return '';
}
return new Promise((resolve, reject) => global.getPrivateKey(share, capsuleShare, (err, result) => {
if (err) {
reject(err);
}
resolve(result);
}));
});
}

@@ -62,2 +62,6 @@ // ANY CHANGES TO THIS FILE REQUIRE A REBUILD OF THE WORKER

}
case 'GET_PRIVATE_KEY': {
const { share, walletId, userId } = params;
return yield walletUtils.getPrivateKey(ctx, share, walletId, userId);
}
default: {

@@ -64,0 +68,0 @@ throw new Error(`functionType: ${functionType} not supported`);

8

package.json
{
"name": "@usecapsule/web-sdk",
"version": "1.9.0",
"version": "1.10.0",
"type": "module",

@@ -11,4 +11,4 @@ "main": "dist/index.js",

"dependencies": {
"@usecapsule/core-sdk": "1.8.0",
"@usecapsule/user-management-client": "1.5.0",
"@usecapsule/core-sdk": "1.9.0",
"@usecapsule/user-management-client": "1.6.0",
"assert": "^2.1.0",

@@ -36,3 +36,3 @@ "base64url": "3.0.1",

],
"gitHead": "18b6d11b654f3c05995e1a5dff9f0dedcbc37c0a"
"gitHead": "9f19a2e9224958e127ed0cdfa3550d1b832b6361"
}
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