-
Notifications
You must be signed in to change notification settings - Fork 679
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Small updates to nearlib + RPC accepts cross-domain requests (#375)
* [nearlib] switch signing library * Allow cross-site for RPC requests * Add getAccounts to list all present accounts in key store, add createDefaultConfig nodeUrl param * Adding build script and exports file for nearlib to standalone script * Fix up the rest of RPC calls; adding Account to exports * Return package lock
- Loading branch information
1 parent
1b96a45
commit 4c5b32f
Showing
6 changed files
with
83 additions
and
36 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 |
---|---|---|
|
@@ -22,5 +22,8 @@ core/wasm/**/Cargo.lock | |
# Python env | ||
.env | ||
|
||
# JS build | ||
nearlib/dist/ | ||
|
||
# Integration tests | ||
tmp/ |
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,4 @@ | ||
#!/bin/sh | ||
|
||
npx browserify exports.js -o dist/nearlib.js | ||
|
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,16 @@ | ||
const Near = require('./near'); | ||
const NearClient = require('./nearclient'); | ||
const Account = require('./account'); | ||
const BrowserLocalStorageKeystore = require('./signing/browser_local_storage_keystore'); | ||
const LocalNodeConnection = require('./local_node_connection'); | ||
|
||
|
||
var nearLib = window.nearLib || {}; | ||
|
||
nearLib.Near = Near; | ||
nearLib.NearClient = NearClient; | ||
nearLib.Account = Account; | ||
nearLib.BrowserLocalStorageKeystore = BrowserLocalStorageKeystore; | ||
nearLib.LocalNodeConnection = LocalNodeConnection; | ||
|
||
window.nearLib = nearLib; |
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
i don't think this is what we want by default and should be a configuration option