Skip to content

Commit e78ed70

Browse files
feat(package): proper naming
Signed-off-by: Daniel Thompson-Yvetot <[email protected]>
1 parent 2489810 commit e78ed70

File tree

4 files changed

+53
-5
lines changed

4 files changed

+53
-5
lines changed

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Tauri Plugin Stronghold
2+
3+
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.
4+
5+
## Architecture
6+
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.
7+
8+
## Installation
9+
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`
10+
11+
### RUST
12+
`src-tauri/Cargo.toml`
13+
```yaml
14+
[dependencies.tauri-stronghold]
15+
git = "https://github.com/tauri-apps/tauri-plugin-stronghold.rs"
16+
branch = "main"
17+
```
18+
19+
Use in `src-tauri/src/main.rs`:
20+
```rust
21+
use tauri_stronghold::TauriStronghold;
22+
23+
fn main() {
24+
tauri::AppBuilder::new()
25+
.plugin(TauriStronghold {})
26+
.build()
27+
.run();
28+
}
29+
```
30+
31+
### WEB
32+
`package.json`
33+
```json
34+
"dependencies": {
35+
"tauri-stronghold-plugin-api": "tauri-apps/tauri-plugin-stronghold.rs#main",
36+
```
37+
38+
Import in your JS/TS:
39+
```
40+
import { Stronghold, Location } from 'tauri-stronghold-plugin-api'
41+
```
42+
43+
44+
# License
45+
MIT / Apache-2.0

examples/svelte-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@
2626
"dependencies": {
2727
"sirv-cli": "^1.0.0",
2828
"tauri": "^0.14.1",
29-
"tauri-stronghold-api": "link:../../api-definitions/"
29+
"tauri-stronghold-package-api": "link:../../"
3030
}
3131
}

examples/svelte-app/src/App.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import { Stronghold, Location } from 'tauri-stronghold-api'
2+
import { Stronghold, Location } from 'tauri-stronghold-plugin-api'
33
44
const stronghold = new Stronghold('./example.stronghold', 'password')
55
const store = stronghold.getStore('exampleStoreVault', [])

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
{
2-
"name": "tauri-stronghold-api",
2+
"name": "tauri-stronghold-plugin-api",
33
"version": "0.1.0",
4-
"author": "Lucas Nogueira <[email protected]>",
5-
"description": "API wrapper for the Stronghold Tauri plugin",
4+
"authors": [
5+
"Lucas Nogueira <[email protected]>",
6+
"Daniel Thompson-Yvetot <[email protected]>"
7+
],
8+
"description": "API wrapper for the Tauri Plugin for Stronghold ",
69
"browser": "dist/index.js",
710
"private": "true",
811
"scripts": {

0 commit comments

Comments
 (0)