Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add export files #10

Merged
merged 4 commits into from
Oct 27, 2023
Merged
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
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,23 @@ on:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
directory: ["recovery", "export"]
Comment on lines +13 to +15
Copy link
Collaborator

Choose a reason for hiding this comment

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

fancy!


steps:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2

- name: Install node
- name: Install Node.js
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
with:
node-version: 18

- name: Install dependencies
working-directory: ./recovery
- name: Install Dependencies for ${{ matrix.directory }}
working-directory: ./${{ matrix.directory }}
run: npm install

- name: Run Tests
working-directory: ./recovery
- name: Run Tests for ${{ matrix.directory }}
working-directory: ./${{ matrix.directory }}
run: npm test
48 changes: 42 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,38 @@
# recovery
# Frames

This repository contains code for the recovery component of Turnkey. This self-contained HTML page is meant to be used as a standalone document to help first-party Turnkey root users. It's also going to be embedded as an iframe to help with sub-org root recovery.
This repository contains code for the recovery and export components of Turnkey. These components can be embedded as iframes by users to support end-users in recovery and export.

This page is hosted on Github pages at https://tkhq.github.io/recovery/
## Email Recovery
This self-contained HTML page is meant to be used as a standalone document to help first-party Turnkey root users. It's also going to be embedded as an iframe to help with sub-org root recovery.

# Running tests
This page is hosted at https://recovery.tkhqlabs.xyz/

This HTML page has tests. They run on CI automatically. If you want to run them locally:
## Key and Wallet Export
This self-contained HTML page is meant to be used as either a standalone document or to be embedded as an iframe.

This page is hosted at https://export.tkhqlabs.xyz/

# Getting Started

Clone the repo:
```sh
git clone [email protected]:tkhq/frames.git
cd frames/
```

Install dependencies
```sh
npm install
```

# Unit Testing

This HTML page has tests. They run on CI automatically. If you want to run them locally:
```sh
npm test
```

# Running a fake recovery
# Running a Fake Recovery

Download mono, then check out `zeke-recovery-demo`:
```sh
Expand Down Expand Up @@ -47,3 +67,19 @@ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 4 filtered out; fini
```

Now, paste the artifacts and then decrypt! Note the Enclave Auth Key should already be correct.

# Running Local Wallet Export
Start the server. This command will run a simple static server on port 8080.
```sh
npm start
```

Clone the `sdk` repo.
```sh
git clone [email protected]:tkhq/sdk.git
```

Follow the README.md for the `key-export` example. Set the `NEXT_PUBLIC_EXPORT_IFRAME_URL="http://localhost:3000/export"` in the example's environment variables configuration. The `wallet-export` example embeds this page as an iframe.
```sh
cd sdk/examples/wallet-export
```
7 changes: 7 additions & 0 deletions export/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
presets: [
[
'@babel/preset-env'
],
],
}
Loading
Loading