A Javascript/Typescript library for exporting Universal Wallet Backup Containers.
TBD
TBD
- Node.js 14+ is recommended.
To install via NPM:
npm install @interop/wallet-export-ts
To install locally (for development):
git clone https://github.com/interop-alliance/wallet-export-ts.git
cd wallet-export-ts
npm install
export() // no wallet passed in, generates an empty Universal Wallet Backup TAR file
...
$ tar -vtf wallet-export-2024-01-01.tar
drwxr-xr-x 0/0 0 2024-06-11 15:58 app
drwxr-xr-x 0/0 0 2024-06-11 15:58 keys
-rw-r--r-- 0/0 21 2024-06-11 15:58 manifest.yaml
$ cat manifest.yaml
---
ubc-version: 0.1
meta:
created: 2024-01-01
createdBy:
client:
url: https://github.com/interop-alliance/wallet-export-ts
import * as fs from 'node:fs'
import { exportActorProfile } from '@interop/wallet-export-ts'
const filename = 'out/test-export-2024-01-01.tar'
const tarball = fs.createWriteStream(filename)
// Each of the arguments passed in is Optional
const packStream = exportActorProfile({
actorProfile, outbox, followers, followingAccounts, lists, bookmarks, likes,
blockedAccounts, blockedDomains, mutedAccounts
})
packStream.pipe(tarball)
then
cd out
tar -vtf test-export-2024-01-01.tar
drwxr-xr-x 0 0 0 0 Oct 9 20:19 activitypub
-rw-r--r-- 0 0 0 3526 Oct 9 20:19 activitypub/actor.json
-rw-r--r-- 0 0 0 4367 Oct 9 20:19 activitypub/outbox.json
-rw-r--r-- 0 0 0 386 Oct 9 20:19 manifest.yaml
see https://codeberg.org/fediverse/fep/src/branch/main/fep/6fcd/fep-6fcd.md#activitypub-export-example for contents
PRs accepted.
If editing the Readme, please conform to the standard-readme specification.
MIT License © 2024 Interop Alliance and Dmitri Zagidulin.