Skip to content

Commit

Permalink
Webcrypto Shim 2.0 Electric Boogaloo
Browse files Browse the repository at this point in the history
  • Loading branch information
Akamig committed Oct 30, 2023
1 parent 3426d62 commit 7965998
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions @planetarium/tx/src/crypto/node.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
import { Crypto } from "@peculiar/webcrypto";
export const crypto = new Crypto();
// @ts-ignore
import * as nc from "node:crypto";
export const crypto =
nc && typeof nc === "object" && "webcrypto" in nc
? (nc.webcrypto as any)
: undefined;

0 comments on commit 7965998

Please sign in to comment.