Skip to content

Commit

Permalink
Update dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtnetwork committed May 30, 2024
1 parent a0fbee4 commit f383acf
Show file tree
Hide file tree
Showing 19 changed files with 222 additions and 82 deletions.
14 changes: 10 additions & 4 deletions .dart_tool/package_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
{
"name": "blockchain_utils",
"rootUri": "file:///Users/macbookpro/.pub-cache/hosted/pub.dev/blockchain_utils-2.1.2",
"rootUri": "file:///Users/macbookpro/.pub-cache/hosted/pub.dev/blockchain_utils-3.0.0",
"packageUri": "lib/",
"languageVersion": "2.15"
},
Expand Down Expand Up @@ -67,6 +67,12 @@
"packageUri": "lib/",
"languageVersion": "3.0"
},
{
"name": "flutter_lints",
"rootUri": "file:///Users/macbookpro/.pub-cache/hosted/pub.dev/flutter_lints-4.0.0",
"packageUri": "lib/",
"languageVersion": "3.1"
},
{
"name": "frontend_server_client",
"rootUri": "file:///Users/macbookpro/.pub-cache/hosted/pub.dev/frontend_server_client-4.0.0",
Expand Down Expand Up @@ -105,9 +111,9 @@
},
{
"name": "lints",
"rootUri": "file:///Users/macbookpro/.pub-cache/hosted/pub.dev/lints-3.0.0",
"rootUri": "file:///Users/macbookpro/.pub-cache/hosted/pub.dev/lints-4.0.0",
"packageUri": "lib/",
"languageVersion": "3.0"
"languageVersion": "3.1"
},
{
"name": "logging",
Expand Down Expand Up @@ -296,7 +302,7 @@
"languageVersion": "2.15"
}
],
"generated": "2024-04-20T14:47:52.470454Z",
"generated": "2024-05-30T05:31:17.826794Z",
"generator": "pub",
"generatorVersion": "3.3.3"
}
18 changes: 11 additions & 7 deletions .dart_tool/package_config_subset
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ async
2.18
file:///Users/macbookpro/.pub-cache/hosted/pub.dev/async-2.11.0/
file:///Users/macbookpro/.pub-cache/hosted/pub.dev/async-2.11.0/lib/
blockchain_utils
2.15
file:///Users/macbookpro/.pub-cache/hosted/pub.dev/blockchain_utils-3.0.0/
file:///Users/macbookpro/.pub-cache/hosted/pub.dev/blockchain_utils-3.0.0/lib/
boolean_selector
2.17
file:///Users/macbookpro/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1/
Expand All @@ -38,6 +42,10 @@ file
3.0
file:///Users/macbookpro/.pub-cache/hosted/pub.dev/file-7.0.0/
file:///Users/macbookpro/.pub-cache/hosted/pub.dev/file-7.0.0/lib/
flutter_lints
3.1
file:///Users/macbookpro/.pub-cache/hosted/pub.dev/flutter_lints-4.0.0/
file:///Users/macbookpro/.pub-cache/hosted/pub.dev/flutter_lints-4.0.0/lib/
frontend_server_client
3.0
file:///Users/macbookpro/.pub-cache/hosted/pub.dev/frontend_server_client-4.0.0/
Expand All @@ -63,9 +71,9 @@ js
file:///Users/macbookpro/.pub-cache/hosted/pub.dev/js-0.7.1/
file:///Users/macbookpro/.pub-cache/hosted/pub.dev/js-0.7.1/lib/
lints
3.0
file:///Users/macbookpro/.pub-cache/hosted/pub.dev/lints-3.0.0/
file:///Users/macbookpro/.pub-cache/hosted/pub.dev/lints-3.0.0/lib/
3.1
file:///Users/macbookpro/.pub-cache/hosted/pub.dev/lints-4.0.0/
file:///Users/macbookpro/.pub-cache/hosted/pub.dev/lints-4.0.0/lib/
logging
2.19
file:///Users/macbookpro/.pub-cache/hosted/pub.dev/logging-1.2.0/
Expand Down Expand Up @@ -186,10 +194,6 @@ yaml
2.19
file:///Users/macbookpro/.pub-cache/hosted/pub.dev/yaml-3.1.2/
file:///Users/macbookpro/.pub-cache/hosted/pub.dev/yaml-3.1.2/lib/
blockchain_utils
2.15
file:///Users/macbookpro/Documents/bitcoin/blockchain_utils/
file:///Users/macbookpro/Documents/bitcoin/blockchain_utils/lib/
xrpl_dart
2.15
file:///Users/macbookpro/Documents/xrpl_dart/
Expand Down
Binary file removed .dart_tool/pub/bin/test/test.dart-3.3.3.snapshot
Binary file not shown.
Binary file modified .dart_tool/test/incremental_kernel.Ly9AZGFydD0yLjE1
Binary file not shown.
33 changes: 18 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
## 4.2.0

