Web3 App Store プロトコル: Web3 アプリケーションの登録と配布のための標準を提供します。
最初のレベルのタイトル
背景
現在、開発者はブロックチェーン上の一連のスマート コントラクトを通じてトラストレス プロトコル層サービスをユーザーに提供できます。ただし、一般的な日常ユーザーはこれらのスマート コントラクトを直接理解して使用する能力を持っていないため、トラストレスで安全で使いやすいアプリケーション層が必要です。
アプリケーション層の開発者は、ユーザーがプロトコルやトークンと直接対話できるように、使いやすいユーザー インターフェイスを展開します。これらのアプリケーションのほとんどは、ユーザーの Web3 ウォレットに接続して署名を直接要求しようとします。
これらのアプリケーションを次のように呼びます。"Web3 App"。たとえば、Uniswap の公式 Web アプリケーションは、次の場所でホストされています。https://app.uniswap.orgは、ユーザーがブロックチェーン上で独自のプロトコルを操作するのに役立つ典型的な Web3 アプリケーションです。以下は、Uniswap のアプリケーションとプロトコルの技術構造です。

モチベーション
プロトコル層のスマート コントラクトが、対応する Web3 アプリケーションとともに急増するにつれて、現在の業界慣行では、アクセシビリティとセキュリティに関して 2 つの重要な問題が依然として発生していることがわかります。
アクセシビリティ
まず、今日のほとんどの Web3 アプリケーションは、プロジェクト所有者が管理するクラウド サービスにコードを保存します。所有者がサイトをオフラインにしたり、DDos によってサイトがシャットダウンされたり、国家政策の要件などに応じて閉鎖されたりした場合、一般的なユーザーは (直接対話できるほど賢くない限り) 自分の資産を簡単に管理できなくなります。プロトコル層を使用)。アクセスの不確実性はユーザー間の信頼を低下させるため、恐ろしい場合があります。
安全
第 2 に、ほとんどのユーザーは現在、Web ブラウザと Web3 プラグインを組み合わせて Web3 アプリケーションにアクセスしていますが、このプロセスにはセキュリティ上の問題がたくさんあります。これにより、プロジェクト チームとハッカーの両方に、Web3 アプリケーションに新しい悪意のあるコードを埋め込み、ユーザーの資産を盗む機会が与えられます。
最初のレベルのタイトル
仕様
Web3 App Store プロトコル
私たちは提案しますWeb3 App Store プロトコル前述のアクセシビリティとセキュリティの問題に対処するため。これらのアプリストアにはスマートコントラクトベースのものが含まれている必要がありますWeb3 アプリ レジストリ (Web3 アプリ レジストリ)、権限、バージョン説明、仕様などのオフチェーンに保存されたメタデータに基づく Web3 アプリケーション パッケージ、およびユーザーのローカル デバイスにインストールされる Web3 アプリケーション ストア クライアントです。その後、次のことも必要ですWeb3監査人ユーザーが Web3 アプリケーションのソース コードを監査できるようにします。これらのコンポーネントの関係を以下に示します。

