Questions tagged [javascript]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
18 views

Unexpected character in contract.js React issue

everyone. I generated a smart contract js representation using this command below : completium-cli generate javascript ./contract/mycontract.arl > ./src/contract.js and i get this error : Line 1: ...
Muhammed Ekici's user avatar
0 votes
1 answer
18 views

How to compile a LigoLang jsLigo written smart contract on Windows + vsCode?

I'm beginning to learn to write Tezos smart contracts with LigoLang using jsLigo as programming language and Windows as operating system. For IDE I'm using vsCode. I've followed the Getting Started ...
Luiz Milfont's user avatar
2 votes
1 answer
47 views

Is there a way to create a keystore file on Tezos that is similar to Ethereum's keystore V3?

Talking about this specifically: https://web3js.readthedocs.io/en/v1.2.11/web3-eth-accounts.html#encrypt Takes a private key and outputs a JSON keystore file.
hlvntn's user avatar
  • 111
2 votes
1 answer
109 views

How to get encrypted Tezos private key from decrypted private key and password?

In my app on back-end the next code is used to get signer: const { InMemorySigner } = require('@taquito/signer'); const signer = InMemorySigner.fromSecretKey( signingKey, TEZOS_SERVICE_PASSPHRASE ...
Ihor Bohdanov's user avatar
1 vote
1 answer
74 views

How to encrypt and decrypt some data with a users wallet before persisting it inside publicly readable storage?

I would like to encrypt a piece of data before persisting it in publicly accessible storage (e.g. localstore, IndexedDB, smart contract etc), ideally with no user interaction for encrypting or ...
0x10's user avatar
  • 359
1 vote
1 answer
51 views

Chest keys generated by @smartpy/timelock are not functional

The tool I use https://www.npmjs.com/package/@smartpy/timelock, https://github.com/RomarQ/tezos-timelock/ the tool works good on other functions such as openChest and createChestKey. I used node 14.14....
Hexa's user avatar
  • 61
1 vote
1 answer
167 views

General solution for getting fungible token balance off-chain

Given the public hash of a fungible token contract, I want to get the amount of tokens owned by a wallet. I want to perform this operation off-chain so that it is free. FA1.2 (tzip7) has getBalance() ...
PEC's user avatar
  • 139
0 votes
1 answer
66 views

Manipulation of Tezos.amount and test cleanup storage

I am about to write some tests to verify some method functionality. The method functionality is quite simple: function checkAmount(const store : storage) : storage is block{ if Tezos.amount <= ...
Stiflers Mum's user avatar
1 vote
1 answer
34 views

Call method taking timestamp as parameter from JavaScript

I have a Truffle instance of the contract and I call the method like this contract_instance.test(1); Where test in a function that takes a timestamp as parameter. This gives me this error message: ...
Thorkil Værge's user avatar
3 votes
1 answer
127 views

How to call PACK in JavaScript

In my smart contract in LIGO I serialize some data using Bytes.pack which calls the underlying PACK Michelson instruction. In my case, the function signature is (nat, address, nat) -> bytes. Does ...
Thorkil Værge's user avatar
3 votes
1 answer
210 views

How do I call the FA2 balance_of endpoint through Truffle?

I have written a contract to implement FA2 and I have a Truffle/JavaScript setup to test this contract while running against a sandboxed node. I can test the transfer endpoint and the update_operators ...
Thorkil Værge's user avatar
5 votes
3 answers
618 views

How to decode raw transaction?

I am using @taquito to build and sign a transaction. But before I send it I want to decode it to check my destination address, amount etc like you would normally do for other blockchains. Not sure ...
coder123's user avatar
  • 157
1 vote
1 answer
296 views

How to increase the counter of a transaction

I am using @taquito/taquito. To transfer tezos tokens from one address to another is am using below function. Tezos.contract.transfer({ to: toAddress, amount: amountToSend, ...
Karthick's user avatar
4 votes
1 answer
287 views

How to estimate Baker and Storage fee with @taquito for a contract?

I have a simple smart-contract that holds user funds and that can be withdrawn by sending a signed message. However, I would like to offer the possibility for users to anticipate the fees they have ...
Charles Beyer's user avatar
2 votes
2 answers
554 views

How to retrieve data from smart-contract using javascript?

I have stored data that I would like to retrieve from a deployed smart-contract. The storage structure was defined using SmartPy: def __init__(self): self.init(bmap=sp.big_map(tkey=sp....
macourtney7's user avatar
1 vote
1 answer
32 views

How to fix 'paused before out-of-memory crash' contract deployment error in browser? [ConseilJS]

I wish to deploy a contract using ConseilJS that I am able to originate successfully using smartpy.io However, when I copy the generated Michelson and initial storage into the following function: ...
macourtney7's user avatar
1 vote
1 answer
186 views

How to interact with SmartPy BigMap in contract?

I would like to setup a smart contract that contains (as defined by smartpy) a BigMap storage. I have the following code: import smartpy as sp class contract(sp.Contract): def __init__(self): ...
macourtney7's user avatar
2 votes
1 answer
51 views

ConseilJS TezosContractIntrospector.generateEntryPointsFromAddress `Uncaught (in promise) TypeError: Cannot read property '0' of undefined`

Trying to retrieve contract entry points using the TezosContractIntrospector The following code: async function entry_points(){ const server={ url:'https://conseil-dev.cryptonomic-infra.tech:...
macourtney7's user avatar
2 votes
1 answer
212 views

How to deploy a smart contract influenced by UI inputs using ConseilJS and SmartPy generated Michelson?

I wish to be able to create a smart contract taking input from a UI to supply parameters pubKey,prvKey,pubHash for the deployment and minAmount and maxTime to influence the Michelson. I have the ...
macourtney7's user avatar
1 vote
1 answer
74 views

Transfer operation using ConseilJS

I'm trying to use ConseilJS to make a transfer to a contract from a webpage. I'm using a keystore object based on my tezos-client wallet. const keystore = { publicKey: '...
Nemo's user avatar
  • 736
1 vote
1 answer
139 views

How to ensure that operation was included in a block with taquito

When I inject an operation using the taquito library, how can I have my program wait for a specific number of blocks after my operation is included in the network.
Jev Björsell's user avatar
1 vote
1 answer
179 views

How to originate a smart contract with Taquito

How can I access my contract after originating it using taquito? If I use taquito like this. Tezos.contract.originate({...contractOptions}) How can I access my new originated address and start using ...
Jev Björsell's user avatar
1 vote
1 answer
262 views

How can I derive a public key from a known private key?

Edpk from a edsk, programmatically?
Luiz Milfont's user avatar
3 votes
0 answers
16 views

API Ballots not working

The API : https://api6.tzscan.io/v3/ballots/11 is not working, I don't understand why. Tzscan API instructions : https://tzscan.io/api#operation/405
lexxor's user avatar
  • 141
2 votes
1 answer
44 views

Is there a TzScan API to find the number of Tezos Node?

I'm looking for an API to get the number of Tezos Node or the number of Bakers.
lexxor's user avatar
  • 141
3 votes
0 answers
38 views

Is there a TzScan API to find the total number of delegated Tezos?

I'm looking for an API to get the total number of delegated Tezos. I already found an API to get the number of rolls delegated: https://api6.tzscan.io/v3/rolls_history/...
lexxor's user avatar
  • 141
4 votes
2 answers
87 views

Issue with API Request Cycle

I have an issue to request the Cycle Number from this API. I don't understand how to use the map to get the data from the last cycle only. const ul2 = document.getElementById('Cycle'); const url2 =...
Lexxor's user avatar
  • 165
4 votes
1 answer
178 views

API Access HTML/Javascript problem

I have an issue trying to use javascript to get the circulating supply by requesting data from Tzscan API: HTML code to request the circulating supply: <!DOCTYPE html> <html> <head>...
Lexxor's user avatar
  • 165
8 votes
2 answers
602 views

Base58 encoding/decoding of addresses in Micheline

who know some javascript library for decoding optimized Micheline representation of an address value? 011cd5f135e80fd8ebb6e43335b24ca6116edeba6900 => KT1BDEn6wobs7tDReKkGheXAhoq278TGaNn5
Михаил Магомедов's user avatar