Giter Site home page Giter Site logo

laksacsharp's People

Contributors

iantanwx avatar liefqin avatar yanbin007 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

laksacsharp's Issues

Targeting .Net Standard

Hi,

I saw the project is targeting Framework v4.5.2, is there a reason not to target .NET Standard?

Send Transaction

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.

The project source is incomplete.

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.

CreateAccount, SendTransaction Error...

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.

Issue with publicPointFromPrivate() function

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.

@neeboo @yanbin007

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.