profile
viewpoint
Tankred Hase tanx Munich, Germany https://tankredhase.com Software Engineer interested in Security, Privacy, and UX • Previously @lightninglabs, @whiteout-io, @openpgpjs

tanx/hoodiecrow 25

Mail App with integrated OpenPGP encryption

tanx/mailreader 9

RFC parser as an AMD module written with node API for the browser.

photon-sdk/photon-keyserver 5

2FA server for encrypted private key backup

tanx/pgpbuilder 3

High-level module to construct RFC-compliant emails from javascript

tanx/mail 2

Mail App with integrated OpenPGP encryption

tanx/Signal2Mail 1

A UX prototype of an encrypted Email client in React Native

tanx/blog-theme 0

Theme for my ghost blog

tanx/BlueWallet 0

Bitcoin thin client for iOS & Android. Built with React Native

tanx/garecovery 0

GreenAddress recovery tool for 2of2 and 2of3 wallets

tanx/lightning-app 0

An easy-to-use cross-platform Lightning wallet

startedmakepad/makepad

started time in 6 days

startedgohyperr/hecs

started time in 6 days

startedmozilla/extension-activity-monitor

started time in 7 days

Pull request review commentphoton-sdk/photon-app

Adds support for google drive backups

 when( when(   () => store.walletReady,   async () => {+    await backup.authenticate();

Yeah good spot!

ConorOkus

comment created time in 7 days

pull request commentphoton-sdk/photon-lib

Conor okus google drive cloud storage

Think this can be closed now - https://github.com/photon-sdk/photon-lib/pull/22

tanx

comment created time in 9 days

startedobservablehq/htl

started time in 9 days

pull request commentphoton-sdk/photon-lib

Adds support for google drive backups on android

Hmm okay, no I just reverted that change that updates the package-lock.json. Now it's failing in CI?

ConorOkus

comment created time in 14 days

pull request commentphoton-sdk/photon-lib

Adds support for google drive backups on android

Bit confused about removing the diff, I think CI will fail if the package.json and package-lock.json files are not in sync?

ConorOkus

comment created time in 14 days

Pull request review commentphoton-sdk/photon-lib

Adds support for google drive backups on android

+import * as CloudStore from '../../src/cloudstore';+import * as GDriveCloudStorage from '../../src/GDriveCloudStorage';++describe('CloudStore android unit test', () => {+  const keyId = '8abe1a93-6a9c-490c-bbd5-d7f11a4a9c8f';+  const ciphertext = Buffer.from('encrypted stuff');++  describe('putKey', () => {+    it.skip('fail on invalid args', async () => {+      const setItemSpy = jest.spyOn(GDriveCloudStorage, 'setItem');++      await expect(CloudStore.putKey({ keyId })).rejects.toThrow(/Invalid/);+      expect(setItemSpy.mock.calls.length).toBe(0);+    });++    it.skip('store item', async () => {+      const getItemSpy = jest.spyOn(GDriveCloudStorage, 'getItem').mockImplementation();+      const setItemSpy = jest.spyOn(GDriveCloudStorage, 'setItem');++      await CloudStore.putKey({ keyId, ciphertext });+      expect(setItemSpy.mock.calls[0][0]).toBe('1_photon_key_id');+      expect(setItemSpy.mock.calls[0][1]).toBe(keyId);+      expect(setItemSpy.mock.calls[1][0]).toBe('1_8abe1a93');+      expect(setItemSpy.mock.calls[1][1]).toMatch(/^{"keyId":.*"}$/);+      expect(setItemSpy.mock.calls.length).toBe(2);++      getItemSpy.mockRestore();+    });++    it.skip('should not backup twice', async () => {+      const getItemSpy = jest.spyOn(GDriveCloudStorage, 'getItem');+      const setItemSpy = jest.spyOn(GDriveCloudStorage, 'setItem');++      await expect(CloudStore.putKey({ keyId, ciphertext })).rejects.toThrow(/already present/);+      expect(setItemSpy.mock.calls.length).toBe(2);++      getItemSpy.mockRestore();+      setItemSpy.mockRestore();+    });+  });++  describe('getKey', () => {+    it.skip('should not find item', async () => {+      const getItemSpy = jest.spyOn(GDriveCloudStorage, 'getItem').mockResolvedValue(null);++      const stored = await CloudStore.getKey();+      expect(stored).toBe(null);++      getItemSpy.mockRestore();+    });++    it.skip('should get stored item by key Id', async () => {+      const result = {+        keyId: keyId,+        ciphertext: ciphertext,+        time: new Date(),+      };++      const getItemSpy = jest+        .spyOn(GDriveCloudStorage, 'getItem')+        .mockImplementation()+        .mockResolvedValueOnce(keyId)+        .mockResolvedValueOnce(JSON.stringify(result));++      const stored = await CloudStore.getKey();+      expect(stored).toEqual({+        keyId,+        ciphertext,+        time: expect.objectContaining(new Date()),+      });++      getItemSpy.mockRestore();+    });++    describe('removeKeyId', () => {+      it.skip('fail on invalid args', async () => {+        const result = {+          keyId: keyId,+          ciphertext: ciphertext,+          time: new Date(),+        };++        const removeItemSpy = jest.spyOn(GDriveCloudStorage, 'removeItem');+        const getItemSpy = jest.spyOn(GDriveCloudStorage, 'getItem').mockResolvedValueOnce(keyId).mockResolvedValue(JSON.stringify(result));+        const getKeySpy = jest.spyOn(CloudStore, 'getKey').mockResolvedValue(result);++        await expect(CloudStore.removeKeyId({ keyId: 'invalid' })).rejects.toThrow(/not found/);+        expect(getItemSpy.mock.calls.length).toBe(2);++        getItemSpy.mockRestore();+        removeItemSpy.mockRestore();+        getKeySpy.mockRestore();+      });+    });+  });+});

No unfortunately not, the naming convention just makes it a bit easier to run in isolation here it's not ideal to have a setup file for running in the android environment but changing the Platform directly in the tests doesn't seem to work so this is a workaround using Haste.

ConorOkus

comment created time in 14 days

issue openedphoton-sdk/photon-lib-swift

Create Swift Framework

After peer reviews and documentation has been created, create Swift framework downloadable from Cocoapods and Swift Package Manager

created time in 15 days

pull request commentphoton-sdk/photon-lib

Adds support for google drive backups on android

Yeah we did, weird. I think my rebasing messed something up. I've added them back in now anyway!

ConorOkus

comment created time in 15 days

pull request commentphoton-sdk/photon-app

Adds support for Google Drive backups on Android

Updated here - https://github.com/photon-sdk/photon-app/pull/13 🚧

ConorOkus

comment created time in 15 days

PR opened photon-sdk/photon-app

Adds support for google drive backups

Depends on - https://github.com/photon-sdk/photon-lib/pull/22

+24 -3

0 comment

3 changed files

pr created time in 15 days

pull request commentphoton-sdk/photon-lib

Adds Google Drive support on Android

Ahhh my bad! New PR here - https://github.com/photon-sdk/photon-lib/pull/22

ConorOkus

comment created time in 15 days

issue commentphoton-sdk/photon-lib

Question: nodejs compatibility?

the idea behind blue_modules was that sometimes pieces of code work better as OOP (with all that incapsulation and inheritance stuff), and sometimes code is organized well enough with plain modules. also, some external dependencies can be moved outside of node_modules into blue_modules to better keep an eye on them.

consolidating library code is not something I would do immediately for BW, but there is certainly value in making it work seamlessly on nodejs/rn/browser, this way next time I'll start a side project I won't have to copy-paste a bunch of code from BW.

Overtorment

comment created time in 16 days

PR opened photon-sdk/photon-app

Adds support for Google Drive backups on Android

Depends on - https://github.com/photon-sdk/photon-lib/pull/21

+17 -5

0 comment

3 changed files

pr created time in 20 days

issue commentphoton-sdk/photon-lib

Question: nodejs compatibility?

bitcoinjs-lib already works everywhere, but its a bit too low-level

Overtorment

comment created time in a month

issue commentphoton-sdk/photon-lib

Question: nodejs compatibility?

thanks! :-) so long story short, I wanted bluewallet code to be isomorphic, to reuse it on servers and in browsers, but BW grown too complex. one day I tried to setup nodejs project and add BW as a dependency just to reuse some classes without copy-paste, and failed miserably. so that would be really nice to have a project (like photon-lib) that can only be used as a dependency, and instantly provide some of bluewallet's classes to either nodejs, browser tab, react-native, or whatever (think javascript on microcontrollers).

Overtorment

comment created time in a month

startedarachsys/montage-shell

started time in a month

delete branch photon-sdk/photon-lib

delete branch : dependabot/npm_and_yarn/node-notifier-8.0.1

delete time in a month

push eventphoton-sdk/photon-lib

Tankred Hase

commit sha 2413d18f3505eecef8da2479c6b2f47411bc278e

Run npm audit fix

view details

dependabot[bot]

commit sha 3076769e79b79199f2f7a38454a6fdd6553dbee9

Bump node-notifier from 8.0.0 to 8.0.1 Bumps [node-notifier](https://github.com/mikaelbr/node-notifier) from 8.0.0 to 8.0.1. - [Release notes](https://github.com/mikaelbr/node-notifier/releases) - [Changelog](https://github.com/mikaelbr/node-notifier/blob/v8.0.1/CHANGELOG.md) - [Commits](https://github.com/mikaelbr/node-notifier/compare/v8.0.0...v8.0.1) Signed-off-by: dependabot[bot] <support@github.com>

view details

push time in a month

PR opened photon-sdk/photon-lib

Bump node-notifier from 8.0.0 to 8.0.1

Bumps node-notifier from 8.0.0 to 8.0.1. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/mikaelbr/node-notifier/blob/v8.0.1/CHANGELOG.md">node-notifier's changelog</a>.</em></p> <blockquote> <h3><code>v8.0.1</code></h3> <ul> <li>fixes possible injection issue for notify-send</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/mikaelbr/node-notifier/commit/5d62799dab88505a709cd032653b2320c5813fce"><code>5d62799</code></a> v8.0.1</li> <li><a href="https://github.com/mikaelbr/node-notifier/commit/0c4a80df9a3b5015cd1e1ab858e008be3fece082"><code>0c4a80d</code></a> chore: adds changelog</li> <li><a href="https://github.com/mikaelbr/node-notifier/commit/f5a7bc647589fc89ac64b0f1d259a853fcf057bc"><code>f5a7bc6</code></a> fix: test cases</li> <li><a href="https://github.com/mikaelbr/node-notifier/commit/b9d148d697d3db807f653e2e6953c3de57dfeb8a"><code>b9d148d</code></a> patch: fixes possible injection issue for notify-send</li> <li>See full diff in <a href="https://github.com/mikaelbr/node-notifier/compare/v8.0.0...v8.0.1">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+1060 -19416

0 comment

1 changed file

pr created time in a month

issue commentphoton-sdk/photon-lib

Question: nodejs compatibility?

no I was thinking about, for example, starting new backend project and having all classes available to import mnemonics and create transactions. no relation to Lndhub

Overtorment

comment created time in a month

startedandsens/homeshick

started time in a month

issue commentphoton-sdk/photon-lib

Question: nodejs compatibility?

no, if it runs under nodejs then it will most likely run under ts.

but is there a way to just throw in this lib as a dependency in nodejs project with minimal efforts (like, mocking RN modules)?

Overtorment

comment created time in a month

more