Skip to content

Commit 744efbf

Browse files
committed
V2.0.0
- Minimum required Dart SDK version updated to 3.3. - The RPC method names and service class implementations have been updated. Please refer to the examples folder for guidance. - Support for evmos. - Update dependencies.
1 parent 645e884 commit 744efbf

File tree

1,609 files changed

+40436
-7114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,609 files changed

+40436
-7114
lines changed

CHANGELOG.md

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,78 @@
1-
## 1.4.3
1+
## 2.0.0
22

3+
- Minimum required Dart SDK version updated to 3.3.
4+
- The RPC method names and service class implementations have been updated. Please refer to the examples folder for guidance.
5+
- Support for evmos.
36
- Update dependencies.
4-
- Important Notice: This is the final version supporting Dart v2. The next release will require Dart v3.3 or higher.
57

6-
## 1.4.2
8+
## 1.4.3
79

810
- Update dependencies.
11+
- Important Notice: This is the final version supporting Dart v2. The next release will require Dart v3.3 or higher.
912

1013
## 1.4.1
1114

12-
- Cleaned up imports
15+
* Cleaned up imports
1316

1417
## 1.4.0
1518

16-
- Update dependencies
19+
* Update dependencies
1720

1821
## 1.3.0
1922

20-
- Resolve issues with model deserialization on the web.
23+
* Resolve issues with model deserialization on the web.
2124

2225
## 1.1.0
2326

24-
- Fix parsing transaction.
27+
* Fix parsing transaction.
2528

2629
## 1.0.0
2730

28-
- Update dependencies
31+
* Update dependencies
2932

3033
## 0.4.0
3134

32-
- Update dependencies
35+
* Update dependencies
3336

3437
## 0.3.0
3538

36-
- Update dependencies
39+
* Update dependencies
3740

3841
## 0.2.0
3942

40-
- Update dependencies
43+
* Update dependencies
4144

4245
## 0.1.0
4346

44-
- Enhanced compatibility with the latest features of the Osmosis network.
47+
* Enhanced compatibility with the latest features of the Osmosis network.
4548

4649
## 0.0.10
4750

48-
- Fix importing issue
51+
* Fix importing issue
4952

5053
## 0.0.6
5154

52-
- Support for osmosis network features.
55+
* Support for osmosis network features.
5356

5457
## 0.0.5
5558

56-
- Fix bugs.
57-
- Add thor swap example
59+
* Fix bugs.
60+
* Add thor swap example
5861

5962
## 0.0.4
6063

61-
- remove junk codes
64+
* remove junk codes
6265

6366
## 0.0.3
6467

65-
- Fix bugs.
66-
- Update dependencies.
68+
* Fix bugs.
69+
* Update dependencies.
6770

6871
## 0.0.2
6972

70-
- Support for thor and maya serialization.
71-
- Support thor and maya node api provider.
73+
* Support for thor and maya serialization.
74+
* Support thor and maya node api provider.
7275

7376
## 0.0.1
7477

