diff --git a/app/controllers/api/nextv1/contribution_page_controller.rb b/app/controllers/api/nextv1/contribution_page_controller.rb new file mode 100644 index 0000000000..a409150a29 --- /dev/null +++ b/app/controllers/api/nextv1/contribution_page_controller.rb @@ -0,0 +1,136 @@ +class Api::Nextv1::ContributionPageController < Api::Nextv1::BaseController + include PublishersHelper + include ActiveStorage::SetCurrent + + MAX_IMAGE_SIZE = 10_000_000 + + def index + channel_list = current_publisher.channels.as_json(only: [:id, :details_type], + include: { + details: {only: [], methods: [:url, :publication_title]} + }) + render(json: channel_list) + end + + def show + current_channel = current_publisher.channels.find(params[:id]) + + SiteBanner.new_helper(current_publisher.id, current_channel.id) if !current_channel.site_banner + + channel_data = format_channel_data(current_channel.reload) + render(json: channel_data) + end + + def update + begin + current_channel = current_publisher.channels.find(params[:id]) + site_banner = current_channel.site_banner + rescue ActiveRecord::RecordNotFound + return render json: {}, status: 404 + end + + permitted_params = params.permit( + :contribution_page, + :id, + :format, + :description, + :title, + :logo, + :cover, + socialLinks: [:twitter, :reddit, :github, :vimeo, :youtube, :twitch] + ) + + logo_length = permitted_params[:logo]&.length || 0 + cover_length = permitted_params[:cover]&.length || 0 + + if (cover_length > MAX_IMAGE_SIZE) || (logo_length > MAX_IMAGE_SIZE) + render(json: {errors: t("banner.upload_too_big")}, status: 400) + end + + begin + # don't erase old data, particularly other social links stored in the existing json string + new_data = site_banner.read_only_react_property.deep_merge(permitted_params.to_hash.transform_keys(&:to_sym)) + # the 'sanatize' method in the update helper doesn't handle ruby hashes well + site_banner.update_helper(new_data[:title], new_data[:description], new_data[:socialLinks].to_json) + + if permitted_params[:logo] + site_banner.logo.attach( + image_properties(permitted_params[:logo]) + ) + site_banner.save! + end + + if permitted_params[:cover] + site_banner.background_image.attach( + image_properties(permitted_params[:cover]) + ) + site_banner.save! + end + site_banner.reload + channel_data = format_channel_data(current_channel) + render(json: channel_data, status: 200) + rescue => e + LogException.perform(e, publisher: current_publisher) + render(json: {errors: "channel banner could not be updated"}, status: 400) + end + end + + def destroy_attachment + begin + current_channel = current_publisher.channels.find(params[:id]) + site_banner = current_channel.site_banner + rescue ActiveRecord::RecordNotFound + return render json: {}, status: 404 + end + + permitted_params = params.permit(:logo, :cover) + + site_banner.logo.purge if permitted_params[:logo] && site_banner.logo.attached? + site_banner.background_image.purge if permitted_params[:cover] && site_banner.background_image.attached? + + channel_data = format_channel_data(current_channel.reload) + render(json: channel_data) + end + + private + + def format_channel_data(channel) + channel.as_json(only: [:details_type, :id, :public_identifier], + include: { + details: {only: [], methods: [:url, :publication_title]}, + site_banner: {only: [], methods: [:read_only_react_property]} + }) + end + + def image_properties(data) + if data.starts_with?("data:image/jpeg") || data.starts_with?("data:image/jpg") + extension = ".jpg" + elsif data.starts_with?("data:image/png") + extension = ".png" + elsif data.starts_with?("data:image/webp") + extension = ".webp" + else + LogException.perform(StandardError.new("Unknown image format:" + data), params: {}) + return nil + end + filename = Time.now.to_s.tr!(" ", "_").tr!(":", "_") + current_publisher.id + + temp_file = Tempfile.new([filename, extension]) + File.binwrite(temp_file.path, Base64.decode64(data)) + + original_image_path = temp_file.path + temp_file.rewind + new_filename = generate_filename(source_image_path: original_image_path) + { + io: File.open(original_image_path), + filename: new_filename + extension + ".padded", + content_type: "image/#{extension}" + } + end + + def generate_filename(source_image_path:) + File.open(source_image_path, "r") do |f| + Digest::SHA256.hexdigest f.read + end + end +end diff --git a/app/controllers/api/nextv1/public_channel_controller.rb b/app/controllers/api/nextv1/public_channel_controller.rb new file mode 100644 index 0000000000..7a037ac13e --- /dev/null +++ b/app/controllers/api/nextv1/public_channel_controller.rb @@ -0,0 +1,43 @@ +class Api::Nextv1::PublicChannelController < Api::Nextv1::BaseController + def show + channel = Channel.includes(:site_banner).find_by(public_identifier: params[:public_identifier]) + channel_title = channel&.publication_title + crypto_addresses = channel&.crypto_addresses&.pluck(:address, :chain) + + # Handle the case when the resource is not found + if channel.nil? || @crypto_addresses&.empty? + return render json: {}, status: 404 + end + + begin + url = channel.details&.url + site_banner = channel.site_banner&.read_only_react_property || SiteBanner.new_helper(current_publisher.id, channel.id) + + crypto_constants = { + solana_main_url: ENV["SOLANA_MAIN_URL"], + solana_bat_address: ENV["SOLANA_BAT_ADDRESS"], + eth_bat_address: ENV["ETH_BAT_ADDRESS"], + eth_usdc_address: ENV["ETH_USDC_ADDRESS"], + solana_usdc_address: ENV["SOLANA_USDC_ADDRESS"] + } + + response_data = { + url: url, + site_banner: site_banner, + crypto_addresses: crypto_addresses, + title: channel_title, + crypto_constants: crypto_constants + } + + render(json: response_data.to_json, status: 200) + rescue => e + LogException.perform(e) + render(json: {errors: "channel information not found"}, status: 400) + end + end + + def get_ratios + ratios = Ratio::Ratio.channel_page_cached + render json: ratios["payload"] + end +end diff --git a/config/routes.rb b/config/routes.rb index 3a4344e861..04dadcae12 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -176,6 +176,12 @@ get "publishers/security", to: "publishers#security" get "home/dashboard", to: "home#dashboard" + resources :contribution_page, only: %i[index show update] do + member do + delete :destroy_attachment + end + end + resources :channels, only: %i[destroy] do resources :crypto_address_for_channels, only: %i[index create destroy] do collection do @@ -214,6 +220,9 @@ resource :bitflyer_connection resource :uphold_connection, except: [:new] end + + get "c/:public_identifier", to: "public_channel#show", as: :public_channel + get "/get_ratios", to: "public_channel#get_ratios" end namespace :v1, defaults: {format: :json} do diff --git a/nextjs/package-lock.json b/nextjs/package-lock.json index b26e087b7e..59a23e9762 100644 --- a/nextjs/package-lock.json +++ b/nextjs/package-lock.json @@ -9,22 +9,26 @@ "version": "0.1.0", "hasInstallScript": true, "dependencies": { - "@brave/leo": "github:brave/leo#84b3117d0fd10eb45d94e816fba87909124e7bb1", + "@brave/leo": "github:brave/leo#63e98a1bb14cf87dcb8cbd4436e9e38615840447", "@fontsource/dm-mono": "5.0.19", "@fontsource/inter": "5.0.17", "@fontsource/poppins": "5.0.12", "@github/webauthn-json": "^2.1.1", "axios": "1.7.4", + "@solana/spl-token": "^0.4.8", + "@solana/web3.js": "^1.95.2", "bs58": "5.0.0", "clsx": "^2.0.0", "express-basic-auth": "1.2.1", "moment": "^2.29.4", "next": "^14.1.1", "next-intl": "3.13.0", + "qr-code-styling": "^1.6.0-rc.1", "react": "^18.2.0", "react-dom": "^18.2.0", "react-responsive": "^9.0.2", - "react-select": "^5.7.4" + "react-select": "^5.7.4", + "web3": "^4.8.0" }, "devDependencies": { "@commitlint/cli": "^17.6.7", @@ -62,7 +66,7 @@ "stylelint-config-standard": "^34.0.0", "stylelint-webpack-plugin": "^4.1.1", "tailwindcss": "^3.3.3", - "typescript": "^4.9.4" + "typescript": "^5.5.4" }, "engines": { "node": "18.17.1", @@ -83,6 +87,12 @@ "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.0.tgz", "integrity": "sha512-Ff9+ksdQQB3rMncgqDK78uLznstjyfIf2Arnh22pW8kBpLs6rpKDwgnZT46hin5Hl1WzazzK64DOrhSwYpS7bQ==" }, + "node_modules/@adraffy/ens-normalize": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz", + "integrity": "sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==", + "license": "MIT" + }, "node_modules/@alloc/quick-lru": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", @@ -2032,9 +2042,10 @@ "dev": true }, "node_modules/@babel/runtime": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.15.tgz", - "integrity": "sha512-T0O+aa+4w0u06iNmapipJXMV4HoUir03hpx3/YqXXhu9xim3w+dVphjFWl1OH8NbZHw5Lbm9k45drDkgq2VNNA==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.0.tgz", + "integrity": "sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw==", + "license": "MIT", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -2098,11 +2109,11 @@ }, "node_modules/@brave/leo": { "version": "0.0.1", - "resolved": "git+ssh://git@github.com/brave/leo.git#84b3117d0fd10eb45d94e816fba87909124e7bb1", - "integrity": "sha512-iNOQr9a5bKsG9k9hXrj4uCDEcTKRX5rf8t32Gv6ghWaP0lRb9fmc57L5CFQ0okROspKZx5hhcw7Y7ItvUCPQvQ==", + "resolved": "git+ssh://git@github.com/brave/leo.git#63e98a1bb14cf87dcb8cbd4436e9e38615840447", + "integrity": "sha512-0qWu4JIp0gXrq4pGRiiX3Zfy52KPwlW1DWAVR4x7MEbUJ1duuyCpREYlH8XdNOrdcnobg6FgYfHZ0kEp7KyPtw==", "license": "MIT", "dependencies": { - "@storybook/test": "8.1.10", + "@storybook/test": "8.1.11", "svelte": "4.2.18", "svelte-preprocess": "5.1.4", "tailwindcss": "3.2.6", @@ -2112,10 +2123,14 @@ "leo-check": "src/scripts/audit-tokens.js" }, "peerDependencies": { + "@material/material-color-utilities": ">= 0.2.7", "react": ">= 16.0.0", "typescript": ">= 4.7.0" }, "peerDependenciesMeta": { + "@material/material-color-utilities": { + "optional": true + }, "react": { "optional": true }, @@ -2815,6 +2830,18 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@ethereumjs/rlp": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-4.0.1.tgz", + "integrity": "sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==", + "license": "MPL-2.0", + "bin": { + "rlp": "bin/rlp" + }, + "engines": { + "node": ">=14" + } + }, "node_modules/@faker-js/faker": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-8.1.0.tgz", @@ -3473,124 +3500,28 @@ "node": ">= 10" } }, - "node_modules/@next/swc-darwin-x64": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.3.tgz", - "integrity": "sha512-6adp7waE6P1TYFSXpY366xwsOnEXM+y1kgRpjSRVI2CBDOcbRjsJ67Z6EgKIqWIue52d2q/Mx8g9MszARj8IEA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm64-gnu": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.3.tgz", - "integrity": "sha512-cuzCE/1G0ZSnTAHJPUT1rPgQx1w5tzSX7POXSLaS7w2nIUJUD+e25QoXD/hMfxbsT9rslEXugWypJMILBj/QsA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm64-musl": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.3.tgz", - "integrity": "sha512-0D4/oMM2Y9Ta3nGuCcQN8jjJjmDPYpHX9OJzqk42NZGJocU2MqhBq5tWkJrUQOQY9N+In9xOdymzapM09GeiZw==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-gnu": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.3.tgz", - "integrity": "sha512-ENPiNnBNDInBLyUU5ii8PMQh+4XLr4pG51tOp6aJ9xqFQ2iRI6IH0Ds2yJkAzNV1CfyagcyzPfROMViS2wOZ9w==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-musl": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.3.tgz", - "integrity": "sha512-BTAbq0LnCbF5MtoM7I/9UeUu/8ZBY0i8SFjUMCbPDOLv+un67e2JgyN4pmgfXBwy/I+RHu8q+k+MCkDN6P9ViQ==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-arm64-msvc": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.3.tgz", - "integrity": "sha512-AEHIw/dhAMLNFJFJIJIyOFDzrzI5bAjI9J26gbO5xhAKHYTZ9Or04BesFPXiAYXDNdrwTP2dQceYA4dL1geu8A==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-ia32-msvc": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.3.tgz", - "integrity": "sha512-vga40n1q6aYb0CLrM+eEmisfKCR45ixQYXuBXxOOmmoV8sYST9k7E3US32FsY+CkkF7NtzdcebiFT4CHuMSyZw==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" + "node_modules/@noble/curves": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.5.0.tgz", + "integrity": "sha512-J5EKamIHnKPyClwVrzmaf5wSdQXgdHcPZIZLu3bwnbeCx8/7NPK5q2ZBWF+5FvYGByjiQQsJYX6jfgB2wDPn3A==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" } }, - "node_modules/@next/swc-win32-x64-msvc": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.3.tgz", - "integrity": "sha512-Q1/zm43RWynxrO7lW4ehciQVj+5ePBhOK+/K2P7pLFX3JaJ/IZVC69SHidrmZSOkqz7ECIOhhy7XhAFG4JYyHA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], + "node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "license": "MIT", "engines": { - "node": ">= 10" + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" } }, "node_modules/@nodelib/fs.scandir": { @@ -3675,6 +3606,54 @@ "integrity": "sha512-cEjvTPU32OM9lUFegJagO0mRnIn+rbqrG89vV8/xLnLFX0DoR0r1oy5IlTga71Q7uT3Qus7qm7wgeiMT/+Irlg==", "dev": true }, + "node_modules/@scure/base": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.7.tgz", + "integrity": "sha512-PPNYBslrLNNUQ/Yad37MHYsNQtK67EhWb6WtSvNLLPo7SdVZgkUjD6Dg+5On7zNwmskf8OX7I7Nx5oN+MIWE0g==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "license": "MIT", + "dependencies": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@sinclair/typebox": { "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", @@ -3698,13 +3677,369 @@ "@sinonjs/commons": "^3.0.0" } }, + "node_modules/@solana/buffer-layout": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz", + "integrity": "sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==", + "license": "MIT", + "dependencies": { + "buffer": "~6.0.3" + }, + "engines": { + "node": ">=5.10" + } + }, + "node_modules/@solana/buffer-layout-utils": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@solana/buffer-layout-utils/-/buffer-layout-utils-0.2.0.tgz", + "integrity": "sha512-szG4sxgJGktbuZYDg2FfNmkMi0DYQoVjN2h7ta1W1hPrwzarcFLBq9UpX1UjNXsNpT9dn+chgprtWGioUAr4/g==", + "license": "Apache-2.0", + "dependencies": { + "@solana/buffer-layout": "^4.0.0", + "@solana/web3.js": "^1.32.0", + "bigint-buffer": "^1.1.5", + "bignumber.js": "^9.0.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@solana/codecs": { + "version": "2.0.0-preview.2", + "resolved": "https://registry.npmjs.org/@solana/codecs/-/codecs-2.0.0-preview.2.tgz", + "integrity": "sha512-4HHzCD5+pOSmSB71X6w9ptweV48Zj1Vqhe732+pcAQ2cMNnN0gMPMdDq7j3YwaZDZ7yrILVV/3+HTnfT77t2yA==", + "license": "MIT", + "dependencies": { + "@solana/codecs-core": "2.0.0-preview.2", + "@solana/codecs-data-structures": "2.0.0-preview.2", + "@solana/codecs-numbers": "2.0.0-preview.2", + "@solana/codecs-strings": "2.0.0-preview.2", + "@solana/options": "2.0.0-preview.2" + } + }, + "node_modules/@solana/codecs-core": { + "version": "2.0.0-preview.2", + "resolved": "https://registry.npmjs.org/@solana/codecs-core/-/codecs-core-2.0.0-preview.2.tgz", + "integrity": "sha512-gLhCJXieSCrAU7acUJjbXl+IbGnqovvxQLlimztPoGgfLQ1wFYu+XJswrEVQqknZYK1pgxpxH3rZ+OKFs0ndQg==", + "license": "MIT", + "dependencies": { + "@solana/errors": "2.0.0-preview.2" + } + }, + "node_modules/@solana/codecs-data-structures": { + "version": "2.0.0-preview.2", + "resolved": "https://registry.npmjs.org/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0-preview.2.tgz", + "integrity": "sha512-Xf5vIfromOZo94Q8HbR04TbgTwzigqrKII0GjYr21K7rb3nba4hUW2ir8kguY7HWFBcjHGlU5x3MevKBOLp3Zg==", + "license": "MIT", + "dependencies": { + "@solana/codecs-core": "2.0.0-preview.2", + "@solana/codecs-numbers": "2.0.0-preview.2", + "@solana/errors": "2.0.0-preview.2" + } + }, + "node_modules/@solana/codecs-numbers": { + "version": "2.0.0-preview.2", + "resolved": "https://registry.npmjs.org/@solana/codecs-numbers/-/codecs-numbers-2.0.0-preview.2.tgz", + "integrity": "sha512-aLZnDTf43z4qOnpTcDsUVy1Ci9im1Md8thWipSWbE+WM9ojZAx528oAql+Cv8M8N+6ALKwgVRhPZkto6E59ARw==", + "license": "MIT", + "dependencies": { + "@solana/codecs-core": "2.0.0-preview.2", + "@solana/errors": "2.0.0-preview.2" + } + }, + "node_modules/@solana/codecs-strings": { + "version": "2.0.0-preview.2", + "resolved": "https://registry.npmjs.org/@solana/codecs-strings/-/codecs-strings-2.0.0-preview.2.tgz", + "integrity": "sha512-EgBwY+lIaHHgMJIqVOGHfIfpdmmUDNoNO/GAUGeFPf+q0dF+DtwhJPEMShhzh64X2MeCZcmSO6Kinx0Bvmmz2g==", + "license": "MIT", + "dependencies": { + "@solana/codecs-core": "2.0.0-preview.2", + "@solana/codecs-numbers": "2.0.0-preview.2", + "@solana/errors": "2.0.0-preview.2" + }, + "peerDependencies": { + "fastestsmallesttextencoderdecoder": "^1.0.22" + } + }, + "node_modules/@solana/errors": { + "version": "2.0.0-preview.2", + "resolved": "https://registry.npmjs.org/@solana/errors/-/errors-2.0.0-preview.2.tgz", + "integrity": "sha512-H2DZ1l3iYF5Rp5pPbJpmmtCauWeQXRJapkDg8epQ8BJ7cA2Ut/QEtC3CMmw/iMTcuS6uemFNLcWvlOfoQhvQuA==", + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "commander": "^12.0.0" + }, + "bin": { + "errors": "bin/cli.js" + } + }, + "node_modules/@solana/errors/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@solana/errors/node_modules/commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@solana/options": { + "version": "2.0.0-preview.2", + "resolved": "https://registry.npmjs.org/@solana/options/-/options-2.0.0-preview.2.tgz", + "integrity": "sha512-FAHqEeH0cVsUOTzjl5OfUBw2cyT8d5Oekx4xcn5hn+NyPAfQJgM3CEThzgRD6Q/4mM5pVUnND3oK/Mt1RzSE/w==", + "license": "MIT", + "dependencies": { + "@solana/codecs-core": "2.0.0-preview.2", + "@solana/codecs-numbers": "2.0.0-preview.2" + } + }, + "node_modules/@solana/spl-token": { + "version": "0.4.8", + "resolved": "https://registry.npmjs.org/@solana/spl-token/-/spl-token-0.4.8.tgz", + "integrity": "sha512-RO0JD9vPRi4LsAbMUdNbDJ5/cv2z11MGhtAvFeRzT4+hAGE/FUzRi0tkkWtuCfSIU3twC6CtmAihRp/+XXjWsA==", + "license": "Apache-2.0", + "dependencies": { + "@solana/buffer-layout": "^4.0.0", + "@solana/buffer-layout-utils": "^0.2.0", + "@solana/spl-token-group": "^0.0.5", + "@solana/spl-token-metadata": "^0.1.3", + "buffer": "^6.0.3" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.94.0" + } + }, + "node_modules/@solana/spl-token-group": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/@solana/spl-token-group/-/spl-token-group-0.0.5.tgz", + "integrity": "sha512-CLJnWEcdoUBpQJfx9WEbX3h6nTdNiUzswfFdkABUik7HVwSNA98u5AYvBVK2H93d9PGMOHAak2lHW9xr+zAJGQ==", + "license": "Apache-2.0", + "dependencies": { + "@solana/codecs": "2.0.0-preview.4", + "@solana/spl-type-length-value": "0.1.0" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.94.0" + } + }, + "node_modules/@solana/spl-token-group/node_modules/@solana/codecs": { + "version": "2.0.0-preview.4", + "resolved": "https://registry.npmjs.org/@solana/codecs/-/codecs-2.0.0-preview.4.tgz", + "integrity": "sha512-gLMupqI4i+G4uPi2SGF/Tc1aXcviZF2ybC81x7Q/fARamNSgNOCUUoSCg9nWu1Gid6+UhA7LH80sWI8XjKaRog==", + "license": "MIT", + "dependencies": { + "@solana/codecs-core": "2.0.0-preview.4", + "@solana/codecs-data-structures": "2.0.0-preview.4", + "@solana/codecs-numbers": "2.0.0-preview.4", + "@solana/codecs-strings": "2.0.0-preview.4", + "@solana/options": "2.0.0-preview.4" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/spl-token-group/node_modules/@solana/codecs-core": { + "version": "2.0.0-preview.4", + "resolved": "https://registry.npmjs.org/@solana/codecs-core/-/codecs-core-2.0.0-preview.4.tgz", + "integrity": "sha512-A0VVuDDA5kNKZUinOqHxJQK32aKTucaVbvn31YenGzHX1gPqq+SOnFwgaEY6pq4XEopSmaK16w938ZQS8IvCnw==", + "license": "MIT", + "dependencies": { + "@solana/errors": "2.0.0-preview.4" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/spl-token-group/node_modules/@solana/codecs-data-structures": { + "version": "2.0.0-preview.4", + "resolved": "https://registry.npmjs.org/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0-preview.4.tgz", + "integrity": "sha512-nt2k2eTeyzlI/ccutPcG36M/J8NAYfxBPI9h/nQjgJ+M+IgOKi31JV8StDDlG/1XvY0zyqugV3I0r3KAbZRJpA==", + "license": "MIT", + "dependencies": { + "@solana/codecs-core": "2.0.0-preview.4", + "@solana/codecs-numbers": "2.0.0-preview.4", + "@solana/errors": "2.0.0-preview.4" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/spl-token-group/node_modules/@solana/codecs-numbers": { + "version": "2.0.0-preview.4", + "resolved": "https://registry.npmjs.org/@solana/codecs-numbers/-/codecs-numbers-2.0.0-preview.4.tgz", + "integrity": "sha512-Q061rLtMadsO7uxpguT+Z7G4UHnjQ6moVIxAQxR58nLxDPCC7MB1Pk106/Z7NDhDLHTcd18uO6DZ7ajHZEn2XQ==", + "license": "MIT", + "dependencies": { + "@solana/codecs-core": "2.0.0-preview.4", + "@solana/errors": "2.0.0-preview.4" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/spl-token-group/node_modules/@solana/codecs-strings": { + "version": "2.0.0-preview.4", + "resolved": "https://registry.npmjs.org/@solana/codecs-strings/-/codecs-strings-2.0.0-preview.4.tgz", + "integrity": "sha512-YDbsQePRWm+xnrfS64losSGRg8Wb76cjK1K6qfR8LPmdwIC3787x9uW5/E4icl/k+9nwgbIRXZ65lpF+ucZUnw==", + "license": "MIT", + "dependencies": { + "@solana/codecs-core": "2.0.0-preview.4", + "@solana/codecs-numbers": "2.0.0-preview.4", + "@solana/errors": "2.0.0-preview.4" + }, + "peerDependencies": { + "fastestsmallesttextencoderdecoder": "^1.0.22", + "typescript": ">=5" + } + }, + "node_modules/@solana/spl-token-group/node_modules/@solana/errors": { + "version": "2.0.0-preview.4", + "resolved": "https://registry.npmjs.org/@solana/errors/-/errors-2.0.0-preview.4.tgz", + "integrity": "sha512-kadtlbRv2LCWr8A9V22On15Us7Nn8BvqNaOB4hXsTB3O0fU40D1ru2l+cReqLcRPij4znqlRzW9Xi0m6J5DIhA==", + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "commander": "^12.1.0" + }, + "bin": { + "errors": "bin/cli.mjs" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/spl-token-group/node_modules/@solana/options": { + "version": "2.0.0-preview.4", + "resolved": "https://registry.npmjs.org/@solana/options/-/options-2.0.0-preview.4.tgz", + "integrity": "sha512-tv2O/Frxql/wSe3jbzi5nVicIWIus/BftH+5ZR+r9r3FO0/htEllZS5Q9XdbmSboHu+St87584JXeDx3xm4jaA==", + "license": "MIT", + "dependencies": { + "@solana/codecs-core": "2.0.0-preview.4", + "@solana/codecs-data-structures": "2.0.0-preview.4", + "@solana/codecs-numbers": "2.0.0-preview.4", + "@solana/codecs-strings": "2.0.0-preview.4", + "@solana/errors": "2.0.0-preview.4" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/spl-token-group/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@solana/spl-token-group/node_modules/commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@solana/spl-token-metadata": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@solana/spl-token-metadata/-/spl-token-metadata-0.1.4.tgz", + "integrity": "sha512-N3gZ8DlW6NWDV28+vCCDJoTqaCZiF/jDUnk3o8GRkAFzHObiR60Bs1gXHBa8zCPdvOwiG6Z3dg5pg7+RW6XNsQ==", + "license": "Apache-2.0", + "dependencies": { + "@solana/codecs": "2.0.0-preview.2", + "@solana/spl-type-length-value": "0.1.0" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.91.6" + } + }, + "node_modules/@solana/spl-type-length-value": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@solana/spl-type-length-value/-/spl-type-length-value-0.1.0.tgz", + "integrity": "sha512-JBMGB0oR4lPttOZ5XiUGyvylwLQjt1CPJa6qQ5oM+MBCndfjz2TKKkw0eATlLLcYmq1jBVsNlJ2cD6ns2GR7lA==", + "license": "Apache-2.0", + "dependencies": { + "buffer": "^6.0.3" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/@solana/web3.js": { + "version": "1.95.2", + "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.95.2.tgz", + "integrity": "sha512-SjlHp0G4qhuhkQQc+YXdGkI8EerCqwxvgytMgBpzMUQTafrkNant3e7pgilBGgjy/iM40ICvWBLgASTPMrQU7w==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.24.8", + "@noble/curves": "^1.4.2", + "@noble/hashes": "^1.4.0", + "@solana/buffer-layout": "^4.0.1", + "agentkeepalive": "^4.5.0", + "bigint-buffer": "^1.1.5", + "bn.js": "^5.2.1", + "borsh": "^0.7.0", + "bs58": "^4.0.1", + "buffer": "6.0.3", + "fast-stable-stringify": "^1.0.0", + "jayson": "^4.1.1", + "node-fetch": "^2.7.0", + "rpc-websockets": "^9.0.2", + "superstruct": "^2.0.2" + } + }, + "node_modules/@solana/web3.js/node_modules/base-x": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz", + "integrity": "sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/@solana/web3.js/node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "license": "MIT", + "dependencies": { + "base-x": "^3.0.2" + } + }, "node_modules/@storybook/channels": { - "version": "8.1.10", - "resolved": "https://registry.npmjs.org/@storybook/channels/-/channels-8.1.10.tgz", - "integrity": "sha512-CxZE4XrQoe+F+S2mo8Z9HTvFZKfKHIIiwYfoXKCryVp2U/z7ZKrely2PbfxWsrQvF3H0+oegfYYhYRHRiM21Zw==", + "version": "8.1.11", + "resolved": "https://registry.npmjs.org/@storybook/channels/-/channels-8.1.11.tgz", + "integrity": "sha512-fu5FTqo6duOqtJFa6gFzKbiSLJoia+8Tibn3xFfB6BeifWrH81hc+AZq0lTmHo5qax2G5t8ZN8JooHjMw6k2RA==", + "license": "MIT", "dependencies": { - "@storybook/client-logger": "8.1.10", - "@storybook/core-events": "8.1.10", + "@storybook/client-logger": "8.1.11", + "@storybook/core-events": "8.1.11", "@storybook/global": "^5.0.0", "telejson": "^7.2.0", "tiny-invariant": "^1.3.1" @@ -3715,9 +4050,10 @@ } }, "node_modules/@storybook/client-logger": { - "version": "8.1.10", - "resolved": "https://registry.npmjs.org/@storybook/client-logger/-/client-logger-8.1.10.tgz", - "integrity": "sha512-sVXCOo7jnlCgRPOcMlQGODAEt6ipPj+8xGkRUws0kie77qiDld1drLSB6R380dWc9lUrbv9E1GpxCd/Y4ZzSJQ==", + "version": "8.1.11", + "resolved": "https://registry.npmjs.org/@storybook/client-logger/-/client-logger-8.1.11.tgz", + "integrity": "sha512-DVMh2usz3yYmlqCLCiCKy5fT8/UR9aTh+gSqwyNFkGZrIM4otC5A8eMXajXifzotQLT5SaOEnM3WzHwmpvMIEA==", + "license": "MIT", "dependencies": { "@storybook/global": "^5.0.0" }, @@ -3727,9 +4063,10 @@ } }, "node_modules/@storybook/core-events": { - "version": "8.1.10", - "resolved": "https://registry.npmjs.org/@storybook/core-events/-/core-events-8.1.10.tgz", - "integrity": "sha512-aS4zsBVyJds74+rAW0IfTEjULDCQwXecVpQfv11B8/89/07s3bOPssGGoTtCTaN4pHbduywE6MxbmFvTmXOFCA==", + "version": "8.1.11", + "resolved": "https://registry.npmjs.org/@storybook/core-events/-/core-events-8.1.11.tgz", + "integrity": "sha512-vXaNe2KEW9BGlLrg0lzmf5cJ0xt+suPjWmEODH5JqBbrdZ67X6ApA2nb6WcxDQhykesWCuFN5gp1l+JuDOBi7A==", + "license": "MIT", "dependencies": { "@storybook/csf": "^0.1.7", "ts-dedent": "^2.0.0" @@ -3743,6 +4080,7 @@ "version": "0.1.11", "resolved": "https://registry.npmjs.org/@storybook/csf/-/csf-0.1.11.tgz", "integrity": "sha512-dHYFQH3mA+EtnCkHXzicbLgsvzYjcDJ1JWsogbItZogkPHgSJM/Wr71uMkcvw8v9mmCyP4NpXJuu6bPoVsOnzg==", + "license": "MIT", "dependencies": { "type-fest": "^2.19.0" } @@ -3751,6 +4089,7 @@ "version": "2.19.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=12.20" }, @@ -3761,18 +4100,20 @@ "node_modules/@storybook/global": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/@storybook/global/-/global-5.0.0.tgz", - "integrity": "sha512-FcOqPAXACP0I3oJ/ws6/rrPT9WGhu915Cg8D02a9YxLo0DE9zI+a9A5gRGvmQ09fiWPukqI8ZAEoQEdWUKMQdQ==" + "integrity": "sha512-FcOqPAXACP0I3oJ/ws6/rrPT9WGhu915Cg8D02a9YxLo0DE9zI+a9A5gRGvmQ09fiWPukqI8ZAEoQEdWUKMQdQ==", + "license": "MIT" }, "node_modules/@storybook/instrumenter": { - "version": "8.1.10", - "resolved": "https://registry.npmjs.org/@storybook/instrumenter/-/instrumenter-8.1.10.tgz", - "integrity": "sha512-/TZ3JpTCorbhThCfaR5k4Vs0Svp6xz6t+FVaim/v7N9VErEfmtn+d76CqYLfvmo68DzkEzvArOFBdh2MXtscsw==", + "version": "8.1.11", + "resolved": "https://registry.npmjs.org/@storybook/instrumenter/-/instrumenter-8.1.11.tgz", + "integrity": "sha512-r/U9hcqnodNMHuzRt1g56mWrVsDazR85Djz64M3KOwBhrTj5d46DF4/EE80w/5zR5JOrT7p8WmjJRowiVteOCQ==", + "license": "MIT", "dependencies": { - "@storybook/channels": "8.1.10", - "@storybook/client-logger": "8.1.10", - "@storybook/core-events": "8.1.10", + "@storybook/channels": "8.1.11", + "@storybook/client-logger": "8.1.11", + "@storybook/core-events": "8.1.11", "@storybook/global": "^5.0.0", - "@storybook/preview-api": "8.1.10", + "@storybook/preview-api": "8.1.11", "@vitest/utils": "^1.3.1", "util": "^0.12.4" }, @@ -3782,16 +4123,17 @@ } }, "node_modules/@storybook/preview-api": { - "version": "8.1.10", - "resolved": "https://registry.npmjs.org/@storybook/preview-api/-/preview-api-8.1.10.tgz", - "integrity": "sha512-0Gl8WHDtp/srrA5uBYXl7YbC8kFQA7IxVmwWN7dIS7HAXu63JZ6JfxaFcfy+kCBfZSBD7spFG4J0f5JXRDYbpg==", + "version": "8.1.11", + "resolved": "https://registry.npmjs.org/@storybook/preview-api/-/preview-api-8.1.11.tgz", + "integrity": "sha512-8ZChmFV56GKppCJ0hnBd/kNTfGn2gWVq1242kuet13pbJtBpvOhyq4W01e/Yo14tAPXvgz8dSnMvWLbJx4QfhQ==", + "license": "MIT", "dependencies": { - "@storybook/channels": "8.1.10", - "@storybook/client-logger": "8.1.10", - "@storybook/core-events": "8.1.10", + "@storybook/channels": "8.1.11", + "@storybook/client-logger": "8.1.11", + "@storybook/core-events": "8.1.11", "@storybook/csf": "^0.1.7", "@storybook/global": "^5.0.0", - "@storybook/types": "8.1.10", + "@storybook/types": "8.1.11", "@types/qs": "^6.9.5", "dequal": "^2.0.2", "lodash": "^4.17.21", @@ -3807,19 +4149,20 @@ } }, "node_modules/@storybook/test": { - "version": "8.1.10", - "resolved": "https://registry.npmjs.org/@storybook/test/-/test-8.1.10.tgz", - "integrity": "sha512-uskw/xb/GkGLRTEKPao/5xUKxjP1X3DnDpE52xDF46ZmTvM+gPQbkex97qdG6Mfv37/0lhVhufAsV3g5+CrYKQ==", - "dependencies": { - "@storybook/client-logger": "8.1.10", - "@storybook/core-events": "8.1.10", - "@storybook/instrumenter": "8.1.10", - "@storybook/preview-api": "8.1.10", - "@testing-library/dom": "^9.3.4", - "@testing-library/jest-dom": "^6.4.2", - "@testing-library/user-event": "^14.5.2", - "@vitest/expect": "1.3.1", - "@vitest/spy": "^1.3.1", + "version": "8.1.11", + "resolved": "https://registry.npmjs.org/@storybook/test/-/test-8.1.11.tgz", + "integrity": "sha512-k+V3HemF2/I8fkRxRqM8uH8ULrpBSAAdBOtWSHWLvHguVcb2YA4g4kKo6tXBB9256QfyDW4ZiaAj0/9TMxmJPQ==", + "license": "MIT", + "dependencies": { + "@storybook/client-logger": "8.1.11", + "@storybook/core-events": "8.1.11", + "@storybook/instrumenter": "8.1.11", + "@storybook/preview-api": "8.1.11", + "@testing-library/dom": "10.1.0", + "@testing-library/jest-dom": "6.4.5", + "@testing-library/user-event": "14.5.2", + "@vitest/expect": "1.6.0", + "@vitest/spy": "1.6.0", "util": "^0.12.4" }, "funding": { @@ -3827,12 +4170,32 @@ "url": "https://opencollective.com/storybook" } }, + "node_modules/@storybook/test/node_modules/@testing-library/dom": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.1.0.tgz", + "integrity": "sha512-wdsYKy5zupPyLCW2Je5DLHSxSfbIp6h80WoHOQc+RPtmPGA52O9x5MJEkv92Sjonpq+poOAtUKhh1kBGAXBrNA==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/runtime": "^7.12.5", + "@types/aria-query": "^5.0.1", + "aria-query": "5.3.0", + "chalk": "^4.1.0", + "dom-accessibility-api": "^0.5.9", + "lz-string": "^1.5.0", + "pretty-format": "^27.0.2" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/@storybook/test/node_modules/@testing-library/jest-dom": { - "version": "6.4.6", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.4.6.tgz", - "integrity": "sha512-8qpnGVincVDLEcQXWaHOf6zmlbwTKc6Us6PPu4CRnPXCzo2OGBS5cwgMMOWdxDpEz1mkbvXHpEy99M5Yvt682w==", + "version": "6.4.5", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.4.5.tgz", + "integrity": "sha512-AguB9yvTXmCnySBP1lWjfNNUwpbElsaQ567lt2VdGqAdHtpieLgjmcVyv1q7PMIvLbgpDdkWV5Ydv3FEejyp2A==", + "license": "MIT", "dependencies": { - "@adobe/css-tools": "^4.4.0", + "@adobe/css-tools": "^4.3.2", "@babel/runtime": "^7.9.2", "aria-query": "^5.0.0", "chalk": "^3.0.0", @@ -3871,10 +4234,11 @@ } } }, - "node_modules/@storybook/test/node_modules/chalk": { + "node_modules/@storybook/test/node_modules/@testing-library/jest-dom/node_modules/chalk": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -3883,17 +4247,19 @@ "node": ">=8" } }, - "node_modules/@storybook/test/node_modules/dom-accessibility-api": { + "node_modules/@storybook/test/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz", - "integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==" + "integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==", + "license": "MIT" }, "node_modules/@storybook/types": { - "version": "8.1.10", - "resolved": "https://registry.npmjs.org/@storybook/types/-/types-8.1.10.tgz", - "integrity": "sha512-UJ97iqI+0Mk13I6ayd3TaBfSFBkWnEauwTnFMQe1dN/L3wTh8laOBaLa0Vr3utRSnt2b5hpcw/nq7azB/Gx4Yw==", + "version": "8.1.11", + "resolved": "https://registry.npmjs.org/@storybook/types/-/types-8.1.11.tgz", + "integrity": "sha512-k9N5iRuY2+t7lVRL6xeu6diNsxO3YI3lS4Juv3RZ2K4QsE/b3yG5ElfJB8DjHDSHwRH4ORyrU71KkOCUVfvtnw==", + "license": "MIT", "dependencies": { - "@storybook/channels": "8.1.10", + "@storybook/channels": "8.1.11", "@types/express": "^4.7.0", "file-system-cache": "2.3.0" }, @@ -4256,6 +4622,7 @@ "version": "14.5.2", "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.5.2.tgz", "integrity": "sha512-YAh82Wh4TIrxYLmfGcixwD18oIjyC1pFQC2Y01F2lzV2HTMiYrI0nze0FD0ocB//CKS/7jIUgae+adPqxK5yCQ==", + "license": "MIT", "engines": { "node": ">=12", "npm": ">=6" @@ -4551,6 +4918,7 @@ "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.11.tgz", "integrity": "sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*" } @@ -4664,6 +5032,21 @@ "integrity": "sha512-THo502dA5PzG/sfQH+42Lw3fvmYkceefOspdCwpHRul8ik2Jv1K8I5OZz1AT3/rs46kwgMCe9bSBmDLYkkOMGg==", "dev": true }, + "node_modules/@types/uuid": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", + "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==", + "license": "MIT" + }, + "node_modules/@types/ws": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", + "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/yargs": { "version": "17.0.24", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.24.tgz", @@ -4869,76 +5252,24 @@ } }, "node_modules/@vitest/expect": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.3.1.tgz", - "integrity": "sha512-xofQFwIzfdmLLlHa6ag0dPV8YsnKOCP1KdAeVVh34vSjN2dcUiXYCD9htu/9eM7t8Xln4v03U9HLxLpPlsXdZw==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.6.0.tgz", + "integrity": "sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==", + "license": "MIT", "dependencies": { - "@vitest/spy": "1.3.1", - "@vitest/utils": "1.3.1", + "@vitest/spy": "1.6.0", + "@vitest/utils": "1.6.0", "chai": "^4.3.10" }, "funding": { "url": "https://opencollective.com/vitest" } }, - "node_modules/@vitest/expect/node_modules/@vitest/spy": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.3.1.tgz", - "integrity": "sha512-xAcW+S099ylC9VLU7eZfdT9myV67Nor9w9zhf0mGCYJSO+zM2839tOeROTdikOi/8Qeusffvxb/MyBSOja1Uig==", - "dependencies": { - "tinyspy": "^2.2.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/expect/node_modules/@vitest/utils": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.3.1.tgz", - "integrity": "sha512-d3Waie/299qqRyHTm2DjADeTaNdNSVsnwHPWrs20JMpjh6eiVq7ggggweO8rc4arhf6rRkWuHKwvxGvejUXZZQ==", - "dependencies": { - "diff-sequences": "^29.6.3", - "estree-walker": "^3.0.3", - "loupe": "^2.3.7", - "pretty-format": "^29.7.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/expect/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@vitest/expect/node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@vitest/expect/node_modules/react-is": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" - }, "node_modules/@vitest/spy": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.6.0.tgz", "integrity": "sha512-leUTap6B/cqi/bQkXUu6bQV5TZPx7pmMBKBQiI0rJA8c3pB56ZsaTbREnF7CJfmvAS4V2cXIBAh/3rVwrrCYgw==", + "license": "MIT", "dependencies": { "tinyspy": "^2.2.0" }, @@ -4950,6 +5281,7 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.6.0.tgz", "integrity": "sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw==", + "license": "MIT", "dependencies": { "diff-sequences": "^29.6.3", "estree-walker": "^3.0.3", @@ -4964,6 +5296,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "license": "MIT", "engines": { "node": ">=10" }, @@ -4975,6 +5308,7 @@ "version": "29.7.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "license": "MIT", "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", @@ -4987,7 +5321,8 @@ "node_modules/@vitest/utils/node_modules/react-is": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "license": "MIT" }, "node_modules/@webassemblyjs/ast": { "version": "1.11.6", @@ -5176,6 +5511,21 @@ "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", "dev": true }, + "node_modules/abitype": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/abitype/-/abitype-0.7.1.tgz", + "integrity": "sha512-VBkRHTDZf9Myaek/dO3yMmOzB/y2s3Zo6nVU7yaw1G+TvCHAjwaJzNGN9yo4K5D8bU/VZXKP1EJpRhFr862PlQ==", + "license": "MIT", + "peerDependencies": { + "typescript": ">=4.9.4", + "zod": "^3 >=3.19.1" + }, + "peerDependenciesMeta": { + "zod": { + "optional": true + } + } + }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -5279,6 +5629,18 @@ "node": ">= 6.0.0" } }, + "node_modules/agentkeepalive": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", + "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", + "license": "MIT", + "dependencies": { + "humanize-ms": "^1.2.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, "node_modules/ajv": { "version": "8.12.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", @@ -5552,6 +5914,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "license": "MIT", "engines": { "node": "*" } @@ -5655,6 +6018,10 @@ "version": "1.7.4", "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz", "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==", +<<<<<<< HEAD +======= + "license": "MIT", +>>>>>>> 7940ca4cd (Add contribution banner customizer, migrate public channel page files) "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -5881,6 +6248,26 @@ "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/basic-auth": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", @@ -5906,6 +6293,28 @@ "node": ">=0.6" } }, + "node_modules/bigint-buffer": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bigint-buffer/-/bigint-buffer-1.1.5.tgz", + "integrity": "sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA==", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "bindings": "^1.3.0" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/bignumber.js": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", + "license": "MIT", + "engines": { + "node": "*" + } + }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -5914,6 +6323,21 @@ "node": ">=8" } }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "license": "MIT", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "license": "MIT" + }, "node_modules/body-parser": { "version": "1.20.2", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", @@ -5971,6 +6395,35 @@ "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", "dev": true }, + "node_modules/borsh": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.7.0.tgz", + "integrity": "sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA==", + "license": "Apache-2.0", + "dependencies": { + "bn.js": "^5.2.0", + "bs58": "^4.0.0", + "text-encoding-utf-8": "^1.0.2" + } + }, + "node_modules/borsh/node_modules/base-x": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz", + "integrity": "sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/borsh/node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "license": "MIT", + "dependencies": { + "base-x": "^3.0.2" + } + }, "node_modules/bplist-parser": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", @@ -6053,6 +6506,30 @@ "node-int64": "^0.4.0" } }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, "node_modules/buffer-crc32": { "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", @@ -6067,6 +6544,20 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "devOptional": true }, + "node_modules/bufferutil": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", + "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, "node_modules/bundle-name": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", @@ -6188,9 +6679,10 @@ ] }, "node_modules/chai": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", - "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", + "license": "MIT", "dependencies": { "assertion-error": "^1.1.0", "check-error": "^1.0.3", @@ -6198,12 +6690,21 @@ "get-func-name": "^2.0.2", "loupe": "^2.3.6", "pathval": "^1.1.1", - "type-detect": "^4.0.8" + "type-detect": "^4.1.0" }, "engines": { "node": ">=4" } }, + "node_modules/chai/node_modules/type-detect": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -6232,6 +6733,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "license": "MIT", "dependencies": { "get-func-name": "^2.0.2" }, @@ -6645,6 +7147,18 @@ "typescript": ">=4" } }, + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "license": "Apache-2.0", + "bin": { + "crc32": "bin/crc32.njs" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/create-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", @@ -6672,6 +7186,15 @@ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "devOptional": true }, + "node_modules/cross-fetch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", + "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", + "license": "MIT", + "dependencies": { + "node-fetch": "^2.6.12" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -6922,6 +7445,7 @@ "version": "4.1.4", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", + "license": "MIT", "dependencies": { "type-detect": "^4.0.0" }, @@ -7165,6 +7689,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/delay": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", + "integrity": "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -7611,6 +8147,21 @@ "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==" }, + "node_modules/es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==", + "license": "MIT", + "dependencies": { + "es6-promise": "^4.0.3" + } + }, + "node_modules/es6-promisify/node_modules/es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", + "license": "MIT" + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -8284,6 +8835,30 @@ "node": ">= 0.6" } }, + "node_modules/ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "license": "MIT", + "dependencies": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "node_modules/ethereum-cryptography/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/eventemitter3": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", @@ -8413,6 +8988,14 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, + "node_modules/eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==", + "engines": { + "node": "> 0.1.90" + } + }, "node_modules/fake-xml-http-request": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/fake-xml-http-request/-/fake-xml-http-request-2.1.2.tgz", @@ -8469,6 +9052,12 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, + "node_modules/fast-stable-stringify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz", + "integrity": "sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==", + "license": "MIT" + }, "node_modules/fastest-levenshtein": { "version": "1.0.16", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", @@ -8478,6 +9067,13 @@ "node": ">= 4.9.1" } }, + "node_modules/fastestsmallesttextencoderdecoder": { + "version": "1.0.22", + "resolved": "https://registry.npmjs.org/fastestsmallesttextencoderdecoder/-/fastestsmallesttextencoderdecoder-1.0.22.tgz", + "integrity": "sha512-Pb8d48e+oIuY4MaM64Cd7OW1gt4nxCHs7/ddPPZ/Ic3sg8yVGM7O9wDvZ7us6ScaUupzM+pfBolwtYhN1IxBIw==", + "license": "CC0-1.0", + "peer": true + }, "node_modules/fastq": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", @@ -8511,11 +9107,18 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/file-system-cache/-/file-system-cache-2.3.0.tgz", "integrity": "sha512-l4DMNdsIPsVnKrgEXbJwDJsA5mB8rGwHYERMgqQx/xAUtChPJMre1bXBzDEqqVbWv9AIbFezXMxeEkZDSrXUOQ==", + "license": "MIT", "dependencies": { "fs-extra": "11.1.1", "ramda": "0.29.0" } }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "license": "MIT" + }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -8766,6 +9369,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "license": "MIT", "engines": { "node": "*" } @@ -9269,6 +9873,15 @@ "node": ">=10.17.0" } }, + "node_modules/humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "license": "MIT", + "dependencies": { + "ms": "^2.0.0" + } + }, "node_modules/hyphenate-style-name": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz", @@ -9286,6 +9899,26 @@ "node": ">=0.10.0" } }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, "node_modules/ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", @@ -9912,6 +10545,15 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "devOptional": true }, + "node_modules/isomorphic-ws": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", + "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", + "license": "MIT", + "peerDependencies": { + "ws": "*" + } + }, "node_modules/istanbul-lib-coverage": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", @@ -9991,6 +10633,65 @@ "set-function-name": "^2.0.1" } }, + "node_modules/jayson": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/jayson/-/jayson-4.1.1.tgz", + "integrity": "sha512-5ZWm4Q/0DHPyeMfAsrwViwUS2DMVsQgWh8bEEIVTkfb3DzHZ2L3G5WUnF+AKmGjjM9r1uAv73SaqC1/U4RL45w==", + "license": "MIT", + "dependencies": { + "@types/connect": "^3.4.33", + "@types/node": "^12.12.54", + "@types/ws": "^7.4.4", + "commander": "^2.20.3", + "delay": "^5.0.0", + "es6-promisify": "^5.0.0", + "eyes": "^0.1.8", + "isomorphic-ws": "^4.0.1", + "json-stringify-safe": "^5.0.1", + "JSONStream": "^1.3.5", + "uuid": "^8.3.2", + "ws": "^7.5.10" + }, + "bin": { + "jayson": "bin/jayson.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jayson/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "license": "MIT" + }, + "node_modules/jayson/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "license": "MIT" + }, + "node_modules/jayson/node_modules/ws": { + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "license": "MIT", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", @@ -10967,6 +11668,12 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "license": "ISC" + }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", @@ -11003,7 +11710,6 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", - "dev": true, "engines": [ "node >= 0.2.0" ] @@ -11012,7 +11718,6 @@ "version": "1.3.5", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", - "dev": true, "dependencies": { "jsonparse": "^1.2.0", "through": ">=2.2.7 <3" @@ -11506,6 +12211,7 @@ "version": "2.3.7", "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "license": "MIT", "dependencies": { "get-func-name": "^2.0.1" } @@ -11589,7 +12295,8 @@ "node_modules/map-or-similar": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/map-or-similar/-/map-or-similar-1.5.0.tgz", - "integrity": "sha512-0aF7ZmVon1igznGI4VS30yugpduQW3y3GkcgGJOp7d8x8QrizhigUxjI/m2UojsXXto+jLAH3KSz+xOJTiORjg==" + "integrity": "sha512-0aF7ZmVon1igznGI4VS30yugpduQW3y3GkcgGJOp7d8x8QrizhigUxjI/m2UojsXXto+jLAH3KSz+xOJTiORjg==", + "license": "MIT" }, "node_modules/matchmediaquery": { "version": "0.3.1", @@ -11632,6 +12339,7 @@ "version": "1.11.3", "resolved": "https://registry.npmjs.org/memoizerific/-/memoizerific-1.11.3.tgz", "integrity": "sha512-/EuHYwAPdLtXwAwSZkh/Gutery6pD2KYd44oQLhAvQp/50mpyduZh8Q7PYHXTCJ+wuXxt7oij2LXyIJOOYFPog==", + "license": "MIT", "dependencies": { "map-or-similar": "^1.5.0" } @@ -11832,8 +12540,7 @@ "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "devOptional": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/mz": { "version": "2.7.0", @@ -11973,15 +12680,70 @@ "tslib": "^2.0.3" } }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-fetch/node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" + }, + "node_modules/node-fetch/node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" + }, + "node_modules/node-fetch/node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/node-forge": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", "dev": true, + "license": "(BSD-3-Clause OR GPL-2.0)", "engines": { "node": ">= 6.13.0" } }, + "node_modules/node-gyp-build": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.1.tgz", + "integrity": "sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==", + "license": "MIT", + "optional": true, + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -12473,6 +13235,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "license": "MIT", "engines": { "node": "*" } @@ -12973,6 +13736,21 @@ } ] }, + "node_modules/qr-code-styling": { + "version": "1.6.0-rc.1", + "resolved": "https://registry.npmjs.org/qr-code-styling/-/qr-code-styling-1.6.0-rc.1.tgz", + "integrity": "sha512-ModRIiW6oUnsP18QzrRYZSc/CFKFKIdj7pUs57AEVH20ajlglRpN3HukjHk0UbNMTlKGuaYl7Gt6/O5Gg2NU2Q==", + "license": "MIT", + "dependencies": { + "qrcode-generator": "^1.4.3" + } + }, + "node_modules/qrcode-generator": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/qrcode-generator/-/qrcode-generator-1.4.4.tgz", + "integrity": "sha512-HM7yY8O2ilqhmULxGMpcHSF1EhJJ9yBj8gvDEuZ6M+KGJ0YY2hKpnXvRD+hZPLrDVck3ExIGhmPtSdcjC+guuw==", + "license": "MIT" + }, "node_modules/qs": { "version": "6.11.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", @@ -13025,6 +13803,7 @@ "version": "0.29.0", "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.29.0.tgz", "integrity": "sha512-BBea6L67bYLtdbOqfp8f58fPMqEwx0doL+pAi8TZyp2YWz8R9G8z9x75CZI8W+ftqhFHCpEX2cRnUUXK130iKA==", + "license": "MIT", "funding": { "type": "opencollective", "url": "https://opencollective.com/ramda" @@ -13579,6 +14358,53 @@ "integrity": "sha512-2+MhsfPhvauN1O8KaXpXAOfR/fwe8dnUXVM+xw7yt40lJRfPVQxV6yryZm0cgRvAj5fMF/mdRZbL2ptwbs5i2g==", "dev": true }, + "node_modules/rpc-websockets": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-9.0.2.tgz", + "integrity": "sha512-YzggvfItxMY3Lwuax5rC18inhbjJv9Py7JXRHxTIi94JOLrqBsSsUUc5bbl5W6c11tXhdfpDPK0KzBhoGe8jjw==", + "license": "LGPL-3.0-only", + "dependencies": { + "@swc/helpers": "^0.5.11", + "@types/uuid": "^8.3.4", + "@types/ws": "^8.2.2", + "buffer": "^6.0.3", + "eventemitter3": "^5.0.1", + "uuid": "^8.3.2", + "ws": "^8.5.0" + }, + "funding": { + "type": "paypal", + "url": "https://paypal.me/kozjak" + }, + "optionalDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + } + }, + "node_modules/rpc-websockets/node_modules/@swc/helpers": { + "version": "0.5.12", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.12.tgz", + "integrity": "sha512-KMZNXiGibsW9kvZAO1Pam2JPTDBm+KSHMMHWdsyI/1DbIZjT2A6Gy3hblVXUMEDvUAKq+e0vL0X0o54owWji7g==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/rpc-websockets/node_modules/@types/ws": { + "version": "8.5.12", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz", + "integrity": "sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/rpc-websockets/node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "license": "MIT" + }, "node_modules/run-applescript": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", @@ -13638,7 +14464,6 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, "funding": [ { "type": "github", @@ -13758,6 +14583,7 @@ "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.4.1.tgz", "integrity": "sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==", "dev": true, + "license": "MIT", "dependencies": { "@types/node-forge": "^1.3.0", "node-forge": "^1" @@ -13882,6 +14708,12 @@ "node": ">= 0.4" } }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", + "license": "MIT" + }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -14764,6 +15596,15 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/superstruct": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-2.0.2.tgz", + "integrity": "sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -15071,6 +15912,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/telejson/-/telejson-7.2.0.tgz", "integrity": "sha512-1QTEcJkJEhc8OnStBx/ILRu5J2p0GjvWsBx56bmZRqnrkdBMUe+nX92jxV+p3dB4CP6PZCdJMQJwCggkNBMzkQ==", + "license": "MIT", "dependencies": { "memoizerific": "^1.11.3" } @@ -15245,6 +16087,11 @@ "node": ">=8" } }, + "node_modules/text-encoding-utf-8": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz", + "integrity": "sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg==" + }, "node_modules/text-extensions": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", @@ -15284,8 +16131,7 @@ "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", - "dev": true + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" }, "node_modules/through2": { "version": "4.0.2", @@ -15299,12 +16145,14 @@ "node_modules/tiny-invariant": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz", - "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==" + "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==", + "license": "MIT" }, "node_modules/tinyspy": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.1.tgz", "integrity": "sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==", + "license": "MIT", "engines": { "node": ">=14.0.0" } @@ -15429,6 +16277,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.2.0.tgz", "integrity": "sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==", + "license": "MIT", "engines": { "node": ">=6.10" } @@ -15637,16 +16486,16 @@ } }, "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "devOptional": true, + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "node_modules/unbox-primitive": { @@ -15804,10 +16653,25 @@ } } }, + "node_modules/utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, "node_modules/util": { "version": "0.12.5", "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "license": "MIT", "dependencies": { "inherits": "^2.0.3", "is-arguments": "^1.0.4", @@ -15830,6 +16694,15 @@ "node": ">= 0.4.0" } }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", @@ -15904,6 +16777,384 @@ "node": ">=10.13.0" } }, + "node_modules/web3": { + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/web3/-/web3-4.11.1.tgz", + "integrity": "sha512-KUntBtnc+cj9ur/yNcdTok9MpCI9dHf8h1hRmLPVICF5wyKyHbR4t+51vqUnK5bI6UxVfRPT++qCcP7KhDACVA==", + "license": "LGPL-3.0", + "dependencies": { + "web3-core": "^4.5.0", + "web3-errors": "^1.2.1", + "web3-eth": "^4.8.2", + "web3-eth-abi": "^4.2.3", + "web3-eth-accounts": "^4.1.3", + "web3-eth-contract": "^4.6.0", + "web3-eth-ens": "^4.4.0", + "web3-eth-iban": "^4.0.7", + "web3-eth-personal": "^4.0.8", + "web3-net": "^4.1.0", + "web3-providers-http": "^4.1.0", + "web3-providers-ws": "^4.0.8", + "web3-rpc-methods": "^1.3.0", + "web3-rpc-providers": "^1.0.0-rc.1", + "web3-types": "^1.7.0", + "web3-utils": "^4.3.1", + "web3-validator": "^2.0.6" + }, + "engines": { + "node": ">=14.0.0", + "npm": ">=6.12.0" + } + }, + "node_modules/web3-core": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-4.5.0.tgz", + "integrity": "sha512-Q8LIAqmF7vkRydBPiU+OC7wI44nEU6JEExolFaOakqrjMtQ1CWFHRUQMNJRDsk5bRirjyShuAsuqLeYByvvXhg==", + "license": "LGPL-3.0", + "dependencies": { + "web3-errors": "^1.2.0", + "web3-eth-accounts": "^4.1.2", + "web3-eth-iban": "^4.0.7", + "web3-providers-http": "^4.1.0", + "web3-providers-ws": "^4.0.7", + "web3-types": "^1.7.0", + "web3-utils": "^4.3.0", + "web3-validator": "^2.0.6" + }, + "engines": { + "node": ">=14", + "npm": ">=6.12.0" + }, + "optionalDependencies": { + "web3-providers-ipc": "^4.0.7" + } + }, + "node_modules/web3-errors": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-errors/-/web3-errors-1.2.1.tgz", + "integrity": "sha512-dIsi8SFC9TCAWpPmacXeVMk/F8tDNa1Bvg8/Cc2cvJo8LRSWd099szEyb+/SiMYcLlEbwftiT9Rpukz7ql4hBg==", + "license": "LGPL-3.0", + "dependencies": { + "web3-types": "^1.7.0" + }, + "engines": { + "node": ">=14", + "npm": ">=6.12.0" + } + }, + "node_modules/web3-eth": { + "version": "4.8.2", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-4.8.2.tgz", + "integrity": "sha512-DLV/fIMG6gBp/B0gv0+G4FzxZ4YCDQsY3lzqqv7avwh3uU7/O27aifCUcFd7Ye+3ixTqCjAvLEl9wYSeyG3zQw==", + "license": "LGPL-3.0", + "dependencies": { + "setimmediate": "^1.0.5", + "web3-core": "^4.5.0", + "web3-errors": "^1.2.1", + "web3-eth-abi": "^4.2.3", + "web3-eth-accounts": "^4.1.3", + "web3-net": "^4.1.0", + "web3-providers-ws": "^4.0.8", + "web3-rpc-methods": "^1.3.0", + "web3-types": "^1.7.0", + "web3-utils": "^4.3.1", + "web3-validator": "^2.0.6" + }, + "engines": { + "node": ">=14", + "npm": ">=6.12.0" + } + }, + "node_modules/web3-eth-abi": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-4.2.3.tgz", + "integrity": "sha512-rPVwTn0O1CzbtfXwEfIjUP0W5Y7u1OFjugwKpSqJzPQE6+REBg6OELjomTGZBu+GThxHnv0rp15SOxvqp+tyXA==", + "license": "LGPL-3.0", + "dependencies": { + "abitype": "0.7.1", + "web3-errors": "^1.2.0", + "web3-types": "^1.7.0", + "web3-utils": "^4.3.1", + "web3-validator": "^2.0.6" + }, + "engines": { + "node": ">=14", + "npm": ">=6.12.0" + } + }, + "node_modules/web3-eth-accounts": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-4.1.3.tgz", + "integrity": "sha512-61Nb7xCXy6Vw/6xUZMM5ITtXetXmaP0F8oKRxika4GO4fRfKZLAwBZtshMyrdAORPZYq77ENiqXJVU+hTmtUaQ==", + "license": "LGPL-3.0", + "dependencies": { + "@ethereumjs/rlp": "^4.0.1", + "crc-32": "^1.2.2", + "ethereum-cryptography": "^2.0.0", + "web3-errors": "^1.2.0", + "web3-types": "^1.7.0", + "web3-utils": "^4.3.1", + "web3-validator": "^2.0.6" + }, + "engines": { + "node": ">=14", + "npm": ">=6.12.0" + } + }, + "node_modules/web3-eth-contract": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-4.6.0.tgz", + "integrity": "sha512-mgQ/WUUlgW9BVKKVGU/Q7KrQEbEGI98h8ppox7fT964wY9ITFMDuRCvYk50WTWnFMdjFtOBqt1xRJ0+B1ekCHg==", + "license": "LGPL-3.0", + "dependencies": { + "@ethereumjs/rlp": "^5.0.2", + "web3-core": "^4.5.0", + "web3-errors": "^1.2.0", + "web3-eth": "^4.8.1", + "web3-eth-abi": "^4.2.3", + "web3-types": "^1.7.0", + "web3-utils": "^4.3.1", + "web3-validator": "^2.0.6" + }, + "engines": { + "node": ">=14", + "npm": ">=6.12.0" + } + }, + "node_modules/web3-eth-contract/node_modules/@ethereumjs/rlp": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-5.0.2.tgz", + "integrity": "sha512-DziebCdg4JpGlEqEdGgXmjqcFoJi+JGulUXwEjsZGAscAQ7MyD/7LE/GVCP29vEQxKc7AAwjT3A2ywHp2xfoCA==", + "license": "MPL-2.0", + "bin": { + "rlp": "bin/rlp.cjs" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/web3-eth-ens": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-4.4.0.tgz", + "integrity": "sha512-DeyVIS060hNV9g8dnTx92syqvgbvPricE3MerCxe/DquNZT3tD8aVgFfq65GATtpCgDDJffO2bVeHp3XBemnSQ==", + "license": "LGPL-3.0", + "dependencies": { + "@adraffy/ens-normalize": "^1.8.8", + "web3-core": "^4.5.0", + "web3-errors": "^1.2.0", + "web3-eth": "^4.8.0", + "web3-eth-contract": "^4.5.0", + "web3-net": "^4.1.0", + "web3-types": "^1.7.0", + "web3-utils": "^4.3.0", + "web3-validator": "^2.0.6" + }, + "engines": { + "node": ">=14", + "npm": ">=6.12.0" + } + }, + "node_modules/web3-eth-iban": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-4.0.7.tgz", + "integrity": "sha512-8weKLa9KuKRzibC87vNLdkinpUE30gn0IGY027F8doeJdcPUfsa4IlBgNC4k4HLBembBB2CTU0Kr/HAOqMeYVQ==", + "license": "LGPL-3.0", + "dependencies": { + "web3-errors": "^1.1.3", + "web3-types": "^1.3.0", + "web3-utils": "^4.0.7", + "web3-validator": "^2.0.3" + }, + "engines": { + "node": ">=14", + "npm": ">=6.12.0" + } + }, + "node_modules/web3-eth-personal": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-4.0.8.tgz", + "integrity": "sha512-sXeyLKJ7ddQdMxz1BZkAwImjqh7OmKxhXoBNF3isDmD4QDpMIwv/t237S3q4Z0sZQamPa/pHebJRWVuvP8jZdw==", + "license": "LGPL-3.0", + "dependencies": { + "web3-core": "^4.3.0", + "web3-eth": "^4.3.1", + "web3-rpc-methods": "^1.1.3", + "web3-types": "^1.3.0", + "web3-utils": "^4.0.7", + "web3-validator": "^2.0.3" + }, + "engines": { + "node": ">=14", + "npm": ">=6.12.0" + } + }, + "node_modules/web3-net": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-4.1.0.tgz", + "integrity": "sha512-WWmfvHVIXWEoBDWdgKNYKN8rAy6SgluZ0abyRyXOL3ESr7ym7pKWbfP4fjApIHlYTh8tNqkrdPfM4Dyi6CA0SA==", + "license": "LGPL-3.0", + "dependencies": { + "web3-core": "^4.4.0", + "web3-rpc-methods": "^1.3.0", + "web3-types": "^1.6.0", + "web3-utils": "^4.3.0" + }, + "engines": { + "node": ">=14", + "npm": ">=6.12.0" + } + }, + "node_modules/web3-providers-http": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-4.1.0.tgz", + "integrity": "sha512-6qRUGAhJfVQM41E5t+re5IHYmb5hSaLc02BE2MaRQsz2xKA6RjmHpOA5h/+ojJxEpI9NI2CrfDKOAgtJfoUJQg==", + "license": "LGPL-3.0", + "dependencies": { + "cross-fetch": "^4.0.0", + "web3-errors": "^1.1.3", + "web3-types": "^1.3.0", + "web3-utils": "^4.0.7" + }, + "engines": { + "node": ">=14", + "npm": ">=6.12.0" + } + }, + "node_modules/web3-providers-ipc": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-4.0.7.tgz", + "integrity": "sha512-YbNqY4zUvIaK2MHr1lQFE53/8t/ejHtJchrWn9zVbFMGXlTsOAbNoIoZWROrg1v+hCBvT2c9z8xt7e/+uz5p1g==", + "license": "LGPL-3.0", + "optional": true, + "dependencies": { + "web3-errors": "^1.1.3", + "web3-types": "^1.3.0", + "web3-utils": "^4.0.7" + }, + "engines": { + "node": ">=14", + "npm": ">=6.12.0" + } + }, + "node_modules/web3-providers-ws": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-4.0.8.tgz", + "integrity": "sha512-goJdgata7v4pyzHRsg9fSegUG4gVnHZSHODhNnn6J93ykHkBI1nz4fjlGpcQLUMi4jAMz6SHl9Ibzs2jj9xqPw==", + "license": "LGPL-3.0", + "dependencies": { + "@types/ws": "8.5.3", + "isomorphic-ws": "^5.0.0", + "web3-errors": "^1.2.0", + "web3-types": "^1.7.0", + "web3-utils": "^4.3.1", + "ws": "^8.17.1" + }, + "engines": { + "node": ">=14", + "npm": ">=6.12.0" + } + }, + "node_modules/web3-providers-ws/node_modules/@types/ws": { + "version": "8.5.3", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz", + "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/web3-providers-ws/node_modules/isomorphic-ws": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz", + "integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==", + "license": "MIT", + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/web3-rpc-methods": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/web3-rpc-methods/-/web3-rpc-methods-1.3.0.tgz", + "integrity": "sha512-/CHmzGN+IYgdBOme7PdqzF+FNeMleefzqs0LVOduncSaqsppeOEoskLXb2anSpzmQAP3xZJPaTrkQPWSJMORig==", + "license": "LGPL-3.0", + "dependencies": { + "web3-core": "^4.4.0", + "web3-types": "^1.6.0", + "web3-validator": "^2.0.6" + }, + "engines": { + "node": ">=14", + "npm": ">=6.12.0" + } + }, + "node_modules/web3-rpc-providers": { + "version": "1.0.0-rc.1", + "resolved": "https://registry.npmjs.org/web3-rpc-providers/-/web3-rpc-providers-1.0.0-rc.1.tgz", + "integrity": "sha512-N7AgGB+ilKPFQohnlI1vNHWmQ5Wh5vlGdYKWCWJc9kisKxxGtOsqN3W8tOj6/898sHZIXU9i/IAOyreGDIybmw==", + "license": "LGPL-3.0", + "dependencies": { + "web3-errors": "^1.2.0", + "web3-providers-http": "^4.1.0", + "web3-providers-ws": "^4.0.8", + "web3-types": "^1.7.0", + "web3-utils": "^4.3.1", + "web3-validator": "^2.0.6" + }, + "engines": { + "node": ">=14", + "npm": ">=6.12.0" + } + }, + "node_modules/web3-types": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/web3-types/-/web3-types-1.7.0.tgz", + "integrity": "sha512-nhXxDJ7a5FesRw9UG5SZdP/C/3Q2EzHGnB39hkAV+YGXDMgwxBXFWebQLfEzZzuArfHnvC0sQqkIHNwSKcVjdA==", + "license": "LGPL-3.0", + "engines": { + "node": ">=14", + "npm": ">=6.12.0" + } + }, + "node_modules/web3-utils": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-4.3.1.tgz", + "integrity": "sha512-kGwOk8FxOLJ9DQC68yqNQc7AzN+k9YDLaW+ZjlAXs3qORhf8zXk5SxWAAGLbLykMs3vTeB0FTb1Exut4JEYfFA==", + "license": "LGPL-3.0", + "dependencies": { + "ethereum-cryptography": "^2.0.0", + "eventemitter3": "^5.0.1", + "web3-errors": "^1.2.0", + "web3-types": "^1.7.0", + "web3-validator": "^2.0.6" + }, + "engines": { + "node": ">=14", + "npm": ">=6.12.0" + } + }, + "node_modules/web3-utils/node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "license": "MIT" + }, + "node_modules/web3-validator": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/web3-validator/-/web3-validator-2.0.6.tgz", + "integrity": "sha512-qn9id0/l1bWmvH4XfnG/JtGKKwut2Vokl6YXP5Kfg424npysmtRLe9DgiNBM9Op7QL/aSiaA0TVXibuIuWcizg==", + "license": "LGPL-3.0", + "dependencies": { + "ethereum-cryptography": "^2.0.0", + "util": "^0.12.5", + "web3-errors": "^1.2.0", + "web3-types": "^1.6.0", + "zod": "^3.21.4" + }, + "engines": { + "node": ">=14", + "npm": ">=6.12.0" + } + }, "node_modules/webidl-conversions": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", @@ -16248,7 +17499,6 @@ "version": "8.17.1", "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=10.0.0" @@ -16398,6 +17648,15 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/zod": { + "version": "3.23.8", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", + "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } } } } diff --git a/nextjs/package.json b/nextjs/package.json index 0bd242bda4..1841fbbf8e 100644 --- a/nextjs/package.json +++ b/nextjs/package.json @@ -18,12 +18,14 @@ "typecheck": "tsc --noEmit --incremental false" }, "dependencies": { - "@brave/leo": "github:brave/leo#84b3117d0fd10eb45d94e816fba87909124e7bb1", + "@brave/leo": "github:brave/leo#63e98a1bb14cf87dcb8cbd4436e9e38615840447", "@fontsource/poppins": "5.0.12", "@fontsource/inter": "5.0.17", "@fontsource/dm-mono": "5.0.19", "@github/webauthn-json": "^2.1.1", "axios": "1.7.4", + "@solana/spl-token": "^0.4.8", + "@solana/web3.js": "^1.95.2", "clsx": "^2.0.0", "moment": "^2.29.4", "next": "^14.1.1", @@ -33,7 +35,9 @@ "react-responsive": "^9.0.2", "express-basic-auth": "1.2.1", "bs58": "5.0.0", - "react-select": "^5.7.4" + "react-select": "^5.7.4", + "qr-code-styling": "^1.6.0-rc.1", + "web3": "^4.8.0" }, "devDependencies": { "@commitlint/cli": "^17.6.7", @@ -71,7 +75,7 @@ "stylelint-config-standard": "^34.0.0", "stylelint-webpack-plugin": "^4.1.1", "tailwindcss": "^3.3.3", - "typescript": "^4.9.4" + "typescript": "^5.5.4" }, "lint-staged": { "**/*.{js,jsx,ts,tsx}": [ diff --git a/nextjs/public/images/crypto_widget_bg.png b/nextjs/public/images/crypto_widget_bg.png new file mode 100644 index 0000000000..fd52cf0665 Binary files /dev/null and b/nextjs/public/images/crypto_widget_bg.png differ diff --git a/nextjs/public/images/crypto_widget_success.png b/nextjs/public/images/crypto_widget_success.png new file mode 100644 index 0000000000..bcc18d42b5 Binary files /dev/null and b/nextjs/public/images/crypto_widget_success.png differ diff --git a/nextjs/public/images/default_banner_bg.jpg b/nextjs/public/images/default_banner_bg.jpg new file mode 100644 index 0000000000..a810fac2e0 Binary files /dev/null and b/nextjs/public/images/default_banner_bg.jpg differ diff --git a/nextjs/public/images/dollar_sign.svg b/nextjs/public/images/dollar_sign.svg new file mode 100644 index 0000000000..6574f7c91a --- /dev/null +++ b/nextjs/public/images/dollar_sign.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/nextjs/public/images/exchange.svg b/nextjs/public/images/exchange.svg new file mode 100644 index 0000000000..067655ccf9 --- /dev/null +++ b/nextjs/public/images/exchange.svg @@ -0,0 +1,3 @@ + + + diff --git a/nextjs/public/images/orange_checkmark.png b/nextjs/public/images/orange_checkmark.png new file mode 100644 index 0000000000..86f825d050 Binary files /dev/null and b/nextjs/public/images/orange_checkmark.png differ diff --git a/nextjs/public/images/qr_logo.png b/nextjs/public/images/qr_logo.png new file mode 100644 index 0000000000..931492b91a Binary files /dev/null and b/nextjs/public/images/qr_logo.png differ diff --git a/nextjs/public/images/try_wallet_modal_gradient.png b/nextjs/public/images/try_wallet_modal_gradient.png new file mode 100644 index 0000000000..1d3a60542f Binary files /dev/null and b/nextjs/public/images/try_wallet_modal_gradient.png differ diff --git a/nextjs/public/images/wallet_icon_color.png b/nextjs/public/images/wallet_icon_color.png new file mode 100644 index 0000000000..1ca5b0421c Binary files /dev/null and b/nextjs/public/images/wallet_icon_color.png differ diff --git a/nextjs/scripts/create-local-server.js b/nextjs/scripts/create-local-server.js index 7a7625e50c..32f87590d4 100644 --- a/nextjs/scripts/create-local-server.js +++ b/nextjs/scripts/create-local-server.js @@ -21,6 +21,7 @@ const nextAllowPageRoutes = [ 'publishers/totp_registrations/new', 'publishers/u2f_registrations/new', 'publishers/home', + 'publishers/contribution_page' ]; const routeMatch = [ nextAllowPageRoutes.map((r) => `ja/${r}`).join('|'), diff --git a/nextjs/src/app/[locale]/c/[public_identifier]/CryptoPaymentOption.jsx b/nextjs/src/app/[locale]/c/[public_identifier]/CryptoPaymentOption.jsx new file mode 100644 index 0000000000..e69c15f607 --- /dev/null +++ b/nextjs/src/app/[locale]/c/[public_identifier]/CryptoPaymentOption.jsx @@ -0,0 +1,21 @@ +'use client'; + +import styles from '@/styles/PublicChannelPage.module.css'; +import Icon from '@brave/leo/react/icon'; + +export default function CryptoPaymentOption({label, value, innerProps, data}) { + const icon = data.icon; + const subheading = data.subheading; + + return ( +
+ + +
+ {label} +
{subheading}
+
+
+
+ ) +} diff --git a/nextjs/src/app/[locale]/c/[public_identifier]/CryptoPaymentWidget.jsx b/nextjs/src/app/[locale]/c/[public_identifier]/CryptoPaymentWidget.jsx new file mode 100644 index 0000000000..43306bb88b --- /dev/null +++ b/nextjs/src/app/[locale]/c/[public_identifier]/CryptoPaymentWidget.jsx @@ -0,0 +1,597 @@ +'use client'; +// webpacker does not import the correct version automatically. +// this is necessary for the Solana transfer object to function +import * as buffer from "buffer"; +if (typeof window !== 'undefined') { + window.Buffer = buffer.Buffer; +} +import { useEffect, useState } from 'react'; +import { useTranslations } from 'next-intl'; +import Web3 from "web3"; +import { + Connection, + Keypair, + SystemProgram, + LAMPORTS_PER_SOL, + Transaction, + PublicKey, +} from "@solana/web3.js"; +import { + getAssociatedTokenAddress, + createAssociatedTokenAccountInstruction, + createTransferInstruction, +} from "@solana/spl-token"; + +import Icon from '@brave/leo/react/icon'; +import Select, { components } from 'react-select'; +import Dialog from '@brave/leo/react/dialog'; +import Button from '@brave/leo/react/button'; +import QRCodeModal from "./QRCodeModal"; +import TryBraveModal from "./TryBraveModal"; +import CryptoPaymentOption from "./CryptoPaymentOption"; +import SuccessWidget from "./SuccessWidget"; +import { apiRequest } from '@/lib/api'; +import styles from '@/styles/PublicChannelPage.module.css'; +import batAbi from "@/constant/batAbi.json"; +import erc20Abi from "@/constant/erc20Abi.json"; + +export default function CryptoPaymentWidget({title, cryptoAddresses, cryptoConstants, previewMode}) { + const t = useTranslations(); + let intervalId; + const placeholder = t('publicChannelPage.custom'); + // There shouldn't be more than one of each, but just in case + const solAddress = cryptoAddresses.filter(address => address.includes('SOL'))[0]; + const ethAddress = cryptoAddresses.filter(address => address.includes('ETH'))[0]; + const addresses = { SOL: solAddress && solAddress[0], ETH: ethAddress && ethAddress[0] }; + const iconOptions = { SOL: 'sol-color', ETH: 'eth-color', BAT: 'bat-color', USDC: 'usdc-color' }; + const defaultAmounts = [1,5,10]; + const ethBatAddress = cryptoConstants.eth_bat_address; + const solanaBatAddress = cryptoConstants.solana_bat_address; + const solanaMainUrl = cryptoConstants.solana_main_url; + const ethUsdcAddress = cryptoConstants.eth_usdc_address; + const solUsdcAddress = cryptoConstants.solana_usdc_address; + + const dropdownOptions = [] + if (ethAddress) { + dropdownOptions.push({ + label: t('publicChannelPage.ethereumNetwork'), + options: [ + { + label: t('walletServices.addCryptoWidget.ethereum'), + subheading: t('publicChannelPage.ethSubheading'), + value: "ETH", + icon: 'eth-color' + }, + { + label: t('walletServices.addCryptoWidget.ethereumBAT'), + subheading: t('publicChannelPage.ethBatSubheading'), + value: "BAT", + icon: 'bat-color' + }, + { + label: t('publicChannelPage.usdc'), + subheading: t('publicChannelPage.usdcSubheading'), + value: "USDC", + icon: 'usdc-color' + } + ] + }) + } + + if (solAddress) { + dropdownOptions.push({ + label: t('publicChannelPage.solanaNetwork'), + options: [ + { + label: t('walletServices.addCryptoWidget.solana'), + subheading: t('publicChannelPage.solSubheading'), + value: "SOL", + icon: 'sol-color' + }, + { + label: t('walletServices.addCryptoWidget.solanaBAT'), + subheading: t('publicChannelPage.solBatSubheading'), + value: "splBAT", + icon: 'bat-color' + }, + { + label: t('publicChannelPage.solUsdc'), + subheading: t('publicChannelPage.solUsdcSubheading'), + value: "USDC-SPL", + icon: 'usdc-color' + } + ] + }) + } + // the channel must have at least one crypto address for this page to be navigable, + // and right now the options are only sol and eth + const [currentChain, setCurrentChain] = useState(ethAddress ? 'BAT' : 'splBAT'); + const [isLoading, setIsLoading] = useState(true); + const [ratios, setRatios] = useState({}); + const [displayChain, SetDisplayChain] = useState('BAT'); + const [isModalOpen, setIsModalOpen] = useState(false); + const [isTryBraveModalOpen, setIsTryBraveModalOpen] = useState(false); + const [customAmount, setCustomAmount] = useState(null); + const [currentAmount, setCurrentAmount] = useState(5); + const [errorTitle, setErrorTitle] = useState(null); + const [errorMsg, setErrorMsg] = useState(null); + const [toggle, setToggle] = useState('crypto'); + const [isSuccessView, setIsSuccessView] = useState(false); + const [selectValue, setSelectValue] = useState(dropdownOptions.flatMap(opt => opt.options).filter(opt => opt.value === currentChain)[0]) + + useEffect(() => { + loadData(); + + if (!previewMode) { + // Set up a setInterval to fetch new price data every 5 minutes (300,000 milliseconds) + intervalId = setInterval(backgroundLoadData.bind(this), 300000); + } + }, []); + + async function backgroundLoadData() { + const ratioData = await apiRequest(`get_ratios`); + setRatios(ratioData); + } + + async function loadData() { + setIsLoading(true); + const ratioData = await apiRequest(`get_ratios`); + setRatios(ratioData); + setIsLoading(false); + }; + + function calculateCryptoPrice() { + if (displayChain.includes('USDC')) { + return currentAmount; + } else { + return currentAmount / ratios[displayChain.toLowerCase()]['usd']; + } + }; + + function roundCryptoPrice() { + return Math.round(calculateCryptoPrice() * 100000) / 100000; + }; + + function baseChain() { + if (currentChain.toLowerCase().includes('spl') || currentChain.includes('SOL')) { + return 'SOL'; + } else { + return 'ETH'; + } + }; + + async function sendPayment() { + clearError(); + switch(currentChain) { + case 'ETH': + await sendEthPayment(); + break; + case 'SOL': + sendSolPayment(); + break; + case 'BAT': + sendEthBatPayment(); + break; + case 'splBAT': + sendSolBatPayment(); + break; + case 'USDC': + sendEthUsdcPayment(); + break; + case 'USDC-SPL': + sendSolUsdcPayment(); + break; + default: + setGenericError(); + } + }; + + function setGenericError() { + setErrorTitle(t('publicChannelPage.ErrorTitle')); + setErrorMsg(t('publicChannelPage.ErrorMsg')); + }; + + function setError(titleId, msgId) { + setErrorTitle(t(titleId)); + setErrorMsg(t(msgId)); + } + + function clearError() { + setErrorTitle(null); + setErrorMsg(null); + } + + async function sendEthPayment() { + if (typeof window !== 'undefined' && window.ethereum) { + const accounts = await window.ethereum.request({ method: 'eth_requestAccounts' }) + const address = accounts[0] + if (!address) { + setGenericError(); + return; + } + + // While most guides to converting eth to wei multiply the value by 10e18, In javascript e counts + // as the 10 and *10e18 results in a value that is an order of mangitude too high. + const value = Web3.utils.toHex(Web3.utils.toBigInt(Math.round(calculateCryptoPrice()*10e17))); + + const params = [{ + from: address, + to: addresses.ETH, + value: value + }]; + + const transaction = window.ethereum + .request({ + method: 'eth_sendTransaction', + params, + }) + .then((result) => { + setIsSuccessView(true) + }) + .catch((error) => { + setGenericError(); + }); + } else { + setIsTryBraveModalOpen(true); + setError('publicChannelPage.noEthTitle', 'publicChannelPage.noEthMsg') + return; + } + } + + async function sendEthTokenPayment(contractAddress, amount, abi) { + if (typeof window !== 'undefined' && window.ethereum) { + const accounts = await window.ethereum.request({ method: 'eth_requestAccounts' }) + const address = accounts[0] + if (!address) { + setGenericError(); + return; + } + + try { + const web3 = new Web3(window.ethereum); + const contract = new web3.eth.Contract(abi, contractAddress); + const encodedAbi = await contract.methods.transfer(addresses.ETH, amount).encodeABI(); + const gasPrice = await web3.eth.getGasPrice(); + + const transaction = { + from: address, + to: contractAddress, + value: "0", // note that value is a string + data: encodedAbi, + gasPrice + } + const gasEstimate = await web3.eth.estimateGas(transaction); + const results = await web3.eth.sendTransaction({ ...transaction, gas: gasEstimate + Web3.utils.toBigInt(450000) }) + + if (results.status > 0) { + setIsSuccessView(true); + } + } catch (e) { + setGenericError(); + return; + } + } else { + setIsTryBraveModalOpen(true); + setError('publicChannelPage.noEthTitle', 'publicChannelPage.noEthMsg'); + return; + } + } + + async function sendEthBatPayment() { + const amount = Web3.utils.toBigInt(Math.round(calculateCryptoPrice()*10e17)); + await sendEthTokenPayment(ethBatAddress, amount, batAbi); + } + + async function sendEthUsdcPayment() { + // USDC token needs 6 decimal places, not 18 + const amount = Web3.utils.toBigInt(Math.round(calculateCryptoPrice()*10e5)); + await sendEthTokenPayment(ethUsdcAddress, amount, erc20Abi); + } + + async function sendSolPayment() { + if (typeof window !== 'undefined' && !window.solana) { + setIsTryBraveModalOpen(true); + setError('publicChannelPage.noSolTitle', 'publicChannelPage.noSolMsg'); + return; + } else { + const provider = await window.solana.connect(); + if (provider.publicKey) { + const pub_key = provider.publicKey + const connection = new Connection(solanaMainUrl); + const amount = Math.round(calculateCryptoPrice() * LAMPORTS_PER_SOL) + + const transaction = new Transaction().add( + SystemProgram.transfer({ + fromPubkey: pub_key, + toPubkey: addresses.SOL, + lamports: amount, + }) + ); + transaction.feePayer = pub_key; + const blockhashObj = await connection.getLatestBlockhash('confirmed'); + transaction.recentBlockhash = await blockhashObj.blockhash; + + try { + const result = await window.solana.signAndSendTransaction(transaction); + if ( result.signature ) { + window.solana.disconnect(); + setIsSuccessView(true); + } + } catch (e) { + setGenericError(); + window.solana.disconnect() + } + } else { + setGenericError(); + return; + } + } + } + + async function sendSolTokenPayment(contractAddress, decimal) { + if (typeof window !== 'undefined' && !window.solana) { + setIsTryBraveModalOpen(true); + setError('publicChannelPage.noSolTitle', 'publicChannelPage.noSolMsg'); + return; + } else { + const provider = await window.solana.connect(); + + if (provider.publicKey) { + try { + // This is the account address of the user who is sending bat + const sourceAccountOwner = provider.publicKey + // multiply the number of bat tokens to the power of the decimals in the token program + const amount = Math.round(calculateCryptoPrice() * Math.pow(10, decimal)); + // this is the account address that will receive bat + const destinationAccountOwner = new PublicKey(addresses.SOL) + const connection = new Connection(solanaMainUrl) + const contract = new PublicKey(contractAddress) + // Check to see if the sender has an associated token account + const senderAccount = await connection.getParsedTokenAccountsByOwner(sourceAccountOwner, { + mint: contract, + }); + + if (senderAccount.value.length > 0) { + const senderTokenAddress = senderAccount.value[0].pubkey; + // get receiver associated token account + + const destinationAccount = await connection.getParsedTokenAccountsByOwner(destinationAccountOwner, { + mint: contract, + }); + // Does the receiver token account already exist? + const hasDestinationAccount = destinationAccount.value.length > 0; + // Get the receiver token address, whether it exists or not + const destinationTokenAddress = hasDestinationAccount ? destinationAccount.value[0].pubkey : await getAssociatedTokenAddress(contract, destinationAccountOwner); + + const tx = new Transaction(); + // if the token accout has not been created, add an instruction to create it + if (!hasDestinationAccount) { + tx.add(createAssociatedTokenAccountInstruction( + sourceAccountOwner, + destinationTokenAddress, + destinationAccountOwner, + contract, + )) + } + // Add the instruction to transfer the tokens + tx.add(createTransferInstruction( + senderTokenAddress, + destinationTokenAddress, + sourceAccountOwner, + amount + )); + + tx.feePayer = sourceAccountOwner; + const latestBlockHash = await connection.getLatestBlockhash('confirmed'); + tx.recentBlockhash = latestBlockHash.blockhash; + + const signature = await window.solana.signAndSendTransaction(tx); + + if ( signature.signature ) { + window.solana.disconnect(); + setIsSuccessView(true); + } + } else { + setError('publicChannelPage.ErrorTitle', 'publicChannelPage.insufficientBalance'); + window.solana.disconnect(); + return; + } + } catch (e) { + setGenericError(); + window.solana.disconnect() + } + } else { + setGenericError(); + return; + } + } + } + + async function sendSolBatPayment() { + await sendSolTokenPayment(solanaBatAddress, 8); + } + + async function sendSolUsdcPayment () { + await sendSolTokenPayment(state.solUsdcAddress, 6); + } + + function changeChain(optionVal) { + setCurrentChain(optionVal.value); + setSelectValue(optionVal) + SetDisplayChain(optionVal.value.includes('BAT') ? 'BAT' : + optionVal.value.includes('USDC') ? 'USDC' : + optionVal.value); + clearError(); + } + + function handleInputChange(event) { + const customValue = event.target.value ? parseFloat(event.target.value) : null; + setCustomAmount(customValue); + setCurrentAmount(customValue); + }; + + if (isLoading) { + return (
) + } else if (isSuccessView) { + return ( setIsSuccessView(false)} amount={roundCryptoPrice()} chain={displayChain} name={title} /> ) + } else { + return ( +
+
+
+ {t("publicChannelPage.paymentSubHeading")} +
+
+ {t("publicChannelPage.paymentHeading")} +
+
+
+ +
+
+
+ {toggle === 'crypto' ? ( + {roundCryptoPrice()} {displayChain} + ) : ( + ${currentAmount} USD + )} +
+
+ {toggle === 'fiat' ? ( + {roundCryptoPrice()} {displayChain} + ) : ( + ${currentAmount} USD + )} +
+
setToggle(toggle === 'crypto' ? 'fiat' : 'crypto')} className={`${styles['exchange-icon']}`}>
+
+
+ {errorTitle && ( +
+
+
+
{errorTitle}
+
{errorMsg}
+
+
+ )} + +
+ + + { + event.preventDefault(); + setIsModalOpen(true); + }}> + {t("publicChannelPage.generateQR")} + +
+ setIsModalOpen(false)} + > + + + isTryBraveModalOpen(false)} + > + + + + ) + } +} diff --git a/nextjs/src/app/[locale]/c/[public_identifier]/PublicChannelPage.jsx b/nextjs/src/app/[locale]/c/[public_identifier]/PublicChannelPage.jsx new file mode 100644 index 0000000000..753cebc25e --- /dev/null +++ b/nextjs/src/app/[locale]/c/[public_identifier]/PublicChannelPage.jsx @@ -0,0 +1,104 @@ +'use client'; + +import { useEffect, useState } from 'react'; +import { useTranslations } from 'next-intl'; +import Icon from '@brave/leo/react/icon'; +import ProgressRing from '@brave/leo/react/progressRing'; +import { apiRequest } from '@/lib/api'; + +import CryptoPaymentWidget from "./CryptoPaymentWidget"; +import styles from '@/styles/PublicChannelPage.module.css'; + +export default function PublicChannelPage({publicIdentifier, previewMode}) { + const t = useTranslations(); + const [isLoading, setIsLoading] = useState(true); + const [title, setTitle] = useState(''); + const [description, setDescription] = useState(''); + const [socialLinks, setSocialLinks] = useState({}); + const [logoUrl, setLogoUrl] = useState(''); + const [coverUrl, setCoverUrl] = useState(''); + const [cryptoAddresses, setCryptoAddresses] = useState([]); + const [cryptoConstants, setCryptoConstants] = useState({}); + const [url, setUrl] = useState(''); + + async function fetchChannelData() { + const channelData = await apiRequest(`c/${publicIdentifier}`); + + const siteBannerData = channelData.site_banner; + setTitle(siteBannerData.title); + setDescription(siteBannerData.description); + setSocialLinks(siteBannerData.socialLinks); + setLogoUrl(siteBannerData.logoUrl); + setCoverUrl(siteBannerData.coverUrl); + setUrl(channelData.url); + setCryptoAddresses(channelData.crypto_addresses); + setCryptoConstants(channelData.crypto_constants); + setIsLoading(false); + } + + useEffect(() => { + fetchChannelData(); + }, []); + + function channelIconType(channelType, color = true) { + if (channelType === 'site') { + return ; + } else if (channelType === 'twitter') { + return ; + } else { + return ; + } + } + + if (isLoading) { + return ( +
+
+ +
+
+ ) + } else { + return ( +
+
+
+
+
+
+
+
+
{title}
+
{description}
+
+ {Object.keys(socialLinks).map((key) => { + if (socialLinks[key].length) { + return ( + + {channelIconType(key)} + + ); + } + })} +
+
+
+ +
+ {t('publicChannelPage.trustWarning')} + {url} +
+
+ {t('publicChannelPage.privacyDisclaimer')} +
+
+
+
+
+ ) + } +} diff --git a/nextjs/src/app/[locale]/c/[public_identifier]/QRCodeModal.jsx b/nextjs/src/app/[locale]/c/[public_identifier]/QRCodeModal.jsx new file mode 100644 index 0000000000..98f18e28aa --- /dev/null +++ b/nextjs/src/app/[locale]/c/[public_identifier]/QRCodeModal.jsx @@ -0,0 +1,66 @@ +'use client'; + +import { useEffect } from 'react'; +import { useTranslations } from 'next-intl'; +import styles from '@/styles/PublicChannelPage.module.css'; +import Icon from '@brave/leo/react/icon'; +import qr_logo from "~/images/qr_logo.png"; + +export default function QRCodeModal({address, chain, displayChain}) { + const t = useTranslations(); + + useEffect(() => { + createQRCode(); + }, []); + + function createQRCode() { + if(typeof window !== 'undefined') { + import('qr-code-styling').then(( QRCodeStyling ) => { + const qrCode = QRCodeStyling({ + width: 270, + height: 270, + data: address, + image: qr_logo, + dotsOptions: { + color: "#000000", + type: "dots" + }, + imageOptions: { + crossOrigin: "anonymous", + margin: 3 + }, + cornersSquareOptions: { + type: 'extra-rounded' + }, + cornersDotOptions: { + type: 'square' + } + }); + + qrCode.append(window.document.getElementById('qr-wrapper')); + }); + } + } + + return ( +
+
+ {t('publicChannelPage.QRModalHeader')} + {displayChain.includes('BAT') ? ( +
{t('publicChannelPage.QRBatText', {chain: t(`publicChannelPage.${chain}`)})}
+ ) : ( +
{t('publicChannelPage.QRStandardText', {chain})}
+ )} +
+
+
+
+ +
+
+ {t('publicChannelPage.QRModalText')} +
+
+
+ ) +} diff --git a/nextjs/src/app/[locale]/c/[public_identifier]/SuccessWidget.jsx b/nextjs/src/app/[locale]/c/[public_identifier]/SuccessWidget.jsx new file mode 100644 index 0000000000..62b0a3bbbf --- /dev/null +++ b/nextjs/src/app/[locale]/c/[public_identifier]/SuccessWidget.jsx @@ -0,0 +1,42 @@ +'use client'; + +import { useTranslations } from 'next-intl'; +import styles from '@/styles/PublicChannelPage.module.css'; + +export default function SuccessWidget({setStateToStart, amount, chain, name}) { + const t = useTranslations(); + const tweetText = t('publicChannelPage.successTweet', {url: window.location.href, name: name, symbol: chain}); + + return ( +
+
+
+ {t('publicChannelPage.hooray', {amount: `${amount} ${chain}`})} +
+
+ {t('publicChannelPage.thanks')} +
+
+ +
+ ) +} diff --git a/nextjs/src/app/[locale]/c/[public_identifier]/TryBraveModal.jsx b/nextjs/src/app/[locale]/c/[public_identifier]/TryBraveModal.jsx new file mode 100644 index 0000000000..1a60ca624a --- /dev/null +++ b/nextjs/src/app/[locale]/c/[public_identifier]/TryBraveModal.jsx @@ -0,0 +1,47 @@ +'use client'; + +import { useEffect } from 'react'; +import { useTranslations } from 'next-intl'; +import styles from '@/styles/PublicChannelPage.module.css'; +import Icon from '@brave/leo/react/icon'; +import wallet from "~/images/wallet_icon_color.png"; + +export default function TryBraveModal() { + const t = useTranslations(); + + return ( +
+
+
+ +
+
+
+ {t('publicChannelPage.tryBraveHeader')} +
+
+ {t('publicChannelPage.tryBraveSubheader')} +
+
+
+
+ {t('publicChannelPage.tryBraveText')} +
+
+ + {t('publicChannelPage.tryBraveBullet1')} +
+
+ + {t('publicChannelPage.tryBraveBullet2')} +
+
+ + {t('publicChannelPage.tryBraveBullet3')} +
+ + {t('publicChannelPage.tryBraveButton')} + +
+ ) +} diff --git a/nextjs/src/app/[locale]/c/[public_identifier]/page.jsx b/nextjs/src/app/[locale]/c/[public_identifier]/page.jsx new file mode 100644 index 0000000000..496b4fed18 --- /dev/null +++ b/nextjs/src/app/[locale]/c/[public_identifier]/page.jsx @@ -0,0 +1,26 @@ +'use client'; + +import Input from '@brave/leo/react/input'; +import { useEffect, useState } from 'react'; + +import { apiRequest } from '@/lib/api'; + +import Card from '@/components/Card'; +import Container from '@/components/Container'; + +export default function PublicChannelPageContainer() { + + async function fetchChannelData() { + + } + + useEffect(() => { + fetchChannelData(); + }, []); + + return ( +
+ test +
+ ); +} diff --git a/nextjs/src/app/[locale]/publishers/NavigationOptions.tsx b/nextjs/src/app/[locale]/publishers/NavigationOptions.tsx index b8f12efdc3..c01ff99cd3 100644 --- a/nextjs/src/app/[locale]/publishers/NavigationOptions.tsx +++ b/nextjs/src/app/[locale]/publishers/NavigationOptions.tsx @@ -26,8 +26,8 @@ export default function NavigationOptions() { {t('NavDropdown.contribution_banners')} diff --git a/nextjs/src/app/[locale]/publishers/contribution_page/page.jsx b/nextjs/src/app/[locale]/publishers/contribution_page/page.jsx new file mode 100644 index 0000000000..9d58870daf --- /dev/null +++ b/nextjs/src/app/[locale]/publishers/contribution_page/page.jsx @@ -0,0 +1,330 @@ +'use client'; + +import Button from '@brave/leo/react/button'; +import ProgressRing from '@brave/leo/react/progressRing'; +import Dropdown from '@brave/leo/react/dropdown'; +import Icon from '@brave/leo/react/icon'; +import Input from '@brave/leo/react/input'; +import Link from '@brave/leo/react/link'; +import Hr from '@brave/leo/react/hr'; +import Dialog from '@brave/leo/react/dialog'; + +import { useTranslations } from 'next-intl'; +import { useSearchParams } from 'next/navigation' +import { useEffect, useState } from 'react'; + +import { apiRequest } from '@/lib/api'; + +import Card from '@/components/Card'; +import Container from '@/components/Container'; +import Toast from '@/components/Toast'; +import Preview from './preview/preview'; +import styles from '@/styles/ContributionBanner.module.css'; + +export default function ContributionPage() { + const [isLoading, setIsLoading] = useState(true); + const [channel, setChannel] = useState({}); + const [channelList, setChannelList] = useState([]); + const [title, setTitle] = useState(''); + const [description, setDescription] = useState(''); + const [socialLinks, setSocialLinks] = useState({}); + const [logoUrl, setLogoUrl] = useState(''); + const [coverUrl, setCoverUrl] = useState(''); + const [toastMessage, setToastMessage] = useState(''); + const [previewModalOpen, setPreviewModalOpen] = useState(false); + + const channelCategories = ['twitter', 'youtube', 'twitch', 'github', 'reddit', 'vimeo'] + const searchParams = useSearchParams(); + const channelId = searchParams.get('channel') + const t = useTranslations(); + + useEffect(() => { + fetchChannelList(); + }, []); + + async function fetchChannelList() { + const res = await apiRequest(`contribution_page`); + setChannelList(res); + await fetchChannelData({value: channelId || res[0].id}); + } + + async function fetchChannelData({value}) { + setIsLoading(true); + const channelData = await apiRequest(`contribution_page/${value}`); + setChannel(channelData); + await updateChannelAttributes(channelData); + setIsLoading(false); + } + + async function updateChannelAttributes(channelData) { + const bannerDetails = channelData.site_banner.read_only_react_property; + setTitle(bannerDetails.title); + setDescription(bannerDetails.description); + setSocialLinks(bannerDetails.socialLinks); + setLogoUrl(bannerDetails.logoUrl); + setCoverUrl(bannerDetails.coverUrl); + } + + function channelType(channelObj) { + return channelObj.details_type.split('ChannelDetails').join('').toLowerCase(); + } + + function channelDisplay(type) { + return t(`contribution_pages.channel_names.${type}`); + } + + function channelIconType(channelType, color = true) { + if (channelType === 'site') { + return ; + } else if (channelType === 'twitter') { + return ; + } else { + return ; + } + } + + async function updateAttribute(body) { + setToastMessage(t('contribution_pages.saving_toast')) + const res = await apiRequest(`contribution_page/${channel.id}`, 'PATCH', body); + console.log(res) + setChannel(res); + await updateChannelAttributes(res); + } + + async function saveTitle(e) { + await updateAttribute({ title: e.value }); + } + + async function saveDescription(e) { + await updateAttribute({ description: e.target.value }); + } + + async function updateSocial(category, value) { + const patchData = {}; + patchData[category] = value; + await updateAttribute({ socialLinks: patchData }); + } + + async function readData(file) { + let reader = new FileReader(); + reader.readAsDataURL(file.files[0]); + return new Promise( + resolve => + (reader.onloadend = function() { + resolve(reader.result); + }) + ); + } + + async function addLogo(e) { + const logoData = await readData(event.target) + await updateAttribute({logo: logoData}); + } + + async function addCover(e) { + const coverData = await readData(event.target) + await updateAttribute({cover: coverData}); + } + + async function deleteImage(type) { + const res = await apiRequest(`contribution_page/${channel.id}/destroy_attachment`, 'DELETE', {[type]: true}); + setChannel(res) + await updateChannelAttributes(res); + } + + function renderSocialLinks(category, socialLinks) { + const options = channelList.filter((c) => channelType(c) === category); + const noOptions = options.length === 0; + + return ( +
+
{channelDisplay(category)}
+ {noOptions && ( + {t('contribution_pages.add_account')} + )} + updateSocial(category, value)} + className='w-full' + > +
+ {channelIconType(category, !(noOptions || !socialLinks[category]))} +
+
+ {socialLinks[category].replace('https://','')} +
+ {options.map((opt) => { + return( + +
{opt.details.url.replace('https://','')}
+
+ ) + })} + +
{t('contribution_pages.clear_social')}
+
+
+
+ ) + } + + if (isLoading) { + return ( +
+ +
+ +
+ +
+
+
+
+
+ ) + } else { + return ( +
+ +
+ +
+ {t('contribution_pages.page_header')} +
+ + +
+ {channelIconType(channelType(channel))} +
+
+ {channel.details.publication_title} +
+ {channelList.map(function (channelName) { + return ( + + {channelIconType(channelType(channelName))} +
{channelName.details.publication_title}
+
+ ); + })} +
+ +

{t('contribution_pages.channel_header')}

+ {/* +
+ {t('contribution_pages.sharable_url')} +
+
*/} + +
{t('contribution_pages.avatar_cover_image')}
+
+
+
+ + + +
+
+
+
+ + + +
+
+
+ +
{t('contribution_pages.channel_name')}
+ +
{t('contribution_pages.bio')}
+
+