diff --git a/.all-contributorsrc b/.all-contributorsrc index fe90bc92..6938e0d3 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1,6 +1,6 @@ { - "projectName": "bux-console", - "projectOwner": "BuxOrg", + "projectName": "spv-wallet-admin", + "projectOwner": "bitcoin-sv", "repoType": "github", "repoHost": "https://github.com", "files": [ @@ -11,38 +11,5 @@ "commitConvention": "none", "contributorsPerLine": 7, "contributorsSortAlphabetically": false, - "contributors": [ - { - "login": "icellan", - "name": "Siggi", - "avatar_url": "https://avatars.githubusercontent.com/u/4411176?v=4", - "profile": "https://github.com/icellan", - "contributions": [ - "infra", - "code", - "security" - ] - }, - { - "login": "mrz1836", - "name": "Mr. Z", - "avatar_url": "https://avatars.githubusercontent.com/u/3743002?v=4", - "profile": "https://mrz1818.com", - "contributions": [ - "infra", - "code", - "maintenance", - "business" - ] - }, - { - "login": "galt-tr", - "name": "Dylan", - "avatar_url": "https://avatars.githubusercontent.com/u/64976002?v=4", - "profile": "https://github.com/galt-tr", - "contributions": [ - "code" - ] - } - ] + "contributors": [] } diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index dced696d..e35bb611 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,4 +1,4 @@ -# CODEOWNERS file for BuxOrg +# CODEOWNERS file for spv-wallet-admin # This file is used to designate code owners for files and directories in this repository. # The code owner will automatically be requested for review on pull requests that modify the corresponding files. diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 44a260e9..00000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,4 +0,0 @@ -# These are supported funding model platforms - -github: BuxOrg -custom: https://getbux.io/?utm_source=github&utm_medium=sponsor-link&utm_campaign=bux-console&utm_term=bux-console&utm_content=bux-console diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index f701fd9d..a5136ff2 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -5,8 +5,8 @@ # Pull Request Checklist -- [ ] 📖 I created my PR using provided : [CODE_STANDARDS](https://github.com/BuxOrg/bux-console/blob/main/.github/CODE_STANDARDS.md) -- [ ] 📖 I have read the short Code of Conduct: [CODE_OF_CONDUCT](https://github.com/BuxOrg/bux-console/blob/main/.github/CODE_OF_CONDUCT.md) +- [ ] 📖 I created my PR using provided : [CODE_STANDARDS](https://github.com/bitcoin-sv/spv-wallet-admin/blob/main/.github/CODE_STANDARDS.md) +- [ ] 📖 I have read the short Code of Conduct: [CODE_OF_CONDUCT](https://github.com/bitcoin-sv/spv-wallet-admin/blob/main/.github/CODE_OF_CONDUCT.md) - [ ] 🏠 I tested my changes locally. - [ ] ✅ I have provided tests for my changes. - [ ] 📝 I have used conventional commits. diff --git a/.goreleaser.yml b/.goreleaser.yml index 389d28a2..fc4f4a53 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -37,8 +37,8 @@ announce: # See more at: https://goreleaser.com/customization/announce/#slack slack: enabled: false - message_template: '{{ .ProjectName }} {{ .Tag }} is out! Changelog: https://github.com/BuxOrg/{{ .ProjectName }}/releases/tag/{{ .Tag }}' - channel: '#bux' + message_template: '{{ .ProjectName }} {{ .Tag }} is out! Changelog: https://github.com/bitcoin-sv/{{ .ProjectName }}/releases/tag/{{ .Tag }}' + channel: '#bsv-team-pr' # username: '' # icon_emoji: '' # icon_url: '' @@ -67,6 +67,6 @@ announce: # Username for your Reddit account username: "" # Defaults to `{{ .GitURL }}/releases/tag/{{ .Tag }}` - # url_template: 'https://github.com/BuxOrg/{{ .ProjectName }}/releases/tag/{{ .Tag }}' + # url_template: 'https://github.com/bitcoin-sv/{{ .ProjectName }}/releases/tag/{{ .Tag }}' # Defaults to `{{ .ProjectName }} {{ .Tag }} is out!` title_template: '{{ .ProjectName }} {{ .Tag }} is out!' diff --git a/LICENSE b/LICENSE index 32d1c3b0..280e118b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,6 @@ MIT License +Copyright (c) 2023 BSV Blockchain Association ("BA") Copyright (c) 2022 @BuxOrg Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/Makefile b/Makefile index 40dc5126..aff7589d 100644 --- a/Makefile +++ b/Makefile @@ -3,12 +3,12 @@ include .make/common.mk ## Not defined? Use default repo name which is the application ifeq ($(REPO_NAME),) - REPO_NAME="bux-console" + REPO_NAME="spv-wallet-admin" endif ## Not defined? Use default repo owner ifeq ($(REPO_OWNER),) - REPO_OWNER="BuxOrg" + REPO_OWNER="bitcoin-sv" endif ## Default branch diff --git a/README.md b/README.md index 2d5f47d9..5fb12324 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,7 @@ -# BUX: Console -> Administrative dashboard to manage your [BUX](https://getbux.io) Server - -[![last commit](https://img.shields.io/github/last-commit/BuxOrg/bux-console.svg?style=flat)](https://github.com/BuxOrg/bux-console/commits/master) -[![version](https://img.shields.io/github/release-pre/BuxOrg/bux-console.svg?style=flat)](https://github.com/BuxOrg/bux-console/releases) -[![app health](https://img.shields.io/website-up-down-green-red/https/getbux.io.svg?label=status&v=1)](https://getbux.io) -[![Mergify Status](https://img.shields.io/endpoint.svg?url=https://api.mergify.com/v1/badges/BuxOrg/bux-console&style=flat&v=3)](https://mergify.io) -[![Sponsor](https://img.shields.io/badge/sponsor-BuxOrg-181717.svg?logo=github&style=flat&v=1)](https://github.com/sponsors/BuxOrg) +# SPV-WALLET-ADMIN ## Table of Contents -- [What is BUX?](#what-is-bux) +- [What is SPV-Wallet?](#what-is-spv-wallet) - [Installation](#installation) - [Documentation](#documentation) - [Code Standards](#code-standards) @@ -18,8 +11,8 @@
-## What is BUX? -[Read more about BUX](https://getbux.io) +## What is SPV-Wallet? +[Read more about SPV-Wallet](https://replace-after-moving-spv-wallet)
@@ -35,8 +28,6 @@ yarn start ``` ## Documentation -View more [BUX documentation](https://getbux.io) -
Release Deployment
@@ -84,49 +75,19 @@ Please read our [standards document](.github/CODE_STANDARDS.md)
-## Usage -Here's the [getting started](https://getbux.io) with BUX - -
- - ## Contributing View the [contributing guidelines](.github/CONTRIBUTING.md) and follow the [code of conduct](.github/CODE_OF_CONDUCT.md).
-### How can I help? -All kinds of contributions are welcome :raised_hands:! -The most basic way to show your support is to star :star2: the project, or to raise issues :speech_balloon:. -You can also support this project by [becoming a sponsor on GitHub](https://github.com/sponsors/BuxOrg) :clap: -or by making a [**bitcoin donation**](https://getbux.io/#sponsor?utm_source=github&utm_medium=sponsor-link&utm_campaign=bux-console&utm_term=bux-console&utm_content=bux-console) to ensure this journey continues indefinitely! :rocket: - -[![Stars](https://img.shields.io/github/stars/BuxOrg/bux-console?label=Please%20like%20us&style=social&v=2)](https://github.com/BuxOrg/bux-console/stargazers) - +## Contributing +All kinds of contributions are welcome!
+To get started, take a look at [code standards](.github/CODE_STANDARDS.md). +
+View the [contributing guidelines](.github/CODE_STANDARDS.md#3-contributing) and follow the [code of conduct](.github/CODE_OF_CONDUCT.md). -### Contributors ✨ -Thank you to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): - - - - - - - - - - -

Siggi

🚇 💻 🛡️

Mr. Z

🚇 💻 🚧 💼

Dylan

💻
- - - - - - -> This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. - -
+
## License -[![License](https://img.shields.io/github/license/BuxOrg/bux-console.svg?style=flat&v=1)](LICENSE) +[![License](https://img.shields.io/github/license/bitcoin-sv/spv-wallet-admin.svg?style=flat&v=1)](LICENSE) diff --git a/package.json b/package.json index c6ef94c6..947cbe86 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@buxorg/bux-console", + "name": "@bsv/spv-wallet-admin", "version": "0.0.0", "scripts": { "start": "craco start", @@ -7,43 +7,28 @@ "test": "craco test", "eject": "react-scripts eject" }, - "author": "Siggi ", - "homepage": "https://getbux.io", "license": "MIT", "keywords": [ - "bux", + "spv-wallet-admin", "bitcoin", "bitcoinsv", "bsv" ], "repository": { "type": "git", - "url": "https://github.com/BuxOrg/bux-console" + "url": "https://github.com/bitcoin-sv/spv-wallet-admin" }, "bugs": { - "url": "https://github.com/BuxOrg/bux-console/issues" + "url": "https://github.com/bitcoin-sv/spv-wallet-admin/issues" }, - "contributors": [ - { - "name": "Siggi", - "url": "https://github.com/icellan/" - }, - { - "name": "MrZ", - "url": "https://github.com/mrz1836/" - }, - { - "name": "dorzepowski", - "url": "https://github.com/dorzepowski/" - } - ], + "contributors": [], "engines": { "node": "^20.0.0" }, "proxy": "http://localhost:3003", "dependencies": { "@4chain-ag/react-configuration": "^1.0.4", - "@buxorg/js-buxclient": "^1.4.5", + "@bsv/spv-wallet-js-client": "^0.2.1", "@emotion/cache": "^11.11.0", "@emotion/react": "^11.11.3", "@emotion/server": "^11.11.0", diff --git a/public/android-chrome-192x192.png b/public/android-chrome-192x192.png index df77a4e9..1edae621 100644 Binary files a/public/android-chrome-192x192.png and b/public/android-chrome-192x192.png differ diff --git a/public/android-chrome-512x512.png b/public/android-chrome-512x512.png index a82f051f..ea21dba1 100644 Binary files a/public/android-chrome-512x512.png and b/public/android-chrome-512x512.png differ diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png index 6a98cd83..8e8bd4ec 100644 Binary files a/public/apple-touch-icon.png and b/public/apple-touch-icon.png differ diff --git a/public/config.default.json b/public/config.default.json index 7028dad5..ef8c67fe 100644 --- a/public/config.default.json +++ b/public/config.default.json @@ -1,5 +1,5 @@ { - "loginTitle": "Sign in to a Bux server", + "loginTitle": "Sign in to a SPV Wallet", "loginSubtitle": "Sign in using your xPriv", "transportType": "http", "serverUrl": "", diff --git a/public/favicon-16x16.png b/public/favicon-16x16.png index 05a1cba6..5b0258c5 100644 Binary files a/public/favicon-16x16.png and b/public/favicon-16x16.png differ diff --git a/public/favicon-32x32.png b/public/favicon-32x32.png index 4d120ea7..ca968904 100644 Binary files a/public/favicon-32x32.png and b/public/favicon-32x32.png differ diff --git a/public/favicon.ico b/public/favicon.ico index 06937add..9c84a227 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/public/index.html b/public/index.html index 17663b8b..05f607f9 100644 --- a/public/index.html +++ b/public/index.html @@ -20,7 +20,7 @@ work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> - BUX - Administrative Console Dashboard + SPV Wallet - Administrative Console Dashboard diff --git a/public/manifest.json b/public/manifest.json index 4cb7b6f4..4b869af3 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,6 +1,6 @@ { - "short_name": "Bux Console", - "name": "Bux admin console", + "short_name": "SPV Wallet Admin", + "name": "SPV Wallet Admin", "icons": [ { "src": "favicon.ico", diff --git a/release/README.DOCKER.md b/release/README.DOCKER.md index f21aad02..e5d6b1c7 100644 --- a/release/README.DOCKER.md +++ b/release/README.DOCKER.md @@ -1,4 +1,4 @@ -# Bux Console +# SPV Wallet Admin --- diff --git a/src/components/block-headers.js b/src/components/block-headers.js deleted file mode 100644 index 29cf9a5c..00000000 --- a/src/components/block-headers.js +++ /dev/null @@ -1,74 +0,0 @@ -import {Table, TableBody, TableCell, TableHead, TableRow,} from '@mui/material'; - -import PropTypes from 'prop-types'; -import React, {useEffect, useState} from 'react'; -import {JsonView} from "./json-view"; - -export const BlockHeadersList = ( - { - items, - } -) => { - - const [selectedXPubs, setSelectedXPubs] = useState([]); - - useEffect(() => { - if (items && items.length === 1) { - setSelectedXPubs([items[0].id]); - } - }, [items]); - - return ( - - - - ID - Height - Time - Created - - - - {items.map(xpub => ( - - { - if (selectedXPubs.indexOf(xpub.id) !== -1) { - setSelectedXPubs([]) - } else { - setSelectedXPubs([xpub.id]) - } - }} - > - {xpub.id} - {xpub.height} - - {new Date(xpub.time*1000).toLocaleString()} - - - {new Date(xpub.created_at).toLocaleString()} - - - {selectedXPubs.indexOf(xpub.id) !== -1 && - - - - - - } - - ))} - -
- ); -}; - -BlockHeadersList.propTypes = { - items: PropTypes.array.isRequired, - refetch: PropTypes.func, -}; diff --git a/src/components/dashboard-sidebar.js b/src/components/dashboard-sidebar.js index 7ff3f9c0..21cf08f6 100755 --- a/src/components/dashboard-sidebar.js +++ b/src/components/dashboard-sidebar.js @@ -39,11 +39,6 @@ const adminItems = [ icon: (), title: 'Access Keys' }, - { - href: '/admin/block-headers', - icon: (), - title: 'Block Headers' - }, { href: '/admin/destinations', icon: (), @@ -163,7 +158,7 @@ export const DashboardSidebar = (props) => { - Bux + SPV Wallet { - if (!buxAdminClient) { + if (!spvWalletAdminClient) { navigate('/'); } - }, [buxAdminClient]); + }, [spvWalletAdminClient]); useEffect(() => { if (initialFilter) { diff --git a/src/components/paymails.js b/src/components/paymails.js index 29be877b..3c59193e 100644 --- a/src/components/paymails.js +++ b/src/components/paymails.js @@ -15,14 +15,14 @@ export const PaymailsList = ( refetch, } ) => { - const { buxAdminClient } = useUser(); + const { spvWalletAdminClient } = useUser(); const [selectedPaymails, setSelectedPaymails] = useState([]); const handleDeletePaymail = useCallback(async paymailAddress => { // eslint-disable-next-line no-restricted-globals if (paymailAddress && confirm('Are you sure you want to delete the paymail address from this user?')) { - const paymailDeleted = await buxAdminClient.AdminDeletePaymail(`${paymailAddress.alias}@${paymailAddress.domain}`).catch(e => { + const paymailDeleted = await spvWalletAdminClient.AdminDeletePaymail(`${paymailAddress.alias}@${paymailAddress.domain}`).catch(e => { logger.error("Could not delete paymail" + e.message) alert("ERROR: Could not delete paymail: " + e.message); }); @@ -32,7 +32,7 @@ export const PaymailsList = ( refetch(); } } - }, [buxAdminClient, refetch]); + }, [spvWalletAdminClient, refetch]); return ( diff --git a/src/hooks/use-query-list.jsx b/src/hooks/use-query-list.jsx index 69eedf46..11478937 100644 --- a/src/hooks/use-query-list.jsx +++ b/src/hooks/use-query-list.jsx @@ -10,7 +10,7 @@ export const useQueryList = function ( conditions, } ) { - const {buxClient, buxAdminClient} = useUser(); + const {spvWalletClient, spvWalletAdminClient} = useUser(); const [items, setItems] = useState([]); const [itemsCount, setItemsCount] = useState(0); @@ -34,7 +34,7 @@ export const useQueryList = function ( }, [limit]); useEffect(() => { - const client = admin ? buxAdminClient : buxClient; + const client = admin ? spvWalletAdminClient : spvWalletClient; if (!client) return; client[`${modelFunction}Count`](conditions || {}, {}).then(count => { setItemsCount(count); @@ -54,7 +54,7 @@ export const useQueryList = function ( order_by_field: 'created_at', sort_direction: 'desc', }; - const client = admin ? buxAdminClient : buxClient; + const client = admin ? spvWalletAdminClient : spvWalletClient; if (!client) return; client[`${modelFunction}`](conditions || {}, {}, queryParams).then(items => { setItems([...items]); @@ -91,7 +91,7 @@ export const useQueryList = function ( Pagination, refreshData, setRefreshData, - buxClient, - buxAdminClient, + spvWalletClient, + spvWalletAdminClient, } } diff --git a/src/hooks/user.js b/src/hooks/user.js index 30ab315c..3101097f 100644 --- a/src/hooks/user.js +++ b/src/hooks/user.js @@ -1,5 +1,5 @@ import bsv from 'bsv'; -import {BuxClient} from "@buxorg/js-buxclient"; +import {SpvWalletClient} from "@bsv/spv-wallet-js-client"; import {useCredentials} from "./use-credentials"; export const useUser = () => { const { @@ -36,9 +36,9 @@ export const useUser = () => { adminId = bsv.crypto.Hash.sha256(Buffer.from(adminKeyString)).toString('hex') } - let buxClient, buxAdminClient; + let spvWalletClient, spvWalletAdminClient; if (server && transportType) { - buxClient = new BuxClient(server, { + spvWalletClient = new SpvWalletClient(server, { transportType: transportType, xPriv, xPub, @@ -46,14 +46,14 @@ export const useUser = () => { signRequest: true, }); if (adminKey) { - buxAdminClient = new BuxClient(server, { + spvWalletAdminClient = new SpvWalletClient(server, { transportType: transportType, xPriv, xPub, accessKey, signRequest: true, }); - buxAdminClient.SetAdminKey(adminKey); + spvWalletAdminClient.SetAdminKey(adminKey); } } @@ -69,7 +69,7 @@ export const useUser = () => { server, adminKey, adminId, - buxClient, - buxAdminClient, + spvWalletClient, + spvWalletAdminClient, }; }; diff --git a/src/logger/index.js b/src/logger/index.js index 84ca3da9..7fda3b97 100644 --- a/src/logger/index.js +++ b/src/logger/index.js @@ -3,11 +3,11 @@ import pino from 'pino' const levels = { 60: "fatal", 50: "error", 40: "warn", 30: "info", 20: "debug", 10: "trace" } const getDefaultObject = (o) => ({ ...o, level: levels[o.level], - name: 'bux-console'}) + name: 'spv-wallet-admin'}) const pinoLogger = pino({ level: 'trace', - name: "bux-console", + name: "spv-wallet-admin", browser: { asObject: true, write: { diff --git a/src/pages/access-keys.jsx b/src/pages/access-keys.jsx index 8031b9c8..a2beb1f2 100644 --- a/src/pages/access-keys.jsx +++ b/src/pages/access-keys.jsx @@ -18,7 +18,7 @@ export const AccessKeys = () => { setError, Pagination, setRefreshData, - buxClient, + spvWalletClient, } = useQueryList({modelFunction: 'GetAccessKeys'}); const [info, setInfo] = useState(''); @@ -26,7 +26,7 @@ export const AccessKeys = () => { const handleRevokeAccessKey = function (accessKey) { // eslint-disable-next-line no-restricted-globals if (confirm('Revoke access key?')) { - buxClient.RevokeAccessKey(accessKey.id).then(r => { + spvWalletClient.RevokeAccessKey(accessKey.id).then(r => { setInfo(`Access key ${accessKey.id} revoked`); logger.info(`Access key ${accessKey.id} revoked`) setRefreshData(+new Date()); @@ -48,7 +48,7 @@ export const AccessKeys = () => {