input-output-hk / js-cardano-wasm

various cardano javascript using wasm bindings
MIT License
31 stars 21 forks source link

TypeError: account_public.bip44_chain is not a function #73

Closed rohitsahu21 closed 5 years ago

rohitsahu21 commented 5 years ago

`const Cardano = require("cardano-wallet");

const MNEMONICS = "job unit evolve when convince scale again leisure october knee inject awful"; const PASSWORD = "thisispassword";

// to connect the wallet to mainnet let settings = Cardano.BlockchainSettings.mainnet();

// recover the entropy let entropy = Cardano.Entropy.from_english_mnemonics(MNEMONICS); // recover the wallet let wallet = Cardano.Bip44RootPrivateKey.recover(entropy, PASSWORD);

// create a wallet account let account = wallet.bip44_account(Cardano.AccountIndex.new(0 | 0x80000000)); let account_public = account.public();

// create an address let chain_pub = account_public.bip44_chain(false); let key_pub = chain_pub.address_key(Cardano.AddressKeyIndex.new(0)); let address = key_pub.bootstrap_era_address(settings);

console.log("Address m/bip44/ada/'0/0/0", address.to_base58()); `

NicolasDP commented 5 years ago

Thanks for the issue report. Could you give us more context so we can reproduce the issue?

  1. what version are you utilising?
  2. are you testing with nodejs?
  3. did you install cardano-wallet or cardano-wallet-browser ? or are you rebuilding from source?
rohitsahu21 commented 5 years ago

@NicolasDP OS: Ubuntu 18.04.2 LTS Node: v10.16.0 are you testing with nodejs? Yes Yes i'm install cardano-wallet using NPM

NicolasDP commented 5 years ago

and what is the version of cardano-wallet ?

rohitsahu21 commented 5 years ago

@NicolasDP

"cardano-wallet": "^0.2.4",

NicolasDP commented 5 years ago

please try "1.1.0"

rohitsahu21 commented 5 years ago

it's working but where is privateKey and mainly DdzFFzCqrh prefix wallet address are use by network

NicolasDP commented 5 years ago

There is a full example here: https://github.com/input-output-hk/js-cardano-wasm/blob/master/cardano-wallet/tests/index.js

rohitsahu21 commented 5 years ago

How can i submit a signed transaction hex on Mainnet or Testnet

NicolasDP commented 5 years ago

I would use https://github.com/input-output-hk/cardano-http-bridge#post-networktxssigned

rohitsahu21 commented 5 years ago

@NicolasDP

What is the remote Endpoint of signed transaction ? and how to get UTXO ? and what's the roll of input and output array in transaction wxample??