
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
@digix/react-ledger-container
Advanced tools
⚠️ Works with the 1.2+ Ledger firmware. EIP155 Replay protection only works with 1.3+
❗️ Use with cation; Developer accepts no liability for loss of funds!
version
arbitraryDataEnabled
eip155
ethLedger
methods injection
signTransaction
getAddress
(TODO)signPersonalMessage
(TODO)expect
option for validating addressonReady
event handler for triggering actionsimport React, { PropTypes, Component } from 'react';
import LedgerContianer from '@digix/react-ledger-container';
export default class SignLedgerTransaction extends Component {
constructor(props) {
super(props);
this.handleSign = this.handleSign.bind(this);
}
handleSign({ signTransaction }) {
// txData = { to, nonce, gasPrice, value, data, gas } (w/ optional `from` for validating)
const { txData, account, publishTransaction } = this.props;
// kdPath = "44'/60'/0'/0";
const { kdPath } = account;
// signTransaction method will show the signing UI on ledger screen
signTransaction(kdPath, txData).then((signedTx) => {
publishTransaction({ signedTx });
})
}
render() {
const { kdPath, address } = this.props.account;
return (
<LedgerContianer
expect={{ kdPath, address }}
onReady={this.handleSign}
renderReady={({ config }) => <p>Ready to sign! Using ledger version {config.version}.</p>}
/>
);
}
}
SignLedgerTransaction.propTypes = {
publishTransaction: PropTypes.func.isRequired,
account: PropTypes.object.isRequired,
txData: PropTypes.object.isRequired,
};
getAddress
& signPersonalMessage
FAQs
React component for handling Ledger connectivity
The npm package @digix/react-ledger-container receives a total of 24 weekly downloads. As such, @digix/react-ledger-container popularity was classified as not popular.
We found that @digix/react-ledger-container demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
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.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.