75-
- TODO: Release.
78+
* TODO: Release.

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Experience effortless interaction with a Cosmos SDK-based network in Dart, facil
7979
8080
/// Querying account info from the blockchain
8181
final accountInfo = await provider.request(TendermintRequestAbciQuery(
82-
request: QueryAccountInfoRequest(pubkey.toAddresss())));
82+
request: QueryAccountInfoRequest(pubkey.toAddress())));
8383
8484
/// Querying the latest block information
8585
final latestBlock = await provider.request(
@@ -102,7 +102,7 @@ Experience effortless interaction with a Cosmos SDK-based network in Dart, facil
102102
103103
/// Creating a transaction message to send tokens
104104
final message = MsgSend(
105-
fromAddress: pubkey.toAddresss(),
105+
fromAddress: pubkey.toAddress(),
106106
toAddress: CosmosBaseAddress("cosmos1qhslf0sx2fegltfqq0p5j6etmdznjgfnm2j6nc"),
107107
amount: [Coin(denom: "uatom", amount: BigInt.from(1000000))]);
108108
@@ -150,7 +150,7 @@ Experience effortless interaction with a Cosmos SDK-based network in Dart, facil
150150
151151
/// Generate the corresponding public key and address for Secp256k1
152152
final pubkey = CosmosSecp256K1PublicKey.fromBytes(bip44.publicKey.compressed);
153-
final cosmosAddress = pubkey.toAddresss(hrp: "cosmos");
153+
final cosmosAddress = pubkey.toAddress(hrp: "cosmos");
154154
155155
/// Sign the provided digest using the Secp256k1 private key
156156
final sign = privateKey.sign(digest);
@@ -160,7 +160,7 @@ Experience effortless interaction with a Cosmos SDK-based network in Dart, facil
160160
161161
/// Generate the corresponding public key and address for ED25519
162162
final edPublicKey = ed25519PrivateKey.toPublicKey();
163-
final validatorAddr = edPublicKey.toAddresss(hrp: "cosmosvaloper");
163+
final validatorAddr = edPublicKey.toAddress(hrp: "cosmosvaloper");
164164
165165
/// Sign the provided digest using the ED25519 private key
166166
final edSign = ed25519PrivateKey.sign(digest);
@@ -170,7 +170,7 @@ Experience effortless interaction with a Cosmos SDK-based network in Dart, facil
170170
171171
/// Generate the corresponding public key and base address for NIST P-256
172172
final nistPublicKey = nistPrivateKey.toPublicKey();
173-
final baseAddress = nistPublicKey.toAddresss();
173+
final baseAddress = nistPublicKey.toAddress();
174174
175175
/// Sign the provided digest using the NIST P-256 private key
176176
final nistSign = nistPrivateKey.sign(digest);
@@ -189,7 +189,7 @@ Experience effortless interaction with a Cosmos SDK-based network in Dart, facil
189189
190190
/// Query account information using the provider
191191
final accountInfo = await provider.request(TendermintRequestAbciQuery(
192-
request: QueryAccountInfoRequest(pubkey.toAddresss())));
192+
request: QueryAccountInfoRequest(pubkey.toAddress())));
193193
194194
/// Get the latest block information using the provider
195195
final latestBlock = await provider.request(

analysis_options.yaml

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,34 @@
1+
# This file configures the static analysis results for your project (errors,
2+
# warnings, and lints).
3+
#
4+
# This enables the 'recommended' set of lints from `package:lints`.
5+
# This set helps identify many issues that may lead to problems when running
6+
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
7+
# style and format.
8+
#
9+
# If you want a smaller set of lints you can change this to specify
10+
# 'package:lints/core.yaml'. These are just the most critical lints
11+
# (the recommended set includes the core lints).
12+
# The core lints are also what is used by pub.dev for scoring packages.
13+
114
# include: package:lints/recommended.yaml
215
include: package:flutter_lints/flutter.yaml
16+
317
# Uncomment the following section to specify additional rules.
18+
419
linter:
520
rules:
6-
prefer_final_locals: true # Warns when a local variable could be final
7-
prefer_final_in_for_each: true # Warns when a forEach variable could be final
8-
prefer_const_constructors: true # Warns when a constructor could be const
9-
prefer_const_declarations: true # Warns when a declaration could be const
21+
- unnecessary_const
22+
- prefer_const_declarations
23+
- prefer_final_locals # Warns when a local variable could be final
24+
- prefer_final_in_for_each # Warns when a forEach variable could be final
25+
26+
# analyzer:
27+
# exclude:
28+
# - path/to/excluded/files/**
29+
30+
# For more information about the core and recommended set of lints, see
31+
# https://dart.dev/go/core-lints
32+
33+
# For additional information about configuring this file, see
34+
# https://dart.dev/guides/language/analysis-options

example/lib/maya_deposit.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ void main() async {
1818
const btcAddress = "18o6JzKApaUQ1uJXQhbTUNDsKZRT9hAJuC";
1919
const String chainName = "BTC";
2020
const String assetName = "BTC.BTC";
21-
final CosmosBaseAddress owner = pubkey.toAddresss(hrp: "smaya");
21+
final CosmosBaseAddress owner = pubkey.toAddress(hrp: "smaya");
2222

2323
final provider = TendermintProvider(
2424
TendermintHTTPProvider(url: "http://54.243.15.123:27147/"));
2525
final latestBlock = await provider.request(
2626
TendermintRequestAbciQuery(request: const GetLatestBlockRequest()));
2727
final accountQuery = await provider.request(TendermintRequestAbciQuery(
28-
request: QueryAccountRequest(pubkey.toAddresss(hrp: "smaya"))));
28+
request: QueryAccountRequest(pubkey.toAddress(hrp: "smaya"))));
2929
final BaseAccount account = accountQuery.account as BaseAccount;
3030

3131
final message = ThorchainMsgDeposit.create(

example/lib/maya_send_cacao.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ void main() async {
2020
final latestBlock = await provider.request(
2121
TendermintRequestAbciQuery(request: const GetLatestBlockRequest()));
2222
final accountQuery = await provider.request(TendermintRequestAbciQuery(
23-
request: QueryAccountRequest(pubkey.toAddresss(hrp: "smaya"))));
23+
request: QueryAccountRequest(pubkey.toAddress(hrp: "smaya"))));
2424
final BaseAccount account = accountQuery.account as BaseAccount;
2525
final message = ThorchainMsgSend(
26-
fromAddress: pubkey.toAddresss(hrp: "smaya"),
26+
fromAddress: pubkey.toAddress(hrp: "smaya"),
2727
toAddress:
2828
CosmosBaseAddress("smaya1wqzpmju4gl0kcajhjls6ufrqecaedxm9xlrkv4"),
2929
amount: [

example/lib/msg_delegate.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ void main() async {
1515
url: "https://rpc.sentry-02.theta-testnet.polypore.xyz"));
1616

1717
final accountInfo = await provider.request(TendermintRequestAbciQuery(
18-
request: QueryAccountInfoRequest(pubkey.toAddresss())));
18+
request: QueryAccountInfoRequest(pubkey.toAddress())));
1919
final latestBlock = await provider.request(
2020
TendermintRequestAbciQuery(request: const GetLatestBlockRequest()));
2121