- Update dependencies.
- Some API changed please review the examples.

## 4.1.2

- Update dependencies.
- Update dependencies.

## 4.1.1

- Update dependencies.
- Update dependencies.

## 4.1.0

- Update dependencies.
- Update dependencies.

## 4.0.1

- Update the README.
- Update the README.

## 4.0.0

- Changed the package name from xrp_dart to xrpl_dart to match the already existing SDK naming convention
- Changed the package name from xrp_dart to xrpl_dart to match the already existing SDK naming convention

## 3.0.3

- Corrected fee calculation in the autoFill method.
- Updated dependencies for enhanced performance and security.
- Corrected fee calculation in the autoFill method.
- Updated dependencies for enhanced performance and security.

## 3.0.2

Expand All @@ -44,22 +49,20 @@
- XChainCreateBridge
- XChainModifyBridge


## 2.0.0

* Remove unused dependencies.
* Update dependencies.
* Fix Some method for web.

- Remove unused dependencies.
- Update dependencies.
- Fix Some method for web.

## 1.1.0

* Update dependencies.
- Update dependencies.

## 0.2.0

* Removing inefficient methods.
- Removing inefficient methods.

## 0.1.0

* TODO: Release.
- TODO: Release.
45 changes: 29 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ For BIP32 HD wallet, BIP39, and Secret storage definitions, please refer to the
## Features

### Transaction Types

The XRP Ledger accommodates a diverse range of transaction types, each tailored for specific purposes. Some of these are outlined below:

- Payment Transactions: Standard transactions used to send XRP or Issue from one address to another.
Expand All @@ -26,21 +27,27 @@ The XRP Ledger accommodates a diverse range of transaction types, each tailored
- XChainClaim: Transaction completes a cross-chain transfer of value.
- XChainCreateBridge: Transaction creates a new Bridge ledger.
...

### Addresses

- classAddress: They are straightforward representations of the recipient's address on the XRP Ledger
- xAddress: newer format, which provides additional features and interoperability. xAddresses include destination tags by default and are designed to simplify cross-network transactions and improve address interoperability

### Sign

- Sign XRP transactions with ED25519 and SECP256K1 algorithms.

### JSON-RPC Support

This package streamlines communication with XRP nodes using both the JSON-RPC protocol and WebSocket technology. While endeavors have been undertaken to integrate all methods into RPC, it's crucial to acknowledge that, currently, the majority of data APIs are presented in JSON format and haven't been entirely modeled. The addition of WebSocket support enhances the package's versatility for real-time and asynchronous interactions with XRP nodes.

## EXAMPLES

