Git Product home page Git Product logo

Comments (5)

snowypowers avatar snowypowers commented on July 20, 2024

yes, you need babel if you want to run import

from neon-js.

iNomaD avatar iNomaD commented on July 20, 2024

With which commands can I run this file after installing babel? I am new to NodeJS

from neon-js.

snowypowers avatar snowypowers commented on July 20, 2024

you cant run import currently using cli. Try using require instead.

from neon-js.

iNomaD avatar iNomaD commented on July 20, 2024

@snowypowers do you mean like this?

let neon_js = require('@cityofzion/neon-js')
let Neon = neon_js.default
let wallet = neon_js.wallet
const a = Neon.create.Account('ALfnhLg7rUyL6Jr98bzzoxz5J7m64fbR4s')
console.log(a.address) // ALfnhLg7rUyL6Jr98bzzoxz5J7m64fbR4s
const b = new wallet.Account('9ab7e154840daca3a2efadaf0df93cd3a5b51768c632f5433f86909d9b994a69')
console.log(b.privateKey) // 9ab7e154840daca3a2efadaf0df93cd3a5b51768c632f5433f86909d9b994a69

What's wrong?

TypeError: Neon.create.Account is not a function
    at Object.<anonymous> (C:\Projects\IDEAProjects\identity-contract\test.js:5:23)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)

from neon-js.

snowypowers avatar snowypowers commented on July 20, 2024

http://cityofzion.io/neon-js/installation.html

Please go to discord for such questions. Issues are meant for development, not tutorials.

from neon-js.

Related Issues (20)

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.