2222
final valAddr =
2323
CosmosBaseAddress("cosmosvaloper10v6wvdenee8r9l6wlsphcgur2ltl8ztkfrvj9a");
2424
final validator = MsgDelegate(
2525
validatorAddress: valAddr,
26-
delegatorAddress: pubkey.toAddresss(),
26+
delegatorAddress: pubkey.toAddress(),
2727
amount: Coin(
2828
denom: "uatom",
2929
amount: BigInt.from(100000),
@@ -37,7 +37,7 @@ void main() async {
3737
sequence: accountInfo.info.sequence),
3838
],
3939
fee: Fee(
40-
payer: pubkey.toAddresss(),
40+
payer: pubkey.toAddress(),
4141
amount: [
4242
Coin(
4343
denom: "uatom",

example/lib/osmosis/osmosis_create_denom.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ void main() async {
1919
TendermintHTTPProvider(url: "https://rpc.testnet.osmosis.zone/"));
2020

2121
final message = OsmosisTokenFactoryMsgCreateDenom(
22-
sender: publickey.toAddresss(hrp: CosmosAddrConst.osmosis).address,
22+
sender: publickey.toAddress(hrp: CosmosAddrConst.osmosis).address,
2323
subdenom: "MRT");
2424

2525
/// Querying account info from the blockchain
2626
final accountInfo = await provider.request(TendermintRequestAbciQuery(
2727
request: QueryAccountInfoRequest(
28-
publickey.toAddresss(hrp: CosmosAddrConst.osmosis))));
28+
publickey.toAddress(hrp: CosmosAddrConst.osmosis))));
2929

3030
/// Querying the latest block information
3131
final latestBlock = await provider.request(

example/lib/osmosis/osmosis_mint_token.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,19 @@ void main() async {
1515
final privateKey = CosmosSecp256K1PrivateKey.fromBytes(bip44.privateKey.raw);
1616

1717
final publickey = privateKey.toPublicKey();
18-
// print(pr.toPublicKey().toAddresss(hrp: "osmo"));
19-
2018
final provider = TendermintProvider(
2119
TendermintHTTPProvider(url: "https://rpc.testnet.osmosis.zone/"));
2220

2321
final message = OsmosisTokenFactoryMsgMint(
24-
sender: publickey.toAddresss(hrp: CosmosAddrConst.osmosis).address,
22+
sender: publickey.toAddress(hrp: CosmosAddrConst.osmosis).address,
2523
amount: Coin(
2624
denom: "factory/osmo1htg7dmhelazdsmuwm9ngtg0tpe82006ugka49q/MRT",
2725
amount: BigInt.from(123123123123123)));
2826

2927
/// Querying account info from the blockchain
3028
final accountInfo = await provider.request(TendermintRequestAbciQuery(
3129
request: QueryAccountInfoRequest(
32-
publickey.toAddresss(hrp: CosmosAddrConst.osmosis))));
30+
publickey.toAddress(hrp: CosmosAddrConst.osmosis))));
3331

3432
/// Querying the latest block information
3533
final latestBlock = await provider.request(

example/lib/osmosis/send_factory_token_example.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,12 @@ void main() async {
2020
final privateKey = CosmosSecp256K1PrivateKey.fromBytes(bip44.privateKey.raw);
2121

2222
final publickey = privateKey.toPublicKey();
23-
// print(pr.toPublicKey().toAddresss(hrp: "osmo"));
2423

2524
final provider = TendermintProvider(
2625
TendermintHTTPProvider(url: "https://rpc.testnet.osmosis.zone/"));
2726

2827
final message = MsgSend(
29-
fromAddress: publickey.toAddresss(hrp: CosmosAddrConst.osmosis),
28+
fromAddress: publickey.toAddress(hrp: CosmosAddrConst.osmosis),
3029
toAddress:
3130
CosmosBaseAddress("osmo1wqzpmju4gl0kcajhjls6ufrqecaedxm9udt80k"),
3231
amount: [
@@ -35,12 +34,12 @@ void main() async {
3534
amount: BigInt.from(100))
3635
]);
3736
// print(
38-
// "address ${publickey.toAddresss(hrp: CosmosAddrConst.osmosis).address}");
37+
// "address ${publickey.toAddress(hrp: CosmosAddrConst.osmosis).address}");
3938

4039
/// Querying account info from the blockchain
4140
final accountInfo = await provider.request(TendermintRequestAbciQuery(
4241
request: QueryAccountInfoRequest(
43-
publickey.toAddresss(hrp: CosmosAddrConst.osmosis))));
42+
publickey.toAddress(hrp: CosmosAddrConst.osmosis))));
4443

4544
/// Querying the latest block information
4645
final latestBlock = await provider.request(

0 commit comments

Comments
 (0)