Skip to content

Commit

Permalink
Merge pull request #19 from rsksmart/security-preparation
Browse files Browse the repository at this point in the history
Security preparation
  • Loading branch information
Luisfc68 authored May 21, 2024
2 parents 9f35c2f + fcdbc72 commit d870656
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ The intention of this library is to make easier to work with Bitcoin transaction
## Features

The features of this library include:
* Bitcoin transaction output parsing: is able to receive a raw tx and return an array of structs with the tx outputs
* Bitcoin transaction output parsing: is able to receive a raw tx and return an array of structures with the tx outputs
* Bitcoin transaction hashing: is able to receive a raw tx and return its hash
* Bitcoin transaction output script validation: is able to receive a raw output script, validate that is from a specific type and return a result. E.g. receive a raw null-data script and return the embeded data in it
* Bitcoin transaction output script validation: is able to receive a raw output script, validate that is from a specific type and return a result. E.g. receive a raw null-data script and return the embedded data in it
* Bitcoin address generation: is able to generate Bitcoin the address from a specific script and also to validate if a given address was generated from a script or not.
* Bitcoin address validation: is able to validate if a Bitcoin address is of a given type or not.

### Future features
These are some features that can increase the library capabilities in the future:
Expand Down
2 changes: 1 addition & 1 deletion contracts/BtcUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ library BtcUtils {
}

function extractRawOutput(uint position, bytes memory rawTx) private pure returns (TxRawOutput memory) {
TxRawOutput memory result;
TxRawOutput memory result = TxRawOutput(0, "", 0, 0);
result.value = uint64(calculateLittleEndianFragment(position, position + OUTPUT_VALUE_SIZE, rawTx));
position += OUTPUT_VALUE_SIZE;

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rsksmart/btc-transaction-solidity-helper",
"version": "0.1.0",
"version": "0.1.1",
"description": "Solidity library with functions to work with Bitcoin transactions inside smart contracts",
"main": "contracts",
"files": [
Expand Down

0 comments on commit d870656

Please sign in to comment.