9 votes
Accepted

Base58 encoding/decoding of addresses in Micheline

Optimized addresses are 22 bytes, which follows the following format: The first byte is a tag, either 00 for implicit (tz) or 01 for originated (KT) If the first byte is 00 and we are working with ...
Stephen Andrews's user avatar
7 votes
Accepted

API Access HTML/Javascript problem

You've encountered a mixed content error. Requests can't be a mixture of http and https, they need to be all of the same, preferably https. Just change the const url = 'http://api6.tzscan.io/v3/supply'...
Richard Ayotte's user avatar
7 votes
Accepted

How to decode raw transaction?

Taquito can parse forged bytes using the parse() method in the @taquito/local-forging package. TypeDocs are here. You can see the unit tests here. Implementation to decode a signed transaction: ...
Jev Björsell's user avatar
7 votes

How to decode raw transaction?

You can use the tezos-codec binary to decode this: tezos-codec decode 006-PsCARTHA.operation from ...
Tomáš Zemanovič's user avatar
6 votes
Accepted

How to retrieve data from smart-contract using javascript?

As of the current Babylon protocol and the upcoming Carthage, the RPC only provides you the ability to retrieve the value for a known key that you provide to the RPC. But even in this scenario you ...
cousinit's user avatar
  • 1,999
3 votes
Accepted

Issue with API Request Cycle

The first element returned from https://api6.tzscan.io/v3/rolls_history/tz1NortRftucvAkD1J58L32EhSVrQEWJCEnB?number=1 is the data from the latest cycle. HTML <h1>Last Cycle</h1> <div ...
Richard Ayotte's user avatar
3 votes

Base58 encoding/decoding of addresses in Micheline

I believe you should be able to make use of Stephen Andrews eztz library to access various tools from a js environment I would speculate the function is this one where you use the KT prefix ...
Ezy's user avatar
  • 6,064
3 votes
Accepted

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

I cannot answer all your questions but at least, I can say that, in SmartPy.io, the storage sent to ConseilJS is the content of the tab "Storage" (in either Michelson or Micheline formats) and the ...
FFF's user avatar
  • 3,260
3 votes

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

You can call toTransferParams({amount: 5}) on the method you want to estimate, and pass that result to Tezos.estimate.transfer() The results of which will look something like: Estimate { _gasLimit:...
Jev Björsell's user avatar
3 votes

How to retrieve data from smart-contract using javascript?

We maintain an index of all historic bigmap data at TzStats. To fetch all current keys and values in a bigmap call https://api.tzstats.com/explorer/bigmap/:id/values If your bigmap is very large you ...
Alexander Eichhorn's user avatar
2 votes

How to call PACK in JavaScript

Taquito has this functionality: the packData method in the RPC client package.
Claude Barde's user avatar
2 votes
Accepted

How do I call the FA2 balance_of endpoint through Truffle?

As far as I know, you cannot check if the entrypoint returns the balance with JavaScript, because the entrypoint doesn't return a value but emits a transaction. I didn't try it for a FA2 token ...
Claude Barde's user avatar
2 votes

How to decode raw transaction?

You can use the RPC endpoint: /chains/main/blocks/head/helpers/parse/operations to do that. Example: await axios.post( `${nodeURL}/chains/main/blocks/head/helpers/parse/operations`, ...
Daly's user avatar
  • 442
2 votes
Accepted

General solution for getting fungible token balance off-chain

A better approach would be to use an Indexer. In general wallets only communicate with the chain directly to inject an operation or to do some sort of highly specific task with a single contract. ...
Simon McLoughlin's user avatar
  • 1,047
2 votes
Accepted

How to interact with SmartPy BigMap in contract?

The first and main issue you have is that setup is a method of class sp.Contract that is broken when you redefine it in your contract. This should not be the case and must be fixed on the SmartPy side....
FFF's user avatar
  • 3,260
1 vote
Accepted

Unexpected character in contract.js React issue

i fixed it by using this solution : www.stackoverflow.com/a/51349619
Muhammed Ekici's user avatar
1 vote

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

Never mind, I've just found the issue. Maybe this could help Windows users: To compile on Windows you have to add ".exe" on the command, like this: ligo.exe compile contract starting.jsligo -...
Luiz Milfont's user avatar
1 vote
Accepted

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

You are not required to have an encrypted key edesk, you can just provide the edsk without password and encrypt your wallet storage the way you prefer. Answering your exact question: Python solution: ...
Rodrigo Quelhas's user avatar
1 vote

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

There are libraries for JS/TS that can manage the encryption. Do that first, then convert the encrypted binary data to hex then store that in your contract. You will need to securely store the key ...
utdrmac's user avatar
  • 3,422
1 vote
Accepted

Chest keys generated by @smartpy/timelock are not functional

The javascript primitives seem to be weak for creating the chest. You can use the CLI: ./timelock.exe create-chest-and-chest-key --payload "05010000000b48454c4c4f20574f524c44" --time 3456 ...
Rodrigo Quelhas's user avatar
1 vote
Accepted

Call method taking timestamp as parameter from JavaScript

For some reason you need to represent the timestamp as a string. So contract_instance.test("1"); will work.
Thorkil Værge's user avatar
1 vote
Accepted

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

You should probably use the Micheline / JSON version created by SmartPy.io. This is what is actually sent from SmartPy.io. You also need to change the conseiljs.TezosParameterFormat.Michelson ...
FFF's user avatar
  • 3,260
1 vote

Transfer operation using ConseilJS

Please retry creating the keys from the faucet mnemonic, it sounds like you missed a few characters when copying the secret key.
Crypto Mike's user avatar
1 vote
Accepted

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

Taquito return an operation object for each operation you inject using it. For instance if you do: const op = Tezos.contract.transfer({to: address, amount: 1}) You can wait until the confirmation ...
Simon B.Robert's user avatar
1 vote
Accepted

How to originate a smart contract with Taquito

When you inject any kind of operation using taquito you will get an Operation object back which can allow you to interact with the result of your operation. In the case of Origination you will be ...
Simon B.Robert's user avatar
1 vote

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

It's on the site. Just go tzscan and click API, or here you go https://tzscan.io/api
KevinOnChain's user avatar

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