Questions tagged [taquito]
Questions related to using the [Taquito](https://tezostaquito.io) Typescript/Javascript library to interact with the Tezos blockchain
111
questions
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 ...
5
votes
2
answers
389
views
Operation cost for invoking smart contract
I would like to find out if the smart contract's code size/storage or an operation's parameters helps to derive to the cost.
Is there a formula to calculate the cost of the operation to be invoking a ...
5
votes
1
answer
52
views
bigmap.get(key, "") with default param in case of no entry for key in the map with Taquito
Can we do something similar to myMap.get(key, defaultValue = None) of smartPy with Taquito?
An instruction like:
const myContract = await Tezos.contract.at(contractAddress);
const contractStorage = ...
4
votes
1
answer
511
views
How do I get the storage value of a bigmap using pair datatype as key with taquito library?
I am using the taquito library to interact with a smart contract that I have uploaded to carthagenet.
However, I am facing an issue in retrieving the value of a bigmap property in my smart contract ...
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 ...
3
votes
1
answer
183
views
How to convert hex string/bytes to ASCII characters
Using Taquito I can load the storage from a smart contract. This storage contains a map called token_info. If I call token_info.get('symbol'), I get a hex string of "4d494e". How do I ...
3
votes
1
answer
200
views
Why aren't the offchain views appearing?
I'm extending the smartpy FA2 template
#
FA2 = sp.import_script_from_url("https://smartpy.io/dev/templates/FA2.py")
class TezosLandNft(FA2.FA2):
...
which has the following offchain views ...
3
votes
2
answers
128
views
Understanding how @Taquito/Beacon works
I've entered the wonderful world of Tezos from an EVM based background, with some familiarity with Web3/EthersJS. I'm currently trying to understand how dApps communicate with wallets. From my ...
3
votes
1
answer
70
views
Create input for injectOperation (forged op + Beacon Wallet signature)
I'm trying to manually forge a transaction, sign it with Beacon Wallet and inject it.
I've forged and sign it. preapplyOperations is OK.
Now I'm trying to build the input data for injectOperation ...
3
votes
1
answer
79
views
Is it possible to retrieve only a single variable from contract storage?
As far as I can tell using the taquito npm package, in order to get any storage from a contract, you have to get all of a contract's storage. This seems like it can become highly inefficient if you ...
3
votes
1
answer
146
views
Generating new Tz1 account from Taquito
In ConseilJs, there is a KeyStoreUtils which helps generate mnemonic and restore it to an account. Are there any ways in taquito library to perform similar action? Or do we need to install and import ...
2
votes
2
answers
38
views
InMemorySigner from node crypto key
Is it possible to generate keys with node's crypto library and import them in the InMemorySigner?
I want to generate keys that I can use to sign transactions for a proof of concept.
2
votes
1
answer
83
views
Get number of entries in bigmap
I am currently writing tests for a contract and for one of those tests, I would like to get the number of entries in a bigmap field of the contract's storage. I am using JavaScript with Taquito and ...
2
votes
2
answers
287
views
Signing transaction with external hardware device and broadcasting on Babylonnet gives invalid signature
I am trying to broadcast a Tezos transaction on the Babylon testnet.
I'm using an external military-grade hardware security module (HSM) located on a remote server. Its purpose is to never expose the ...
2
votes
1
answer
78
views
How do you decode an event?
I am fetching an event using Taquito's PollingSubscribeProvider and the result is:
{"opHash":"onqeD75WQfWb2BHiqQBh4Z1yfwY131rHVRX9mNUC8GPkW3iDbTS","blockHash":"...
2
votes
2
answers
142
views
Passing parameters in truffle tests
I have this parameter for a function:
type modify_list is
| Add of list(address)
| Remove of list(address)
type modify_list_michelson is michelson_or_right_comb(modify_list)
When I try to supply ...
2
votes
1
answer
67
views
How to swap object with taquito
I'm trying to swap NFT using such function:
async function swap(fa2: string, contractAddress: string, objkt_id: number, royalties: number, objkt_amount: number, xtz_per_objkt: number, owner_address: ...
2
votes
2
answers
256
views
How to drain account with Taquito?
I have 9.9 tezos on my address tz2B35M8eHC6FhAVsQrtp8EBPri4H73w7W7C.
I want to send all of it to another address tz1i4ezL2FZ1kZ8oqEY8n6wCr2eGRJPC4xin which has never been used and is thus empty. For ...
2
votes
1
answer
56
views
Interact with Tezos in xamarin
im searching for a way to communicate to the chain in my xamarin app. The problem is that the native libs like this https://github.com/mscappini/Tz.Net are not really well looked after so im searching ...
2
votes
1
answer
58
views
How to get Harbinger price feed from Taquito
I get an http error 'Key not found' The contract is a harbinger (coinbase carthage) storage contract. What is the correct 'get' param ?
Tezos.contract.at('KT1P7D7jt3PfjMpsEKPyao1kHQR93t7XR5zh')
.then(...
2
votes
1
answer
38
views
Unpacking return unexpected result
I'm having some issue with the contract read, i have data in format of sp.TMap(string,bytes), im using sp.pack() to get the bytes representation of a sp.TNat in a concrete example for a nat 200 y get ...
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
...
2
votes
2
answers
332
views
How do I get method arguments using Taquito?
When I have a object of type ContractAbstraction<ContractProvider>, I can get a key/value map of all the endpoints in the deployed contract like this:
const contract: ContractAbstraction<...
2
votes
1
answer
35
views
How to calculate total fees spent on a Tezos transaction using Taquito?
I am currently working on a project involving Tezos smart contracts, and I'm using Taquito to interact with the Tezos blockchain. I'm trying to calculate the total fees spent on a confirmed ...
2
votes
2
answers
107
views
Cannot pass MichelsonMap as smart contract method parameter
I have the following smartPy code deployed to a contract:
@sp.entry_point
def add(self, id, data_raw):
sp.set_type(id, sp.TString)
sp.set_type(data_raw, sp.TMap(sp.TString, sp.TString))
...
2
votes
1
answer
160
views
How to estimate transaction fee without initializing a signer in taquito?
I am trying to estimate the fees for a transaction call using the Tezos.estimate.transfer() function but it is asking to initialize a signer. Is it possible to make an estimate call without a signer ...
2
votes
1
answer
231
views
Specifying a counter for parallel transactions
I want to send transactions asynchronously (in parallel) with Taquito. For payments, this works well with a counter (see also https://github.com/ecadlabs/taquito/compare/allow-to-explicitly-set-...
1
vote
2
answers
139
views
How to know an operation has definitely been included?
For example, calling an entrypoint to change a smart contract's storage. When can I be maximally certain the change is now part of the blockchain? Will it suffice if I grab the contract's storage with ...
1
vote
2
answers
286
views
Listen for operations of a deployed contract
Coming from an ethereum web3 background, I'm accustomed to listening for a contract's events to figure out when things happen in my contract and react accordingly in the application.
I'm looking for ...
1
vote
2
answers
500
views
Taquito + BeaconWallet = Signer?
I've configured Taquito to use the BeaconWallet this way:
const wallet = new BeaconWallet(options)
await wallet.requestPermissions({
network: {
type: 'edonet'
}
...
1
vote
2
answers
214
views
Taquito default entrypoint not found
I have deployed a smart contract on carthagenet.
The contract only has a single entry point.
Taquito is not able to find that single entry point. I tried both default and root methods and it doesn'...
1
vote
2
answers
95
views
Multisig Sapling - Taquito
Title is presenting the idea here:
Using shielded pool:
Trying to make a transactions:
From alice -> to bob
Approved by a third party (admin)
NomadicLabs defined it in their docs however, not ...
1
vote
1
answer
175
views
Can I iterate over a big_map using Taquito?
I have made a web interface for Tezos token interaction and now I would like to show a balance overview of the loaded tokens, i.e. show a list of address, account tuples . This requires me to be able ...
1
vote
1
answer
98
views
How do I transfer a NFT from a wallet to another using Taquito?
I want to transfer one collectible from one wallet to another using Taquito (I know how to do the operation manually using a wallet, but not in code).
The documentation shows how to transfer an amount ...
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() ...
1
vote
1
answer
12
views
Taquito: Is it possible to create smart contract transactions and send them to a over the network without using the .send method?
I wonder if it's possible to create smart contract transactions and them send them to a over the network without using the .send method...? I need to group and sort and some things (from different ...
1
vote
1
answer
17
views
how can I turn an address from bytes into the string representation
I’m using taquito to parse a lambda, and the addresses are in bytes (0x0158f34461ea883382831e9d9333c1b88749130e7c00), how can I turn it into the string representation (...
1
vote
2
answers
60
views
I'm getting different public key hashes when creating new wallet with Taquito InMemorySigner x when creating with Kukai wallet. Why?
I'm writing a dApp where I need to create a "native" (not beacon) wallet so it can perform some automatic operations.
Occurs that, with the same mnemonic words used to create a wallet in ...
1
vote
1
answer
24
views
Add text to Tezos contract storage results in HttpRequestFailed: Error: timeout of 30000ms exceeded
I'm trying to get this tutorial to work but adding a memo to the Tezos blockchain always results in a HttpRequestFailed: Error: timeout of 30000ms exceeded
Full repo:
https://github.com/MelvinManni/...
1
vote
2
answers
214
views
Simple connect wallet button with beacon and taquito in React - cannot find cipher-base
I just created a new React template from scratch with npx create-react-app my-app --template typescript.
Then I added beacon and taquito package.
And then I wanted as a test first to try to create a ...
1
vote
1
answer
30
views
Ballot operation with Taquito and Beacon SDK
I'm trying to send a ballot operation with Taquito and Beacon SDK. Here's my code:
const currentProposal: string = (await Tezos.rpc.getCurrentProposal())?.toString() || "";
const branch: ...
1
vote
1
answer
74
views
AddressValidationError when calling an entrypoint with Taquito
I'm trying to call the Plenty Router with Taquito to swap from kUSD (Kolibri USD) to tzBTC via Plenty token. In this example, I'm sending 1 kUSD. I'm using arbitrary minimum output (I do not compute ...
1
vote
1
answer
52
views
How to simply store signed, hashed data on Tezos blockchain?
I'm new to Tezos. I'm wanting to store some signed, hashed data on the Tezos blockchain, most likely using Taquito/Batch API. Can anyone direct me to the correct method to simply send the data and get ...
1
vote
1
answer
127
views
Packing and signing a payload in Taquito
I'm trying to call a contract method that checks a signature against the chain ID, contract address, caller, and params. The contract lives at KT1XoT3RTkXCN2y25e635WeEmjN4xszQWtq6 on mainnet, and here ...
1
vote
2
answers
211
views
How to obtain the public key (not public hash - PKH) using taquito
In order to use the verifySignature method in Taquito, I need the public key of the wallet. I can only find the public key hash method - am I missing something obvious?
Thanks!
Below is how I obtain ...
1
vote
1
answer
90
views
Taquito: error when using "parameter" in withTransfer with Batch API
I am trying to transfer an amount to a contract while calling a contract endpoint using the Batch API provided by Taquito. I've tried passing a parameter object as shown in the Taquito documentation, ...
1
vote
1
answer
88
views
How to fetch list of known addresses in Taquito?
Just like we can run tezos-client list known contracts to get a list of deployed contracts and any user accounts, is there a way to do the same using Taquito? So, in short, I've RPC address and wish ...
1
vote
2
answers
196
views
How to fetch all the values in a big map using taquito?
Per the BigMapAbstraction Taquito API docs, there isn't a way to fetch all the values in that map.
Is the suggested way to fetch all of values in the map by doing batch queries on it then? Or what's ...
1
vote
1
answer
347
views
Calling contract entrypoint having complex parameters
I am trying to call FA-2.0 transfer entry point using tezos taquito, I have also gone through https://tezostaquito.io/docs/complex_parameters/.
however I get the error below when I try to call ...
1
vote
1
answer
51
views
how to set type 'Sets' to orginate()
in smartpy,
self.init(used = sp.set(t = sp.TSignature))
in taquito
await Tezos.wallet.originate({
code: contractJson,
storage: {
used: [],
} })
TezosOperationError { ...