@bsv/overlay-express 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.txt ADDED
@@ -0,0 +1,28 @@
1
+ Open BSV License version 4
2
+
3
+ Copyright (c) 2023 BSV Blockchain Association ("Bitcoin Association")
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ 1 - The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ 2 - The Software, and any software that is derived from the Software or parts thereof,
16
+ can only be used on the Bitcoin SV blockchains. The Bitcoin SV blockchains are defined,
17
+ for purposes of this license, as the Bitcoin blockchain containing block height #556767
18
+ with the hash "000000000000000001d956714215d96ffc00e0afda4cd0a96c96f8d802b1662b" and
19
+ that contains the longest persistent chain of blocks accepted by this Software and which are valid under the rules set forth in the Bitcoin white paper (S. Nakamoto, Bitcoin: A Peer-to-Peer Electronic Cash System, posted online October 2008) and the latest version of this Software available in this repository or another repository designated by Bitcoin Association,
20
+ as well as the test blockchains that contain the longest persistent chains of blocks accepted by this Software and which are valid under the rules set forth in the Bitcoin whitepaper (S. Nakamoto, Bitcoin: A Peer-to-Peer Electronic Cash System, posted online October 2008) and the latest version of this Software available in this repository, or another repository designated by Bitcoin Association
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,38 @@
1
+ # Overlay Express
2
+
3
+ BSV BLOCKCHAIN | Overlay Express
4
+
5
+ An opinionated but configurable Overlay Services deployment system:
6
+ - Uses express for HTTP(S)
7
+ - Implements a configurable web UI
8
+ - Uses common MySQL and Mongo databases
9
+ - Supports SHIP, SLAP, GASP out of the box (or not)
10
+ - Supports Arc callbacks natively (or not)
11
+
12
+ ## Example Usage
13
+
14
+ Here's a quick example that uses Ngrok and some common environment variables.
15
+
16
+ ```typescript
17
+ import OverlayExpress from '@bsv/overlay-express'
18
+ import ngrok from 'ngrok'
19
+ import dotenv from 'dotenv'
20
+ dotenv.config()
21
+
22
+ const main = async () => {
23
+ const ngrokUrl = await ngrok.connect(3000)
24
+ console.log(ngrokUrl)
25
+ const server = new OverlayExpress('Server Name', process.env.SERVER_PRIVATE_KEY!, ngrokUrl)
26
+ await server.configureKnex(process.env.KNEX_URL!)
27
+ await server.configureMongo(process.env.MONGO_URL!)
28
+ await server.configureEngine()
29
+ await server.start()
30
+ }
31
+ main()
32
+ ```
33
+
34
+ ## License
35
+
36
+ The license for the code in this repository is the Open BSV License. Refer to [LICENSE.txt](./LICENSE.txt) for the license text.
37
+
38
+ Thank you for being a part of the BSV Blockchain Overlay Express Project. Let's build the future of BSV Blockchain together!
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.default = void 0;
7
+ var OverlayExpress_js_1 = require("./src/OverlayExpress.js");
8
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(OverlayExpress_js_1).default; } });
9
+ //# sourceMappingURL=mod.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mod.js","sourceRoot":"","sources":["../../mod.ts"],"names":[],"mappings":";;;;;;AAAA,6DAAiD;AAAxC,6HAAA,OAAO,OAAA"}
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "@bsv/overlay-express",
3
+ "version": "0.1.0",
4
+ "type": "commonjs",
5
+ "description": "BSV Blockchain Overlay Express",
6
+ "files": [
7
+ "dist",
8
+ "src",
9
+ "docs",
10
+ "mod.ts",
11
+ "LICENSE.txt"
12
+ ],
13
+ "scripts": {
14
+ "test": "npm run build && jest",
15
+ "test:watch": "npm run build && jest --watch",
16
+ "test:coverage": "npm run build && jest --coverage",
17
+ "lint": "ts-standard --fix src/**/*.ts",
18
+ "build": "tsc -b && tsconfig-to-dual-package tsconfig.cjs.json",
19
+ "dev": "tsc -b -w",
20
+ "prepublish": "npm run build",
21
+ "doc": "ts2md --inputFilename=mod.ts --outputFilename=API.md --filenameSubstring=API --firstHeadingLevel=1"
22
+ },
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/bitcoin-sv/overlay-express.git"
26
+ },
27
+ "keywords": [
28
+ "BSV",
29
+ "Blockchain",
30
+ "Overlay",
31
+ "Bitcoin",
32
+ "SV"
33
+ ],
34
+ "author": "BSV Association",
35
+ "license": "SEE LICENSE IN LICENSE.txt",
36
+ "bugs": {
37
+ "url": "https://github.com/bitcoin-sv/overlay-express/issues"
38
+ },
39
+ "homepage": "https://github.com/bitcoin-sv/overlay-express#readme",
40
+ "devDependencies": {
41
+ "@types/express": "^5.0.0",
42
+ "@types/jest": "^29.5.12",
43
+ "jest": "^29.7.0",
44
+ "ts-jest": "^29.1.1",
45
+ "ts-standard": "^12.0.2",
46
+ "ts2md": "^0.2.0",
47
+ "tsconfig-to-dual-package": "^1.2.0",
48
+ "typescript": "^5.2.2"
49
+ },
50
+ "dependencies": {
51
+ "@bsv/overlay": "^0.1.15",
52
+ "@bsv/overlay-discovery-services": "^0.1.0",
53
+ "@bsv/sdk": "^1.2.3",
54
+ "body-parser": "^1.20.3",
55
+ "express": "^4.21.1",
56
+ "knex": "^3.1.0",
57
+ "mongodb": "^6.11.0"
58
+ }
59
+ }