Giter VIP home page Giter VIP logo

gxbjs's People

Contributors

dophinl avatar lanhaoxiang avatar svk31 avatar vikramrajkumar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gxbjs's Issues

Question: how to create an `account_update` transaction?

I don't quite understand how to create an account_update transaction, I tried adding the operation like so:

    const tx = new TransactionBuilder();

    tx.add_type_operation('account_update', {
        fee: {
            amount: 0, 
            asset_id: '1.3.1'
        },
        account: user.id,
        owner: {
            weight_threshold: 1,
            account_auths: [],
            key_auths: [ PublicKey.fromPublicKeyString('GXC76CWcEHaLnyWbcWmEiMRnMn9LfcTQQ5sDypx29Ei4Yp3BtxgzV'), 1 ],
            address_auths: []
        },
        active: {
            weight_threshold: 1,
            account_auths: [],
            key_auths: [ PublicKey.fromPublicKeyString('GXC76CWcEHaLnyWbcWmEiMRnMn9LfcTQQ5sDypx29Ei4Yp3BtxgzV'), 1 ],
            address_auths: []
        },
        new_options: {
            memo_key: PublicKey.fromPublicKeyString('GXC76CWcEHaLnyWbcWmEiMRnMn9LfcTQQ5sDypx29Ei4Yp3BtxgzV'),
            voting_account: '1.2.5',
            num_witness: 0,
            num_committee: 0,
            votes: [],
            extensions: []
        },
        extensions: []
    });

And this results in:

account_update.owner	 cause: authority.key_auths	 cause: value required  undefined 
 stack: Error: value required  undefined
    at Object.required (/home/user/NodeJS/test/node_modules/gxbjs/dist/serializer/src/SerializerValidation.js:39:19)

I also tried to pass the keys as strings, but would get this error:

Expecting key to begin with GXC, instead got G.

I'm not sure what I'm doing wrong here...

Provide deserialize_contract_param method

Is your feature request related to a problem? Please describe.
This function would be usefull in gxchain explorer and all gxclient, help developer to deserialize contract params in transaction body

Describe the solution you'd like
Provide deserialize_contract_param method in this lib

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.