firestack-lab / laksacsharp Goto Github PK
View Code? Open in Web Editor NEWZilliqa Blockchain C# Library
Zilliqa Blockchain C# Library
Hi,
I saw the project is targeting Framework v4.5.2, is there a reason not to target .NET Standard?
Hi,
Thanks for all the effort so far, I tried to send transactions with the package but ran into a few problems. Will see if I can send a pull request later but here they are:
Signature misses ToString() method.
I think it should be ( as in the Java variant)
public override string ToString() { String rHex = Hex.ToHexString(R.ToByteArray()); while (rHex.Length< 64) { rHex = "0" + rHex; } String sHex = Hex.ToHexString(S.ToByteArray()); while (sHex.Length < 64) { sHex = "0" + sHex; } return rHex + sHex; }
Fix in HttpProvider.cs
public Rep<CreateTxResult> CreateTransaction(TransactionPayload payload) { return Send<CreateTxResult, TransactionPayload>("GetContractAddressFromTransactionID", payload); }
The GetContractAddressFromTransactionID should be CreateTransaction.
If i correct the above but then I get an "Invalid Signature size". That is were I got stuck for now.
Hi
Thanks to that, we are developing easily.
But when I try to build it with the latest source, I get an error.
In the KeyTools.cs file in the Crypto folder of the LaksaCsharp project
No class associated with Numeric.
(Numeric.ToHexStringNoPrefixZeroPadded, Numeric.HexStringToByteArray)
Then, when the sign operation is performed in the transaction operation sample source, the Exception is returned from the Validation.IsBech32 check.
The recipient address is 4baf5fada8e5db92c3d3242618c5b47133ae003c.
Please confirm. Thank you.
Hi
I'm getting a lot of help from your source. Thanks.
However, there is an error in address creation and transmission, and it is not proceeding.
I want you to solve it.
PROBLEM: The following function in ECKeyPair.cs
allows one to obtain the public key from an input private key.
public static ECPoint publicPointFromPrivate(BigInteger privKey)
{
/*
* TODO: FixedPointCombMultiplier currently doesn't support scalars longer than the group
* order, but that could change in future versions.
*/
if (privKey.BitLength > CURVE.N.BitLength)
{
privKey = privKey.Mod(CURVE.N);
}
return new FixedPointCombMultiplier().Multiply(CURVE.G, privKey);
}
If the input privKey
has a bit length that is larger than the bit length of the group order N
, then privKey
is reduced modulo N
. There are couple of issues here: 1) Any input privKey
that does not fall between 1
and N-1
(both inclusive) should be outright rejected. 2) Comparing the bit length of N
and privKey
is not correct. One should rather compare their values directly.
SOLUTION: Replace the if
condition by instead checking whether the input privKey
is valid or not. A valid privKey
is simply a scalar value that is between 1
and N-1
. If privKey
is invalid, then the function should simply throw an error instead of reducing privKey
modulo N
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.