Web3 アプリ レジストリ (Web3 アプリ レジストリ)に基づいたセットですWeb3 アプリ登録標準 (Web3 アプリ登録標準)スマートコントラクト。グループ (Orgs) および個人は、許可なしに独自の Web3 アプリケーション レジストリをセットアップできます。 Web3 開発者は、オンチェーン アカウントを使用して Web3 アプリケーションをこのレジストリに登録し、インストール パッケージの配布とチェックサムのバージョン管理を実行できます。監査人は、許可なくオンチェーン アカウントを使用して、これらすべてのアプリケーションを監査し、結果をレジストリに公開できます。
Web3 アプリ パッケージユーザーがローカル デバイスに Web3 アプリケーションをインストールするために開発者によってリリースされたソフトウェアを指します。これらのパッケージは、集中型または分散型のストレージ サービスに保存でき、パッケージの URL とチェックサムはレジストリに記録される必要があります。同時に、それに基づいて、Web3 アプリケーション構成標準 (Web3 アプリケーション構成標準)上記では、パッケージのルートに、Web3 アプリケーションの許可ステートメントとバージョンの説明を含む構成ファイルがあるはずです。監査人が監査用のソース コードを簡単に取得できるように、ソース コードの保存パスを構成ファイルで指定する必要があります。
Web3 App Store クライアント (Web3 App Store クライアント)ユーザーのローカル デバイスにインストールされるソフトウェアです。グループや個人ができることは、Web3 App Store クライアント標準 (**App Store クライアント標準)をベースにして独自のアプリ ストア クライアントを自由に構築クライアントは 1 つ以上のレジストリに同時に接続できます。 Web3 アプリケーションのリスト、バージョン情報、監査情報をレジストリから取得する必要があります。ユーザーが Web3 アプリケーションをインストールまたは更新する場合、インストール パッケージを自動的に取得する必要があります。次に、パッケージのチェックサムがレジストリのチェックサムと等しいことを確認します。最後に、この Web3 アプリケーションが必要とするアクセス許可の数をユーザーに通知する必要があります。ユーザーが許可を確認すると、Web3 アプリがローカル デバイスにインストールされます。
この設計フレームワークにより、ユーザーは古いローカル バージョンを引き続き使用でき、新しいレジストリや新しいアプリケーション パッケージに従ってアップグレードする権利があるため、Web3 アプリケーションのアクセシビリティが保証されます。
同時に、クライアントはローカル ソフトウェア パッケージのチェックサムを登録センターのチェックサム (チェックサム) と照合するため、ハッカーやプロジェクト チームが変更される可能性を回避し、ユーザーが使用するアプリケーションが確実に一致していることを確認します。チェーン上の登録センター 公開されたアプリケーションと一致します。ソフトウェア パッケージ内の構成ファイルは、ソース コードの現在のバージョンも示しているため、監査人はチェックサムを使用して、ソフトウェア パッケージがこれらのソース コードからパッケージ化されていることを検証できます。これにより、ソース コードとインストール パッケージ間の一貫性が確保され、ユーザーが監査員によって監査された安全なパッケージを使用していることが保証されます。
ユーザーが Web3 アプリケーションを使用する場合、クライアントは、ユーザーが事前に確認したアプリケーションの権限ステートメントに従って、これらのアプリケーションの権限も制限します。これにより、ローカル Web3 サービスにアクセスする際のユーザーのセキュリティが完全に保証されます。
Web3アプリ登録基準(Web3アプリ登録基準)
pragma solidity ^0.8.0;
/**
* @title AppRegistration interface
*/
interface IAppRegistration {
struct auditorVote {
address auditor;
uint8 level;
}
function createApp() external returns (uint256);
function addVersion(uint256 appId, string memory versionId, string memory fileUrl) external;
function getAppIds() external returns (uint256[] memory);
function getVersions(uint256 appId) external returns (string[] memory);
function getVersionFileUrl(uint256 appId, string memory versionId) external view returns (string memory);
function voteApp(uint256 appId, uint8 level) external;
function voteAppVersion(uint256 appId, string memory versionId, uint8 level) external;
function getVotes(uint256 appId, string memory versionId) external returns (auditorVote[] memory);
}
Web3 App Configration Standard (Web3 アプリケーション構成標準)
{
"properties": {
"name": {
"title": "Name of the App",
"type": "string"
},
"logoUrl": {
"title": "Logo of the App",
"type": "string"
},
"description": {
"title": "Description of the App",
"type": "string"
},
"origin": {
"title": "Online dapp origin",
"type": "string",
"pattern": "^((https|http)?:\\/\\/)[^\\\\s]+"
},
"permissions": {
"properties": {
"web3Provider": {
"requestAccount": {
"title": "If App need permission to connect with wallet",
"type": "boolean"
},
"personalSign": {
"properties": {
"request": {
"type": "boolean",
"title": "If App need permission to request sign text message"
},
"patterns": {
"type": "array",
"title": "Patterns of text message"
}
},
"title": "Declaration for sign text message",
"type": "object"
},
"transaction": {
"properties": {
"request": {
"type": "boolean",
"title": "If App need permission to request transaction"
},
"contractCalls": {
"type": "array",
"title": "Declaration for contrat transaction"
},
"tokenApproves": {
"type": "array",
"title": "Declaration for token approval"
},
"ERC20TokenTransfer": {
"type": "array",
"title": "Declaration for ERC20 token transfer transaction"
}
},
"type": "object",
"title": "Declaration for transaction"
},
"network": {
"urlPatterns": {
"type": "array",
"title": "Patterns of whitelist network request URL"
},
"title": "Declaration for APP network request",
"type": "object"
},
"title": "Declaration for Web3Provider permissions",
"type": "object"
}
},
"title": "Declaration for App permissions",
"type": "object"
},
"app": {
"properties": {
"id": {
"title": "AppId allocated by App Store",
"type": "string"
},
"chainId": {
"title": "The chainId which App Store deployed",
"type": "string"
},
"contract": {
"title": "The contract address of App Store",
"type": "string"
}
},
"type": "object",
"title": "App information on App Store"
},
"source": {
"properties": {
"repository": {
"type": "string",
"title": "The URL that can access App source code",
"pattern": "^(https:\\/\\/|git@)[^\\\\s]+"
},
"buildScript": {
"type": "string",
"title": "The script that can complie source code to bundles"
},
"systemEnvironment": {
"type": "string",
"title": "The system environment that can make sure auditor can build bundle which has the same SHA256"
}
},
"type": "object",
"title": "Information of source code for auditor use"
}
},
"title": "Web3 App json config file",
"type": "object"
}
Web3 App Store クライアント スタンダード (Web3 App Store クライアント スタンダード)
interface App {
app: {
id: string
chainId: string
contract: string
}
permissions: {
network: {
urlPatterns: string[]
},
web3Provider: {
requestAccount: boolean
personalSign: {
request: boolean
patterns: string[]
},
transaction: {
request: boolean
contractCalls: ContractCallItem[]
tokenApproves: TokenApproveItem[]
ERC20TokenTransfer: ERC20TokenTransferItem[]
}
}
}
source: {
repository: string
buildScript: string
systemEnvironment: string
}
appId: number
domain: string
versionId: string
files: string[]
name: string
description?: string
logoUrl: string
}
enum VoteLevel {
DANGER = -1
UNKNOW = 0
SAFE = 1
}
class Web3AppStore {
chainId: string; // The chainId which App Store deployed
contract: string; // The contract address of App Store
getApps(): Promise
getApp(appId: number, version?: string): Promise
getAppVersions(appId: number): Promise
createApp(): Promise
addVersion(appId: number, fileUrls: string[]): Promise
voteApp(appId: number, level: VoteLevel): Promise
voteAppVersion(appId: number, versionId: string, level: VoteLevel): Promise
// Validate the SHA256 of App file is same as versionId of not
validateAppVersion(app: App): Promise
// Validate if the domain which declared in domain property has the same web3.json file of current App
validateAppDomain(app: App): Promise
}
No releases published
No packages published


