Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build and Package .dapp

on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
uses: ./.github/workflows/make-dapp.yaml
with:
manifest_name: 'Beam Anonymous Name Service'
manifest_description: 'Decentralized anonymous naming for the BEAM wallet'
manifest_version_prefix: "1.1"
manifest_guid: '80d959380988421cb3825b6839dcad67'
manifest_icon: 'localapp/app/favicon.ico'
dapp_name: 'bans-app'

114 changes: 114 additions & 0 deletions .github/workflows/make-dapp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: Reusable Build and Package .dapp

on:
workflow_call:
inputs:
node_version:
description: 'Node.js version to use'
default: '20'
type: string
build_command:
description: 'Command to build the project'
default: 'yarn build:prod'
type: string
manifest_name:
description: 'Name of the .dapp application'
required: true
type: string
manifest_description:
description: 'Description of the .dapp application'
required: true
type: string
manifest_icon:
description: 'Path to the icon file'
default: 'localapp/app/logo.svg'
type: string
manifest_url:
description: 'URL for the application'
default: 'localapp/app/index.html'
type: string
manifest_version_prefix:
description: 'Version prefix of the application'
required: true
type: string
manifest_api_version:
description: 'API version of the application'
default: '7.3'
type: string
manifest_min_api_version:
description: 'Minimum API version required'
default: '7.3'
type: string
manifest_guid:
description: 'GUID for the .dapp manifest'
required: true
type: string
dapp_name:
description: 'Name of the dapp'
required: true
type: string

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Git
run: git fetch --prune --unshallow

- name: Get commit count
id: commit_count
run: |
COMMIT_COUNT=$(git rev-list --count HEAD)
echo "COMMIT_COUNT=${COMMIT_COUNT}" >> $GITHUB_ENV

- name: Generate version
id: version
run: |
VERSION="${{inputs.manifest_version_prefix}}.${{ env.COMMIT_COUNT }}"
echo "VERSION=${VERSION}" >> $GITHUB_ENV

- name: Set up Node.js environment
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node_version }}

- name: Install dependencies
run: yarn install

- name: Build the project
run: ${{ inputs.build_command }}

- name: Create folder structure
run: mkdir -p ${{ inputs.dapp_name }}/app

- name: Copy build files
run: cp -r html/* ${{ inputs.dapp_name }}/app/

- name: Create manifest.json
run: |
echo '{
"name": "${{ inputs.manifest_name }}",
"description": "${{ inputs.manifest_description }}",
"icon": "${{ inputs.manifest_icon }}",
"url": "${{ inputs.manifest_url }}",
"version": "${{ env.VERSION }}",
"api_version": "${{ inputs.manifest_api_version }}",
"min_api_version": "${{ inputs.manifest_min_api_version }}",
"guid": "${{ inputs.manifest_guid }}"
}' > ${{ inputs.dapp_name }}/manifest.json

- name: Package into .dapp file
run: |
cd ${{ inputs.dapp_name }}
zip -r ../${{ inputs.dapp_name }}.dapp ./*
cd ..

- name: Upload .dapp file
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.dapp_name }}.dapp
path: ${{ inputs.dapp_name }}.dapp
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ node_modules
npm-debug.log*
yarn-debug.log*
yarn-error.log*

bans-app/
bans-app.dapp/
Binary file added .yarn/install-state.gz
Binary file not shown.
5 changes: 5 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
compressionLevel: mixed

enableGlobalCache: false

nodeLinker: node-modules
19 changes: 19 additions & 0 deletions html/app/assets/icons/asset.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified html/bansAppShader.wasm
Binary file not shown.
11,747 changes: 2 additions & 11,745 deletions html/index.js

Large diffs are not rendered by default.

128 changes: 128 additions & 0 deletions html/index.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/

/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/

/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */

/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/

/**
* BEAM DApp Connector - Stable Wallet Integration Library
*
* A robust, production-ready library for connecting BEAM dApps to various
* BEAM wallet environments (Desktop, Web Extension, Mobile, Headless).
*
* Features:
* - Automatic reconnection with exponential backoff
* - Connection state management
* - Event-driven architecture
* - Promise-based API with timeouts
* - Heartbeat mechanism for connection monitoring
* - Memory-safe callback handling
* - TypeScript-ready JSDoc annotations
*
* @version 2.0.0
* @license MIT
* @author BEAM Community
*/

/**
* Checks if an event is supported in the current execution environment.
*
* NOTE: This will not work correctly for non-generic events such as `change`,
* `reset`, `load`, `error`, and `select`.
*
* Borrows from Modernizr.
*
* @param {string} eventNameSuffix Event name, e.g. "click".
* @return {boolean} True if the event is supported.
* @internal
* @license Modernizr 3.0.0pre (Custom Build) | MIT
*/

