Socket
Socket
Sign inDemoInstall

mina-ledger-js

Package Overview
Dependencies
3
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.4 to 1.0.5

26

dist/lib.js

@@ -86,3 +86,3 @@ "use strict";

var txType = _a.txType, senderAccount = _a.senderAccount, senderAddress = _a.senderAddress, receiverAddress = _a.receiverAddress, amount = _a.amount, fee = _a.fee, nonce = _a.nonce, _b = _a.validUntil, validUntil = _b === void 0 ? 4294967295 : _b, _c = _a.memo, memo = _c === void 0 ? "" : _c, networkId = _a.networkId;
var senderBip44AccountHex = this.pad(senderAccount, 8);
var senderBip44AccountHex = this.pad(senderAccount.toString(16), 8);
var senderAddressHex = this.asciiToHex(senderAddress);

@@ -98,12 +98,12 @@ var receiverHex = this.asciiToHex(receiverAddress);

// Uncomment for debug
// console.log("senderBip44AccountHex", senderBip44AccountHex);
// console.log("senderAddressHex", senderAddressHex);
// console.log("receiverHex", receiverHex);
// console.log("amountHex", amountHex);
// console.log("feeHex", feeHex);
// console.log("nonceHex", nonceHex);
// console.log("validUntilHex", validUntilHex);
// console.log("memoHex", memoHex);
// console.log("tagHex", tagHex);
// console.log("networkIdHex", networkIdHex);
console.log("senderBip44AccountHex", senderBip44AccountHex);
console.log("senderAddressHex", senderAddressHex);
console.log("receiverHex", receiverHex);
console.log("amountHex", amountHex);
console.log("feeHex", feeHex);
console.log("nonceHex", nonceHex);
console.log("validUntilHex", validUntilHex);
console.log("memoHex", memoHex);
console.log("tagHex", tagHex);
console.log("networkIdHex", networkIdHex);
var apduMessage = senderBip44AccountHex +

@@ -120,4 +120,4 @@ senderAddressHex +

// Uncomment for debug
// console.log(apduMessage);
// console.log('length: ', apduMessage.length);
console.log(apduMessage);
console.log('length: ', apduMessage.length);
return apduMessage;

@@ -124,0 +124,0 @@ };

@@ -9,3 +9,3 @@ import TransportNodeHid from "@ledgerhq/hw-transport-node-hid-singleton";

const getAddress = async (instance: any) => {
const address = await instance.getAddress(0);
const address = await instance.getAddress(42);
console.log(address);

@@ -19,8 +19,8 @@ };

const signature = await instance.signTransaction({
"senderAccount": 0,
"senderAddress": "B62qoBEWahYw3CzeFLBkekmT8B7Z1YsfhNcP32cantDgApQ97RNUMhT",
"senderAccount": 42,
"senderAddress": "B62qr9pMrhSwBA6txJ8kD3f9GZ3VQPoUaFnKhEosdJmnZXXKj6qhkGF",
"receiverAddress": "B62qkEB9FPhBs9mYdPJPVkUevrJuYr22MwANNvavy6HWZEDqL8WKR3F",
"fee": +"98146290",
"amount": +"1000000000",
"memo": "hub <3 ledger!",
"memo": "clorio <3 ledger!",
"nonce": 2,

@@ -27,0 +27,0 @@ "txType": 0,

{
"name": "mina-ledger-js",
"version": "1.0.4",
"version": "1.0.5",
"description": "JS API for Mina App (Ledger Nano S/X)",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

@@ -95,3 +95,3 @@ # Mina Ledger JS

On node: Open the ledger-app-mina on the Ledger device and run `npm install @ledgerhq/hw-transport-node-hid && npx ts-node example/index.ts` to see the methods running.
On node: Open the ledger-app-mina on the Ledger device and run `npm install @ledgerhq/hw-transport-node-hid-singleton && npx ts-node example/index.ts` to see the methods running.
Note, this will add `@ledgerhq/hw-transport-node-hid-singleton` to the package.json. Do not commit this change. This is just for example purposes.

@@ -105,3 +105,3 @@

Copyright 2016-2020 Carbonara
Copyright 2021 Carbonara

@@ -108,0 +108,0 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

@@ -76,3 +76,3 @@ import {

}: SignTransactionArgs) {
const senderBip44AccountHex = this.pad(senderAccount, 8);
const senderBip44AccountHex = this.pad(senderAccount.toString(16), 8);
const senderAddressHex = this.asciiToHex(senderAddress);

@@ -79,0 +79,0 @@ const receiverHex = this.asciiToHex(receiverAddress);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc