Giter Club home page Giter Club logo

go-libra's People

Contributors

the729 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

go-libra's Issues

[Opinion] Wallet operations.

It's a good choice to add a wallet package and related functions such as newWallet, wallet.createAccount, and more such as client.mintCoin.
Moreover, adding a wallet also tackles the problem of the differentiation of ed25519 between golang and rust.
In golang, there is 64-bytes private key, whereas the libra uses 32-bytes private key (called PrivateKeySeed in golang). The private key generated from libra source code that can't be used directly to go-libra package because of the difference of key length.
To eliminate the ambiguities, the choices are either to add wallet operations in golang package that would use golang's ed25519 or support the 32-bytes length private key from rust or other analogous programming languages that only produce 32-bytes private key by declaring a function like ed25519.NewKeyFromSeed().

Installation

New to golang, so installation instructions would be helpful. After installing golang, from the command line enter: 'go get github.com/the729/go-libra/...' The executables will be placed in $GOPATH/bin/, and when running the executable it needs a copy of the file 'trusted_peers.config.toml' to be in the parent directory, (../trusted_peers.config.toml).

Cannot connect libra-swarm node for gopher-js lib.

The example node server http://hk2.wutj.info:38080 has worked as well, while my libra-swarm node server I'm trying to connect was failed.
The connect point of the libra-cli to the swarm node is http://34.223.183.142:8000.

Errors below:

Error:  rpc error: code = Unknown desc = Response closed without headers

How's the difference between them?
I'm using HTTP/2 protocol.

[Options] Need option for customized local node genesis hash.

Currently, the genesis hash is hard coded:

genesisHash, _ := hex.DecodeString("b7712506940af39e57de4a868c15849ab09bd8e3c4a89113a492797c6f98bf6b")

I think the genesisHash is represented as libra testnet genesis hash.
Are there any options for replacing it to a customized local node hash, not the libra testnet hash?

[Enhancement] Type definition to work with TypeScript.

Is there a possible way to implement the type definition of gopherjs-libra to work with typescript?
I see such .d.ts generator dts-gen from microsoft can help to generate d.ts file from node or js library.

There is the generated d.ts file from gopherjs-libra.js.

 /** Declaration file generated by dts-gen */

export = gopherjs_libra;

declare const gopherjs_libra: {
    libra: {
        accountReceivedEventPath: any;
        accountResourcePath: any;
        accountSentEventPath: any;
        client: any;
        inferProgramName: any;
        pubkeyToAddress: any;
        resourcePath: any;
    };
};

However, the origin javascript file need to be a module (translate to ts file) or exported. I'm trying to implement that at this time.

[Contribute] Supporting submitting Move Script or Module Transactions

We're considering to develop a new Libra IDE for enabling contract capabilities. However I didn't see there is a SDK to support that functioning as well.
Well I think this repo is maintained as so good as sticking with the latest libra testnet, and can be used as frontend javascript library. Therefore, we want to contribute about the move contract interaction code to this repo to enabling that capabilities, not just peer-to-peer-transactions.

RotateKeys not working

I've tried to make the RotateKeys function working, but there seems to be problems regarding the passing of byte arrays. This is what I tried to pass as the payload of a raw transaction (key is a []byte slice):

payload := &types.TxnPayloadScript{
    Code: stdscript.RotateAuthKey,
    Args: []types.TransactionArgument{
        types.TxnArgBytes(key),
    },
}

Could you try to verify if RotateKeys is working for you or the problem is related to libra core?

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.