Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion AI_GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
```dart
import 'package:ndk/ndk.dart';
import 'package:ndk_rust_verifier/ndk_rust_verifier.dart';
import 'package:nip01/nip01.dart';
import 'package:nip49/nip49.dart';
final cacheManager = MemCacheManager();
Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ Isar database implementation.

Sembast database implementation.

### [🔗 rust verifier](./packages/rust_verifier/)

Event verifier written in Rust.

### [🔗 sample app](./packages/sample-app/)

example app using the NDK.
35 changes: 1 addition & 34 deletions doc/guides/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ order: 100

## Install

Ndk has a core package `ndk` and optional packages like `rust_verifier` and `amber`.
Ndk has a core package `ndk` and optional packages like `amber` and `objectbox`

```bash
flutter pub add ndk
Expand All @@ -28,12 +28,10 @@ If you code with AI then your AI must read https://github.com/relaystr/ndk/blob/

!!!
We strongly recommend using `RustEventVerifier()` for client applications. It uses a separate thread for signature verification and is therefore more performant. \
How to install below. For web look [here](https://github.com/relaystr/ndk/blob/master/packages/rust_verifier/README.md)
!!!

```dart
import 'package:ndk/ndk.dart';
import 'package:ndk_rust_verifier/ndk_rust_verifier.dart';

// init
final ndk = Ndk(
Expand Down Expand Up @@ -64,45 +62,14 @@ await for (final event in response.stream) {

$~~~~~~~~~~~$

## Getting started with NDK helper packages

### Prerequisites `ndk_rust_verifier`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to keep this part of the docs. Installing rust+tool chains is necessary


- android SDK (also for desktop builds)
- flutter SDK
- rust ( + toolchain for target)

Rust toolchain android:

```bash
rustup target add \
aarch64-linux-android \
armv7-linux-androideabi \
x86_64-linux-android \
i686-linux-android
```

Rust toolchain ios:

```bash
# 64 bit targets (real device & simulator):
rustup target add aarch64-apple-ios x86_64-apple-ios
# New simulator target for Xcode 12 and later
rustup target add aarch64-apple-ios-sim
# 32 bit targets (you probably don't need these):
rustup target add armv7-apple-ios i386-apple-ios
```

## Install

```bash
flutter pub add ndk_rust_verifier
flutter pub add ndk_amber
```

## Import

```dart
import 'package:ndk_rust_verifier/ndk_rust_verifier.dart';
import 'package:ndk_amber/ndk_amber.dart';
```
4 changes: 1 addition & 3 deletions doc/library-development/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,14 @@ Install [prerequisites](#prerequisites)

run `melos bootstrap` to install all dependencies.

If you work on rust code (`packages/rust_verifier/rust_builder/rust`) run `flutter_rust_bridge_codegen generate --watch` to generate the rust dart glue code.

Run build runner: (e.g for generating mocks)\
`dart run build_runner build`

## Architecture

The repo is setup as a monorepo and packages are split to enable user choice of what to include.\
The main package is `ndk` which is the main entry point for the lib user. \
Other packages like `rust_verifier` or `amber` are optional and can be included if needed.
Other packages like `objectbox` or `amber` are optional and can be included if needed.

NDK uses Clean Architecture. Reasons for it being clear separation of concerns and therefore making it more accessible for future contributors.\
You can read more about it [here](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html).
Expand Down
2 changes: 0 additions & 2 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ packages:
- packages/bip32_keys
- packages/ndk
- packages/objectbox
- packages/rust_verifier
- packages/rust_verifier/rust_builder
- packages/nip07_event_signer
- packages/sembast_cache_manager
- packages/drift
Expand Down
Loading
Loading