├── .github ├── CODE_OF_CONDUCT.md ├── CODE_STANDARDS.md ├── CONTRIBUTING.md ├── FUNDING.yml ├── IMAGES │ └── infrastructure-diagram.png ├── ISSUE_TEMPLATE │ ├── 1_new_schema.md │ ├── 2_new_property.md │ ├── 3_bug_report.md │ ├── 4_feature_request.md │ ├── 5_sponsor_request.md │ └── 6_general.md ├── SECURITY.md ├── dependabot.yml ├── labels.yml ├── mergify.yml └── workflows │ ├── codeql-analysis.yml │ ├── release.yml │ └── sync-labels.yml ├── .gitignore ├── .goreleaser.yml ├── .make ├── aws.mk ├── common.mk └── firebase.mk ├── LICENSE ├── Makefile ├── README.md ├── application.yaml ├── assets ├── bitcoinSchemaShareImg.png └── sponsors │ ├── all-aboard.png │ ├── metalens.png │ └── tonicpow.png ├── buildspec.yml ├── docs ├── .nojekyll ├── CNAME ├── README.md ├── _media │ └── favicon.ico ├── _navbar.md ├── _sidebar.md ├── cover.md ├── error_404.md ├── es │ ├── README.md │ ├── _navbar.md │ ├── _sidebar.md │ ├── about.md │ ├── cover.md │ ├── error_404.md │ └── terms_of_service.md ├── generic_schema.md ├── getting_started.md ├── index.html ├── schemas.md ├── social_schema.md ├── terms_of_service.md └── vendor │ ├── css │ ├── styles.min.css │ ├── theme-simple-dark.css │ └── vue.css │ └── js │ ├── app.min.js │ ├── docsify-copy-code.min.js │ ├── docsify-pagination.min.js │ ├── docsify.min.js │ ├── edit-on-github.js │ ├── emoji.min.js │ ├── external-script.min.js │ ├── ga.min.js │ ├── prism-json.min.js │ ├── search.min.js │ └── sw.js ├── firebase.json ├── gulpfile.js ├── package-lock.json ├── package.json ├── src ├── js │ └── app.js └── sass │ ├── _vars.scss │ └── styles.scss └── yarn.lock /.github/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Merit 2 | 3 | 1. The project creators, lead developers, core team, constitute 4 | the managing members of the project and have final say in every decision 5 | of the project, technical or otherwise, including overruling previous decisions. 6 | There are no limitations to this decisional power. 7 | 8 | 2. Contributions are an expected result of your membership on the project. 9 | Don't expect others to do your work or help you with your work forever. 10 | 11 | 3. All members have the same opportunities to seek any challenge they want 12 | within the project. 13 | 14 | 4. Authority or position in the project will be proportional 15 | to the accrued contribution. Seniority must be earned. 16 | 17 | 5. Software is evolutive: the better implementations must supersede lesser 18 | implementations. Technical advantage is the primary evaluation metric. 19 | 20 | 6. This is a space for technical prowess; topics outside of the project 21 | will not be tolerated. 22 | 23 | 7. Non technical conflicts will be discussed in a separate space. Disruption 24 | of the project will not be allowed. 25 | 26 | 8. Individual characteristics, including but not limited to, 27 | body, sex, sexual preference, race, language, religion, nationality, 28 | or political preferences are irrelevant in the scope of the project and 29 | will not be taken into account concerning your value or that of your contribution 30 | to the project. 31 | 32 | 9. Discuss or debate the idea, not the person. 33 | 34 | 10. There is no room for ambiguity: Ambiguity will be met with questioning; 35 | further ambiguity will be met with silence. It is the responsibility 36 | of the originator to provide requested context. 37 | 38 | 11. If something is illegal outside the scope of the project, it is illegal 39 | in the scope of the project. This Code of Merit does not take precedence over 40 | governing law. 41 | 42 | 12. This Code of Merit governs the technical procedures of the project not the 43 | activities outside of it. 44 | 45 | 13. Participation on the project equates to agreement of this Code of Merit. 46 | 47 | 14. No objectives beyond the stated objectives of this project are relevant 48 | to the project. Any intent to deviate the project from its original purpose 49 | of existence will constitute grounds for remedial action which may include 50 | expulsion from the project. 51 | -------------------------------------------------------------------------------- /.github/CODE_STANDARDS.md: -------------------------------------------------------------------------------- 1 | # Code Standards 2 | This project uses the following code standards and specifications from: 3 | - [docsify](https://docsify.js.org) - documentation 4 | - [schema.org](https://github.com/schemaorg/schemaorg) - schemas 5 | 6 | # Schema Standards 7 | Our schema creation and update process is founded on the [Schema.org](https://github.com/schemaorg/schemaorg#proposing-schemas) design and we follow many of their principles. 8 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Schema 2 | 3 | See [README](../README.md) for more details, especially on proposing schemas. 4 | 5 | Getting Started: 6 | 7 | * Please join the [Schema Channel on Slack](https://atlantistic.slack.com/app_redirect?channel=schema). 8 | * Visit the official site at [BitcoinSchema.org](https://BitcoinSchema.org) where you can see all published schemas. 9 | * For our license see the [LICENSE](../LICENSE) file. 10 | * Learn more about [Schema.org](https://github.com/schemaorg/schemaorg#welcome-to-schemaorg) 11 | * How we work: _coming soon_ ;-) 12 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: BitcoinSchema 4 | custom: https://bitcoinschema.org/?utm_source=github&utm_medium=sponsor-link&utm_campaign=schema&utm_term=schema&utm_content=schema 5 | -------------------------------------------------------------------------------- /.github/IMAGES/infrastructure-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitcoinSchema/schema/a99f6e63b8c9172a64a8e1ac15e5b761baed14e3/.github/IMAGES/infrastructure-diagram.png -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/1_new_schema.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: New Schema Proposal 3 | about: Got a schema we should add? Let us know! 4 | title: '' 5 | labels: new-schema 6 | assignees: mrz1836 7 | 8 | --- 9 | 10 | **Schema model name** 11 | Title or name of the schema 12 | 13 | **Please describe your new schema** 14 | A brief description of the schema 15 | 16 | **Schema properties** 17 | A list of properties, names, types, default values, examples... 18 | 19 | **Is this related to another schema?** 20 | Maybe this is dependant to another schema? 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/2_new_property.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: New Schema Property 3 | about: Got a property for a schema we should add? 4 | title: '' 5 | labels: new-property 6 | assignees: mrz1836 7 | 8 | --- 9 | 10 | **Related schema model** 11 | What schema model are we talking about? 12 | 13 | **Property name** 14 | Title or name of the property 15 | 16 | **Please describe your new property** 17 | A brief description of the property 18 | 19 | **Properties** 20 | Type of field, validations, example values 21 | 22 | **Is this related to another schema or property?** 23 | Maybe this is dependant to another schema or property? 24 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/3_bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Report a Bug 3 | about: Create a bug report to help us improve our project 4 | title: '' 5 | labels: bug-P3 6 | assignees: mrz1836 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Recordings** 27 | These help immensely! Use https://recordit.co 28 | 29 | **Desktop or Mobile Browser (please complete the following information):** 30 | - OS: [e.g. iOS] 31 | - Browser [e.g. chrome, safari] 32 | - Version [e.g. 22] 33 | 34 | **Additional context** 35 | Add any other context about the problem here. 36 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/4_feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: Suggest an idea or feature for this project 4 | title: '' 5 | labels: idea 6 | assignees: mrz1836 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Any supplemental graphics or designs*** 20 | If you have any sketches, designs, graphics, please attach them here. 21 | 22 | **Additional context** 23 | Add any other context or screenshots about the feature request here. 24 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/5_sponsor_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Sponsor Request 3 | about: Are you interested in becoming a sponsor? 4 | title: '' 5 | labels: new-sponsor 6 | assignees: mrz1836 7 | 8 | --- 9 | 10 | **Your name or company** 11 | Let us know who you are! 12 | 13 | **Your website or project** 14 | What is it? 15 | 16 | **How should we contact you?** 17 | Email, slack, twitter...? 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/6_general.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Miscellaneous 3 | about: For all other miscellaneous issues 4 | title: '' 5 | labels: question 6 | assignees: mrz1836 7 | 8 | --- 9 | 10 | **Please describe your request/issue** 11 | A clear and concise description of what the issue is. 12 | -------------------------------------------------------------------------------- /.github/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported & Maintained Versions 4 | 5 | | Version | Supported | 6 | | ------- | ------------------ | 7 | | 0.x.x | :white_check_mark: | 8 | 9 | ## Reporting a Vulnerability 10 | 11 | Individuals or organizations that are experiencing a product security issue are strongly encouraged to contact the [project maintainers](mailto:security@bitcoinschema.org). 12 | We welcome reports from independent researchers, industry organizations, vendors, customers, and other sources concerned with our project security. 13 | The minimal data needed for reporting a security issue is a description of the potential vulnerability. 14 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # Basic dependabot.yml to update npm and Github Actions 2 | 3 | version: 2 4 | updates: 5 | - package-ecosystem: 'npm' 6 | target-branch: 'master' 7 | directory: '/' 8 | schedule: 9 | interval: 'daily' 10 | # Check for npm updates at 10am UTC (5am EST) 11 | time: '10:00' 12 | reviewers: 13 | - 'mrz1836' 14 | assignees: 15 | - 'mrz1836' 16 | # Labels must be created first 17 | labels: 18 | - 'update' 19 | 20 | # Maintain dependencies for GitHub Actions 21 | - package-ecosystem: "github-actions" 22 | target-branch: "master" 23 | directory: "/" 24 | schedule: 25 | interval: "weekly" 26 | day: "monday" 27 | reviewers: 28 | - "mrz1836" 29 | assignees: 30 | - "mrz1836" 31 | labels: 32 | - "chore" 33 | open-pull-requests-limit: 10 34 | -------------------------------------------------------------------------------- /.github/labels.yml: -------------------------------------------------------------------------------- 1 | - color: 0075ca 2 | description: "Improvements or additions to documentation" 3 | name: "documentation" 4 | - color: b23128 5 | description: "Highest rated bug or issue, affects all" 6 | name: "bug-P1" 7 | - color: de3d32 8 | description: "Medium rated bug, affects a few" 9 | name: "bug-P2" 10 | - color: f44336 11 | description: "Lowest rated bug, affects nearly none or low-impact" 12 | name: "bug-P3" 13 | - color: 0e8a16 14 | description: "Any new significant addition" 15 | name: "feature" 16 | - color: b60205 17 | description: "Urgent or important fix/patch" 18 | name: "hot-fix" 19 | - color: cccccc 20 | description: "Any idea, suggestion" 21 | name: "idea" 22 | - color: d4c5f9 23 | description: "Experimental - can break!" 24 | name: "prototype" 25 | - color: cc317c 26 | description: "Any question or concern" 27 | name: "question" 28 | - color: c2e0c6 29 | description: "Unit tests, mocking, integration testing" 30 | name: "test" 31 | - color: fbca04 32 | description: "Anything GUI related" 33 | name: "ui-ux" 34 | - color: 006b75 35 | description: "Simple dependency updates or version bumps" 36 | name: "chore" 37 | - color: 006b75 38 | description: "General updates" 39 | name: "update" 40 | - color: FFA500 41 | description: "Any significant refactoring" 42 | name: "refactor" 43 | - color: 8692e0 44 | description: "For all new proposed properties" 45 | name: "new-property" 46 | - color: 4e309b 47 | description: "For all new proposed schemas" 48 | name: "new-schema" 49 | - color: ea85de 50 | description: "Interested in becoming a sponsor" 51 | name: "new-sponsor" 52 | - color: FEF2C0 53 | description: "Used for automatic merging" 54 | name: "automerge" 55 | - color: FBCA04 56 | description: "Used for denoting a WIP, stops auto-merge" 57 | name: "work-in-progress" 58 | - color: c2e0c6 59 | description: "Old, unused, stale" 60 | name: "stale" 61 | -------------------------------------------------------------------------------- /.github/mergify.yml: -------------------------------------------------------------------------------- 1 | pull_request_rules: 2 | 3 | # =============================================================================== 4 | # DEPENDABOT 5 | # =============================================================================== 6 | 7 | - name: Automatic Merge for Dependabot Minor Version Pull Requests 8 | conditions: 9 | - -draft 10 | - author~=^dependabot(|-preview)\[bot\]$ 11 | - check-success='Analyze (javascript)' 12 | - title~=^Bump [^\s]+ from ([\d]+)\..+ to \1\. 13 | actions: 14 | review: 15 | type: APPROVE 16 | message: Automatically approving dependabot pull request 17 | merge: 18 | method: merge 19 | - name: Alert on major version detection 20 | conditions: 21 | - author~=^dependabot(|-preview)\[bot\]$ 22 | - check-success='Analyze (javascript)' 23 | - -title~=^Bump [^\s]+ from ([\d]+)\..+ to \1\. 24 | actions: 25 | comment: 26 | message: "⚠️ @mrz1836: this is a major version bump and requires your attention" 27 | 28 | # =============================================================================== 29 | # AUTOMATIC MERGE (APPROVALS) 30 | # =============================================================================== 31 | 32 | - name: Automatic Merge ⬇️ on Approval ✔ 33 | conditions: 34 | - "#approved-reviews-by>=1" 35 | - "#review-requested=0" 36 | - "#changes-requested-reviews-by=0" 37 | - check-success='Analyze (javascript)' 38 | - -title~=(?i)wip 39 | - label!=work-in-progress 40 | - -draft 41 | actions: 42 | merge: 43 | method: merge 44 | 45 | # =============================================================================== 46 | # AUTHOR 47 | # =============================================================================== 48 | 49 | - name: Auto-Assign Author 50 | conditions: 51 | - "#assignee=0" 52 | actions: 53 | assign: 54 | users: [ "mrz1836" ] 55 | 56 | # =============================================================================== 57 | # ALERTS 58 | # =============================================================================== 59 | 60 | - name: Notify on merge 61 | conditions: 62 | - merged 63 | - label=automerge 64 | actions: 65 | comment: 66 | message: "✅ @{{author}}: **{{title}}** has been merged successfully." 67 | - name: Alert on merge conflict 68 | conditions: 69 | - conflict 70 | - label=automerge 71 | actions: 72 | comment: 73 | message: "🆘 @{{author}}: `{{head}}` has conflicts with `{{base}}` that must be resolved." 74 | - name: Alert on tests failure for automerge 75 | conditions: 76 | - label=automerge 77 | - status-failure=commit 78 | actions: 79 | comment: 80 | message: "🆘 @{{author}}: unable to merge due to CI failure." 81 | 82 | # =============================================================================== 83 | # LABELS 84 | # =============================================================================== 85 | # Automatically add labels when PRs match certain patterns 86 | # 87 | # NOTE: 88 | # - single quotes for regex to avoid accidental escapes 89 | # - Mergify leverages Python regular expressions to match rules. 90 | # 91 | # Semantic commit messages 92 | # - chore: updating grunt tasks etc.; no production code change 93 | # - docs: changes to the documentation 94 | # - feat: feature or story 95 | # - feature: new feature or story 96 | # - fix: bug fix for the user, not a fix to a build script 97 | # - idea: general idea or suggestion 98 | # - question: question regarding code 99 | # - test: test related changes 100 | # - wip: work in progress PR 101 | # =============================================================================== 102 | 103 | - name: Work in Progress 104 | conditions: 105 | - "head~=(?i)^wip" # if the PR branch starts with wip/ 106 | actions: 107 | label: 108 | add: ["work-in-progress"] 109 | - name: Hotfix label 110 | conditions: 111 | - "head~=(?i)^hotfix" # if the PR branch starts with hotfix/ 112 | actions: 113 | label: 114 | add: ["hot-fix"] 115 | - name: Bug / Fix label 116 | conditions: 117 | - "head~=(?i)^(bug)?fix" # if the PR branch starts with (bug)?fix/ 118 | actions: 119 | label: 120 | add: ["bug-P3"] 121 | - name: Documentation label 122 | conditions: 123 | - "head~=(?i)^docs" # if the PR branch starts with docs/ 124 | actions: 125 | label: 126 | add: ["documentation"] 127 | - name: Feature label 128 | conditions: 129 | - "head~=(?i)^feat(ure)?" # if the PR branch starts with feat(ure)?/ 130 | actions: 131 | label: 132 | add: ["feature"] 133 | - name: Chore label 134 | conditions: 135 | - "head~=(?i)^chore" # if the PR branch starts with chore/ 136 | actions: 137 | label: 138 | add: ["update"] 139 | - name: Question label 140 | conditions: 141 | - "head~=(?i)^question" # if the PR branch starts with question/ 142 | actions: 143 | label: 144 | add: ["question"] 145 | - name: Test label 146 | conditions: 147 | - "head~=(?i)^test" # if the PR branch starts with test/ 148 | actions: 149 | label: 150 | add: ["test"] 151 | - name: Idea label 152 | conditions: 153 | - "head~=(?i)^idea" # if the PR branch starts with idea/ 154 | actions: 155 | label: 156 | add: ["idea"] 157 | 158 | # =============================================================================== 159 | # CONTRIBUTORS 160 | # =============================================================================== 161 | 162 | - name: Welcome New Contributors 163 | conditions: 164 | - and: 165 | - author!=dependabot[bot] 166 | - author!=mergify[bot] 167 | - author!=mrz1836 168 | - author!=rohenaz 169 | actions: 170 | comment: 171 | message: Welcome to our open-source project! 💘 172 | 173 | # =============================================================================== 174 | # STALE BRANCHES 175 | # =============================================================================== 176 | 177 | - name: Close stale pull request 178 | conditions: 179 | - base=master 180 | - -closed 181 | - updated-at<21 days ago 182 | actions: 183 | close: 184 | message: | 185 | This pull request looks stale. Feel free to reopen it if you think it's a mistake. 186 | label: 187 | add: [ "stale" ] 188 | 189 | # =============================================================================== 190 | # BRANCHES 191 | # =============================================================================== 192 | 193 | - name: Delete head branch after merge 194 | conditions: 195 | - merged 196 | actions: 197 | delete_head_branch: 198 | 199 | # =============================================================================== 200 | # CONVENTION 201 | # =============================================================================== 202 | # https://www.conventionalcommits.org/en/v1.0.0/ 203 | # Premium feature only 204 | 205 | #- name: Conventional Commit 206 | # conditions: 207 | # - "title~=^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\\(.+\\))?:" 208 | # actions: 209 | # post_check: 210 | # title: | 211 | # {% if check_succeed %} 212 | # Title follows Conventional Commit 213 | # {% else %} 214 | # Title does not follow Conventional Commit 215 | # {% endif %} 216 | # summary: | 217 | # {% if not check_succeed %} 218 | # Your pull request title must follow [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/). 219 | # {% endif %} 220 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ master ] 17 | pull_request: 18 | # The branches below must be a subset of the branches above 19 | branches: [ master ] 20 | schedule: 21 | - cron: '34 10 * * 3' 22 | 23 | jobs: 24 | analyze: 25 | name: Analyze 26 | runs-on: ubuntu-latest 27 | permissions: 28 | actions: read 29 | contents: read 30 | security-events: write 31 | 32 | strategy: 33 | fail-fast: false 34 | matrix: 35 | language: [ 'javascript' ] 36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] 37 | # Learn more: 38 | # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed 39 | 40 | steps: 41 | - name: Checkout repository 42 | uses: actions/checkout@v4 43 | 44 | # Initializes the CodeQL tools for scanning. 45 | - name: Initialize CodeQL 46 | uses: github/codeql-action/init@v3 47 | with: 48 | languages: ${{ matrix.language }} 49 | # If you wish to specify custom queries, you can do so here or in a config file. 50 | # By default, queries listed here will override any specified in a config file. 51 | # Prefix the list here with "+" to use these queries and those in the config file. 52 | # queries: ./path/to/local/query, your-org/your-repo/queries@main 53 | 54 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 55 | # If this step fails, then you should remove it and run the build manually (see below) 56 | - name: Autobuild 57 | uses: github/codeql-action/autobuild@v3 58 | 59 | # ℹ️ Command-line programs to run using the OS shell. 60 | # 📚 https://git.io/JvXDl 61 | 62 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines 63 | # and modify them (or add more) to build your code if your project 64 | # uses a compiled language 65 | 66 | #- run: | 67 | # make bootstrap 68 | # make release 69 | 70 | - name: Perform CodeQL Analysis 71 | uses: github/codeql-action/analyze@v3 72 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | # From: https://goreleaser.com/ci/actions/#usage 2 | name: release 3 | 4 | env: 5 | GO111MODULE: on 6 | 7 | on: 8 | push: 9 | tags: 10 | - '*' 11 | 12 | permissions: 13 | contents: write 14 | 15 | jobs: 16 | goreleaser: 17 | runs-on: ubuntu-latest 18 | steps: 19 | - name: Checkout 20 | uses: actions/checkout@v4 21 | with: 22 | fetch-depth: 0 23 | - uses: actions/setup-node@v4 24 | with: 25 | node-version: '14' 26 | cache: 'npm' 27 | - name: Install package deps 28 | run: make ci 29 | - name: Set up Go 30 | uses: actions/setup-go@v5 31 | with: 32 | go-version: 1.17 33 | - name: Run GoReleaser 34 | uses: goreleaser/goreleaser-action@v6.3.0 35 | with: 36 | distribution: goreleaser 37 | version: latest 38 | args: release --rm-dist --debug 39 | env: 40 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 41 | -------------------------------------------------------------------------------- /.github/workflows/sync-labels.yml: -------------------------------------------------------------------------------- 1 | # Workflow: https://github.com/micnncim/action-label-syncer 2 | # Export your labels: https://github.com/micnncim/label-exporter 3 | name: sync-labels 4 | on: 5 | push: 6 | branches: 7 | - master 8 | paths: 9 | - .github/labels.yml 10 | jobs: 11 | sync-labels: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v4 15 | - uses: micnncim/action-label-syncer@v1.3.0 16 | env: 17 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 18 | with: 19 | manifest: .github/labels.yml 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | firebase-debug.log* 8 | 9 | # Firebase cache 10 | .firebase/ 11 | .firebase 12 | .firebaserc 13 | 14 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 15 | .grunt 16 | 17 | # Bower dependency directory (https://bower.io/) 18 | bower_components 19 | 20 | # Dependency directories 21 | node_modules/ 22 | 23 | # Optional npm cache directory 24 | .npm 25 | 26 | # Optional eslint cache 27 | .eslintcache 28 | 29 | # Optional REPL history 30 | .node_repl_history 31 | 32 | # Output of 'npm pack' 33 | *.tgz 34 | 35 | # Yarn Integrity file 36 | .yarn-integrity 37 | 38 | # dotenv environment variables file 39 | .env 40 | 41 | # WebStorm 42 | .idea 43 | .DS_Store 44 | todo.md 45 | 46 | # Deployment 47 | release 48 | packaged.yaml 49 | -------------------------------------------------------------------------------- /.goreleaser.yml: -------------------------------------------------------------------------------- 1 | # Make sure to check the documentation at http://goreleaser.com 2 | # --------------------------- 3 | # General 4 | # --------------------------- 5 | before: 6 | hooks: 7 | - make test 8 | snapshot: 9 | name_template: "{{ .Tag }}" 10 | dist: release 11 | changelog: 12 | sort: asc 13 | filters: 14 | exclude: 15 | - '^.github:' 16 | - '^.vscode:' 17 | - '^test:' 18 | 19 | # --------------------------- 20 | # Publishers 21 | # --------------------------- 22 | # publishers: 23 | # - name: "Publish GoDocs" 24 | # cmd: make godocs 25 | 26 | # --------------------------- 27 | # Builder 28 | # --------------------------- 29 | build: 30 | skip: true 31 | 32 | # --------------------------- 33 | # Github Release 34 | # --------------------------- 35 | release: 36 | prerelease: true 37 | name_template: "Release v{{.Version}}" 38 | 39 | # --------------------------- 40 | # Announce 41 | # --------------------------- 42 | announce: 43 | 44 | # See more at: https://goreleaser.com/customization/announce/#slack 45 | slack: 46 | enabled: false 47 | message_template: '{{ .ProjectName }} {{ .Tag }} is out! Changelog: https://github.com/BitcoinSchema/{{ .ProjectName }}/releases/tag/{{ .Tag }}' 48 | channel: '#test_slack' 49 | # username: '' 50 | # icon_emoji: '' 51 | # icon_url: '' 52 | 53 | # See more at: https://goreleaser.com/customization/announce/#twitter 54 | twitter: 55 | enabled: false 56 | message_template: '{{ .ProjectName }} {{ .Tag }} is out!' 57 | 58 | # See more at: https://goreleaser.com/customization/announce/#discord 59 | discord: 60 | enabled: false 61 | message_template: '{{ .ProjectName }} {{ .Tag }} is out!' 62 | # Defaults to `GoReleaser` 63 | author: '' 64 | # Defaults to `3888754` - the grey-ish from goreleaser 65 | color: '' 66 | # Defaults to `https://goreleaser.com/static/avatar.png` 67 | icon_url: '' 68 | 69 | # See more at: https://goreleaser.com/customization/announce/#reddit 70 | reddit: 71 | enabled: false 72 | # Application ID for Reddit Application 73 | application_id: "" 74 | # Username for your Reddit account 75 | username: "" 76 | # Defaults to `{{ .GitURL }}/releases/tag/{{ .Tag }}` 77 | # url_template: 'https://github.com/BitcoinSchema/{{ .ProjectName }}/releases/tag/{{ .Tag }}' 78 | # Defaults to `{{ .ProjectName }} {{ .Tag }} is out!` 79 | title_template: '{{ .ProjectName }} {{ .Tag }} is out!' 80 | -------------------------------------------------------------------------------- /.make/aws.mk: -------------------------------------------------------------------------------- 1 | ## Default region for the application 2 | ifndef AWS_REGION 3 | override AWS_REGION=us-east-1 4 | export AWS_REGION 5 | endif 6 | 7 | ## Set capabilities for the sam deploy option 8 | ifndef IAM_CAPABILITIES 9 | override IAM_CAPABILITIES="CAPABILITY_IAM" 10 | export IAM_CAPABILITIES 11 | endif 12 | 13 | ## Raw cloud formation template for the application 14 | ifndef TEMPLATE_RAW 15 | override TEMPLATE_RAW=application.yaml 16 | export TEMPLATE_RAW 17 | endif 18 | 19 | ## Packaged cloud formation template 20 | ifndef TEMPLATE_PACKAGED 21 | override TEMPLATE_PACKAGED=packaged.yaml 22 | export TEMPLATE_PACKAGED 23 | endif 24 | 25 | ## Set if defined (alias variable for ease of use) 26 | ifdef tags 27 | override AWS_TAGS=$(tags) 28 | export AWS_TAGS 29 | endif 30 | 31 | ## Set if defined (alias variable for ease of use) 32 | ifdef bucket 33 | override APPLICATION_BUCKET=$(bucket) 34 | export APPLICATION_BUCKET 35 | endif 36 | 37 | ## Set if defined (alias variable for ease of use) 38 | ifdef domain 39 | override APPLICATION_DOMAIN_NAME=$(domain) 40 | export APPLICATION_DOMAIN_NAME 41 | endif 42 | 43 | ## Set if defined (alias variable for ease of use) 44 | ifdef stage 45 | override APPLICATION_STAGE_NAME=$(stage) 46 | export APPLICATION_STAGE_NAME 47 | endif 48 | 49 | ## Set if defined (alias variable for ease of use) 50 | ifdef feature 51 | override APPLICATION_FEATURE_NAME=$(feature) 52 | export APPLICATION_FEATURE_NAME 53 | endif 54 | 55 | aws-param-zone: ## Returns the ssm location for the host zone id 56 | @test $(domain) 57 | @echo "/$(domain)/zone_id" 58 | 59 | aws-param-certificate: ## Returns the ssm location for the domain ssl certificate id 60 | @test $(domain) 61 | @echo "/$(domain)/certificate_id" 62 | 63 | create-env-key: ## Creates a new key in KMS for a new stage 64 | @test $(APPLICATION_NAME) 65 | @test $(APPLICATION_STAGE_NAME) 66 | @$(eval kms_key_id := $(shell aws kms create-key --description "Used to encrypt environment variables for $(APPLICATION_NAME)" --query 'KeyMetadata.KeyId' --output text)) 67 | @aws kms enable-key-rotation --key-id $(kms_key_id) 68 | @$(eval param_location := $(shell $(MAKE) env-key-location app=$(APPLICATION_NAME) stage=$(APPLICATION_STAGE_NAME) )) 69 | @aws kms create-alias --alias-name "alias/$(APPLICATION_NAME)/$(APPLICATION_STAGE_NAME)" --target-key-id $(kms_key_id) 70 | @$(MAKE) save-param param_name="$(param_location)" param_value=$(kms_key_id) 71 | @echo "Saved parameter: $(param_location) with key id: $(kms_key_id)" 72 | 73 | create-secret: ## Creates an secret into AWS SecretsManager 74 | @# Example: make create-secret name='production/test' description='This is a test' secret_value='{\"Key\":\"my_key\",\"Another\":\"value\"}' kms_key_id=b329... 75 | @test "$(name)" 76 | @test "$(description)" 77 | @test "$(secret_value)" 78 | @test $(kms_key_id) 79 | @aws secretsmanager create-secret \ 80 | --name "$(name)" \ 81 | --description "$(description)" \ 82 | --kms-key-id $(kms_key_id) \ 83 | --secret-string "$(secret_value)" 84 | 85 | decrypt: ## Decrypts data using a KMY Key ID (awscli v2) 86 | @# Example: make decrypt decrypt_value=AQICAHgrSMx+3O7... 87 | @test "$(decrypt_value)" 88 | @aws kms decrypt --ciphertext-blob "$(decrypt_value)" --output text --query Plaintext | base64 --decode 89 | 90 | decrypt-deprecated: ## Decrypts data using a KMY Key ID (awscli v1) 91 | @# Example: make decrypt decrypt_value=AQICAHgrSMx+3O7... 92 | @test "$(decrypt_value)" 93 | @echo $(decrypt_value) | base64 --decode >> tempfile 94 | @aws kms decrypt --ciphertext-blob fileb://tempfile --output text --query Plaintext | base64 --decode 95 | @rm -rf tempfile 96 | 97 | env-key-location: ## Returns the environment encryption key location 98 | @test $(app) 99 | @test $(stage) 100 | @echo "/$(app)/$(stage)/kms_key_id" 101 | 102 | encrypt: ## Encrypts data using a KMY Key ID (awscli v2) 103 | @# Example make encrypt kms_key_id=b329... encrypt_value=YourSecret 104 | @test $(kms_key_id) 105 | @test "$(encrypt_value)" 106 | @aws kms encrypt --output text --query CiphertextBlob --key-id $(kms_key_id) --plaintext "$(shell echo "$(encrypt_value)" | base64)" 107 | 108 | invalidate-cache: ## Invalidates a cloudfront cache based on path 109 | @test $(APPLICATION_DISTRIBUTION_ID) 110 | @aws cloudfront create-invalidation --distribution-id $(APPLICATION_DISTRIBUTION_ID) --paths "/*" 111 | 112 | package: ## Process the CF template and prepare for deployment 113 | @SAM_CLI_TELEMETRY=0 sam package \ 114 | --template-file $(TEMPLATE_RAW) \ 115 | --output-template-file $(TEMPLATE_PACKAGED) \ 116 | --s3-bucket $(APPLICATION_BUCKET) \ 117 | --s3-prefix $(APPLICATION_BUCKET_PREFIX) \ 118 | --region $(AWS_REGION) 119 | 120 | save-domain-info: ## Saves the zone id and the ssl id for use by CloudFormation 121 | @test $(domain) 122 | @test $(zone_id) 123 | @test $(certificate_id) 124 | @$(MAKE) save-param param_name="/$(domain)/zone_id" param_value=$(zone_id) 125 | @$(MAKE) save-param param_name="/$(domain)/certificate_id" param_value=$(certificate_id) 126 | 127 | save-param: ## Saves a plain-text string parameter in SSM 128 | @# Example: make save-param param_name='test' param_value='This is a test' 129 | @test "$(param_value)" 130 | @test "$(param_name)" 131 | @aws ssm put-parameter --name "$(param_name)" --value "$(param_value)" --type String --overwrite 132 | 133 | save-param-encrypted: ## Saves an encrypted string value as a parameter in SSM 134 | @# Example: make save-param-encrypted param_name='test' param_value='This is a test' kms_key_id=b329... 135 | @test "$(param_value)" 136 | @test "$(param_name)" 137 | @test $(kms_key_id) 138 | @aws ssm put-parameter \ 139 | --type String \ 140 | --overwrite \ 141 | --name "$(param_name)" \ 142 | --value "$(shell $(MAKE) encrypt kms_key_id=$(kms_key_id) encrypt_value="$(param_value)")" 143 | 144 | upload-files: ## Upload/puts files into S3 bucket 145 | @test "$(source)" 146 | @test "$(destination)" 147 | @test $(APPLICATION_BUCKET) 148 | @aws s3 cp $(source) s3://$(APPLICATION_BUCKET)/$(destination) --recursive 149 | 150 | update-secret: ## Updates an existing secret in AWS SecretsManager 151 | @# Example: make update-secret name='production/test' secret_value='{\"Key\":\"my_key\",\"Another\":\"value\"}' 152 | @test "$(name)" 153 | @test "$(secret_value)" 154 | @aws secretsmanager update-secret \ 155 | --secret-id "$(name)" \ 156 | --secret-string "$(secret_value)" 157 | 158 | teardown: ## Deletes the entire stack 159 | @test $(APPLICATION_STACK_NAME) 160 | @aws cloudformation delete-stack --stack-name $(APPLICATION_STACK_NAME) 161 | -------------------------------------------------------------------------------- /.make/common.mk: -------------------------------------------------------------------------------- 1 | ## Default repository domain name 2 | ifndef GIT_DOMAIN 3 | override GIT_DOMAIN=github.com 4 | endif 5 | 6 | ## Set if defined (alias variable for ease of use) 7 | ifdef branch 8 | override REPO_BRANCH=$(branch) 9 | export REPO_BRANCH 10 | endif 11 | 12 | ## Do we have git available? 13 | HAS_GIT := $(shell command -v git 2> /dev/null) 14 | 15 | ifdef HAS_GIT 16 | ## Do we have a repo? 17 | HAS_REPO := $(shell git rev-parse --is-inside-work-tree 2> /dev/null) 18 | ifdef HAS_REPO 19 | ## Automatically detect the repo owner and repo name (for local use with Git) 20 | REPO_NAME=$(shell basename "$(shell git rev-parse --show-toplevel 2> /dev/null)") 21 | REPO_OWNER=$(shell git config --get remote.origin.url | sed 's/git@$(GIT_DOMAIN)://g' | sed 's/\/$(REPO_NAME).git//g') 22 | VERSION_SHORT=$(shell git describe --tags --always --abbrev=0) 23 | export REPO_NAME, REPO_OWNER, VERSION_SHORT 24 | endif 25 | endif 26 | 27 | ## Set the distribution folder 28 | ifndef DISTRIBUTIONS_DIR 29 | override DISTRIBUTIONS_DIR=./dist 30 | endif 31 | export DISTRIBUTIONS_DIR 32 | 33 | help: ## Show this help message 34 | @egrep -h '^(.+)\:\ ##\ (.+)' ${MAKEFILE_LIST} | column -t -c 2 -s ':#' 35 | 36 | release:: ## Full production release (creates release in Github) 37 | @test $(github_token) 38 | @export GITHUB_TOKEN=$(github_token) && goreleaser --rm-dist 39 | 40 | release-test: ## Full production test release (everything except deploy) 41 | @goreleaser --skip-publish --rm-dist 42 | 43 | release-snap: ## Test the full release (build binaries) 44 | @goreleaser --snapshot --skip-publish --rm-dist 45 | 46 | replace-version: ## Replaces the version in HTML/JS (pre-deploy) 47 | @test $(version) 48 | @test "$(path)" 49 | @find $(path) -name "*.html" -type f -exec sed -i '' -e "s/{{version}}/$(version)/g" {} \; 50 | @find $(path) -name "*.js" -type f -exec sed -i '' -e "s/{{version}}/$(version)/g" {} \; 51 | 52 | tag: ## Generate a new tag and push (tag version=0.0.0) 53 | @test $(version) 54 | @git tag -a v$(version) -m "Pending full release..." 55 | @git push origin v$(version) 56 | @git fetch --tags -f 57 | 58 | tag-remove: ## Remove a tag if found (tag-remove version=0.0.0) 59 | @test $(version) 60 | @git tag -d v$(version) 61 | @git push --delete origin v$(version) 62 | @git fetch --tags 63 | 64 | tag-update: ## Update an existing tag to current commit (tag-update version=0.0.0) 65 | @test $(version) 66 | @git push --force origin HEAD:refs/tags/v$(version) 67 | @git fetch --tags -f 68 | 69 | update-releaser: ## Update the goreleaser application 70 | @brew update 71 | @brew upgrade goreleaser 72 | -------------------------------------------------------------------------------- /.make/firebase.mk: -------------------------------------------------------------------------------- 1 | 2 | firebase-param-app-id: ## Returns the location of the app_id parameter in SSM 3 | @$(MAKE) firebase-param-location app=$(app) stage=$(stage) param=app_id 4 | 5 | firebase-param-sender-id: ## Returns the location of the sender_id parameter in SSM 6 | @$(MAKE) firebase-param-location app=$(app) stage=$(stage) param=sender_id 7 | 8 | firebase-param-project: ## Returns the location of the project-id parameter in SSM 9 | @$(MAKE) firebase-param-location app=$(app) stage=$(stage) param=project 10 | 11 | firebase-param-location: ## Creates a parameter location (for Firebase details in SSM) 12 | @test $(app) 13 | @test $(stage) 14 | @test $(param) 15 | @echo "/$(app)/$(stage)/firebase/$(param)" 16 | 17 | firebase-save-project: ## Saves the firebase project information for use by CloudFormation 18 | @test $(APPLICATION_NAME) 19 | @test $(APPLICATION_STAGE_NAME) 20 | @test $(project) 21 | @test $(sender_id) 22 | @test $(app_id) 23 | @$(MAKE) save-param param_name="$(shell $(MAKE) firebase-param-project app=$(APPLICATION_NAME) stage=$(APPLICATION_STAGE_NAME))" param_value=$(project) 24 | @$(MAKE) save-param param_name="$(shell $(MAKE) firebase-param-sender-id app=$(APPLICATION_NAME) stage=$(APPLICATION_STAGE_NAME))" param_value=$(sender_id) 25 | @$(MAKE) save-param param_name="$(shell $(MAKE) firebase-param-app-id app=$(APPLICATION_NAME) stage=$(APPLICATION_STAGE_NAME))" param_value=$(app_id) 26 | 27 | firebase-deploy-simple: ## Deploys to firebase with limited flags 28 | @test "$(project)" 29 | @test "$(token)" 30 | @firebase deploy --project $(project) --token $(token) 31 | 32 | firebase-update: ## Update the firebase tools 33 | @npm i -g firebase-tools 34 | 35 | firebase-set-env: ## Set an environment variable in a firebase project 36 | @test "$(key)" 37 | @test "$(value)" 38 | @firebase functions:config:set $(key)="$(value)" 39 | 40 | firebase-get-env: ## Gets the current environment variables in the associated project 41 | @firebase functions:config:get 42 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Open BSV License 2 | Copyright (c) 2019 BitCoin Schema 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | 1 - The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 2 - The Software, and any software that is derived from the Software or parts thereof, 14 | can only be used on the Bitcoin SV blockchains. The Bitcoin SV blockchains are defined, 15 | for purposes of this license, as the Bitcoin blockchain containing block height #556767 16 | with the hash "000000000000000001d956714215d96ffc00e0afda4cd0a96c96f8d802b1662b" and 17 | the test blockchains that are supported by the un-modified Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Common makefile commands & variables between projects 2 | include .make/common.mk 3 | 4 | # Common aws commands & variables between projects 5 | include .make/aws.mk 6 | 7 | # Common firebase commands & variables between projects 8 | include .make/firebase.mk 9 | 10 | ## Stage or environment for the application 11 | ifndef APPLICATION_STAGE_NAME 12 | override APPLICATION_STAGE_NAME="production" 13 | endif 14 | 15 | ## Tags for the application in AWS 16 | ifndef AWS_TAGS 17 | override AWS_TAGS="Stage=$(APPLICATION_STAGE_NAME) Product=bitcoinschema" 18 | endif 19 | 20 | ## Default S3 bucket (already exists) to store distribution files 21 | ifndef APPLICATION_BUCKET 22 | override APPLICATION_BUCKET="cloudformation-distribution-raw-files" 23 | endif 24 | 25 | ## Application name (the name of the application, lowercase, no spaces) 26 | ifndef APPLICATION_NAME 27 | override APPLICATION_NAME="bitcoinschema" 28 | endif 29 | 30 | ## Cloud formation stack name (combines the app name with the stage for unique stacks) 31 | ifndef APPLICATION_STACK_NAME 32 | override APPLICATION_STACK_NAME=$(subst _,-,"$(APPLICATION_NAME)-$(APPLICATION_STAGE_NAME)") 33 | endif 34 | 35 | ## Application feature name (if it's a feature branch of a stage) (feature="some-feature") 36 | ifdef APPLICATION_FEATURE_NAME 37 | override APPLICATION_STACK_NAME=$(subst _,-,"$(APPLICATION_NAME)-$(APPLICATION_STAGE_NAME)-$(APPLICATION_FEATURE_NAME)") 38 | endif 39 | 40 | ## S3 prefix to store the distribution files 41 | ifndef APPLICATION_BUCKET_PREFIX 42 | override APPLICATION_BUCKET_PREFIX=$(APPLICATION_STACK_NAME) 43 | endif 44 | 45 | ## Set the distribution folder 46 | ifndef DISTRIBUTIONS_DIR 47 | override DISTRIBUTIONS_DIR=./release 48 | endif 49 | 50 | ## Not defined? Use default repo name which is the application 51 | ifeq ($(REPO_NAME),) 52 | REPO_NAME="schema" 53 | endif 54 | 55 | ## Not defined? Use default repo owner 56 | ifeq ($(REPO_OWNER),) 57 | REPO_OWNER="BitcoinSchema" 58 | endif 59 | 60 | ## Default branch 61 | ifndef REPO_BRANCH 62 | override REPO_BRANCH="master" 63 | endif 64 | 65 | .PHONY: clean release test 66 | 67 | audit: ## Checks for vulnerabilities in dependencies 68 | @npm audit 69 | 70 | build: ## Builds the package for web distribution 71 | @npm run build 72 | 73 | ci: ## Installs the dependencies for the package using CI 74 | @npm ci 75 | 76 | clean: ## Remove previous builds and any test cache data 77 | @npm run clean 78 | @if [ -d $(DISTRIBUTIONS_DIR) ]; then rm -r $(DISTRIBUTIONS_DIR); fi 79 | @if [ -d build ]; then rm -r build; fi 80 | @if [ -d build_cache ]; then rm -r build_cache; fi 81 | @if [ -d node_modules ]; then rm -r node_modules; fi 82 | 83 | deploy: ## Build, prepare and deploy 84 | @$(MAKE) package 85 | @sam deploy \ 86 | --template-file $(TEMPLATE_PACKAGED) \ 87 | --stack-name $(APPLICATION_STACK_NAME) \ 88 | --region $(AWS_REGION) \ 89 | --parameter-overrides ApplicationName=$(APPLICATION_NAME) \ 90 | ApplicationStackName=$(APPLICATION_STACK_NAME) \ 91 | ApplicationStageName=$(APPLICATION_STAGE_NAME) \ 92 | ApplicationBucket=$(APPLICATION_BUCKET) \ 93 | RepoOwner=$(REPO_OWNER) \ 94 | RepoName=$(REPO_NAME) \ 95 | RepoBranch=$(REPO_BRANCH) \ 96 | FirebaseProject="$(shell $(MAKE) firebase-param-project \ 97 | app=$(APPLICATION_NAME) \ 98 | stage=$(APPLICATION_STAGE_NAME))" \ 99 | FirebaseAppId="$(shell $(MAKE) firebase-param-app-id \ 100 | app=$(APPLICATION_NAME) \ 101 | stage=$(APPLICATION_STAGE_NAME))" \ 102 | FirebaseSenderId="$(shell $(MAKE) firebase-param-sender-id \ 103 | app=$(APPLICATION_NAME) \ 104 | stage=$(APPLICATION_STAGE_NAME))" \ 105 | EncryptionKeyId="$(shell $(MAKE) env-key-location \ 106 | app=$(APPLICATION_NAME) \ 107 | stage=$(APPLICATION_STAGE_NAME))" \ 108 | --capabilities $(IAM_CAPABILITIES) \ 109 | --tags $(AWS_TAGS) \ 110 | --no-fail-on-empty-changeset \ 111 | --no-confirm-changeset 112 | 113 | install: ## Installs the dependencies for the package 114 | @npm install 115 | 116 | lint: ## Runs the standard-js lint tool 117 | @npm run lint 118 | 119 | outdated: ## Checks for outdated packages via npm 120 | @npm outdated 121 | 122 | save-secrets: ## Helper for saving sensitive credentials to Secrets Manager 123 | @# Example: make save-secrets github_token=12345... firebase_token=12345... firebase_api_key=12345... kms_key_id=b329... stage= 124 | @test "$(firebase_token)" 125 | @test $(firebase_api_key) 126 | @test $(github_token) 127 | @test $(kms_key_id) 128 | 129 | @$(eval firebase_api_key_encrypted := $(shell $(MAKE) encrypt kms_key_id=$(kms_key_id) encrypt_value="$(firebase_api_key)")) 130 | @$(eval firebase_token_encrypted := $(shell $(MAKE) encrypt kms_key_id=$(kms_key_id) encrypt_value="$(firebase_token)")) 131 | @$(eval secret_value := $(shell echo '{' \ 132 | '\"github_personal_token\":\"$(github_token)\"' \ 133 | ',\"firebase_token_encrypted\":\"$(firebase_token_encrypted)\"' \ 134 | ',\"firebase_api_key_encrypted\":\"$(firebase_api_key_encrypted)\"' \ 135 | '}')) 136 | 137 | @$(eval existing_secret := $(shell aws secretsmanager describe-secret --secret-id "$(APPLICATION_STAGE_NAME)/$(APPLICATION_NAME)" --output text)) 138 | @if [ '$(existing_secret)' = "" ]; then\ 139 | echo "Creating a new secret..."; \ 140 | $(MAKE) create-secret \ 141 | name="$(APPLICATION_STAGE_NAME)/$(APPLICATION_NAME)" \ 142 | description="Sensitive credentials for $(APPLICATION_NAME):$(APPLICATION_STAGE_NAME)" \ 143 | secret_value='$(secret_value)' \ 144 | kms_key_id=$(kms_key_id); \ 145 | else\ 146 | echo "Updating an existing secret..."; \ 147 | $(MAKE) update-secret \ 148 | name="$(APPLICATION_STAGE_NAME)/$(APPLICATION_NAME)" \ 149 | secret_value='$(secret_value)'; \ 150 | fi 151 | 152 | start: ## Start the documentation site 153 | @npm run start 154 | 155 | test: ## Runs all tests 156 | @npm run test 157 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BitCoin [Schema](https://bitcoinschema.org) 2 | > Community driven extensible schemas that enable developers to create interoperable data based applications. View [schema in action](https://map.sv/). 3 | 4 | [![last commit](https://img.shields.io/github/last-commit/bitcoinschema/schema.svg?style=flat)](https://github.com/bitcoinschema/schema/commits/master) 5 | [![version](https://img.shields.io/github/release-pre/bitcoinschema/schema.svg?style=flat)](https://github.com/bitcoinschema/schema/releases) 6 | [![license](https://img.shields.io/badge/license-Open%20BSV-brightgreen.svg?style=flat)](/LICENSE) 7 | [![app health](https://img.shields.io/website-up-down-green-red/https/bitcoinschema.org.svg?label=status&v=1)](https://bitcoinschema.org) 8 |
9 | [![Mergify Status](https://img.shields.io/endpoint.svg?url=https://api.mergify.com/v1/badges/BitcoinSchema/schema&style=flat&v=3)](https://mergify.io) 10 | [![Sponsor](https://img.shields.io/badge/sponsor-BitcoinSchema-181717.svg?logo=github&style=flat&v=1)](https://github.com/sponsors/BitcoinSchema) 11 | [![slack](https://img.shields.io/badge/slack-schema-blue.svg?style=flat)](https://atlantistic.slack.com/app_redirect?channel=schema) 12 | 13 | ## Table of Contents 14 | - [About](#about) 15 | - [Installation](#installation) 16 | - [Deployment & Hosting](#deployment--hosting) 17 | - [Documentation](#documentation) 18 | - [Examples](#examples) 19 | - [Code Standards](#code-standards) 20 | - [Usage](#usage) 21 | - [Maintainers](#maintainers) 22 | - [Contributing](#contributing) 23 | - [Sponsors](#sponsors) 24 | - [License](#license) 25 | 26 | ## About 27 | Standing on the shoulders of giants, our idea was inspired by the [Schema.org](https://schema.org) project. 28 | `(more to come...) @Satchmo` 29 | 30 |
31 | 32 | ### What is Schema? 33 | [Read more here](https://bitcoinschema.org) 34 | 35 |
36 | 37 | ## Installation 38 | This project uses [gulp](https://gulpjs.com/) for workflow automation and [docsify](https://docsify.js.org) for the documentation generation and hosting. 39 | 40 | Install all npm packages 41 | ```bash 42 | $ make install 43 | ``` 44 | 45 | Serve the documentation via `localhost:port` e.g. `http://localhost:4000` 46 | ```bash 47 | $ make start 48 | ``` 49 | 50 | See more scripts in the [package.json](package.json) file or the [makefile](Makefile). 51 | 52 |
53 | 54 | ### Deployment & Hosting 55 | This repository has CI integration using [AWS CodePipeline](https://aws.amazon.com/codepipeline/). 56 | 57 | The build in AWS will deploy to [firebase](https://firebase.google.com). 58 | 59 | The actual build process can be found in the [buildspec.yml](buildspec.yml) file. 60 | 61 | The application relies on [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/) 62 | and [AWS SSM](https://aws.amazon.com/systems-manager/features/) to store environment variables. 63 | Sensitive environment variables are encrypted using [AWS KMS](https://aws.amazon.com/kms/) and then decrypted at runtime. 64 | 65 | Deploy different environments by changing the `` to `production` or `development` as example. 66 | The default stage is `production` if it's not specified. 67 | 68 |
69 | Firebase Hosting Setup 70 |
71 | 72 | 1) Start a new project and assign a CNAME 73 | 2) Make sure the region is us-central 74 | 3) Generate a CI `firebase_token` using the command: `firebase login:ci` 75 |
76 | 77 |
78 | Create Environment Encryption Key(s) (AWS) 79 |
80 | 81 | Create a `KMS Key` per `` for your application(s) to encrypt environment variables 82 | ```shell script 83 | make create-env-key stage="" 84 | ``` 85 | 86 | This will also store the `kms_key_id` in [SSM](https://aws.amazon.com/systems-manager/features/) located at: `///kms_key_id` 87 | 88 |
89 | 90 |
91 | Manage Environment Variables (AWS) 92 |
93 | 94 | - `app_id` is the Firebase application id for the [project](https://firebase.google.com/docs/projects/learn-more) 95 | - `project` is the [Firebase project_id](https://firebase.google.com/docs/projects/learn-more) 96 | - `sender_id` is the Firebase sender_id for the [project](https://firebase.google.com/docs/projects/learn-more) 97 | 98 | Add or update your project information _(all parameters are required)_ 99 | ```shell script 100 | make firebase-save-project \ 101 | app_id="YOUR_APP_ID" \ 102 | project="YOUR_PROJECT_ID" \ 103 | sender_id="YOUR_SENDER_ID" \ 104 | stage=""; 105 | ``` 106 |
107 | 108 |
109 | Manage Environment Secrets (AWS) 110 |
111 | 112 | - `firebase_api_key` is found in the Firebase console for that specific project 113 | - `firebase_token` is the `ci:login` token that is generated from `firebase login:ci` 114 | - `github_token` is a personal token with access to make a webhook 115 | - `kms_key_id` is from the previous step (Create Environment Encryption Keys) 116 | 117 | Add or update your secrets _(all parameters are required)_ 118 | ```shell script 119 | make save-secrets \ 120 | firebase_api_key="YOUR_FIREBASE_API_KEY" \ 121 | firebase_token="YOUR_FIREBASE_CI_TOKEN" \ 122 | github_token="YOUR_GITHUB_TOKEN" \ 123 | kms_key_id="YOUR_KMS_KEY_ID" \ 124 | stage=""; 125 | ``` 126 |
127 | 128 |
129 | Create CI Environment (AWS) 130 |
131 | 132 | infrastructure diagram 133 | 134 | **Prerequisites** 135 | - [An AWS account](https://aws.amazon.com/) 136 | - _Deploying_ requires permission to: [KMS](https://aws.amazon.com/kms/), [SSM](https://aws.amazon.com/systems-manager/features/), [Secrets Manager](https://aws.amazon.com/secrets-manager/) and [Cloud Formation](https://aws.amazon.com/cloudformation/) 137 | - [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/installing.html) _(`brew install awscli`)_ 138 | - [SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install-mac.html) _(`brew tap aws/tap && brew install aws-sam-cli`)_ 139 | 140 | This will create a new [AWS CloudFormation](https://aws.amazon.com/cloudformation/) stack with: 141 | - (1) [CodePipeline](https://aws.amazon.com/codepipeline/) with multiple stages to deploy the application from Github 142 | - (1) [CodePipeline Webhook](https://aws.amazon.com/codepipeline/) to receive Github notifications from a specific `branch:name` 143 | - (1) [CodeBuild Project](https://docs.aws.amazon.com/codebuild/latest/userguide/create-project.html) to build and deploy the app 144 | - (2) [Service Roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-service.html) for working with CodeBuild and CodePipeline 145 | 146 | **NOTE:** Requires an existing S3 bucket for artifacts and sam-cli deployments (located in the [Makefile](Makefile)) 147 | 148 | One command will build, test, package and deploy the application to AWS. 149 | After initial deployment, updating is as simple as committing to Github. 150 | ```shell script 151 | make deploy 152 | ``` 153 | 154 | _(Example)_ Customized deployment for another stage 155 | ```shell script 156 | make deploy stage="development" branch="development" 157 | ``` 158 | 159 | _(Example)_ Customized deployment for a feature branch 160 | ```shell script 161 | make deploy stage="development" branch="some-feature" feature="some-feature" 162 | ``` 163 | 164 | _(Example)_ Customized S3 bucket location 165 | ```shell script 166 | make deploy bucket="some-S3-bucket-location" 167 | ``` 168 | 169 | _(Example)_ Customized tags for the deployment 170 | ```shell script 171 | make deploy tags="MyTag=some-value AnotherTag=some-value" 172 | ``` 173 |
174 | 175 |
176 | Tear Down CI Environment (AWS) 177 |
178 | 179 | Remove the stack (using default stage: `production`) 180 | ```shell script 181 | make teardown 182 | ``` 183 | 184 | _(Example)_ Teardown another stack via stage 185 | ```shell script 186 | make teardown stage="development" 187 | ``` 188 | 189 | _(Example)_ Teardown a feature/branch stack 190 | ```shell script 191 | make teardown stage="development" feature="some-feature" 192 | ``` 193 |
194 | 195 |
196 | 197 | ## Documentation 198 | Visit [our live documentation](https://bitcoinschema.org) site. 199 | 200 |
201 | Release Deployment 202 |
203 | 204 | [goreleaser](https://github.com/goreleaser/goreleaser) for easy binary or library deployment to Github and can be installed via: `brew install goreleaser`. 205 | 206 | The [.goreleaser.yml](.goreleaser.yml) file is used to configure [goreleaser](https://github.com/goreleaser/goreleaser). 207 | 208 | Use `make release-snap` to create a snapshot version of the release, and finally `make release` to ship to production. 209 |
210 | 211 |
212 | Makefile Commands 213 |
214 | 215 | View all `makefile` commands 216 | ```shell script 217 | make help 218 | ``` 219 | 220 | List of all current commands: 221 | ```text 222 | audit Checks for vulnerabilities in dependencies 223 | aws-param-certificate Returns the ssm location for the domain ssl certificate id 224 | aws-param-zone Returns the ssm location for the host zone id 225 | build Builds the package for web distribution 226 | clean Remove previous builds and any test cache data 227 | create-env-key Creates a new key in KMS for a new stage 228 | create-secret Creates an secret into AWS SecretsManager 229 | decrypt Decrypts data using a KMY Key ID (awscli v2) 230 | decrypt-deprecated Decrypts data using a KMY Key ID (awscli v1) 231 | deploy Build, prepare and deploy 232 | encrypt Encrypts data using a KMY Key ID (awscli v2) 233 | env-key-location Returns the environment encryption key location 234 | firebase-deploy-simple Deploys to firebase with limited flags 235 | firebase-get-env Gets the current environment variables in the associated project 236 | firebase-param-app-id Returns the location of the app_id parameter in SSM 237 | firebase-param-location Creates a parameter location (for Firebase details in SSM) 238 | firebase-param-project Returns the location of the project-id parameter in SSM 239 | firebase-param-sender-id Returns the location of the sender_id parameter in SSM 240 | firebase-save-project Saves the firebase project information for use by CloudFormation 241 | firebase-set-env Set an environment variable in a firebase project 242 | firebase-update Update the firebase tools 243 | help Show this help message 244 | install Installs the dependencies for the package 245 | invalidate-cache Invalidates a cloudfront cache based on path 246 | lint Runs the standard-js lint tool 247 | outdated Checks for outdated packages via npm 248 | package Process the CF template and prepare for deployment 249 | release Full production release (creates release in Github) 250 | release-snap Test the full release (build binaries) 251 | release-test Full production test release (everything except deploy) 252 | replace-version Replaces the version in HTML/JS (pre-deploy) 253 | save-domain-info Saves the zone id and the ssl id for use by CloudFormation 254 | save-param Saves a plain-text string parameter in SSM 255 | save-param-encrypted Saves an encrypted string value as a parameter in SSM 256 | save-secrets Helper for saving sensitive credentials to Secrets Manager 257 | start Start the documentation site 258 | tag Generate a new tag and push (tag version=0.0.0) 259 | tag-remove Remove a tag if found (tag-remove version=0.0.0) 260 | tag-update Update an existing tag to current commit (tag-update version=0.0.0) 261 | teardown Deletes the entire stack 262 | test Runs all tests 263 | update-secret Updates an existing secret in AWS SecretsManager 264 | upload-files Upload/puts files into S3 bucket 265 | ``` 266 |
267 | 268 |
269 | 270 | ## Examples 271 | Websites or applications using Schema: 272 | - [map.sv](https://map.sv/?utm_source=github&utm_medium=sponsor-link&utm_campaign=schema&utm_term=schema&utm_content=schema) 273 | - [TonicPow](https://tonicpow.com/?utm_source=github&utm_medium=sponsor-link&utm_campaign=schema&utm_term=schema&utm_content=schema) 274 | 275 |
276 | 277 | ## Code Standards 278 | Please read our [standards document](.github/CODE_STANDARDS.md) 279 | 280 |
281 | 282 | ## Usage 283 | Here's the [getting started](https://bitcoinschema.org/) with schema 284 | 285 |
286 | 287 | ## Maintainers 288 | | [MrZ](https://github.com/mrz1836) | [Satchmo](https://github.com/rohenaz) | 289 | |:------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------:| 290 | | [MrZ](https://github.com/mrz1836) | [Satchmo](https://github.com/rohenaz) | 291 | 292 |
293 | 294 | ## Contributing 295 | Feel free to dive in! [Suggest a new schema](https://github.com/bitcoinschema/schema/issues/new/choose) or submit PRs. 296 | 297 | Open source tools that we used in this project: 298 | - [docsify](https://docsify.js.org) - A magical documentation site generator 299 | - [mythbusters js](https://github.com/Kikobeats/js-mythbusters) - Professional deployment of docsify 300 | 301 |
302 | 303 | ## Contributors 304 | Contribute today and join the team! 305 | 306 | | [MrZ](https://github.com/mrz1836) | [Satchmo](https://github.com/rohenaz) | 307 | |:------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------:| 308 | | [MrZ](https://github.com/mrz1836) | [Satchmo](https://github.com/rohenaz) | 309 | 310 |
311 | 312 | ## Sponsors 313 | Are you interested in becoming a sponsor of Schema? [Let us know!](https://github.com/bitcoinschema/schema/issues/new/choose) 314 | 315 | | [TonicPow](https://tonicpow.com/) | [MetaLens](https://metalens.app/) | [All Aboard](https://allaboardbitcoin.com) | 316 | |:----------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------:| 317 | | [TonicPow](https://tonicpow.com/) | [MetaLens](https://metalens.app/) | [All Aboard](https://allaboardbitcoin.com/) | 318 | 319 |
320 | 321 | ## License 322 | [![License](https://img.shields.io/badge/license-Open%20BSV-brightgreen.svg?style=flat)](/LICENSE) 323 | -------------------------------------------------------------------------------- /application.yaml: -------------------------------------------------------------------------------- 1 | # https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification-template-anatomy.html 2 | AWSTemplateFormatVersion: '2010-09-09' 3 | Transform: AWS::Serverless-2016-10-31 4 | Description: Serverless web app for the BitcoinSchema website deployment 5 | 6 | # More info about Parameters: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html 7 | Parameters: 8 | ApplicationName: 9 | Description: 'used to create the name of the application in cloud formation' 10 | Type: String 11 | AllowedPattern: '[a-zA-Z0-9-_]*' 12 | MinLength: 3 13 | MaxLength: 64 14 | ConstraintDescription: 'must be a valid application name' 15 | 16 | ApplicationStackName: 17 | Description: 'used to create the name of the stack in cloud formation' 18 | Type: String 19 | AllowedPattern: '[a-zA-Z0-9-_]*' 20 | MinLength: 3 21 | MaxLength: 64 22 | ConstraintDescription: 'must be a valid application stack name' 23 | 24 | ApplicationStageName: 25 | Description: 'used for the de-coupling based on environment (IE: prod)' 26 | Type: String 27 | AllowedPattern: '[a-zA-Z0-9-_]*' 28 | MaxLength: 16 29 | ConstraintDescription: 'must be a valid stage name (IE: dev, staging, prod)' 30 | 31 | ApplicationBucket: 32 | Type: String 33 | Description: 'Pre-existing S3 bucket that will store the application files for deployment' 34 | MinLength: 5 35 | AllowedPattern: '[A-Za-z0-9-_]+' 36 | ConstraintDescription: 'must be a valid s3 bucket location' 37 | 38 | EncryptionKeyId: 39 | Type: AWS::SSM::Parameter::Value 40 | Description: 'The ID of the KMS key used to decrypt environment variables' 41 | MinLength: 5 42 | 43 | RepoOwner: 44 | Type: String 45 | Description: 'the repository owner or username' 46 | MinLength: 2 47 | AllowedPattern: '[A-Za-z0-9-]+' 48 | ConstraintDescription: 'must be a valid repository username' 49 | 50 | RepoName: 51 | Type: String 52 | Description: 'the repository name' 53 | MinLength: 1 54 | AllowedPattern: '[A-Za-z0-9-_]+' 55 | ConstraintDescription: 'must be a valid repository name' 56 | 57 | RepoBranch: 58 | Type: String 59 | Description: 'the repository branch that will trigger automatic deployments' 60 | MinLength: 1 61 | AllowedPattern: '[A-Za-z0-9-_/]+' 62 | ConstraintDescription: 'must be a valid branch name' 63 | 64 | FirebaseProject: 65 | Type: AWS::SSM::Parameter::Value 66 | Description: 'the name of the project' 67 | MinLength: 5 68 | 69 | FirebaseSenderId: 70 | Type: AWS::SSM::Parameter::Value 71 | Description: 'this is the sender id supplied from Firebase for the project' 72 | MinLength: 5 73 | 74 | FirebaseAppId: 75 | Type: AWS::SSM::Parameter::Value 76 | Description: 'this is the app id supplied from Firebase for the project' 77 | MinLength: 5 78 | 79 | # More info about MetaData: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-template-publishing-applications-metadata-properties.html 80 | Metadata: 81 | AWS::ServerlessRepo::Application: 82 | Name: !Ref ApplicationStackName 83 | Description: 'Serverless app for the BitcoinSchema website deployment' 84 | Author: MrZ 85 | #ReadmeUrl: README.md 86 | Labels: ['bitcoinschema', 'bitcoin', 'schema'] 87 | HomePageUrl: !Sub 'https://github.com/${RepoOwner}/${RepoName}' 88 | SemanticVersion: '0.0.1' 89 | SourceCodeUrl: !Sub 'https://github.com/${RepoOwner}/${RepoName}' 90 | 91 | # More info about Resources: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification-resources-and-properties.html 92 | Resources: 93 | # https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codepipeline-pipeline.html 94 | CodePipeline: 95 | Type: AWS::CodePipeline::Pipeline 96 | DependsOn: 97 | - BuildAndDeploy 98 | - CodeBuildRole 99 | - CodePipelineRole 100 | Properties: 101 | Name: !Sub '${ApplicationStackName}-deployment' 102 | ArtifactStore: 103 | Type: S3 104 | Location: !Ref ApplicationBucket 105 | RestartExecutionOnUpdate: false 106 | RoleArn: !GetAtt CodePipelineRole.Arn 107 | Stages: 108 | - Name: Source 109 | Actions: 110 | - Name: Source-From-Github 111 | InputArtifacts: [] 112 | RunOrder: 1 113 | ActionTypeId: 114 | Category: Source 115 | Owner: ThirdParty 116 | Version: 1 117 | Provider: GitHub 118 | OutputArtifacts: 119 | - Name: SourceCode 120 | Configuration: 121 | Owner: !Ref RepoOwner 122 | Repo: !Ref RepoName 123 | Branch: !Ref RepoBranch 124 | PollForSourceChanges: false 125 | OAuthToken: !Sub '{{resolve:secretsmanager:${ApplicationStageName}/${ApplicationName}:SecretString:github_personal_token}}' 126 | - Name: Build 127 | Actions: 128 | - Name: Build-and-Deploy-Stack 129 | RunOrder: 3 130 | InputArtifacts: 131 | - Name: SourceCode 132 | ActionTypeId: 133 | Category: Build 134 | Owner: AWS 135 | Version: 1 136 | Provider: CodeBuild 137 | Configuration: 138 | ProjectName: 139 | Ref: BuildAndDeploy 140 | 141 | # https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html 142 | BuildAndDeploy: 143 | Type: AWS::CodeBuild::Project 144 | Properties: 145 | Name: !Sub '${ApplicationStackName}-build-deploy' 146 | ServiceRole: !Ref CodeBuildRole 147 | Artifacts: 148 | Type: CODEPIPELINE 149 | Environment: 150 | Type: LINUX_CONTAINER 151 | ComputeType: BUILD_GENERAL1_SMALL 152 | #Image: aws/codebuild/amazonlinux2-x86_64-standard:3.0 153 | Image: aws/codebuild/standard:5.0 154 | EnvironmentVariables: 155 | - Name: APPLICATION_STAGE_NAME 156 | Type: PLAINTEXT 157 | Value: !Ref ApplicationStageName 158 | - Name: FIREBASE_APP_ID 159 | Type: PLAINTEXT 160 | Value: !Ref FirebaseAppId 161 | - Name: FIREBASE_SENDER_ID 162 | Type: PLAINTEXT 163 | Value: !Ref FirebaseSenderId 164 | - Name: FIREBASE_API_KEY 165 | Type: PLAINTEXT 166 | Value: !Sub '{{resolve:secretsmanager:${ApplicationStageName}/${ApplicationName}:SecretString:firebase_api_key_encrypted}}' 167 | - Name: FIREBASE_PROJECT 168 | Type: PLAINTEXT 169 | Value: !Ref FirebaseProject 170 | - Name: FIREBASE_TOKEN 171 | Type: PLAINTEXT 172 | Value: !Sub '{{resolve:secretsmanager:${ApplicationStageName}/${ApplicationName}:SecretString:firebase_token_encrypted}}' 173 | - Name: ENCRYPTION_KEY_ID 174 | Type: PLAINTEXT 175 | Value: !Ref EncryptionKeyId 176 | Source: 177 | Type: CODEPIPELINE 178 | BuildSpec: 'buildspec.yml' 179 | TimeoutInMinutes: 15 180 | 181 | # https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codepipeline-webhook.html 182 | GithubWebhook: 183 | Type: 'AWS::CodePipeline::Webhook' 184 | DependsOn: 185 | - CodePipeline 186 | Properties: 187 | Authentication: GITHUB_HMAC 188 | AuthenticationConfiguration: 189 | SecretToken: !Sub '{{resolve:secretsmanager:${ApplicationStageName}/${ApplicationName}:SecretString:github_personal_token}}' 190 | RegisterWithThirdParty: 'true' 191 | Filters: 192 | - JsonPath: '$.ref' 193 | MatchEquals: refs/heads/{Branch} 194 | TargetPipeline: !Ref CodePipeline 195 | TargetAction: Source-From-Github 196 | TargetPipelineVersion: !GetAtt CodePipeline.Version 197 | 198 | # https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html 199 | CodeBuildRole: 200 | Type: AWS::IAM::Role 201 | Properties: 202 | AssumeRolePolicyDocument: 203 | Version: '2012-10-17' 204 | Statement: 205 | - Effect: Allow 206 | Principal: 207 | Service: 208 | - codebuild.amazonaws.com 209 | - kms.amazonaws.com 210 | - logs.amazonaws.com 211 | - s3.amazonaws.com 212 | Action: 213 | - 'sts:AssumeRole' 214 | Policies: 215 | - PolicyName: DecryptEnvVars 216 | PolicyDocument: 217 | Version: '2012-10-17' 218 | Statement: 219 | - Effect: Allow 220 | Action: 221 | - kms:DescribeKey 222 | - kms:Decrypt 223 | Resource: !Sub 'arn:aws:kms:${AWS::Region}:${AWS::AccountId}:key/${EncryptionKeyId}' 224 | - PolicyName: FirebaseBuildDeploy 225 | PolicyDocument: 226 | Version: '2012-10-17' 227 | Statement: 228 | - Effect: Allow 229 | Action: 230 | - logs:CreateLogGroup 231 | - logs:CreateLogStream 232 | - logs:PutLogEvents 233 | Resource: 234 | - !Sub 'arn:aws:codebuild:${AWS::Region}:${AWS::AccountId}:build/${ApplicationStackName}-build-deploy:*' 235 | - !Sub 'arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group/aws/codebuild/${ApplicationStackName}-build-deploy' 236 | - !Sub 'arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group/aws/codebuild/${ApplicationStackName}-build-deploy:*' 237 | - !Sub 'arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/${ApplicationStackName}-build-deploy:log-stream:*' 238 | - Effect: Allow 239 | Action: 240 | - s3:PutObject 241 | - s3:GetObject 242 | - s3:GetObjectVersion 243 | - s3:GetBucketAcl 244 | - s3:GetBucketLocation 245 | Resource: 246 | - !Sub 'arn:aws:s3:::codepipeline-${AWS::Region}-*' 247 | - !Sub 'arn:aws:s3:::${ApplicationBucket}/*' 248 | - Effect: Allow 249 | Action: 250 | - codebuild:CreateReportGroup 251 | - codebuild:CreateReport 252 | - codebuild:UpdateReport 253 | - codebuild:BatchPutTestCases 254 | Resource: 255 | - !Sub 'arn:aws:codebuild:${AWS::Region}:${AWS::AccountId}:report-group/${ApplicationStackName}-build-deploy-*' 256 | - Effect: Allow 257 | Action: 258 | - ssm:Get* 259 | Resource: 260 | - !Sub 'arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${ApplicationName}/${ApplicationStageName}*' 261 | 262 | # https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html 263 | CodePipelineRole: 264 | Type: AWS::IAM::Role 265 | Properties: 266 | AssumeRolePolicyDocument: 267 | Version: '2012-10-17' 268 | Statement: 269 | - Effect: Allow 270 | Principal: 271 | Service: 272 | - codepipeline.amazonaws.com 273 | - s3.amazonaws.com 274 | Action: 275 | - 'sts:AssumeRole' 276 | Policies: 277 | - PolicyName: PipelineDeployRole 278 | PolicyDocument: 279 | Version: '2012-10-17' 280 | Statement: 281 | - Action: 282 | - iam:PassRole 283 | Resource: '*' 284 | Effect: Allow 285 | Condition: 286 | StringEqualsIfExists: 287 | iam:PassedToService: 288 | - cloudformation.amazonaws.com 289 | - elasticbeanstalk.amazonaws.com 290 | - ec2.amazonaws.com 291 | - ecs-tasks.amazonaws.com 292 | - Action: 293 | - codedeploy:CreateDeployment 294 | - codedeploy:GetApplication 295 | - codedeploy:GetApplicationRevision 296 | - codedeploy:GetDeployment 297 | - codedeploy:GetDeploymentConfig 298 | - codedeploy:RegisterApplicationRevision 299 | Resource: '*' 300 | Effect: Allow 301 | - Action: 302 | - cloudwatch:* 303 | - elasticbeanstalk:DescribeApplications 304 | - elasticbeanstalk:DescribeEnvironments 305 | - sns:* 306 | Resource: '*' 307 | Effect: Allow 308 | - Action: 309 | - s3:CreateBucket 310 | - s3:GetBucketPolicy 311 | - s3:GetBucketVersioning 312 | - s3:GetObject 313 | - s3:GetObjectAcl 314 | - s3:GetObjectVersion 315 | - s3:ListAllMyBuckets 316 | - s3:ListBucket 317 | - s3:PutBucketPolicy 318 | - s3:PutObject 319 | - s3:PutObjectAcl 320 | Resource: 321 | - !Sub 'arn:aws:s3:::${ApplicationBucket}/*' 322 | - !Sub 'arn:aws:s3:::${ApplicationBucket}/${ApplicationStackName}' 323 | - !Sub 'arn:aws:s3:::${ApplicationBucket}/${ApplicationStackName}*' 324 | Effect: Allow 325 | - Action: 326 | - lambda:GetFunctionConfiguration 327 | - lambda:InvokeFunction 328 | - lambda:ListFunctions 329 | Resource: '*' 330 | Effect: Allow 331 | - Action: 332 | - codebuild:BatchGetBuilds 333 | - codebuild:StartBuild 334 | Resource: '*' 335 | Effect: Allow 336 | - Action: 337 | - cloudformation:ValidateTemplate 338 | Effect: Allow 339 | Resource: '*' 340 | 341 | # More info about Outputs: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/outputs-section-structure.html 342 | Outputs: 343 | CreatedPipeline: 344 | Description: 'CI Deployment Created' 345 | Value: !Sub 'Stage: ${ApplicationStageName} Pipeline: ${CodePipeline} Firebase Project: ${FirebaseProject}' 346 | -------------------------------------------------------------------------------- /assets/bitcoinSchemaShareImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitcoinSchema/schema/a99f6e63b8c9172a64a8e1ac15e5b761baed14e3/assets/bitcoinSchemaShareImg.png -------------------------------------------------------------------------------- /assets/sponsors/all-aboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitcoinSchema/schema/a99f6e63b8c9172a64a8e1ac15e5b761baed14e3/assets/sponsors/all-aboard.png -------------------------------------------------------------------------------- /assets/sponsors/metalens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitcoinSchema/schema/a99f6e63b8c9172a64a8e1ac15e5b761baed14e3/assets/sponsors/metalens.png -------------------------------------------------------------------------------- /assets/sponsors/tonicpow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitcoinSchema/schema/a99f6e63b8c9172a64a8e1ac15e5b761baed14e3/assets/sponsors/tonicpow.png -------------------------------------------------------------------------------- /buildspec.yml: -------------------------------------------------------------------------------- 1 | version: 0.2 2 | 3 | phases: 4 | install: 5 | runtime-versions: 6 | nodejs: 14 7 | commands: 8 | # Install yarn 9 | - apt update 10 | - apt install --no-install-recommends yarn 11 | #- curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash 12 | #- sudo apt-get install -y nodejs 13 | 14 | # Install firebase tools 15 | - yarn global add firebase-tools@10.9.2 16 | 17 | pre_build: 18 | commands: 19 | # Install all root dependencies 20 | - make install 21 | 22 | post_build: 23 | commands: 24 | # Deploy the firebase application using project & CI Token 25 | - make firebase-deploy-simple project=$FIREBASE_PROJECT token=$(make decrypt-deprecated decrypt_value=$FIREBASE_TOKEN) 26 | -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitcoinSchema/schema/a99f6e63b8c9172a64a8e1ac15e5b761baed14e3/docs/.nojekyll -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | bitcoinschema.org 2 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | ## What is Bitcoin Schema? 2 | 3 | The schemas are a set of 'types', each associated with a set of properties. This is a community driven register of types for standard use in applications. [Schema.org](https://schema.org/) provides a similar register, but Bitcoin Schema is specifically designed with BitCoin enabled applications in mind, combining several data protocols. 4 | 5 | ## What protocols are used? 6 | 7 | The protocols used in the models registered here are currently [B](https://github.com/unwriter/b), [MAP](https://github.com/rohenaz/map), [AIP](https://github.com/attilaaf/AUTHOR_IDENTITY_PROTOCOL), [BAP](https://github.com/icellan/bap) and BPP. 8 | 9 | ## Why is Schema Important? 10 | 11 | Bitcoin makes it possible to design communication systems in new ways that solve some of the biggest problems we currently encounter such as censorship, lack of data integrity, and poor incentive design. We can eliminate central control over the universe of content which continuing to respect the private ownership of individual platforms. We can delivers true ownership of data to the individuals contributing to these network instead of the companies operating as central databases for both user authentication and the content itself. 12 | 13 | ## How can I use Schema? 14 | 15 | There are a number of tools available for both recording data types listed here to the blockchain, and parsing transactions to read and consume the associated content. 16 | 17 | - [BMAP.js](https://github.com/rohenaz/bmap) - A JS library for parsing a number of specific Bitcoin data protocols. 18 | - [Go Bitcoin Schema](https://github.com/BitcoinSchema/go-bmap) - Package for generating transactions that comply with several registered actions such as posts, likes, and follows. 19 | - [Go BMAP](https://github.com/bitcoinschema/go-bmap) - Go implementation of bmap.js 20 | - [go-bitcoinsv](https://gobitcoinsv.com) - A collection of packages for working with BSV in Golang. Many of the packages listed here are used to work with Bitcoin Schema payloads. 21 | - [Map.sv](https://map.sv) - A simple wizard for generating application boilerplate that supports Bitcoin Schemas. 22 | 23 | ## Who is using Bitcoin Schema? 24 | 25 | [Tonicpow](https://tonicpow.com), [Jamify](https://jamify.xyz), [BitChat](https://bitchat.allaboardbitcoin.com), [BitChat [Nitro]](https://bitchatnitro.com),[Hona](https://hona.app), [BlockPost](https://blockpost.network), [MetaLens](https://metalens.app), [Retrofeed](https://retrofeed.me), and many others. If you're using Bitcoin Schema in your application and would like to be listed here, contact us or submit a pull request [here](https://github.com/BitcoinSchema/schema). 26 | 27 | ?> _Note_: Currently Bitcoin Schema is made up of OP_RETURN based data protocols. In the future, we expect OP_PUSHDATA based protocols to emerge. As new standards are adopted, they will be incorporated into the models registered here, or new variants will be listed. 28 | -------------------------------------------------------------------------------- /docs/_media/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitcoinSchema/schema/a99f6e63b8c9172a64a8e1ac15e5b761baed14e3/docs/_media/favicon.ico -------------------------------------------------------------------------------- /docs/_navbar.md: -------------------------------------------------------------------------------- 1 | - _Languages_ 2 | - [:us: English](/) 3 | 4 | -------------------------------------------------------------------------------- /docs/_sidebar.md: -------------------------------------------------------------------------------- 1 | - **About Schema** 2 | - [Introduction](/ "Welcome to bitcoin schema") 3 | - [Getting Started](getting_started.md "Get started now using Schema") 4 | - **Browse Schemas** 5 | - [All](schemas.md "Browse all the active schemas") 6 | - [Generic](generic_schema.md "Generic schema models") 7 | - [Social](social_schema.md "Communication schemas") 8 | - **Resources** 9 | - [Terms of Service](terms_of_service.md "Terms of Service for our site") 10 | -------------------------------------------------------------------------------- /docs/cover.md: -------------------------------------------------------------------------------- 1 | # **Bitcoin Schema** 2 | 3 | > Data definitions for Bitcoin applications 4 | 5 | - Unlock Limitless Interoperability 6 | - Build Collaborative Networks 7 | 8 | [Learn More](#what-is-bitcoin-schema) 9 | [Browse Schemas](schemas.md) 10 | 11 | ![color](#ecfcff) 12 | -------------------------------------------------------------------------------- /docs/error_404.md: -------------------------------------------------------------------------------- 1 | ## Whoa! Look's like a 404! 2 | Shucks, that page isn't available or never was available... 3 | -------------------------------------------------------------------------------- /docs/es/README.md: -------------------------------------------------------------------------------- 1 | # About 2 | 3 | Esquemas extensibles impulsados ​​por la comunidad que permiten a los desarrolladores crear aplicaciones basadas en datos interoperables 4 | -------------------------------------------------------------------------------- /docs/es/_navbar.md: -------------------------------------------------------------------------------- 1 | - Traducciones 2 | - [:uk: Inglés](/) 3 | - [:es: Español](/es/) 4 | -------------------------------------------------------------------------------- /docs/es/_sidebar.md: -------------------------------------------------------------------------------- 1 | * [Introducción](/es/ "All the docs in spanish") 2 | * [Qué es el schema?](/es/about.md "Todo sobre bitcoin schema") 3 | * [Términos de Servicio](terms_of_service.md "Términos de servicio para nuestro sitio") 4 | 5 | 6 | -------------------------------------------------------------------------------- /docs/es/about.md: -------------------------------------------------------------------------------- 1 | # Título de la página 2 | Soy una página sobre 3 | -------------------------------------------------------------------------------- /docs/es/cover.md: -------------------------------------------------------------------------------- 1 | # **Schema** 2 | 3 | > Datos estructurados para aplicaciones BitCoin 4 | 5 | - Integrarse con cientos de aplicaciones. 6 | - Efecto de red de gravedad 7 | 8 | [Aprende más](#what-is-bitcoin-schema) 9 | [Vistazo Schemas](schemas.md) 10 | 11 | 12 | ![color](#ecfcff) 13 | -------------------------------------------------------------------------------- /docs/es/error_404.md: -------------------------------------------------------------------------------- 1 | # Es e 404 2 | I'm a 404 page 3 | -------------------------------------------------------------------------------- /docs/es/terms_of_service.md: -------------------------------------------------------------------------------- 1 | # Terms of Service 2 | 3 | This is a contract between you and each of the sponsors of BitcoinSchema.org: TonicPow Inc. (referred to collectively in this agreement as the "Sponsors", "we" or "us"). By using the BitcoinSchema.org website (the "Website") you agree to be bound by the following terms and conditions (the "Terms of Service"). 4 | 5 | ### Scope of Terms of Services; License 6 | 7 | These Terms of Service govern your use of the Website, which contains a schema specifying a vocabulary you can use. The Sponsors' copyrights in the schema are licensed to website publishers and other third parties under the [OpenBSV License](https://github.com/bitcoinschema/schema/blob/master/LICENSE) (version 1.0). To view more information about this type of license, please visit https://nchain.com/en/open-bsv-license/. The Sponsors have applied the W3C Patent Policy to the schemas published by BitcoinSchema.org as follows: each Sponsor, by itself and on behalf of its affiliates, agrees to make available under W3C RF licensing requirements its Essential Claims (if any) in the schemas published by BitcoinSchema.org as if the schemas were W3C Recommendations. In some cases, this website may indicate that some but not all of the Sponsors have recognized a particular extension to the Schema; in those cases, as to that extension, the above rights are granted by only those recognizing Sponsors. 8 | 9 | ### Changes in Website and Terms and Conditions; Change in Schema 10 | 11 | We may modify or terminate the Website, for any reason, and without notice. We also reserve the right to modify these Terms of Service from time to time without notice, and you expressly agree to be bound by such modifications when posted on the Website. Notwithstanding the foregoing, the Sponsors agree that no change that we make to these Terms of Service will terminate or modify the license granted under paragraph 1 above with respect to any use or implementation of the Schema occurring prior to the date that the change is published. Please review these Terms of Service from time to time so that you will be apprised of any changes. The Sponsors reserve the right, at any time, with or without notice to you, to make changes to the Schema, including, without limitation, to make changes that result in your existing Schema content becoming non-compliant with the revised Schema. The Sponsors shall have no liability to you for any such changes. Each of the Sponsors reserves the right to use, or not use, the Schema in whole or in part, on any or all of its products or services, and no Sponsor shall obligated to index, read or otherwise make use of any Schema content published by you. Without limiting the generality of the foregoing, each of the Sponsors reserves the right at any time to discontinue use of the Schema on any or all of its products or services. 12 | 13 | ### Disclaimer of Warranties 14 | 15 | The Sponsors disclaim any and all responsibility or liability for the accuracy, content, completeness, reliability, or operability or availability of information or material displayed on the Website. The Sponsors also disclaim any responsibility for any harm resulting from use of the Schema or downloading or accessing any information or material on the Internet through the Website. THE WEBSITE, THE SCHEMA AND ALL MATERIALS, INFORMATION AND SERVICES INCLUDED IN THE WEBSITE ARE PROVIDED "AS IS," WITH NO WARRANTIES WHATSOEVER. THE SPONSORS AND THEIR LICENSORS EXPRESSLY DISCLAIM TO THE FULLEST EXTENT PERMITTED BY LAW ALL EXPRESS, IMPLIED, AND STATUTORY WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT OF PROPRIETARY RIGHTS. THE SPONSORS AND THEIR LICENSORS DISCLAIM ANY WARRANTIES REGARDING THE SECURITY, RELIABILITY, TIMELINESS, AND PERFORMANCE OF THE WEBSITE. THE SPONSORS AND THEIR LICENSORS DISCLAIM ANY WARRANTIES FOR ANY INFORMATION OR ADVICE RECEIVED THROUGH ANY LINKS PROVIDED IN THE WEBSITE. YOU UNDERSTAND AND AGREE THAT YOU DOWNLOAD OR OTHERWISE OBTAIN MATERIAL OR DATA THROUGH THE USE OF THE WEBSITE AT YOUR OWN DISCRETION AND RISK AND THAT YOU WILL BE SOLELY RESPONSIBLE FOR ANY DAMAGES TO YOUR COMPUTER SYSTEM OR LOSS OF DATA THAT RESULTS FROM THE DOWNLOAD OF SUCH MATERIAL OR DATA. 16 | 17 | ### Limitation of Liability 18 | 19 | UNDER NO CIRCUMSTANCES SHALL THE SPONSORS OR THEIR LICENSORS BE LIABLE TO ANY USER ON ACCOUNT OF THAT USER'S USE OR MISUSE OF OR RELIANCE ON THE WEBSITE OR THE SCHEMA ARISING FROM ANY CLAIM RELATING TO THIS AGREEMENT OR THE SUBJECT MATTER HEREOF. SUCH LIMITATION OF LIABILITY SHALL APPLY TO PREVENT RECOVERY OF DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, SPECIAL, EXEMPLARY, AND PUNITIVE DAMAGES WHETHER SUCH CLAIM IS BASED ON WARRANTY, CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE, (EVEN IF THE SPONSORS OR THEIR LICENSORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES). SUCH LIMITATION OF LIABILITY SHALL APPLY WHETHER THE DAMAGES ARISE FROM USE OR MISUSE OF AND RELIANCE ON THE WEBSITE, FROM INABILITY TO USE THE WEBSITE, OR FROM THE INTERRUPTION, SUSPENSION, OR TERMINATION OF THE WEBSITE (INCLUDING SUCH DAMAGES INCURRED BY THIRD PARTIES). THIS LIMITATION SHALL ALSO APPLY, WITHOUT LIMITATION, TO THE COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, OR LOST DATA. SUCH LIMITATION SHALL FURTHER APPLY WITH RESPECT TO THE PERFORMANCE OR NON-PERFORMANCE OF THE WEBSITE OR ANY INFORMATION THAT APPEARS ON, OR IS LINKED OR RELATED IN ANY WAY TO, THE SPONSORS SERVICES. SUCH LIMITATION SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY LIMITED REMEDY AND TO THE FULLEST EXTENT PERMITTED BY LAW. 20 | 21 | SOME STATES OR OTHER JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE ABOVE LIMITATIONS AND EXCLUSIONS MAY NOT APPLY TO YOU. 22 | -------------------------------------------------------------------------------- /docs/generic_schema.md: -------------------------------------------------------------------------------- 1 | These are generic Schemas that can be used for many use cases. 2 | 3 | ?> More Schemas will be added as common use cases are identified and implemented. 4 | 5 | ### Payment 6 | 7 | Payment is used to describe a payment sent from one identity to another. It is used by [BPP](https://github.com/icellan/bpp) when creating Content Paywalls. 8 | 9 | ##### OP_RETURN 10 | 11 | ``` 12 | MAP SET app type payment context tx tx 13 | ``` 14 | 15 | ##### Optional Parameters 16 | 17 | - Context 18 | - ContextValue 19 | - Subcontext 20 | - Subcontext Value 21 | 22 | 59 | -------------------------------------------------------------------------------- /docs/getting_started.md: -------------------------------------------------------------------------------- 1 | ## Examples 2 | 3 | ### JavaScript 4 | 5 | First, we'll demonstrate creating a new transaction containing some data according to a BitCoin Schema. For this example, we will create a new "like". Likes refer to an existing transaction by its transaction ID. 6 | 7 | Here, we use RelayOne Javascript API to create the transaction. This is very similar to creating the tx using MoneyButton, and is simplified for demonstration purposes. 8 | 9 | ```js 10 | // Initialize payload object 11 | let payload = { 12 | outputs: [] 13 | } 14 | 15 | // Create data payload for Like Schema 16 | const dataPayload = [ 17 | '1PuQa7K62MiKCtssSLKy1kh56WWU7MtUR5', // MAP Prefix 18 | 'SET', 19 | 'app', 20 | appName, 21 | 'type', 22 | 'like', 23 | 'tx', 24 | 25 | ]; 26 | 27 | // Create a script from the data payload 28 | const s = Script.fromSafeDataArray( 29 | dataPayload.map((d) => { 30 | return Buffer.from(d); 31 | }) 32 | ); 33 | 34 | // Add the script to our outputs 35 | payload.outputs = [ 36 | { 37 | script: s.toAsmString(), 38 | }, 39 | ]; 40 | 41 | // Add tip / change outputs 42 | let toOuts = [ 43 | { to: , amount: , currency: }, 44 | { to: , amount: , currency: } 45 | ]; 46 | 47 | // Combine the outputs 48 | payload.outputs = [...payload.outputs.concat(toOuts)]; 49 | 50 | // Broadcast the transaction 51 | let response = await relayOne.send(payload); 52 | ``` 53 | 54 | ### Go 55 | 56 | A library is available for doing this automatically with Go called [go-bitcoin-schema](https://github.com/bitcoinschema/go-bitcoin-schema). Creating a like is as simple as: 57 | 58 | ```go 59 | import "github.com/bitcoinschema/go-bitcoin-schema" 60 | ``` 61 | 62 | ```go 63 | tx, err := CreateUnlike(unlikeTxID, utxos, changeAddress, privateKey) 64 | if err != nil { 65 | // handle error 66 | } 67 | 68 | // do something with tx... 69 | ``` 70 | 71 | ## Getting help 72 | 73 | [TonicPow](https://tonicpow.com) maintains an [#open-social](https://join.slack.com/t/tonicpow/shared_invite/zt-mlccqx28-IEabvOGPx_QLyFJJbWE3hQ) Slack channel dedicated to supporting on-chain social network development. 74 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Bitcoin Schema - Structured Data On the BSV Blockchain 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 20 | 24 | 28 | 29 | 30 | 31 | 32 | 36 | 40 | 44 | 45 | 46 | 50 | 54 | 55 | 56 | 57 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Loading...
69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /docs/schemas.md: -------------------------------------------------------------------------------- 1 | List of all Schemas 2 | 3 | - [Generic](generic_schema.md) 4 | 5 | - [Social](social_schema.md) 6 | 7 | ?> More Schemas will be added as common use cases are identified and implemented in the wild. 8 | -------------------------------------------------------------------------------- /docs/social_schema.md: -------------------------------------------------------------------------------- 1 | These schemas are the building blocks for building social networking apps. These on-chain records can be indexed and queried to build full-featured social platforms of all kinds. 2 | 3 | ## Like 4 | 5 | Used to express positive sentiment about a post, transaction, or any other global identifier. 6 | 7 | ###### OP_RETURN 8 | 9 | ``` 10 | MAP SET app type like tx | AIP BITCOIN_ECDSA
11 | ``` 12 | 13 | ##### go-bitcoin-schema 14 | 15 | ```go 16 | tx, err := CreateLike(likeTxID, utxos, changeAddress, privateKey) 17 | ``` 18 | 19 | ## Unlike 20 | 21 | Used to undo a like 22 | 23 | ##### OP_RETURN 24 | 25 | ``` 26 | MAP SET app type unlike tx | AIP BITCOIN_ECDSA
27 | ``` 28 | 29 | ##### go-bitcoin-schema 30 | 31 | ``` 32 | tx, err := CreateUnlike(unlikeTxID, utxos, changeAddress, privateKey) 33 | ``` 34 | 35 | ## Follow 36 | 37 | Used to express a one-way relationship between two identities. 38 | 39 | ##### OP_RETURN 40 | 41 | ``` 42 | MAP SET app type follow bapID | AIP BITCOIN_ECDSA
43 | ``` 44 | 45 | ## Friend 46 | 47 | Used to express a two-way relationship between two identities and allow for secured communications. Generate the publicKey for future communications based on a SHA256 hash of the other user's bapID. (getSigningPathFromHex is a function from the BAP library). 48 | 49 | #### Generate public key 50 | 51 | ```js 52 | const seedHex = bsv.crypto.Hash.sha256(Buffer.from(friendIdKey)).toString( 53 | "hex" 54 | ); 55 | const signingPath = getSigningPathFromHex( 56 | Buffer.from(seedHex, "utf8").toString("hex") 57 | ); 58 | const hdPrivateFriendKey = bsv.HDPrivateKey.deriveChild(signingPath); 59 | 60 | const publicFriendKey = hdPrivateFriendKey.privateKey.publicKey; 61 | ``` 62 | 63 | ##### OP_RETURN 64 | 65 | ``` 66 | MAP SET app type friend bapID publicKey | AIP BITCOIN_ECDSA
67 | ``` 68 | 69 | ##### go-bitcoin-schema 70 | 71 | ```go 72 | tx, err := CreateFollow(followIdKey, utxos, changeAddress, privateKey) 73 | 74 | ``` 75 | 76 | ## Unfollow 77 | 78 | Used to express a relationship between two identities. 79 | 80 | ##### OP_RETURN 81 | 82 | ``` 83 | MAP SET app type unfollow bapID | AIP BITCOIN_ECDSA
84 | ``` 85 | 86 | ##### go-bitcoin-schema 87 | 88 | ```go 89 | tx, err := CreateUnfollow(unfollowIdKey, utxos, changeAddress, privateKey) 90 | 91 | ``` 92 | 93 | ## Post 94 | 95 | Post is meant to express a new piece of content to the network. 96 | 97 | - B protocol is used for the content. This means the post could be anything from plain text, an image, some markdown, or even binary. Any file type can be expressed as a post. 98 | - Attachments can be made in addition to the post content (see [Attachments]) 99 | - The Context and Subcontext properties are optional. They allow you to post within a specific context such as a geolocation. Some contexts require more than 1 level, such as commenting on a YouTube video. In the case of youtube we use a context name of "provider" and a value of "youtube". We then specify a subcontext name of "videoID" and set the value to the YouTube video ID our post is associated with. This pattern allows us to comment on anything in a flexible way that is machine readable. 100 | 101 | ##### OP_RETURN 102 | 103 | ``` 104 | B | MAP SET app type post | AIP BITCOIN_ECDSA
105 | ``` 106 | 107 | ##### Optional Parameters 108 | 109 | - Context 110 | - ContextValue 111 | - Subcontext 112 | - Subcontext Value 113 | 114 | ##### go-bitcoin-schema 115 | 116 | ```go 117 | // identity key of the user you are requesting 118 | post := bschema.Post{ 119 | MediaType: MediaTypeTextMarkdown, 120 | Encoding: EncodingUTF8, 121 | Content: "# Hello small world!", 122 | Context: ContextProvider, 123 | ContextValue: "youtube", 124 | Subcontext: ContextVideoID, 125 | SubcontextValue: "IdNs8eVGbBs", 126 | } 127 | tx, err := bschema.CreatePost(post, utxos, changeAddress, privateKey) 128 | ``` 129 | 130 | ## Reply 131 | 132 | Replies are just Posts with a context of a transaction ID. 133 | 134 | ##### OP_RETURN 135 | 136 | ``` 137 | OP_FALSE OP_RETURN B | MAP SET app type post context tx tx | AIP BITCOIN_ECDSA
138 | ``` 139 | 140 | ##### go-bitcoin-schema 141 | 142 | ```go 143 | reply := bschema.Post{ 144 | MediaType: MediaTypeTextMarkdown, 145 | Encoding: EncodingUTF8, 146 | Content: "# This is a markdown reply!", 147 | } 148 | tx, err := CreateReply(reply, replyTxID, utxos, changeAddress, privateKey) 149 | ``` 150 | 151 | ## Repost 152 | 153 | A repost is used to amplify an existing post, without reposting the actual content. Like with a post, it is possible to repost with a new context and/or subcontext. This allows you surface posts in multiple contexts. Imagine a post is made with a context of a UPC code (comment on a physical product). Someone might then repost that comment with a context of 'url' and value = the company's web address. This would repost that comment against the company website, surfacing it in new apps such as MetaLens. 154 | 155 | ##### Optional Parameters 156 | 157 | - Context 158 | - ContextValue 159 | - Subcontext 160 | - Subcontext Value 161 | 162 | ##### OP_RETURN 163 | 164 | ``` 165 | MAP SET app type repost tx | AIP BITCOIN_ECDSA
166 | ``` 167 | 168 | ##### go-bitcoin-schema 169 | 170 | ```go 171 | tx, err := CreateRepost(repostTxID, utxos, changeAddress, privateKey) 172 | ``` 173 | 174 | ## Message 175 | 176 | Message is similar to post, but a seperate namespace intended for real time chat content. 177 | 178 | - B protocol is used for the content. This means the chat message could be anything from plain text, an image, some markdown, or even binary. Any file type can be expressed as a message. 179 | - Attachments can be made in addition to the message content (see [Attachments]) 180 | - The Context and Subcontext properties are optional (see post for usage). 181 | 182 | ##### OP_RETURN 183 | 184 | Global chat: 185 | 186 | ``` 187 | B | MAP SET app type message | AIP BITCOIN_ECDSA
188 | ``` 189 | 190 | Specific channel: 191 | 192 | ``` 193 | B | MAP SET app type message context channel channel my-chatroom | AIP BITCOIN_ECDSA
194 | ``` 195 | 196 | Specific user (private): 197 | 198 | ``` 199 | B | MAP SET app type message context bapID bapID | AIP BITCOIN_ECDSA
200 | ``` 201 | 202 | ##### Optional Parameters 203 | 204 | - Context 205 | - ContextValue 206 | - Subcontext 207 | - Subcontext Value 208 | 209 | ##### go-bitcoin-schema 210 | 211 | ```go 212 | message := bschema.Message{ 213 | MediaType: MediaTypeTextPlain, 214 | Encoding: EncodingUTF8, 215 | Content: "Hello everyone in #my-channel!", 216 | Context: ContextChannel, 217 | ContextValue: "my-channel", 218 | } 219 | tx, err := bschema.CreateMessage(message, utxos, changeAddress, privateKey) 220 | ``` 221 | 222 | ## Tags 223 | 224 | Tags allow you to categorize content. Unlike context, which determines when / where the content should be rendered and with what view, tags are a general purpose tool for aiding with search and filtering posts based on their tag values. 225 | 226 | Tags are added as an additional output, with the following format: 227 | 228 | ##### OP_RETURN 229 | 230 | ``` 231 | MAP ADD tags ... | AIP BITCOIN_ECDSA
232 | ``` 233 | 234 | ##### go-bitcoin-schema 235 | 236 | You can include tags on any post 237 | 238 | ```go 239 | postContent := "# This is a post" 240 | tags := []string{"tag1", "tag2", "tag3"} 241 | 242 | post := Post{ 243 | MediaType: MediaTypeTextMarkdown, 244 | Encoding: EncodingUTF8, 245 | Content: postContent, 246 | Tags: tags, 247 | } 248 | ``` 249 | 250 | ## Attachments 251 | 252 | Attachments are included as additional OP_RETURN outputs using B protocol, signed with AIP. 253 | 254 | ##### OP_RETURN 255 | 256 | Attachment 1: 257 | 258 | ``` 259 | B | BITCOIN_ECDSA
260 | ``` 261 | 262 | Attachment 2: 263 | 264 | ``` 265 | B | BITCOIN_ECDSA
266 | ``` 267 | 268 | ##### go-bitcoinb-schema 269 | 270 | ```go 271 | htmlAttachment := "

This is a html attachment

" 272 | cssAttachment := "body { background-color: green; }" 273 | postContent := "# This is a reply!" 274 | 275 | post := Post{ 276 | MediaType: MediaTypeTextMarkdown, 277 | Encoding: EncodingUTF8, 278 | Content: postContent, 279 | Tags: tags, 280 | Attachments: []b.B{{ 281 | MediaType: string(MediaTypeTextHTML), 282 | Encoding: string(EncodingUTF8), 283 | Data: b.Data{UTF8: htmlAttachment}, 284 | },{ 285 | MediaType: string(MediaTypeTestHTML), 286 | Encoding: string(EncodingUTF8), 287 | Data: b.Data{UTF8: cssAttachment} 288 | }}, 289 | } 290 | ``` 291 | 292 | 303 | 304 | ?> "MAP" is a placeholder for the Magic Attribute Protocol prefix, which is 1PuQa7K62MiKCtssSLKy1kh56WWU7MtUR5 305 | 306 | ?> "AIP" is a placeholder for the Author Identity Protocol prefix, which is 15PciHG22SNLQJXMoSUaWVi7WSqc7hCfva 307 | -------------------------------------------------------------------------------- /docs/terms_of_service.md: -------------------------------------------------------------------------------- 1 | # Terms of Service 2 | 3 | This is a contract between you and each of the sponsors of BitcoinSchema.org: TonicPow Inc. (referred to collectively in this agreement as the "Sponsors", "we" or "us"). By using the BitcoinSchema.org website (the "Website") you agree to be bound by the following terms and conditions (the "Terms of Service"). 4 | 5 | ### Scope of Terms of Services; License 6 | 7 | These Terms of Service govern your use of the Website, which contains a schema specifying a vocabulary you can use. The Sponsors' copyrights in the schema are licensed to website publishers and other third parties under the [OpenBSV License](https://github.com/bitcoinschema/schema/blob/master/LICENSE) (version 1.0). To view more information about this type of license, please visit https://nchain.com/en/open-bsv-license/. The Sponsors have applied the W3C Patent Policy to the schemas published by BitcoinSchema.org as follows: each Sponsor, by itself and on behalf of its affiliates, agrees to make available under W3C RF licensing requirements its Essential Claims (if any) in the schemas published by BitcoinSchema.org as if the schemas were W3C Recommendations. In some cases, this website may indicate that some but not all of the Sponsors have recognized a particular extension to the Schema; in those cases, as to that extension, the above rights are granted by only those recognizing Sponsors. 8 | 9 | ### Changes in Website and Terms and Conditions; Change in Schema 10 | 11 | We may modify or terminate the Website, for any reason, and without notice. We also reserve the right to modify these Terms of Service from time to time without notice, and you expressly agree to be bound by such modifications when posted on the Website. Notwithstanding the foregoing, the Sponsors agree that no change that we make to these Terms of Service will terminate or modify the license granted under paragraph 1 above with respect to any use or implementation of the Schema occurring prior to the date that the change is published. Please review these Terms of Service from time to time so that you will be apprised of any changes. The Sponsors reserve the right, at any time, with or without notice to you, to make changes to the Schema, including, without limitation, to make changes that result in your existing Schema content becoming non-compliant with the revised Schema. The Sponsors shall have no liability to you for any such changes. Each of the Sponsors reserves the right to use, or not use, the Schema in whole or in part, on any or all of its products or services, and no Sponsor shall obligated to index, read or otherwise make use of any Schema content published by you. Without limiting the generality of the foregoing, each of the Sponsors reserves the right at any time to discontinue use of the Schema on any or all of its products or services. 12 | 13 | ### Disclaimer of Warranties 14 | 15 | The Sponsors disclaim any and all responsibility or liability for the accuracy, content, completeness, reliability, or operability or availability of information or material displayed on the Website. The Sponsors also disclaim any responsibility for any harm resulting from use of the Schema or downloading or accessing any information or material on the Internet through the Website. THE WEBSITE, THE SCHEMA AND ALL MATERIALS, INFORMATION AND SERVICES INCLUDED IN THE WEBSITE ARE PROVIDED "AS IS," WITH NO WARRANTIES WHATSOEVER. THE SPONSORS AND THEIR LICENSORS EXPRESSLY DISCLAIM TO THE FULLEST EXTENT PERMITTED BY LAW ALL EXPRESS, IMPLIED, AND STATUTORY WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT OF PROPRIETARY RIGHTS. THE SPONSORS AND THEIR LICENSORS DISCLAIM ANY WARRANTIES REGARDING THE SECURITY, RELIABILITY, TIMELINESS, AND PERFORMANCE OF THE WEBSITE. THE SPONSORS AND THEIR LICENSORS DISCLAIM ANY WARRANTIES FOR ANY INFORMATION OR ADVICE RECEIVED THROUGH ANY LINKS PROVIDED IN THE WEBSITE. YOU UNDERSTAND AND AGREE THAT YOU DOWNLOAD OR OTHERWISE OBTAIN MATERIAL OR DATA THROUGH THE USE OF THE WEBSITE AT YOUR OWN DISCRETION AND RISK AND THAT YOU WILL BE SOLELY RESPONSIBLE FOR ANY DAMAGES TO YOUR COMPUTER SYSTEM OR LOSS OF DATA THAT RESULTS FROM THE DOWNLOAD OF SUCH MATERIAL OR DATA. 16 | 17 | ### Limitation of Liability 18 | 19 | UNDER NO CIRCUMSTANCES SHALL THE SPONSORS OR THEIR LICENSORS BE LIABLE TO ANY USER ON ACCOUNT OF THAT USER'S USE OR MISUSE OF OR RELIANCE ON THE WEBSITE OR THE SCHEMA ARISING FROM ANY CLAIM RELATING TO THIS AGREEMENT OR THE SUBJECT MATTER HEREOF. SUCH LIMITATION OF LIABILITY SHALL APPLY TO PREVENT RECOVERY OF DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, SPECIAL, EXEMPLARY, AND PUNITIVE DAMAGES WHETHER SUCH CLAIM IS BASED ON WARRANTY, CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE, (EVEN IF THE SPONSORS OR THEIR LICENSORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES). SUCH LIMITATION OF LIABILITY SHALL APPLY WHETHER THE DAMAGES ARISE FROM USE OR MISUSE OF AND RELIANCE ON THE WEBSITE, FROM INABILITY TO USE THE WEBSITE, OR FROM THE INTERRUPTION, SUSPENSION, OR TERMINATION OF THE WEBSITE (INCLUDING SUCH DAMAGES INCURRED BY THIRD PARTIES). THIS LIMITATION SHALL ALSO APPLY, WITHOUT LIMITATION, TO THE COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, OR LOST DATA. SUCH LIMITATION SHALL FURTHER APPLY WITH RESPECT TO THE PERFORMANCE OR NON-PERFORMANCE OF THE WEBSITE OR ANY INFORMATION THAT APPEARS ON, OR IS LINKED OR RELATED IN ANY WAY TO, THE SPONSORS SERVICES. SUCH LIMITATION SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY LIMITED REMEDY AND TO THE FULLEST EXTENT PERMITTED BY LAW. 20 | 21 | SOME STATES OR OTHER JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE ABOVE LIMITATIONS AND EXCLUSIONS MAY NOT APPLY TO YOU. 22 | -------------------------------------------------------------------------------- /docs/vendor/css/styles.min.css: -------------------------------------------------------------------------------- 1 | @import url("https://fonts.googleapis.com/css?family=Roboto+Mono|Source+Sans+Pro:300,400,600");body{font-size:14px;line-height:20px}.markdown-section pre,.markdown-section pre>code{font-family:Roboto Mono,Monaco,courier,monospace}.markdown-section pre>code{font-size:.8rem}a{overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-word}nav.app-nav li ul{min-width:100px}.sidebar li{margin:0}.edit-button{text-decoration:none;font-size:12px;color:#364149}.edit-button svg{width:14px;margin-right:.5rem;top:2px;position:relative} -------------------------------------------------------------------------------- /docs/vendor/css/vue.css: -------------------------------------------------------------------------------- 1 | @import url("https://fonts.googleapis.com/css?family=Roboto+Mono|Source+Sans+Pro:300,400,600");*{-webkit-font-smoothing:antialiased;-webkit-overflow-scrolling:touch;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-text-size-adjust:none;-webkit-touch-callout:none;box-sizing:border-box}body:not(.ready){overflow:hidden}body:not(.ready) .app-nav,body:not(.ready)>nav,body:not(.ready) [data-cloak]{display:none}div#app{font-size:30px;font-weight:lighter;margin:40vh auto;text-align:center}div#app:empty:before{content:"Loading..."}.emoji{height:1.2rem;vertical-align:middle}.progress{background-color:var(--theme-color,#42b983);height:2px;left:0;position:fixed;right:0;top:0;transition:width .2s,opacity .4s;width:0;z-index:5}.search .search-keyword,.search a:hover{color:var(--theme-color,#42b983)}.search .search-keyword{font-style:normal;font-weight:700}body,html{height:100%}body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:#34495e;font-family:Source Sans Pro,Helvetica Neue,Arial,sans-serif;font-size:15px;letter-spacing:0;margin:0;overflow-x:hidden}img{max-width:100%}a[disabled]{cursor:not-allowed;opacity:.6}kbd{border:1px solid #ccc;border-radius:3px;display:inline-block;font-size:12px!important;line-height:12px;margin-bottom:3px;padding:3px 5px;vertical-align:middle}li input[type=checkbox]{margin:0 .2em .25em 0;vertical-align:middle}.app-nav{margin:25px 60px 0 0;position:absolute;right:0;text-align:right;z-index:2}.app-nav.no-badge{margin-right:25px}.app-nav p{margin:0}.app-nav>a{margin:0 1rem;padding:5px 0}.app-nav li,.app-nav ul{display:inline-block;list-style:none;margin:0}.app-nav a{color:inherit;font-size:16px;text-decoration:none;transition:color .3s}.app-nav a.active,.app-nav a:hover{color:var(--theme-color,#42b983)}.app-nav a.active{border-bottom:2px solid var(--theme-color,#42b983)}.app-nav li{display:inline-block;margin:0 1rem;padding:5px 0;position:relative}.app-nav li ul{background-color:#fff;border:1px solid #ddd;border-bottom-color:#ccc;border-radius:4px;box-sizing:border-box;display:none;max-height:calc(100vh - 61px);overflow-y:auto;padding:10px 0;position:absolute;right:-15px;text-align:left;top:100%;white-space:nowrap}.app-nav li ul li{display:block;font-size:14px;line-height:1rem;margin:0;margin:8px 14px;white-space:nowrap}.app-nav li ul a{display:block;font-size:inherit;margin:0;padding:0}.app-nav li ul a.active{border-bottom:0}.app-nav li:hover ul{display:block}.github-corner{border-bottom:0;position:fixed;right:0;text-decoration:none;top:0;z-index:1}.github-corner:hover .octo-arm{animation:a .56s ease-in-out}.github-corner svg{color:#fff;fill:var(--theme-color,#42b983);height:80px;width:80px}main{display:block;position:relative;width:100vw;height:100%;z-index:0}main.hidden{display:none}.anchor{display:inline-block;text-decoration:none;transition:all .3s}.anchor span{color:#34495e}.anchor:hover{text-decoration:underline}.sidebar{border-right:1px solid rgba(0,0,0,.07);overflow-y:auto;padding:40px 0 0;position:absolute;top:0;bottom:0;left:0;transition:transform .25s ease-out;width:300px;z-index:3}.sidebar>h1{margin:0 auto 1rem;font-size:1.5rem;font-weight:300;text-align:center}.sidebar>h1 a{color:inherit;text-decoration:none}.sidebar>h1 .app-nav{display:block;position:static}.sidebar .sidebar-nav{line-height:2em;padding-bottom:40px}.sidebar li.collapse .app-sub-sidebar{display:none}.sidebar ul{margin:0 0 0 15px;padding:0}.sidebar li>p{font-weight:700;margin:0}.sidebar ul,.sidebar ul li{list-style:none}.sidebar ul li a{border-bottom:none;display:block}.sidebar ul li ul{padding-left:20px}.sidebar::-webkit-scrollbar{width:4px}.sidebar::-webkit-scrollbar-thumb{background:transparent;border-radius:4px}.sidebar:hover::-webkit-scrollbar-thumb{background:hsla(0,0%,53%,.4)}.sidebar:hover::-webkit-scrollbar-track{background:hsla(0,0%,53%,.1)}.sidebar-toggle{background-color:transparent;background-color:hsla(0,0%,100%,.8);border:0;outline:none;padding:10px;position:absolute;bottom:0;left:0;text-align:center;transition:opacity .3s;width:284px;z-index:4}.sidebar-toggle .sidebar-toggle-button:hover{opacity:.4}.sidebar-toggle span{background-color:var(--theme-color,#42b983);display:block;margin-bottom:4px;width:16px;height:2px}body.sticky .sidebar,body.sticky .sidebar-toggle{position:fixed}.content{padding-top:60px;position:absolute;top:0;right:0;bottom:0;left:300px;transition:left .25s ease}.markdown-section{margin:0 auto;max-width:800px;padding:30px 15px 40px;position:relative}.markdown-section>*{box-sizing:border-box;font-size:inherit}.markdown-section>:first-child{margin-top:0!important}.markdown-section hr{border:none;border-bottom:1px solid #eee;margin:2em 0}.markdown-section iframe{border:1px solid #eee;width:1px;min-width:100%}.markdown-section table{border-collapse:collapse;border-spacing:0;display:block;margin-bottom:1rem;overflow:auto;width:100%}.markdown-section th{font-weight:700}.markdown-section td,.markdown-section th{border:1px solid #ddd;padding:6px 13px}.markdown-section tr{border-top:1px solid #ccc}.markdown-section p.tip,.markdown-section tr:nth-child(2n){background-color:#f8f8f8}.markdown-section p.tip{border-bottom-right-radius:2px;border-left:4px solid #f66;border-top-right-radius:2px;margin:2em 0;padding:12px 24px 12px 30px;position:relative}.markdown-section p.tip:before{background-color:#f66;border-radius:100%;color:#fff;content:"!";font-family:Dosis,Source Sans Pro,Helvetica Neue,Arial,sans-serif;font-size:14px;font-weight:700;left:-12px;line-height:20px;position:absolute;height:20px;width:20px;text-align:center;top:14px}.markdown-section p.tip code{background-color:#efefef}.markdown-section p.tip em{color:#34495e}.markdown-section p.warn{background:rgba(66,185,131,.1);border-radius:2px;padding:1rem}.markdown-section ul.task-list>li{list-style-type:none}body.close .sidebar{transform:translateX(-300px)}body.close .sidebar-toggle{width:auto}body.close .content{left:0}@media print{.app-nav,.github-corner,.sidebar,.sidebar-toggle{display:none}}@media screen and (max-width:768px){.github-corner,.sidebar,.sidebar-toggle{position:fixed}.app-nav{margin-top:16px}.app-nav li ul{top:30px}main{height:auto;overflow-x:hidden}.sidebar{left:-300px;transition:transform .25s ease-out}.content{left:0;max-width:100vw;position:static;padding-top:20px;transition:transform .25s ease}.app-nav,.github-corner{transition:transform .25s ease-out}.sidebar-toggle{background-color:transparent;width:auto;padding:30px 30px 10px 10px}body.close .sidebar{transform:translateX(300px)}body.close .sidebar-toggle{background-color:hsla(0,0%,100%,.8);transition:background-color 1s;width:284px;padding:10px}body.close .content{transform:translateX(300px)}body.close .app-nav,body.close .github-corner{display:none}.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:a .56s ease-in-out}}@keyframes a{0%,to{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}section.cover{-ms-flex-align:center;align-items:center;background-position:50%;background-repeat:no-repeat;background-size:cover;height:100vh;display:none}section.cover.show{display:-ms-flexbox;display:flex}section.cover.has-mask .mask{background-color:#fff;opacity:.8;position:absolute;top:0;height:100%;width:100%}section.cover .cover-main{-ms-flex:1;flex:1;margin:-20px 16px 0;text-align:center;z-index:1}section.cover a{color:inherit}section.cover a,section.cover a:hover{text-decoration:none}section.cover p{line-height:1.5rem;margin:1em 0}section.cover h1{color:inherit;font-size:2.5rem;font-weight:300;margin:.625rem 0 2.5rem;position:relative;text-align:center}section.cover h1 a{display:block}section.cover h1 small{bottom:-.4375rem;font-size:1rem;position:absolute}section.cover blockquote{font-size:1.5rem;text-align:center}section.cover ul{line-height:1.8;list-style-type:none;margin:1em auto;max-width:500px;padding:0}section.cover .cover-main>p:last-child a{border:1px solid var(--theme-color,#42b983);border-radius:2rem;box-sizing:border-box;color:var(--theme-color,#42b983);display:inline-block;font-size:1.05rem;letter-spacing:.1rem;margin:.5rem 1rem;padding:.75em 2rem;text-decoration:none;transition:all .15s ease}section.cover .cover-main>p:last-child a:last-child{background-color:var(--theme-color,#42b983);color:#fff}section.cover .cover-main>p:last-child a:last-child:hover{color:inherit;opacity:.8}section.cover .cover-main>p:last-child a:hover{color:inherit}section.cover blockquote>p>a{border-bottom:2px solid var(--theme-color,#42b983);transition:color .3s}section.cover blockquote>p>a:hover{color:var(--theme-color,#42b983)}.sidebar,body{background-color:#fff}.sidebar{color:#364149}.sidebar li{margin:6px 0}.sidebar ul li a{color:#505d6b;font-size:14px;font-weight:400;overflow:hidden;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}.sidebar ul li a:hover{text-decoration:underline}.sidebar ul li ul{padding:0}.sidebar ul li.active>a{border-right:2px solid;color:var(--theme-color,#42b983);font-weight:600}.app-sub-sidebar li:before{content:"-";padding-right:4px;float:left}.markdown-section h1,.markdown-section h2,.markdown-section h3,.markdown-section h4,.markdown-section strong{color:#2c3e50;font-weight:600}.markdown-section a{color:var(--theme-color,#42b983);font-weight:600}.markdown-section h1{font-size:2rem;margin:0 0 1rem}.markdown-section h2{font-size:1.75rem;margin:45px 0 .8rem}.markdown-section h3{font-size:1.5rem;margin:40px 0 .6rem}.markdown-section h4{font-size:1.25rem}.markdown-section h5{font-size:1rem}.markdown-section h6{color:#777;font-size:1rem}.markdown-section figure,.markdown-section p{margin:1.2em 0}.markdown-section ol,.markdown-section p,.markdown-section ul{line-height:1.6rem;word-spacing:.05rem}.markdown-section ol,.markdown-section ul{padding-left:1.5rem}.markdown-section blockquote{border-left:4px solid var(--theme-color,#42b983);color:#858585;margin:2em 0;padding-left:20px}.markdown-section blockquote p{font-weight:600;margin-left:0}.markdown-section iframe{margin:1em 0}.markdown-section em{color:#7f8c8d}.markdown-section code{border-radius:2px;color:#e96900;font-size:.8rem;margin:0 2px;padding:3px 5px;white-space:pre-wrap}.markdown-section code,.markdown-section pre{background-color:#f8f8f8;font-family:Roboto Mono,Monaco,courier,monospace}.markdown-section pre{-moz-osx-font-smoothing:initial;-webkit-font-smoothing:initial;line-height:1.5rem;margin:1.2em 0;overflow:auto;padding:0 1.4rem;position:relative;word-wrap:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#8e908c}.token.namespace{opacity:.7}.token.boolean,.token.number{color:#c76b29}.token.punctuation{color:#525252}.token.property{color:#c08b30}.token.tag{color:#2973b7}.token.string{color:var(--theme-color,#42b983)}.token.selector{color:#6679cc}.token.attr-name{color:#2973b7}.language-css .token.string,.style .token.string,.token.entity,.token.url{color:#22a2c9}.token.attr-value,.token.control,.token.directive,.token.unit{color:var(--theme-color,#42b983)}.token.function,.token.keyword{color:#e96900}.token.atrule,.token.regex,.token.statement{color:#22a2c9}.token.placeholder,.token.variable{color:#3d8fd1}.token.deleted{text-decoration:line-through}.token.inserted{border-bottom:1px dotted #202746;text-decoration:none}.token.italic{font-style:italic}.token.bold,.token.important{font-weight:700}.token.important{color:#c94922}.token.entity{cursor:help}.markdown-section pre>code{-moz-osx-font-smoothing:initial;-webkit-font-smoothing:initial;background-color:#f8f8f8;border-radius:2px;color:#525252;display:block;font-family:Roboto Mono,Monaco,courier,monospace;font-size:.8rem;line-height:inherit;margin:0 2px;max-width:inherit;overflow:inherit;padding:2.2em 5px;white-space:inherit}.markdown-section code:after,.markdown-section code:before{letter-spacing:.05rem}code .token{-moz-osx-font-smoothing:initial;-webkit-font-smoothing:initial;min-height:1.5rem}pre:after{color:#ccc;content:attr(data-lang);font-size:.6rem;font-weight:600;height:15px;line-height:15px;padding:5px 10px 0;position:absolute;right:0;text-align:right;top:0} 2 | -------------------------------------------------------------------------------- /docs/vendor/js/app.min.js: -------------------------------------------------------------------------------- 1 | window.$docsify={auto2top:!0,autoHeader:!1,el:"#app",executeScript:!0,externalLinkTarget:"_blank",fallbackLanguages:["es"],formatUpdated:"{MM}/{DD} {HH}:{mm}",ga:"UA-XXXXX-Y",homepage:"README.md",loadNavbar:!0,loadSidebar:!0,name:"BitCoin Schema",namespace:"bitcoin-schema-1",relativePath:!0,repo:"https://github.com/bitcoinschema/schema",subMaxLevel:4,alias:{".*?/CONDUCT":"https://raw.githubusercontent.com/bitcoinschema/schema/master/CODE_OF_CONDUCT.md",".*?/CONTRIBUTING":"https://raw.githubusercontent.com/bitcoinschema/schema/master/CONTRIBUTING.md"},coverpage:{"/":"cover.md","/es/":"cover.md"},copyCode:{buttonText:{"/es/":"Haga clic para copiar","/":"Copy to clipboard"},errorText:{"/es/":"Error copying","/":"Error copying"},successText:{"/es/":"Copiado","/":"Copied"}},nameLink:{"/es/":"#/es/","/":"/"},notFoundPage:{"/":"error_404.md","/es":"es/error_404.md"},search:{maxAge:"localhost"===window.location.hostname?60:864e5,paths:"auto",placeholder:{"/es/":"Escribe para buscar","/":"Type to search"},noData:{"/es/":"No hay resultados!","/":"No Results!"},depth:3,hideOtherSidebarContent:!1},plugins:[function(e,a){e.beforeEach(function(e){return'
'+('edit this file\n')+"
\n\n"+e})}]},navigator.serviceWorker&&navigator.serviceWorker.register("vendor/js/sw.js"); -------------------------------------------------------------------------------- /docs/vendor/js/docsify-copy-code.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * docsify-copy-code 3 | * v2.1.0 4 | * https://github.com/jperasmus/docsify-copy-code 5 | * (c) 2017-2019 JP Erasmus 6 | * MIT license 7 | */ 8 | !function(){"use strict";function r(o){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(o)}!function(o,e){void 0===e&&(e={});var t=e.insertAt;if(o&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.type="text/css","top"===t&&n.firstChild?n.insertBefore(c,n.firstChild):n.appendChild(c),c.styleSheet?c.styleSheet.cssText=o:c.appendChild(document.createTextNode(o))}}(".docsify-copy-code-button,.docsify-copy-code-button span{cursor:pointer;transition:all .25s ease}.docsify-copy-code-button{position:absolute;z-index:1;top:0;right:0;overflow:visible;padding:.65em .8em;border:0;border-radius:0;outline:0;font-size:1em;background:grey;background:var(--theme-color,grey);color:#fff;opacity:0}.docsify-copy-code-button span{border-radius:3px;background:inherit;pointer-events:none}.docsify-copy-code-button .error,.docsify-copy-code-button .success{position:absolute;z-index:-100;top:50%;left:0;padding:.5em .65em;font-size:.825em;opacity:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.docsify-copy-code-button.error .error,.docsify-copy-code-button.success .success{opacity:1;-webkit-transform:translate(-115%,-50%);transform:translate(-115%,-50%)}.docsify-copy-code-button:focus,pre:hover .docsify-copy-code-button{opacity:1}"),document.querySelector('link[href*="docsify-copy-code"]')&&console.warn("[Deprecation] Link to external docsify-copy-code stylesheet is no longer necessary."),window.DocsifyCopyCodePlugin={init:function(){return function(o,e){o.ready(function(){console.warn("[Deprecation] Manually initializing docsify-copy-code using window.DocsifyCopyCodePlugin.init() is no longer necessary.")})}}},window.$docsify=window.$docsify||{},window.$docsify.plugins=[function(o,s){o.doneEach(function(){var o=Array.apply(null,document.querySelectorAll("pre[data-lang]")),c={buttonText:"Copy to clipboard",errorText:"Error",successText:"Copied"};s.config.copyCode&&Object.keys(c).forEach(function(t){var n=s.config.copyCode[t];"string"==typeof n?c[t]=n:"object"===r(n)&&Object.keys(n).some(function(o){var e=-1',''.concat(c.buttonText,""),''.concat(c.errorText,""),''.concat(c.successText,""),""].join("");o.forEach(function(o){o.insertAdjacentHTML("beforeend",e)})}),o.mounted(function(){document.querySelector(".content").addEventListener("click",function(o){if(o.target.classList.contains("docsify-copy-code-button")){var e="BUTTON"===o.target.tagName?o.target:o.target.parentNode,t=document.createRange(),n=e.parentNode.querySelector("code"),c=window.getSelection();t.selectNode(n),c.removeAllRanges(),c.addRange(t);try{document.execCommand("copy")&&(e.classList.add("success"),setTimeout(function(){e.classList.remove("success")},1e3))}catch(o){console.error("docsify-copy-code: ".concat(o)),e.classList.add("error"),setTimeout(function(){e.classList.remove("error")},1e3)}"function"==typeof(c=window.getSelection()).removeRange?c.removeRange(t):"function"==typeof c.removeAllRanges&&c.removeAllRanges()}})})}].concat(window.$docsify.plugins||[])}(); 9 | //# sourceMappingURL=docsify-copy-code.min.js.map 10 | -------------------------------------------------------------------------------- /docs/vendor/js/docsify-pagination.min.js: -------------------------------------------------------------------------------- 1 | !function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e():"function"==typeof define&&define.amd?define(e):e()}(0,function(){"use strict";var n,c=(function(n,e){function t(n,e){return e.querySelector(n)}(e=n.exports=function(n,e){return t(n,e=e||document)}).all=function(n,e){return(e=e||document).querySelectorAll(n)},e.engine=function(n){if(!n.one)throw new Error(".one callback required");if(!n.all)throw new Error(".all callback required");return t=n.one,e.all=n.all,e}}(n={exports:{}},n.exports),n.exports);c.all,c.engine;try{var o=c}catch(n){o=c}var e=Element.prototype,a=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector,s=function(n,e){if(!n||1!==n.nodeType)return!1;if(a)return a.call(n,e);for(var t=o.all(e,n.parentNode),i=0;i*{line-height:1;vertical-align:middle}.pagination-item-label svg{height:.8em;width:auto;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1px}.pagination-item--next{margin-left:auto;text-align:right}.pagination-item--next svg{margin-left:.5em}.pagination-item--previous svg{margin-right:.5em}.pagination-item-title{font-size:1.6em}");var t=function(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")},r=function(){function i(n,e){for(var t=0;t'},inner:function(n,e){return[n.prev&&'\n \n ",n.next&&'\n \n "].filter(Boolean).join("")}};window.$docsify=window.$docsify||{},window.$docsify.plugins=[function(n,e){var t=l({},u,e.config.pagination||{});function i(){var n=c("."+f);n&&(n.innerHTML=v.inner(function(n,e){try{var t=n.route.path,i=d(c.all(".sidebar li a")).filter(function(n){return!s(n,".section-link")}),o=i.find(m(t)),a=d((p(o,"ul")||{}).children).filter(function(n){return"LI"===n.tagName.toUpperCase()}),r=e?i.findIndex(m(t)):a.findIndex(function(n){var e=g(n);return e&&m(t,e)}),l=e?i:a;return{prev:new h(l[r-1]).toJSON(),next:new h(l[r+1]).toJSON()}}catch(n){return{}}}(e,t.crossChapter),t))}n.afterEach(function(n){return n+v.container()}),n.doneEach(function(){return i()})}].concat(window.$docsify.plugins||[])}); 2 | -------------------------------------------------------------------------------- /docs/vendor/js/edit-on-github.js: -------------------------------------------------------------------------------- 1 | ;(function(win) { 2 | win.EditOnGithubPlugin = {} 3 | 4 | function create(docBase, docEditBase, title) { 5 | title = title || 'Edit on github' 6 | docEditBase = docEditBase || docBase.replace(/\/blob\//, '/edit/') 7 | 8 | function editDoc(event, vm) { 9 | var docName = vm.route.file 10 | 11 | if (docName) { 12 | var editLink = docEditBase + docName 13 | window.open(editLink) 14 | event.preventDefault() 15 | return false 16 | } else { 17 | return true 18 | } 19 | } 20 | 21 | win.EditOnGithubPlugin.editDoc = editDoc 22 | 23 | return function(hook, vm) { 24 | win.EditOnGithubPlugin.onClick = function(event) { 25 | EditOnGithubPlugin.editDoc(event, vm) 26 | } 27 | 28 | var header = [ 29 | '
', 30 | '

', 33 | title, 34 | '

', 35 | '
' 36 | ].join('') 37 | 38 | hook.afterEach(function (html) { 39 | return header + html 40 | }) 41 | } 42 | } 43 | 44 | win.EditOnGithubPlugin.create = create 45 | }) (window) 46 | -------------------------------------------------------------------------------- /docs/vendor/js/emoji.min.js: -------------------------------------------------------------------------------- 1 | !function(){var o=["+1","100","1234","8ball","a","ab","abc","abcd","accept","aerial_tramway","airplane","alarm_clock","alien","ambulance","anchor","angel","anger","angry","anguished","ant","apple","aquarius","aries","arrow_backward","arrow_double_down","arrow_double_up","arrow_down","arrow_down_small","arrow_forward","arrow_heading_down","arrow_heading_up","arrow_left","arrow_lower_left","arrow_lower_right","arrow_right","arrow_right_hook","arrow_up","arrow_up_down","arrow_up_small","arrow_upper_left","arrow_upper_right","arrows_clockwise","arrows_counterclockwise","art","articulated_lorry","astonished","athletic_shoe","atm","b","baby","baby_bottle","baby_chick","baby_symbol","back","baggage_claim","balloon","ballot_box_with_check","bamboo","banana","bangbang","bank","bar_chart","barber","baseball","basketball","bath","bathtub","battery","bear","bee","beer","beers","beetle","beginner","bell","bento","bicyclist","bike","bikini","bird","birthday","black_circle","black_joker","black_large_square","black_medium_small_square","black_medium_square","black_nib","black_small_square","black_square_button","blossom","blowfish","blue_book","blue_car","blue_heart","blush","boar","boat","bomb","book","bookmark","bookmark_tabs","books","boom","boot","bouquet","bow","bowling","bowtie","boy","bread","bride_with_veil","bridge_at_night","briefcase","broken_heart","bug","bulb","bullettrain_front","bullettrain_side","bus","busstop","bust_in_silhouette","busts_in_silhouette","cactus","cake","calendar","calling","camel","camera","cancer","candy","capital_abcd","capricorn","car","card_index","carousel_horse","cat","cat2","cd","chart","chart_with_downwards_trend","chart_with_upwards_trend","checkered_flag","cherries","cherry_blossom","chestnut","chicken","children_crossing","chocolate_bar","christmas_tree","church","cinema","circus_tent","city_sunrise","city_sunset","cl","clap","clapper","clipboard","clock1","clock10","clock1030","clock11","clock1130","clock12","clock1230","clock130","clock2","clock230","clock3","clock330","clock4","clock430","clock5","clock530","clock6","clock630","clock7","clock730","clock8","clock830","clock9","clock930","closed_book","closed_lock_with_key","closed_umbrella","cloud","clubs","cn","cocktail","coffee","cold_sweat","collision","computer","confetti_ball","confounded","confused","congratulations","construction","construction_worker","convenience_store","cookie","cool","cop","copyright","corn","couple","couple_with_heart","couplekiss","cow","cow2","credit_card","crescent_moon","crocodile","crossed_flags","crown","cry","crying_cat_face","crystal_ball","cupid","curly_loop","currency_exchange","curry","custard","customs","cyclone","dancer","dancers","dango","dart","dash","date","de","deciduous_tree","department_store","diamond_shape_with_a_dot_inside","diamonds","disappointed","disappointed_relieved","dizzy","dizzy_face","do_not_litter","dog","dog2","dollar","dolls","dolphin","door","doughnut","dragon","dragon_face","dress","dromedary_camel","droplet","dvd","e-mail","ear","ear_of_rice","earth_africa","earth_americas","earth_asia","egg","eggplant","eight","eight_pointed_black_star","eight_spoked_asterisk","electric_plug","elephant","email","end","envelope","envelope_with_arrow","es","euro","european_castle","european_post_office","evergreen_tree","exclamation","expressionless","eyeglasses","eyes","facepunch","factory","fallen_leaf","family","fast_forward","fax","fearful","feelsgood","feet","ferris_wheel","file_folder","finnadie","fire","fire_engine","fireworks","first_quarter_moon","first_quarter_moon_with_face","fish","fish_cake","fishing_pole_and_fish","fist","five","flags","flashlight","flipper","floppy_disk","flower_playing_cards","flushed","foggy","football","footprints","fork_and_knife","fountain","four","four_leaf_clover","fr","free","fried_shrimp","fries","frog","frowning","fu","fuelpump","full_moon","full_moon_with_face","game_die","gb","gem","gemini","ghost","gift","gift_heart","girl","globe_with_meridians","goat","goberserk","godmode","golf","grapes","green_apple","green_book","green_heart","grey_exclamation","grey_question","grimacing","grin","grinning","guardsman","guitar","gun","haircut","hamburger","hammer","hamster","hand","handbag","hankey","hash","hatched_chick","hatching_chick","headphones","hear_no_evil","heart","heart_decoration","heart_eyes","heart_eyes_cat","heartbeat","heartpulse","hearts","heavy_check_mark","heavy_division_sign","heavy_dollar_sign","heavy_exclamation_mark","heavy_minus_sign","heavy_multiplication_x","heavy_plus_sign","helicopter","herb","hibiscus","high_brightness","high_heel","hocho","honey_pot","honeybee","horse","horse_racing","hospital","hotel","hotsprings","hourglass","hourglass_flowing_sand","house","house_with_garden","hurtrealbad","hushed","ice_cream","icecream","id","ideograph_advantage","imp","inbox_tray","incoming_envelope","information_desk_person","information_source","innocent","interrobang","iphone","it","izakaya_lantern","jack_o_lantern","japan","japanese_castle","japanese_goblin","japanese_ogre","jeans","joy","joy_cat","jp","key","keycap_ten","kimono","kiss","kissing","kissing_cat","kissing_closed_eyes","kissing_heart","kissing_smiling_eyes","koala","koko","kr","lantern","large_blue_circle","large_blue_diamond","large_orange_diamond","last_quarter_moon","last_quarter_moon_with_face","laughing","leaves","ledger","left_luggage","left_right_arrow","leftwards_arrow_with_hook","lemon","leo","leopard","libra","light_rail","link","lips","lipstick","lock","lock_with_ink_pen","lollipop","loop","loud_sound","loudspeaker","love_hotel","love_letter","low_brightness","m","mag","mag_right","mahjong","mailbox","mailbox_closed","mailbox_with_mail","mailbox_with_no_mail","man","man_with_gua_pi_mao","man_with_turban","mans_shoe","maple_leaf","mask","massage","meat_on_bone","mega","melon","memo","mens","metal","metro","microphone","microscope","milky_way","minibus","minidisc","mobile_phone_off","money_with_wings","moneybag","monkey","monkey_face","monorail","moon","mortar_board","mount_fuji","mountain_bicyclist","mountain_cableway","mountain_railway","mouse","mouse2","movie_camera","moyai","muscle","mushroom","musical_keyboard","musical_note","musical_score","mute","nail_care","name_badge","neckbeard","necktie","negative_squared_cross_mark","neutral_face","new","new_moon","new_moon_with_face","newspaper","ng","night_with_stars","nine","no_bell","no_bicycles","no_entry","no_entry_sign","no_good","no_mobile_phones","no_mouth","no_pedestrians","no_smoking","non-potable_water","nose","notebook","notebook_with_decorative_cover","notes","nut_and_bolt","o","o2","ocean","octocat","octopus","oden","office","ok","ok_hand","ok_woman","older_man","older_woman","on","oncoming_automobile","oncoming_bus","oncoming_police_car","oncoming_taxi","one","open_book","open_file_folder","open_hands","open_mouth","ophiuchus","orange_book","outbox_tray","ox","package","page_facing_up","page_with_curl","pager","palm_tree","panda_face","paperclip","parking","part_alternation_mark","partly_sunny","passport_control","paw_prints","peach","pear","pencil","pencil2","penguin","pensive","performing_arts","persevere","person_frowning","person_with_blond_hair","person_with_pouting_face","phone","pig","pig2","pig_nose","pill","pineapple","pisces","pizza","point_down","point_left","point_right","point_up","point_up_2","police_car","poodle","poop","post_office","postal_horn","postbox","potable_water","pouch","poultry_leg","pound","pouting_cat","pray","princess","punch","purple_heart","purse","pushpin","put_litter_in_its_place","question","rabbit","rabbit2","racehorse","radio","radio_button","rage","rage1","rage2","rage3","rage4","railway_car","rainbow","raised_hand","raised_hands","raising_hand","ram","ramen","rat","recycle","red_car","red_circle","registered","relaxed","relieved","repeat","repeat_one","restroom","revolving_hearts","rewind","ribbon","rice","rice_ball","rice_cracker","rice_scene","ring","rocket","roller_coaster","rooster","rose","rotating_light","round_pushpin","rowboat","ru","rugby_football","runner","running","running_shirt_with_sash","sa","sagittarius","sailboat","sake","sandal","santa","satellite","satisfied","saxophone","school","school_satchel","scissors","scorpius","scream","scream_cat","scroll","seat","secret","see_no_evil","seedling","seven","shaved_ice","sheep","shell","ship","shipit","shirt","shit","shoe","shower","signal_strength","six","six_pointed_star","ski","skull","sleeping","sleepy","slot_machine","small_blue_diamond","small_orange_diamond","small_red_triangle","small_red_triangle_down","smile","smile_cat","smiley","smiley_cat","smiling_imp","smirk","smirk_cat","smoking","snail","snake","snowboarder","snowflake","snowman","sob","soccer","soon","sos","sound","space_invader","spades","spaghetti","sparkle","sparkler","sparkles","sparkling_heart","speak_no_evil","speaker","speech_balloon","speedboat","squirrel","star","star2","stars","station","statue_of_liberty","steam_locomotive","stew","straight_ruler","strawberry","stuck_out_tongue","stuck_out_tongue_closed_eyes","stuck_out_tongue_winking_eye","sun_with_face","sunflower","sunglasses","sunny","sunrise","sunrise_over_mountains","surfer","sushi","suspect","suspension_railway","sweat","sweat_drops","sweat_smile","sweet_potato","swimmer","symbols","syringe","tada","tanabata_tree","tangerine","taurus","taxi","tea","telephone","telephone_receiver","telescope","tennis","tent","thought_balloon","three","thumbsdown","thumbsup","ticket","tiger","tiger2","tired_face","tm","toilet","tokyo_tower","tomato","tongue","top","tophat","tractor","traffic_light","train","train2","tram","triangular_flag_on_post","triangular_ruler","trident","triumph","trolleybus","trollface","trophy","tropical_drink","tropical_fish","truck","trumpet","tshirt","tulip","turtle","tv","twisted_rightwards_arrows","two","two_hearts","two_men_holding_hands","two_women_holding_hands","u5272","u5408","u55b6","u6307","u6708","u6709","u6e80","u7121","u7533","u7981","u7a7a","uk","umbrella","unamused","underage","unlock","up","us","v","vertical_traffic_light","vhs","vibration_mode","video_camera","video_game","violin","virgo","volcano","vs","walking","waning_crescent_moon","waning_gibbous_moon","warning","watch","water_buffalo","watermelon","wave","wavy_dash","waxing_crescent_moon","waxing_gibbous_moon","wc","weary","wedding","whale","whale2","wheelchair","white_check_mark","white_circle","white_flower","white_large_square","white_medium_small_square","white_medium_square","white_small_square","white_square_button","wind_chime","wine_glass","wink","wolf","woman","womans_clothes","womans_hat","womens","worried","wrench","x","yellow_heart","yen","yum","zap","zero","zzz"];window.emojify=function(e,a){return-1===o.indexOf(a)?e:''+a+''}}(); 2 | -------------------------------------------------------------------------------- /docs/vendor/js/external-script.min.js: -------------------------------------------------------------------------------- 1 | !function(){function e(){for(var o=Docsify.dom.getNode("#main"),e=Docsify.dom.findAll(o,"script"),n=e.length;n--;){var i=e[n];if(i&&i.src){var t=document.createElement("script");Array.prototype.slice.call(i.attributes).forEach(function(o){t[o.name]=o.value}),i.parentNode.insertBefore(t,i),i.parentNode.removeChild(i)}}}window.$docsify.plugins=[].concat(function(o){o.doneEach(e)},window.$docsify.plugins)}(); 2 | -------------------------------------------------------------------------------- /docs/vendor/js/ga.min.js: -------------------------------------------------------------------------------- 1 | !function(){function n(n){var o;(o=document.createElement("script")).async=!0,o.src="https://www.google-analytics.com/analytics.js",document.body.appendChild(o),window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=Number(new Date),window.ga("create",n,"auto")}function o(){window.ga||n($docsify.ga),window.ga("set","page",location.hash),window.ga("send","pageview")}$docsify.plugins=[].concat(function(n){$docsify.ga?n.beforeEach(o):console.error("[Docsify] ga is required.")},$docsify.plugins)}(); 2 | -------------------------------------------------------------------------------- /docs/vendor/js/prism-json.min.js: -------------------------------------------------------------------------------- 1 | Prism.languages.json={property:{pattern:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,number:/-?\d+\.?\d*(e[+-]?\d+)?/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}}; 2 | -------------------------------------------------------------------------------- /docs/vendor/js/search.min.js: -------------------------------------------------------------------------------- 1 | !function(){var f={},u={EXPIRE_KEY:"docsify.search.expires",INDEX_KEY:"docsify.search.index"};function h(e){var n={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return String(e).replace(/[&<>"'/]/g,function(e){return n[e]})}function o(o,r){var e,n,t="auto"===o.paths,s=(e=o.namespace)?u.EXPIRE_KEY+"/"+e:u.EXPIRE_KEY,c=(n=o.namespace)?u.INDEX_KEY+"/"+n:u.INDEX_KEY,a=localStorage.getItem(s)l.length&&(o=l.length);var r="..."+h(l).substring(i,o).replace(t,''+e+"")+"...";c+=r}}),0\n

