Comments (3)
@atmoner Here's the message structure of SimulateRequest.
const rawMsg = new cosmos.tx.v1beta1.SimulateRequest({
tx: tx,
tx_bytes: txBytes,
});
return new google.protobuf.Any({
type_url: '/cosmos.tx.v1beta1.SimulateRequest',
value: cosmos.tx.v1beta1.SimulateRequest.encode(rawMsg).finish()
});
from cosmosjs.
You need to create SignDoc.
signDoc = (1)txBody + (2)authInfo
Every authInfo will be same when you use only 1 address. You should create SimulateRequest txbody.
You can see msgSend code here.
https://github.com/cosmostation/cosmosjs/blob/ca760c89c50af40d0f6a50852ea61f8e16c2f982/example/cosmoshub.js
For creating SimulateRequest txBody, you can search the proto structure at here.
https://github.com/cosmostation/cosmosjs/blob/ca760c89c50af40d0f6a50852ea61f8e16c2f982/src/messages/proto.js
from cosmosjs.
Thank you for your answer @Booyoun-Kim
I tried a lot of things without success!
If you have an example for me, I could better understand how proto works and help you with the documentation.
But I need an example please
from cosmosjs.
Related Issues (20)
- Does it contain testnet address generation? HOT 4
- How do I get privateKey after address generation? HOT 5
- how can i modify the commission rate for the node ? HOT 3
- Crypto has been deprecated HOT 2
- Add contributors for this library HOT 8
- Unable to Broasdcast StdTX HOT 2
- Internal error with codespace undefined while broadcasting transaction HOT 2
- LCD url: to be or not to be? HOT 6
- Hi I how can I test this in testnet? HOT 3
- error: 'unsupported return type. supported types: block, sync, async' HOT 1
- How to sign a tx which is base64 encoded HOT 1
- private keys in hex HOT 1
- Decode unconfirmed txs HOT 1
- Iris send signing HOT 2
- 'unauthorized: signature verification failed; verify correct account sequence and chain-id HOT 3
- Need to mention stargate-final chainId in getAccount method HOT 1
- README Deprecation HOT 1
- Problem with bip39 HOT 1
- chains/logo/crypto-org.png HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cosmosjs.