Skip to content

Commit

Permalink
feat(package): proper naming
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Thompson-Yvetot <[email protected]>
  • Loading branch information
nothingismagick committed Feb 15, 2021
1 parent 2489810 commit e78ed70
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 5 deletions.
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Tauri Plugin Stronghold

This plugin provides a "classical" Tauri Plugin Interface to the [IOTA Stronghold](https://github.com/iotaledger/stronghold.rs) encrypted database, secure runtime, and peer-to-peer service.

## Architecture
This repo might appear to be strange, but it is really just a hybrid Rust / Typescript project that recommends a specific type of consumption, namely using GIT as the only distribution mechanism.

## Installation
For more details and usage see [the svelte demo](examples/svelte-app/src/App.svelte). Please note, below in the dependencies you can also lock to a revision/tag in both the `Cargo.toml` and `package.json`

### RUST
`src-tauri/Cargo.toml`
```yaml
[dependencies.tauri-stronghold]
git = "https://github.com/tauri-apps/tauri-plugin-stronghold.rs"
branch = "main"
```

Use in `src-tauri/src/main.rs`:
```rust
use tauri_stronghold::TauriStronghold;

fn main() {
tauri::AppBuilder::new()
.plugin(TauriStronghold {})
.build()
.run();
}
```

### WEB
`package.json`
```json
"dependencies": {
"tauri-stronghold-plugin-api": "tauri-apps/tauri-plugin-stronghold.rs#main",
```

Import in your JS/TS:
```
import { Stronghold, Location } from 'tauri-stronghold-plugin-api'
```


# License
MIT / Apache-2.0
2 changes: 1 addition & 1 deletion examples/svelte-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
"dependencies": {
"sirv-cli": "^1.0.0",
"tauri": "^0.14.1",
"tauri-stronghold-api": "link:../../api-definitions/"
"tauri-stronghold-package-api": "link:../../"
}
}
2 changes: 1 addition & 1 deletion examples/svelte-app/src/App.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { Stronghold, Location } from 'tauri-stronghold-api'
import { Stronghold, Location } from 'tauri-stronghold-plugin-api'
const stronghold = new Stronghold('./example.stronghold', 'password')
const store = stronghold.getStore('exampleStoreVault', [])
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"name": "tauri-stronghold-api",
"name": "tauri-stronghold-plugin-api",
"version": "0.1.0",
"author": "Lucas Nogueira <[email protected]>",
"description": "API wrapper for the Stronghold Tauri plugin",
"authors": [
"Lucas Nogueira <[email protected]>",
"Daniel Thompson-Yvetot <[email protected]>"
],
"description": "API wrapper for the Tauri Plugin for Stronghold ",
"browser": "dist/index.js",
"private": "true",
"scripts": {
Expand Down

0 comments on commit e78ed70

Please sign in to comment.