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

@multiversx/sdk-wallet

Package Overview
Dependencies
Maintainers
9
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@multiversx/sdk-wallet - npm Package Compare versions

Comparing version 2.1.3 to 4.0.0-alpha.0

out/guardianSigner.d.ts

1

out/index.d.ts

@@ -7,3 +7,4 @@ export * from "./mnemonic";

export * from "./userSigner";
export * from "./guardianSigner";
export * from "./userVerifier";
export * from "./validatorSigner";

@@ -19,4 +19,5 @@ "use strict";

__exportStar(require("./userSigner"), exports);
__exportStar(require("./guardianSigner"), exports);
__exportStar(require("./userVerifier"), exports);
__exportStar(require("./validatorSigner"), exports);
//# sourceMappingURL=index.js.map

@@ -23,2 +23,15 @@ /// <reference types="node" />

}
/**
* An interface that defines a signing-capable object.
*/
export interface IGuardianSigner {
/**
* Gets the {@link Address} of the signer.
*/
getAddress(): IAddress;
/**
* Signs a message (e.g. a transaction).
*/
guard(signable: ISignable): Promise<void>;
}
export interface IVerifier {

@@ -34,10 +47,19 @@ verify(message: IVerifiable): boolean;

*/
serializeForSigning(signedBy: IAddress): Buffer;
serializeForSigning(): Buffer;
/**
* Returns the signature of the sender.
*/
getSignature(): ISignature;
/**
* Applies the computed signature on the object itself.
*
* @param signature The computed signature
* @param signedBy The address of the {@link ISignature}
*/
applySignature(signature: ISignature, signedBy: IAddress): void;
*/
applySignature(signature: ISignature): void;
/**
* Applies the guardian signature on the transaction.
*
* @param guardianSignature The signature, as computed by a guardian.
*/
applyGuardianSignature(guardianSignature: ISignature): void;
}

@@ -44,0 +66,0 @@ /**

2

out/userSigner.d.ts

@@ -7,3 +7,3 @@ import { IAddress, ISignable, ISigner } from "./interface";

export declare class UserSigner implements ISigner {
private readonly secretKey;
protected readonly secretKey: UserSecretKey;
constructor(secretKey: UserSecretKey);

@@ -10,0 +10,0 @@ static fromWallet(keyFileObject: any, password: string): ISigner;

@@ -47,7 +47,6 @@ "use strict";

trySign(signable) {
let signedBy = this.getAddress();
let bufferToSign = signable.serializeForSigning(signedBy);
let bufferToSign = signable.serializeForSigning();
let signatureBuffer = this.secretKey.sign(bufferToSign);
let signature = new signature_1.Signature(signatureBuffer);
signable.applySignature(signature, signedBy);
signable.applySignature(signature);
}

@@ -54,0 +53,0 @@ /**

{
"name": "@multiversx/sdk-wallet",
"version": "2.1.3",
"version": "4.0.0-alpha.0",
"description": "Wallet components for MultiversX",

@@ -5,0 +5,0 @@ "main": "out/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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