Discover at least one example for each transaction type in the [examples](https://github.com/mrtnetwork/xrpl_dart/tree/main/example/lib) folder.

### Key and addresses
```

```dart
/// create random privateKey
final randomPrivate =
XRPPrivateKey.random(algorithm: CryptoAlgorithm.SECP256K1);
Expand All @@ -64,23 +71,27 @@ Discover at least one example for each transaction type in the [examples](https:
final sig = private.sign(...)
```

### Transaction
Every transaction type has a dedicated class for transaction creation.

Every transaction type has a dedicated class for transaction creation.
Descriptions for some of these classes are outlined below.
Explore training examples for each transaction type in the examples folder [here](https://github.com/mrtnetwork/xrpl_dart/tree/main/example/lib/examples).

- Simple payment

```
```dart
final transaction = Payment(
destination: destination, // destination account
account: ownerAddress, // Sender account
amount: amount, // The amount sent can be in XRP or any other token.
signingPubKey: ownerPublic); // Sender's public key
```

- NTF, mint, createOffer, acceptOffer
```

```dart
// mint token
final transaction = NFTokenMint(
flags: NFTokenMintFlag.TF_TRANSFERABLE.value,
Expand Down Expand Up @@ -109,8 +120,10 @@ Explore training examples for each transaction type in the examples folder [here
);
```

- Completely create, sign, and send transactions
```

```dart
// create escrowCreate transaction
final escrowCreate = EscrowCreate(
account: ownerAddress,
Expand Down Expand Up @@ -151,7 +164,7 @@ Check out the [http_service](https://github.com/mrtnetwork/xrpl_dart/blob/main/e

- HTTP JSON RPC

```
```dart
/// access devent
final rpc = await XRPLRpc.devNet((httpUri, websocketUri) async {
service = RPCHttpService(httpUri, http.Client());
Expand All @@ -168,9 +181,10 @@ Check out the [http_service](https://github.com/mrtnetwork/xrpl_dart/blob/main/e
await rpc.request(RPCServerDefinitions());
...
```

- WEBSOCKET JSON RPC

```
```dart
/// access devent
final rpc = await XRPLRpc.devNet((httpUri, websocketUri) async {
service = await RPCWebSocketService.connect(websocketUri);
Expand All @@ -188,7 +202,7 @@ Check out the [http_service](https://github.com/mrtnetwork/xrpl_dart/blob/main/e

- WEBSOCKET Subscribe

```
```dart
/// stream event
void onEnvet(Map<String, dynamic> event) {}
Expand All @@ -210,7 +224,7 @@ Check out the [http_service](https://github.com/mrtnetwork/xrpl_dart/blob/main/e

- Tailor the RPC response to your specifications.

```
```dart
/// Create a class that inherits from XRPLedgerRequest and customize it for handling Account NFT Offers IDs. Here's an example:
class RPCAccountNftOffersIDs extends XRPLedgerRequest<List<String>> {
RPCAccountNftOffersIDs({
Expand Down Expand Up @@ -250,12 +264,11 @@ class RPCAccountNftOffersIDs extends XRPLedgerRequest<List<String>> {
## Contributing

Contributions are welcome! Please follow these guidelines:
- Fork the repository and create a new branch.
- Make your changes and ensure tests pass.
- Submit a pull request with a detailed description of your changes.

## Feature requests and bugs #

Please file feature requests and bugs in the issue tracker.
- Fork the repository and create a new branch.
- Make your changes and ensure tests pass.
- Submit a pull request with a detailed description of your changes.

## Feature requests and bugs

Please file feature requests and bugs in the issue tracker.
4 changes: 2 additions & 2 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include: package:lints/recommended.yaml

#include: package:lints/recommended.yaml
include: package:flutter_lints/flutter.yaml
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
11 changes: 6 additions & 5 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ packages:
blockchain_utils:
dependency: "direct main"
description:
path: "../../bitcoin/blockchain_utils"
relative: true
source: path
version: "2.1.1"
name: blockchain_utils
sha256: "699d72427447814bd574b95b0d3baf9b2c0ec9c9b82deef3c6264c6f5efa4406"
url: "https://pub.dev"
source: hosted
version: "3.0.0"
boolean_selector:
dependency: transitive
description:
Expand Down Expand Up @@ -277,6 +278,6 @@ packages:
path: ".."
relative: true
source: path
version: "4.1.1"
version: "4.1.2"
sdks:
dart: ">=3.3.0 <4.0.0"
5 changes: 3 additions & 2 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ dependencies:
http: ^1.1.2
web_socket_channel: ^2.4.0
asn1lib: ^1.5.0
blockchain_utils:
path: ../../bitcoin/blockchain_utils
blockchain_utils: ^3.0.0
# blockchain_utils:
# path: ../../bitcoin/blockchain_utils

# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/crypto/keypair/xrpl_private_key.dart
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ class XRPPrivateKey {
final toPrive = IPrivateKey.fromBytes(keyBytes, algorithm.curveType);
return toPrive;
} catch (e) {
throw XRPLAddressCodecException("Invalid private key");
throw const XRPLAddressCodecException("Invalid private key");
}
}

Expand Down
4 changes: 2 additions & 2 deletions lib/src/crypto/keypair/xrpl_public_key.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class XRPPublicKey {
}
}

throw XRPLAddressCodecException(
throw const XRPLAddressCodecException(
"invalid public key. public key length must be ${RippleKeyConst.publicKeyLength} bytes");
}

Expand All @@ -50,7 +50,7 @@ class XRPPublicKey {
}
return IPublicKey.fromBytes(keyBytes, algorithm.curveType);
} catch (e) {
throw XRPLAddressCodecException("invalid public key");
throw const XRPLAddressCodecException("invalid public key");
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/src/utility/fulfillment/ans1/ans1_raw_encoder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ASN1RawEncoder {
} else {
// Indefinite length uses 0x80, data..., 0x00, 0x00
if (!raw.constructed) {
throw ASN1CodecException(
throw const ASN1CodecException(
'indefinite length is only allowed for constructed types');
}
buf.add(0x80);
Expand Down
2 changes: 1 addition & 1 deletion lib/src/xrpl/address/xrpl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class XRPAddress {
XrpAddrDecoder().decodeAddr(address);
return XRPAddress._(address, null);
} catch (e) {
throw XRPLAddressCodecException("Invalid ripple address");
throw const XRPLAddressCodecException("Invalid ripple address");
}
}

Expand Down
Loading

0 comments on commit f383acf

Please sign in to comment.