forked from bitcoinjs/tiny-secp256k1
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
204 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
/coverage | ||
/node_modules | ||
/target | ||
/tests/browser | ||
|
||
lib/secp256k1.wasm | ||
package-lock.json | ||
tests/bundle.js | ||
/lib/secp256k1.wasm | ||
/package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
/target | ||
/tests/browser | ||
/tests/fixtures | ||
/util/gen-fixtures/secp256k1 | ||
|
||
package-lock.json |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import * as wasm from "./secp256k1.wasm"; | ||
export default wasm; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
const { readFileSync } = require("fs"); | ||
const { join } = require("path"); | ||
const validate_wasm = require("./validate_wasm"); | ||
import { readFileSync } from "fs"; | ||
import { URL } from "url"; | ||
import * as wasm_error from "./wasm_error.js"; | ||
import * as wasm_rand from "./wasm_rand.js"; | ||
|
||
const binary = readFileSync(join(__dirname, "secp256k1.wasm")); | ||
const binary = readFileSync(new URL("secp256k1.wasm", import.meta.url)); | ||
const imports = { | ||
"./validate_wasm.js": validate_wasm, | ||
"./wasm_error.js": wasm_error, | ||
"./wasm_rand.js": wasm_rand, | ||
}; | ||
|
||
const mod = new WebAssembly.Module(binary); | ||
const instance = new WebAssembly.Instance(mod, imports); | ||
|
||
module.exports = instance.exports; | ||
export default instance.exports; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.