/**
* React Router DOM v6.3.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/

/**
* React Router v6.3.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/

/** @license React v0.20.2
* scheduler-tracing.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v0.20.2
* scheduler.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v16.13.1
* react-is.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v17.0.2
* react-dom.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v17.0.2
* react.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

//! moment.js

//! moment.js locale configuration
17 changes: 2 additions & 15 deletions html/styles.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
/*!*******************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./src/app/styles.ts ***!
\*******************************************************************************************************************************************************************************/
:root{--color-purple:#da68f5;--color-red:#f25f5b;--color-red-expiring:#ff436a;--color-yellow:#f4ce4a;--color-green:#00f6d2;--color-blue:#0bccf7;--color-dark-blue:#042548;--color-darkest-blue:#032e49;--color-white:#ffffff;--color-gray:#8196a4;--color-white:white;--color-ghost:#ffffff19;--color-disconnect:#ff746b;--color-vote-red:#de3155;--color-dark-gray:rgba(50,50,50);--color-opacity:rgba(255,255,255,0.1);--color-popup:rgba(13,77,118);--color-select:#184469;--color-dark-transparent:rgba(26,22,22,0.27);--color-half-opacity:rgba(255,255,255,0.05);--color-disabled:#8da1ad;--color-transparent:transparent;}@font-face{font-family:'SFProDisplay';src:url('./assets/fonts/SF-Pro-Display-Regular.otf');font-weight:400;font-style:normal;}@font-face{font-family:'SFProDisplay';src:url('./assets/fonts/SF-Pro-Display-RegularItalic.otf');font-weight:400;font-style:italic;}@font-face{font-family:'SFProDisplay';src:url('./assets/fonts/SF-Pro-Display-Bold.otf');font-weight:700;font-style:normal;}*{box-sizing:border-box;outline:none;}html,body{margin:0;padding:0;min-width:860px;font-family:'SFProDisplay',sans-serif !important;font-weight:normal;height:100vh;}#root{display:inline;}html *{font-family:'SFProDisplay',sans-serif;}body{font-size:14px;color:white;}p{margin:0;}h1,h2{margin:0;}ul,ol{list-style:none;margin:0;padding:0;}tr,th,table{border:none;border-spacing:0;padding:0;margin:0;border-collapse:inherit;}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}

/*!**********************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./src/app/components/Tooltip/Tooltip.css ***!
\**********************************************************************************************************************/
/* Custom properties */
:root {
--tooltip-text-color: white;
Expand Down Expand Up @@ -106,16 +100,12 @@
.page::before {
left: 80%;
}
/*!***********************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./src/app/components/Select/SelectWithInput.tsx ***!
\***********************************************************************************************************************************************************************************************************/
.i17lvecr{font-size:16px;font-weight:normal;color:white;background-color:rgba(255,255,255,0);padding:15px 20px;width:90%;border-radius:10px;border:none;}.i17lvecr::-webkit-input-placeholder{font-size:16px;}.i17lvecr::-moz-placeholder{font-size:16px;}.i17lvecr:-ms-input-placeholder{font-size:16px;}.i17lvecr::placeholder{font-size:16px;}
.cbwyixi{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#fff;width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:14px;font-weight:normal;padding:0;}.cbwyixi.open{border:none;border-radius:10px;}.cbwyixi.focus{background-color:rgba(255,255,255,0.12);}
.s1emmhls{width:10%;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}

/*!*************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/react-loading-skeleton/dist/skeleton.css ***!
\*************************************************************************************************************************************/
.c1pzdwd3{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;vertical-align:middle;width:18px;height:18px;margin-right:8px;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;color:var(--c1pzdwd3-0);}

@keyframes react-loading-skeleton {
100% {
transform: translateX(100%);
Expand Down Expand Up @@ -165,9 +155,6 @@
animation-iteration-count: infinite;
}

/*!**************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./src/app/styles.css ***!
\**************************************************************************************************/
:root {
--color-purple: #da68f5;
--color-red: #f25f5b;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
"preinstall": "npx npm-force-resolutions",
"watch": "webpack --watch",
"build": "webpack --config webpack.common.js",
"build:prod": "webpack --config webpack.prod.js",
"start": "webpack serve --config webpack.common.js",
"prod": "webpack serve --config webpack.prod.js"
"start:prod": "webpack serve --config webpack.prod.js"
},
"overrides": {
"ansi-regex": "5.0.1",
Expand Down Expand Up @@ -87,7 +88,6 @@
"react-popper": "^2.2.5",
"react-redux": "^7.2.8",
"react-router-dom": "^6.3.0",
"react-scripts": "6.0.1",
"redux": "^4.1.2",
"redux-saga": "^1.1.3",
"reselect": "^4.1.3",
Expand Down
Loading
Loading