alan-sdk / alan.dart Goto Github PK
View Code? Open in Web Editor NEWPure Dart library allowing you to easily integrate with any Cosmos-based chain.
License: MIT License
Pure Dart library allowing you to easily integrate with any Cosmos-based chain.
License: MIT License
The cosmwasm smart contract language is used with many cosmos chains including juno and stargaze. There is a cosmjs cosmwasm signing client for building dapps with cosmwasm support. https://cosmos.github.io/cosmjs/latest/cosmwasm-stargate/index.html. https://github.com/cosmos/cosmjs The main functionality is adding a cosmwasm signer equivalent to the js client.
adding a cosmwasm signer module and add cosmwasm cosmos sdk module
when i am using alan library with cosmos SDK 0.46.0-rc3 it fails on alan signing. Apparatently the node info URL and the response structure has been change in the latest version .
From
http://URL/node_info
to
http://URL/cosmos/base/tendermint/v1beta1/node_info
Because of which the transaction signing is failing.
Hey I'm using alan.dart
for my custom wallet that manages my custom cosmos-sdk
based blockchain.
I couldn't find any data in Wallet
class that represents the mnemonic phrase after creating a random wallet.
and I have to show the user his mnemonic phrase after he creates an account and I can't.
Can you guys help me?
Thanks
(this is an awesome project !!)
Having difficulty connecting to rpc endpoints for cosmos/juno/desmos
I have tried to reproduce the example in the documentation @ https://alan-sdk.github.io/alan.dart/queries/overview.html#common-data
I cannot connect to any rpc endpoints so far after testing https://rpc-juno.itastakers.com, https://rpc-desmos.itastakers.com, and https://rpc.cosmos.smartnodes.one
I do not believe that Juno should require addditional .proto for anything other than the mint module, but I also had a hard time understanding that portion of the documentation.
I did not find any tests so far that demonstrate connectivity to an rpc endpoint.
I would recommend adding a test or example that demonstrates the queries from the docs.
Error from script below:
gRPC Error (code: 14, codeName: UNAVAILABLE, message: Error connecting: SocketException: Connection timed out (OS Error: Connection timed out, errno = 110), address = rpc-desmos.itastakers.com, port = 34944, details: null, rawResponse: null, trailers: {})
created a test.dart script with the following and run with dart run test.dart
import 'package:alan/proto/cosmos/staking/v1beta1/export.dart' as staking;
Future<staking.QueryValidatorsResponse> _validatorQuery(channel) async {
final stakingClient = staking.QueryClient(channel);
print("starting query");
final pagination = PageRequest.create()
..limit = 100.toInt64()
..offset = 0.toInt64();
// Query the gRPC
final response = await stakingClient.validators(
staking.QueryValidatorsRequest.create()..pagination = pagination,
// ..status = status
);
print("done query");
print(response);
return response;
}
void main() {
final networkInfo = NetworkInfo.fromSingleHost(
// bech32Hrp: "juno",
// host: "https://rpc-juno.itastakers.com",
// bech32Hrp: "cosmos",
// host: "https://rpc.cosmos.smartnodes.one",
// bech32Hrp: "desmos",
// host: "https://rpc-desmos.itastakers.com",
bech32Hrp: "desmos",
host: "localhost",
);
final channel = networkInfo.gRPCChannel;
final resp = _validatorQuery(channel).then((resp) {
print(resp);
});
print(resp);
}
We should integrate a CI workflow that allows publishing new versions of the library once a new tag is created
When i do a transaction with invalid address. It returns the transaction hash and even though through CLI query i see the error. The transaction signing gateway is not throwing this error.
logs: []
raw_log: 'failed to execute message; message index: 0: ID cookbookLOUD already set:
invalid request'
final result = await _transactionSigningGateway.signTransaction(transaction: unsignedTransaction, walletLookupKey: walletLookupKey).mapError((error) { print(error); throw error; }).flatMap( (signed) => _transactionSigningGateway.broadcastTransaction( walletLookupKey: walletLookupKey, transaction: signed, ), );
I would like to be able to set the fee-account
property on a tx.
This allows for the transaction fees to be paid by another account.
THere is already a payer
field in your Fee
class, but it doesn't seem to be used.
I suppose you would have to update the TxBuilder with a setFeeAccount
method, add call it in TxSigner when constructing the tx:
final tx = config.newTxBuilder()
..setMsgs(msgs)
..setSignatures([sig])
..setMemo(memo)
..setFeeAmount(fee.amount)
..setGasLimit(fee.gasLimit)
????????? ..setFeeAccount(fee.payer). ??????????
The alan project right now breaks projects that use build_runner: 2.2.0.
http package has very old version (^0.13.0) and it's breaking against new packages (at the time the issue is written, the latest version of http package is 1.2.1).
solution: upgrade http package to ^1.2.0
protoc-gen-gocosmos couldn't find during generate the .dart files
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.