'+e.title+"

\n

"+e.content+"

\n\n"}),t.classList.add("show"),a.classList.add("show"),t.innerHTML=s||'

'+d+"

",c.hideOtherSidebarContent&&(i.classList.add("hide"),o.classList.add("hide"))}function l(e){c=e}function r(e,n){var t,a,i,o,r=n.router.parse().query.s;l(e),Docsify.dom.style("\n.sidebar {\n padding-top: 0;\n}\n\n.search {\n margin-bottom: 20px;\n padding: 6px;\n border-bottom: 1px solid #eee;\n}\n\n.search .input-wrap {\n display: flex;\n align-items: center;\n}\n\n.search .results-panel {\n display: none;\n}\n\n.search .results-panel.show {\n display: block;\n}\n\n.search input {\n outline: none;\n border: none;\n width: 100%;\n padding: 0 7px;\n line-height: 36px;\n font-size: 14px;\n}\n\n.search input::-webkit-search-decoration,\n.search input::-webkit-search-cancel-button,\n.search input {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n}\n.search .clear-button {\n width: 36px;\n text-align: right;\n display: none;\n}\n\n.search .clear-button.show {\n display: block;\n}\n\n.search .clear-button svg {\n transform: scale(.5);\n}\n\n.search h2 {\n font-size: 17px;\n margin: 10px 0;\n}\n\n.search a {\n text-decoration: none;\n color: inherit;\n}\n\n.search .matching-post {\n border-bottom: 1px solid #eee;\n}\n\n.search .matching-post:last-child {\n border-bottom: 0;\n}\n\n.search p {\n font-size: 14px;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n\n.search p.empty {\n text-align: center;\n}\n\n.app-name.hide, .sidebar-nav.hide {\n display: none;\n}"),function(e){void 0===e&&(e="");var n='
\n \n
\n \n \n \n \n \n
\n
\n
\n ',t=Docsify.dom.create("div",n),a=Docsify.dom.find("aside");Docsify.dom.toggleClass(t,"search"),Docsify.dom.before(a,t)}(r),a=Docsify.dom.find("div.search"),i=Docsify.dom.find(a,"input"),o=Docsify.dom.find(a,".input-wrap"),Docsify.dom.on(a,"click",function(e){return"A"!==e.target.tagName&&e.stopPropagation()}),Docsify.dom.on(i,"input",function(n){clearTimeout(t),t=setTimeout(function(e){return s(n.target.value.trim())},100)}),Docsify.dom.on(o,"click",function(e){"INPUT"!==e.target.tagName&&(i.value="",s())}),r&&setTimeout(function(e){return s(r)},500)}function p(e,n){l(e),function(e,n){var t=Docsify.dom.getNode('.search input[type="search"]');if(t)if("string"==typeof e)t.placeholder=e;else{var a=Object.keys(e).filter(function(e){return-1 { 21 | let now = Date.now() 22 | let url = new URL(req.url) 23 | 24 | // 1. fixed http URL 25 | // Just keep syncing with location.protocol 26 | // fetch(httpURL) belongs to active mixed content. 27 | // And fetch(httpRequest) is not supported yet. 28 | url.protocol = self.location.protocol 29 | 30 | // 2. add query for caching-busting. 31 | // Github Pages served with Cache-Control: max-age=600 32 | // max-age on mutable content is error-prone, with SW life of bugs can even extend. 33 | // Until cache mode of Fetch API landed, we have to workaround cache-busting with query string. 34 | // Cache-Control-Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=453190 35 | if (url.hostname === self.location.hostname) { 36 | url.search += (url.search ? '&' : '?') + 'cache-bust=' + now 37 | } 38 | return url.href 39 | } 40 | 41 | /** 42 | * @Lifecycle Activate 43 | * New one activated when old isnt being used. 44 | * 45 | * waitUntil(): activating ====> activated 46 | */ 47 | self.addEventListener('activate', event => { 48 | event.waitUntil(self.clients.claim()) 49 | }) 50 | 51 | /** 52 | * @Functional Fetch 53 | * All network requests are being intercepted here. 54 | * 55 | * void respondWith(Promise r) 56 | */ 57 | self.addEventListener('fetch', event => { 58 | // Skip some of cross-origin requests, like those for Google Analytics. 59 | if (HOSTNAME_WHITELIST.indexOf(new URL(event.request.url).hostname) > -1) { 60 | // Stale-while-revalidate 61 | // similar to HTTP's stale-while-revalidate: https://www.mnot.net/blog/2007/12/12/stale 62 | // Upgrade from Jake's to Surma's: https://gist.github.com/surma/eb441223daaedf880801ad80006389f1 63 | const cached = caches.match(event.request) 64 | const fixedUrl = getFixedUrl(event.request) 65 | const fetched = fetch(fixedUrl, { cache: 'no-store' }) 66 | const fetchedCopy = fetched.then(resp => resp.clone()) 67 | 68 | // Call respondWith() with whatever we get first. 69 | // If the fetch fails (e.g disconnected), wait for the cache. 70 | // If there’s nothing in cache, wait for the fetch. 71 | // If neither yields a response, return offline pages. 72 | event.respondWith( 73 | Promise.race([fetched.catch(_ => cached), cached]) 74 | .then(resp => resp || fetched) 75 | .catch(_ => { /* eat any errors */ }) 76 | ) 77 | 78 | // Update the cache with the version we fetched (only for ok status) 79 | event.waitUntil( 80 | Promise.all([fetchedCopy, caches.open(RUNTIME)]) 81 | .then(([response, cache]) => response.ok && cache.put(event.request, response)) 82 | .catch(_ => { /* eat any errors */ }) 83 | ) 84 | } 85 | }) 86 | -------------------------------------------------------------------------------- /firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "hosting": { 3 | "public": "docs", 4 | "headers": [ 5 | { 6 | "source": "**", 7 | "headers": [ 8 | { 9 | "key": "Cache-Control", 10 | "value": "no-cache" 11 | } 12 | ] 13 | } 14 | ], 15 | "ignore": [ 16 | "firebase.json", 17 | "**/.*", 18 | "**/node_modules/**" 19 | ] 20 | } 21 | } -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const strip = require('gulp-strip-css-comments') 4 | const prefix = require('gulp-autoprefixer') 5 | const cssnano = require('gulp-cssnano') 6 | const uglify = require('gulp-uglify') 7 | const concat = require('gulp-concat') 8 | const sass = require('gulp-sass')(require('sass')) 9 | const gulp = require('gulp') 10 | 11 | const src = { 12 | css: ['src/sass/styles.scss'], 13 | js: ['src/js/app.js'] 14 | } 15 | 16 | const distCss = { 17 | path: 'docs/vendor/css', 18 | name: { 19 | css: 'styles' 20 | } 21 | } 22 | 23 | const distJs = { 24 | path: 'docs/vendor/js', 25 | name: { 26 | js: 'app' 27 | } 28 | } 29 | 30 | const css = () => 31 | gulp 32 | .src(src.css) 33 | .pipe(sass().on('error', sass.logError)) 34 | .pipe(concat(`${distCss.name.css}.min.css`)) 35 | .pipe(prefix()) 36 | .pipe(strip({ all: true })) 37 | .pipe(cssnano()) 38 | .pipe(gulp.dest(distCss.path)) 39 | 40 | const js = () => 41 | gulp 42 | .src(src.js) 43 | .pipe(concat(`${distJs.name.js}.min.js`)) 44 | .pipe(uglify()) 45 | .pipe(gulp.dest(distJs.path)) 46 | 47 | const build = gulp.parallel(css, js) 48 | 49 | const watch = () => { 50 | gulp.watch(src.css, css) 51 | gulp.watch(src.js, js) 52 | } 53 | 54 | exports.build = build 55 | exports.css = css 56 | exports.js = js 57 | exports.watch = watch 58 | exports.default = gulp.series(build, watch) 59 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bitcoin-schema", 3 | "description": "Community driven extensible schemas that enable developers to create interoperable data based applications.", 4 | "homepage": "https://bitcoinschema.org", 5 | "version": "0.0.4", 6 | "main": "docs/index.html", 7 | "bugs": { 8 | "url": "https://github.com/bitcoinschema/schema/issues" 9 | }, 10 | "keywords": [ 11 | "schema", 12 | "bitcoin", 13 | "bitcoinsv", 14 | "bsv" 15 | ], 16 | "author": { 17 | "name": "BitCoinSchema", 18 | "email": "suggestions@bitcoinschema.org", 19 | "url": "https://bitcoinschema.org" 20 | }, 21 | "contributors": [ 22 | { 23 | "name": "Satchmo", 24 | "url": "https://github.com/rohenaz/" 25 | }, 26 | { 27 | "name": "MrZ", 28 | "url": "https://github.com/mrz1836/" 29 | } 30 | ], 31 | "devDependencies": { 32 | "@commitlint/cli": "^19.8.1", 33 | "@commitlint/config-conventional": "19.8.1", 34 | "browser-sync": "^3.0.4", 35 | "concurrently": "^9.1.2", 36 | "conventional-github-releaser": "^3.1.5", 37 | "docsify-cli": "^4.4.4", 38 | "finepack": "^2.12.8", 39 | "git-authors-cli": "^1.0.52", 40 | "gulp": "^5.0.1", 41 | "gulp-autoprefixer": "^9.0.0", 42 | "gulp-concat": "^2.6.1", 43 | "gulp-cssnano": "^2.1.3", 44 | "gulp-sass": "^6.0.1", 45 | "gulp-strip-css-comments": "^3.0.0", 46 | "gulp-uglify": "^3.0.2", 47 | "lint-staged": "^16.1.0", 48 | "npm-check-updates": "^18.0.1", 49 | "prettier-standard": "^16.4.1", 50 | "sass": "^1.89.1", 51 | "standard": "^17.1.2", 52 | "standard-markdown": "^7.1.0", 53 | "standard-version": "^9.5.0" 54 | }, 55 | "engines": { 56 | "node": "*" 57 | }, 58 | "files": [ 59 | "docs", 60 | "gulpfile.js", 61 | "src" 62 | ], 63 | "scripts": { 64 | "build": "gulp build", 65 | "dev": "concurrently \"gulp\" \"npm run server:dev\"", 66 | "lint": "standard-markdown docs/**/*.md", 67 | "postrelease": "npm run release:tags && npm run release:github", 68 | "prerelease": "npm run update:check", 69 | "pretest": "npm run lint", 70 | "release": "standard-version -a", 71 | "release:github": "conventional-github-releaser -p angular", 72 | "release:tags": "git push --follow-tags origin HEAD:master", 73 | "server:dev": "cd docs && browser-sync start --server --files \"index.html, **/*.md, app.min.js, styles.min.css\"", 74 | "start": "docsify start docs", 75 | "test": "echo 'no tests available' && exit 0", 76 | "update": "ncu -u", 77 | "update:check": "ncu -- --error-level 2" 78 | }, 79 | "private": true, 80 | "license": "Open BSV", 81 | "commitlint": { 82 | "extends": [ 83 | "@commitlint/config-conventional" 84 | ] 85 | }, 86 | "repository": { 87 | "type": "git", 88 | "url": "https://github.com/bitcoinschema/schema/" 89 | }, 90 | "lint-staged": { 91 | "package.json": [ 92 | "finepack", 93 | "git add" 94 | ], 95 | "*.js": [ 96 | "prettier-standard", 97 | "git add" 98 | ], 99 | "*.md": [ 100 | "standard-markdown", 101 | "git add" 102 | ] 103 | }, 104 | "dependencies": { 105 | "sass": "^1.89.1" 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/js/app.js: -------------------------------------------------------------------------------- 1 | // Setup the docsify application 2 | window.$docsify = { 3 | /* themeColor: '#55b3ee', */ 4 | auto2top: true, 5 | autoHeader: false, 6 | el: '#app', 7 | executeScript: true, 8 | externalLinkTarget: '_blank', 9 | fallbackLanguages: ['es'], 10 | formatUpdated: '{MM}/{DD} {HH}:{mm}', 11 | ga: 'UA-XXXXX-Y', 12 | homepage: 'README.md', 13 | loadNavbar: true, 14 | loadSidebar: true, 15 | name: 'BitCoin Schema', 16 | namespace: 'bitcoin-schema-1', 17 | relativePath: true, 18 | repo: 'https://github.com/bitcoinschema/schema', 19 | subMaxLevel: 4, 20 | alias: { 21 | '.*?/CONDUCT': 'https://raw.githubusercontent.com/bitcoinschema/schema/master/CODE_OF_CONDUCT.md', 22 | '.*?/CONTRIBUTING': 'https://raw.githubusercontent.com/bitcoinschema/schema/master/CONTRIBUTING.md' 23 | }, 24 | coverpage: { 25 | '/': 'cover.md', 26 | '/es/': 'cover.md' 27 | }, 28 | copyCode: { 29 | buttonText: { 30 | '/es/': 'Haga clic para copiar', 31 | '/': 'Copy to clipboard' 32 | }, 33 | errorText: { 34 | '/es/': 'Error copying', 35 | '/': 'Error copying' 36 | }, 37 | successText: { 38 | '/es/': 'Copiado', 39 | '/': 'Copied' 40 | } 41 | }, 42 | nameLink: { 43 | '/es/': '#/es/', 44 | '/': '/' 45 | }, 46 | notFoundPage: { 47 | '/': 'error_404.md', 48 | '/es': 'es/error_404.md' 49 | }, 50 | search: { 51 | maxAge: (window.location.hostname === 'localhost') ? 60 : 86400000, // one day 52 | paths: 'auto', 53 | placeholder: { 54 | '/es/': 'Escribe para buscar', 55 | '/': 'Type to search' 56 | }, 57 | noData: { 58 | '/es/': 'No hay resultados!', 59 | '/': 'No Results!' 60 | }, 61 | depth: 3, 62 | hideOtherSidebarContent: false 63 | }, 64 | plugins: [ 65 | function (hook, vm) { 66 | hook.beforeEach(function (markdown) { 67 | const url = 68 | 'https://github.com/bitcoinschema/schema/edit/master/docs' + 69 | vm.router.getFile() 70 | const editButton = 71 | 'edit this file\n' 74 | const metaContainer = 75 | '
' + editButton + '
\n\n' 76 | return metaContainer + markdown 77 | }) 78 | } 79 | ] 80 | } 81 | 82 | // Register the service worker 83 | navigator.serviceWorker && navigator.serviceWorker.register('vendor/js/sw.js') 84 | -------------------------------------------------------------------------------- /src/sass/_vars.scss: -------------------------------------------------------------------------------- 1 | $edit-button-color : #364149; 2 | -------------------------------------------------------------------------------- /src/sass/styles.scss: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css?family=Roboto+Mono|Source+Sans+Pro:300,400,600'); 2 | @import 'vars'; 3 | 4 | body { 5 | font-size: 14px; 6 | line-height: 20px; 7 | } 8 | 9 | .markdown-section pre { 10 | font-family: Roboto Mono, Monaco, courier, monospace; 11 | } 12 | 13 | .markdown-section pre > code { 14 | font-family: Roboto Mono, Monaco, courier, monospace; 15 | font-size: 0.8rem; 16 | } 17 | 18 | a { 19 | overflow-wrap: break-word; 20 | word-wrap: break-word; 21 | -ms-word-break: break-all; 22 | word-break: break-word; 23 | } 24 | 25 | nav.app-nav li ul { 26 | min-width: 100px; 27 | } 28 | 29 | .sidebar li { 30 | margin: 0; 31 | } 32 | 33 | .edit-button { 34 | text-decoration: none; 35 | font-size: 12px; 36 | color: $edit-button-color; 37 | } 38 | 39 | .edit-button svg { 40 | width: 14px; 41 | margin-right: .5rem; 42 | top: 2px; 43 | position: relative; 44 | } 45 | --------------------------------------------------------------------------------