Hot answers tagged

5 votes

window.cardano undefined

I am using this code in react: const isBrowser = () => typeof window !== "undefined"; export const getCardano = (): Cardano | undefined => { const cardano = isBrowser() && ...
2 votes

Submitting a transaction from cardano-cli with Nami Wallet

The solution remains the same. You must convert the array into the map, commonly done by signing it with throw away keys. Then you get the transaction with the serialization library, free the witness ...
2 votes

How do I create and submit a transaction using only Nami Wallet?

If you are open to integrating with a wallet other than Nami, then Typhon Wallet integration is seamless which does not require you to fetch UTXOs and manually build a transaction. The below snippet ...
2 votes

How do I create and submit a transaction using only Nami Wallet?

On Cardano, a transaction consists of UTxOs spent and UTxOs produced. The Nami wallet has a function to extract its UTxOs: cardano.getUtxos(amount?: Value, paginate?: {page: number, limit: number}) : [...
  • 1,356
2 votes
Accepted

LightWallet: Empty array for (await api.getUsedAddresses() || await api.getUnusedAddresses() || [])

Thanks to Marcel - founder of eternl I've found my mistake. await api.getUsedAddresses() actually returns an empty array - I thought both calls return undefined and it defaults to []. After calling ...
1 vote
Accepted

Using testnet with Nami

The currently released version of Nami runs on the old testnet, but here's a vasil-ready branch of it, that you can install separately for testing on the preprod (or preview) testnet: https://github....
  • 1,364
1 vote

Where does Nami store private keys?

Here is the GitHub for Nami, as it is open source. Looks like it uses chrome local storage. I believe chromes local data is located in %AppData%\Google\Chrome\User Data\Default\Local Storage atleast ...
1 vote

Can someone show me how to get the transaction in the proper format for cip-30?

You were on the right track, the key is to add --cddl-format to the build command
  • 669
1 vote

How can I grant an NFT holder a one time action in a web app?

Integrate with a browser wallet (Nami, ccvault, ...) so users can log in with their wallet on your web-app. Let the users sign a message to prove they really own the wallet. Check on server side if ...
  • 3,313
1 vote

How do I properly parse the CIP-30 output from NAMI to send a users wallet tokens?

It is hex encoded byteString. You can use the Cardano serialization lib browser https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-browser And the following code in javascript const ...
1 vote

How to add datum to UTXO in nami

Be careful not to confuse metadata and datum, as they are different things. Metadata are part of a transaction, while a datum is part of an UtxO. Metadata are completely optional and to the discretion ...
1 vote

How do I create and submit a transaction using only Nami Wallet?

Is a long and awful process, Check this example using version 10.4 for all function definitions check my repo https://github.com/alice1989123/vending_machine/blob/main/Cardano/Wallet/Wallet.js Build ...

Only top scored, non community-wiki answers of a minimum length are eligible