Skip to content

Commit

Permalink
Merge pull request #10 from tkhq/olivia/export
Browse files Browse the repository at this point in the history
Add export files
  • Loading branch information
Olivia Thet authored Oct 27, 2023
2 parents 0e98c75 + bee4079 commit 04578aa
Show file tree
Hide file tree
Showing 8 changed files with 16,558 additions and 14 deletions.
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"]

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

0 comments on commit 04578aa

Please sign in to comment.