From 67780662b20de309dd0007319b2346012c633a0d Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Thu, 25 Apr 2024 11:30:32 +0200 Subject: [PATCH 01/29] wip --- docs/specs/meta-clients/web3modal/api.md | 227 +++++++++++------------ 1 file changed, 109 insertions(+), 118 deletions(-) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index 15dcd93f..500d51f3 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -1,142 +1,133 @@ -# API -Web3Modal has it's own api available at [api.web3modal.com](https://api.web3modal.com) that is used to fetch wallet data from a WalletConnect maintained [wallet & dapp registry](https://walletconnect.com/explorer). +# Web3Modal API v2 -All responses are cached for a minimum of 2h. +> For the deprecated v1 specification, see [here (TODO)](#todo). -## Headers +## Query Parameters -All api requests must contain following headers. See [types](./types.md) +All API requests can now use query parameters instead of custom headers for SDK details, making integration simpler and more compatible with common HTTP clients and browser caching mechanisms. -```ts -interface Headers { - "x-project-id": string; - "x-sdk-type": SdkType; - "x-sdk-version": SdkVersion; -} -``` +### Mandatory Query Parameters -## Methods +- `st=`: SDK type + - Options: `w3m | wcm` + - Example: `st=w3m` +- `sv=`: SDK version + - Options: `${framework}-${library}-${version}` + - Example: `react-wagmi-4.0.0` +- `projectId=`: The project ID for tracking and analytics + - Options: `string` + - Example: `projectId=702e2d45...` -### GET `/getWallets` +## API Endpoints -Returns total count and wallet data, based on provided body inputs. See [types](./types.md). +### GET `/v2/wallets` -```ts -interface Request { - headers: Headers; -} +Fetches wallet data based on provided query parameters. -interface UrlQueryParams { - page: string; // eg. 1 - entries: string; // eg. 100 - search?: string; // eg. MetaMa... - include?: string; // eg. id1,id2,id3 - exclude?: string; // eg. id1,id2,id3 - chains?: string; // eg. eip155:1,solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp - platform?: "ios" | "android"; -} +#### Query Parameters -interface Response { - count: number; - data: Array<{ - id: string; - name: string; - homepage: string; - image_id: string; - order: number; - mobile_link: string | null; - desktop_link: string | null; - webapp_link: string | null; - app_store: string | null; - play_store: string | null; - injected: - | { - namespace: string; - injected_id: string; - }[] - | null; - }>; +- `page`: The page number of results (e.g., `1`) +- `entries`: Number of entries per page (e.g., `100`) +- `search`: Optional search term (e.g., `MetaMask`) +- `include`: Optional comma-separated list of wallet IDs to include +- `exclude`: Optional comma-separated list of wallet IDs to exclude +- `chains`: Optional comma-separated list of chain identifiers (e.g., `eip155:1`) +- `platform`: Optional platform filter (`ios` or `android`) + +#### Response + +```typescript +{ + "count": number, + "data": [ + { + "id": string, + "name": string, + "homepage": string, + "image_id": string, + "order": number, + "mobile_link": string | null, + "desktop_link": string | null, + "webapp_link": string | null, + "app_store": string | null, + "play_store": string | null, + "injected": [ + { + "namespace": string, + "injected_id": string + } + ] | null + } + ] } ``` -### GET `/getWalletImage/:wallet_id` +### GET `/v2/wallet-image/{wallet_id}` -Returns image logo for requested `wallet_id`. See [types](./types.md). +Returns the image logo for the specified wallet ID. -```ts -interface Request { - headers: Headers; -} +#### Query Parameters -type Response = Blob; -``` +- `wallet_id`: The unique identifier for the wallet -### GET `/public/getAssetImage/:asset_id` +#### Response -Returns image for public asset for requested `asset_id`, i.e network logo, token logo or connector logo. +- A binary image file (Blob) -```ts -interface Request { - headers: Headers; -} +### GET `/v2/public/asset-image/network/{asset_id}` -type Response = Blob; -``` +Fetches image for public assets like network logos using well-defined CAIP identifiers. + +#### Query Parameters + +- `asset_id`: CAIP identifier for the network (e.g., `eip155-1`) + +#### Example API Requests + +- Ethereum: `GET /v2/public/asset-image/network/eip155-1` +- Arbitrum: `GET /v2/public/asset-image/network/eip155-42161` +- Avalanche: `GET /v2/public/asset-image/network/eip155-43114` +- Binance Smart Chain: `GET /v2/public/asset-image/network/eip155-56` +- Fantom: `GET /v2/public/asset-image/network/eip155-250` +- Optimism: `GET /v2/public/asset-image/network/eip155-10` +- Polygon: `GET /v2/public/asset-image/network/eip155-137` +- Gnosis: `GET /v2/public/asset-image/network/eip155-100` +- Evmos: `GET /v2/public/asset-image/network/eip155-9001` +- ZkSync: `GET /v2/public/asset-image/network/eip155-324` +- Filecoin: `GET /v2/public/asset-image/network/fil-314` +- IoTeX: `GET /v2/public/asset-image/network/eip155-4689` +- Metis: `GET /v2/public/asset-image/network/eip155-1088` +- Moonbeam: `GET /v2/public/asset-image/network/eip155-1284` +- Moonriver: `GET /v2/public/asset-image/network/eip155-1285` +- Zora: `GET /v2/public/asset-image/network/eip155-7777777` +- Celo: `GET /v2/public/asset-image/network/eip155-42220` +- Base: `GET /v2/public/asset-image/network/eip155-8453` +- Aurora: `GET /v2/public/asset-image/network/eip155-1313161554` + +#### Response + +- A binary image file (Blob) + +### GET `/v2/public/asset-image/connector/{connector_id}` + +Fetches image for connector logos using descriptive names. + +#### Query Parameters + +- `connector_id`: Descriptive name for the connector (e.g., `coinbase-wallet`) + +#### Example API Requests + +- Coinbase Wallet: `GET /v2/public/asset-image/connector/coinbase-wallet` +- Safe: `GET /v2/public/asset-image/connector/safe` +- Ledger: `GET /v2/public/asset-image/connector/ledger` +- WalletConnect: `GET /v2/public/asset-image/connector/wallet-connect` +- Injected (Generic Web3 Injected Connectors): `GET /v2/public/asset-image/connector/injected` + +#### Response + +- A binary image file (Blob) -#### Known Static Asset IDs -There are a number of known static asset IDs that can be used to fetch images, e.g. for networks and connectors: -```typescript -// Maps EIP155 chain IDs -> `asset_id` -const EIP155NetworkImageIds = { - // Ethereum - 1: "692ed6ba-e569-459a-556a-776476829e00", - // Arbitrum - 42161: "600a9a04-c1b9-42ca-6785-9b4b6ff85200", - // Avalanche - 43114: "30c46e53-e989-45fb-4549-be3bd4eb3b00", - // Binance Smart Chain - 56: "93564157-2e8e-4ce7-81df-b264dbee9b00", - // Fantom - 250: "06b26297-fe0c-4733-5d6b-ffa5498aac00", - // Optimism - 10: "ab9c186a-c52f-464b-2906-ca59d760a400", - // Polygon - 137: "41d04d42-da3b-4453-8506-668cc0727900", - // Gnosis - 100: "02b53f6a-e3d4-479e-1cb4-21178987d100", - // Evmos - 9001: "f926ff41-260d-4028-635e-91913fc28e00", - // ZkSync - 324: "b310f07f-4ef7-49f3-7073-2a0a39685800", - // Filecoin - 314: "5a73b3dd-af74-424e-cae0-0de859ee9400", - // Iotx - 4689: "34e68754-e536-40da-c153-6ef2e7188a00", - // Metis, - 1088: "3897a66d-40b9-4833-162f-a2c90531c900", - // Moonbeam - 1284: "161038da-44ae-4ec7-1208-0ea569454b00", - // Moonriver - 1285: "f1d73bb6-5450-4e18-38f7-fb6484264a00", - // Zora - 7777777: "845c60df-d429-4991-e687-91ae45791600", - // Celo - 42220: "ab781bbc-ccc6-418d-d32d-789b15da1f00", - // Base - 8453: "7289c336-3981-4081-c5f4-efc26ac64a00", - // Aurora - 1313161554: "3ff73439-a619-4894-9262-4470c773a100", -}; - -// Maps connector name -> `asset_id` -const ConnectorImageIds = { - coinbaseWallet: "0c2840c3-5b04-4c44-9661-fbd4b49e1800", - safe: "461db637-8616-43ce-035a-d89b8a1d5800", - ledger: "54a1aa77-d202-4f8d-0fb2-5d2bb6db0300", - walletConnect: "ef1a1fcf-7fe8-4d69-bd6d-fda1345b4400", - injected: "07ba87ed-43aa-4adf-4540-9e6a2b9cae00", -}; -``` From 116c5c0384ee288680a9ced6e90615d9332d5217 Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Mon, 6 May 2024 14:12:16 +0200 Subject: [PATCH 02/29] Update docs/specs/meta-clients/web3modal/api.md Co-authored-by: Celine Sarafa --- docs/specs/meta-clients/web3modal/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index 500d51f3..e974774a 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -67,7 +67,7 @@ Fetches wallet data based on provided query parameters. Returns the image logo for the specified wallet ID. -#### Query Parameters +#### Route Parameters - `wallet_id`: The unique identifier for the wallet From 008e4bcc7451a0d6aec8d7a45cf32af411fa94bd Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Mon, 6 May 2024 14:12:24 +0200 Subject: [PATCH 03/29] Update docs/specs/meta-clients/web3modal/api.md Co-authored-by: Celine Sarafa --- docs/specs/meta-clients/web3modal/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index e974774a..e07a2f83 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -79,7 +79,7 @@ Returns the image logo for the specified wallet ID. Fetches image for public assets like network logos using well-defined CAIP identifiers. -#### Query Parameters +#### Route Parameters - `asset_id`: CAIP identifier for the network (e.g., `eip155-1`) From 69cc2127ceebd686d3b5bad870bdd0dbd28bc50f Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Mon, 6 May 2024 14:12:39 +0200 Subject: [PATCH 04/29] Update docs/specs/meta-clients/web3modal/api.md Co-authored-by: Celine Sarafa --- docs/specs/meta-clients/web3modal/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index e07a2f83..cb11d063 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -14,7 +14,7 @@ All API requests can now use query parameters instead of custom headers for SDK - Example: `st=w3m` - `sv=`: SDK version - Options: `${framework}-${library}-${version}` - - Example: `react-wagmi-4.0.0` + - Example: `sv=react-wagmi-4.0.0` - `projectId=`: The project ID for tracking and analytics - Options: `string` - Example: `projectId=702e2d45...` From 4591ea2d3119fe4df5a272343da3a1626a0410c2 Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Mon, 6 May 2024 14:12:49 +0200 Subject: [PATCH 05/29] Update docs/specs/meta-clients/web3modal/api.md Co-authored-by: Celine Sarafa --- docs/specs/meta-clients/web3modal/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index cb11d063..db8207b8 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -113,7 +113,7 @@ Fetches image for public assets like network logos using well-defined CAIP ident Fetches image for connector logos using descriptive names. -#### Query Parameters +#### Route Parameters - `connector_id`: Descriptive name for the connector (e.g., `coinbase-wallet`) From 267a7cc48dd741b00cfca1544b889c08ec507d7f Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Tue, 7 May 2024 16:59:47 +0200 Subject: [PATCH 06/29] chore: tweak title --- docs/specs/meta-clients/web3modal/api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index db8207b8..19cccc05 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -1,7 +1,7 @@ -# Web3Modal API v2 +# API (v2) -> For the deprecated v1 specification, see [here (TODO)](#todo). +> For the deprecated v1 specification, see [here](./api-v1-legacy.md). ## Query Parameters From cd22163357fc79cfb86f8c384265f0fec0188996 Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Tue, 7 May 2024 16:59:55 +0200 Subject: [PATCH 07/29] chore: separate out v1 spec and backlink from v2 spec --- .../meta-clients/web3modal/api-v1-legacy.md | 142 ++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 docs/specs/meta-clients/web3modal/api-v1-legacy.md diff --git a/docs/specs/meta-clients/web3modal/api-v1-legacy.md b/docs/specs/meta-clients/web3modal/api-v1-legacy.md new file mode 100644 index 00000000..15dcd93f --- /dev/null +++ b/docs/specs/meta-clients/web3modal/api-v1-legacy.md @@ -0,0 +1,142 @@ +# API + +Web3Modal has it's own api available at [api.web3modal.com](https://api.web3modal.com) that is used to fetch wallet data from a WalletConnect maintained [wallet & dapp registry](https://walletconnect.com/explorer). + +All responses are cached for a minimum of 2h. + +## Headers + +All api requests must contain following headers. See [types](./types.md) + +```ts +interface Headers { + "x-project-id": string; + "x-sdk-type": SdkType; + "x-sdk-version": SdkVersion; +} +``` + +## Methods + +### GET `/getWallets` + +Returns total count and wallet data, based on provided body inputs. See [types](./types.md). + +```ts +interface Request { + headers: Headers; +} + +interface UrlQueryParams { + page: string; // eg. 1 + entries: string; // eg. 100 + search?: string; // eg. MetaMa... + include?: string; // eg. id1,id2,id3 + exclude?: string; // eg. id1,id2,id3 + chains?: string; // eg. eip155:1,solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp + platform?: "ios" | "android"; +} + +interface Response { + count: number; + data: Array<{ + id: string; + name: string; + homepage: string; + image_id: string; + order: number; + mobile_link: string | null; + desktop_link: string | null; + webapp_link: string | null; + app_store: string | null; + play_store: string | null; + injected: + | { + namespace: string; + injected_id: string; + }[] + | null; + }>; +} +``` + +### GET `/getWalletImage/:wallet_id` + +Returns image logo for requested `wallet_id`. See [types](./types.md). + +```ts +interface Request { + headers: Headers; +} + +type Response = Blob; +``` + +### GET `/public/getAssetImage/:asset_id` + +Returns image for public asset for requested `asset_id`, i.e network logo, token logo or connector logo. + +```ts +interface Request { + headers: Headers; +} + +type Response = Blob; +``` + +#### Known Static Asset IDs + +There are a number of known static asset IDs that can be used to fetch images, e.g. for networks and connectors: + +```typescript +// Maps EIP155 chain IDs -> `asset_id` +const EIP155NetworkImageIds = { + // Ethereum + 1: "692ed6ba-e569-459a-556a-776476829e00", + // Arbitrum + 42161: "600a9a04-c1b9-42ca-6785-9b4b6ff85200", + // Avalanche + 43114: "30c46e53-e989-45fb-4549-be3bd4eb3b00", + // Binance Smart Chain + 56: "93564157-2e8e-4ce7-81df-b264dbee9b00", + // Fantom + 250: "06b26297-fe0c-4733-5d6b-ffa5498aac00", + // Optimism + 10: "ab9c186a-c52f-464b-2906-ca59d760a400", + // Polygon + 137: "41d04d42-da3b-4453-8506-668cc0727900", + // Gnosis + 100: "02b53f6a-e3d4-479e-1cb4-21178987d100", + // Evmos + 9001: "f926ff41-260d-4028-635e-91913fc28e00", + // ZkSync + 324: "b310f07f-4ef7-49f3-7073-2a0a39685800", + // Filecoin + 314: "5a73b3dd-af74-424e-cae0-0de859ee9400", + // Iotx + 4689: "34e68754-e536-40da-c153-6ef2e7188a00", + // Metis, + 1088: "3897a66d-40b9-4833-162f-a2c90531c900", + // Moonbeam + 1284: "161038da-44ae-4ec7-1208-0ea569454b00", + // Moonriver + 1285: "f1d73bb6-5450-4e18-38f7-fb6484264a00", + // Zora + 7777777: "845c60df-d429-4991-e687-91ae45791600", + // Celo + 42220: "ab781bbc-ccc6-418d-d32d-789b15da1f00", + // Base + 8453: "7289c336-3981-4081-c5f4-efc26ac64a00", + // Aurora + 1313161554: "3ff73439-a619-4894-9262-4470c773a100", +}; + +// Maps connector name -> `asset_id` +const ConnectorImageIds = { + coinbaseWallet: "0c2840c3-5b04-4c44-9661-fbd4b49e1800", + safe: "461db637-8616-43ce-035a-d89b8a1d5800", + ledger: "54a1aa77-d202-4f8d-0fb2-5d2bb6db0300", + walletConnect: "ef1a1fcf-7fe8-4d69-bd6d-fda1345b4400", + injected: "07ba87ed-43aa-4adf-4540-9e6a2b9cae00", +}; +``` From 85153e579316eb0a750f129fe4b5a21fe26eaedd Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Fri, 10 May 2024 11:20:15 +0200 Subject: [PATCH 08/29] chore: adds missing documentation for ios-data/android-data endpoints --- docs/specs/meta-clients/web3modal/api.md | 49 +++++++++++++++++++++--- 1 file changed, 44 insertions(+), 5 deletions(-) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index 19cccc05..10c4d510 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -1,14 +1,15 @@ - # API (v2) > For the deprecated v1 specification, see [here](./api-v1-legacy.md). ## Query Parameters -All API requests can now use query parameters instead of custom headers for SDK details, making integration simpler and more compatible with common HTTP clients and browser caching mechanisms. +All API requests now use query parameters instead of custom headers for SDK metadata, making integration simpler and more compatible with common HTTP clients and browser caching mechanisms. ### Mandatory Query Parameters +All API endpoints expect the following mandatory query parameters: + - `st=`: SDK type - Options: `w3m | wcm` - Example: `st=w3m` @@ -27,8 +28,13 @@ Fetches wallet data based on provided query parameters. #### Query Parameters +**Required** + - `page`: The page number of results (e.g., `1`) - `entries`: Number of entries per page (e.g., `100`) + +**Optional** + - `search`: Optional search term (e.g., `MetaMask`) - `include`: Optional comma-separated list of wallet IDs to include - `exclude`: Optional comma-separated list of wallet IDs to exclude @@ -63,6 +69,42 @@ Fetches wallet data based on provided query parameters. } ``` +### GET `/v2/ios-data` + +Returns a list of iOS-facing wallet data, including the public Explorer ID and iOS deep link schema. + +#### Response + +```typescript +{ + "count": number, + "data": [ + { + "id": string, + "ios_schema": string + } + ] +} +``` + +### GET `/v2/android-data` + +Returns a list of Android-facing wallet data, including the public Explorer ID and Android App ID. + +#### Response + +```typescript +{ + "count": number, + "data": [ + { + "id": string, + "android_app_id": string + } + ] +} +``` + ### GET `/v2/wallet-image/{wallet_id}` Returns the image logo for the specified wallet ID. @@ -128,6 +170,3 @@ Fetches image for connector logos using descriptive names. #### Response - A binary image file (Blob) - - - From a1fc82e0ece040dda4e1903765f7f286e94fe4ff Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Fri, 10 May 2024 11:27:27 +0200 Subject: [PATCH 09/29] chore: adds missing documentation for `token` image endpoint --- docs/specs/meta-clients/web3modal/api.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index 10c4d510..640cc8cd 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -170,3 +170,21 @@ Fetches image for connector logos using descriptive names. #### Response - A binary image file (Blob) + +### GET `/v2/public/asset-image/token/{token_symbol}` + +Fetches image for known tokens using the token's ticker symbol. + +#### Route Parameters + +- `token_symbol`: The token's ticker symbol (e.g., `ETH`, `USDC`, `WBTC`) + +#### Example API Requests + +- Ethereum: `GET /v2/public/asset-image/token/ETH` +- USD Coin: `GET /v2/public/asset-image/token/USDC` +- Wrapped Bitcoin: `GET /v2/public/asset-image/token/WBTC` + +#### Response + +- A binary image file (Blob) From 6f7dbfa4f4f01ba0b247a040e1d2b41b3129b891 Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Fri, 10 May 2024 11:29:33 +0200 Subject: [PATCH 10/29] chore: adds missing documentation for `currency` endpoint --- docs/specs/meta-clients/web3modal/api.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index 640cc8cd..ee1807a4 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -188,3 +188,21 @@ Fetches image for known tokens using the token's ticker symbol. #### Response - A binary image file (Blob) + +### GET `/v2/public/asset-image/currency/{currency_symbol}` + +Fetches image for known fiat currencies using the currency's symbol. + +#### Route Parameters + +- `currency_symbol`: The currency's symbol (e.g., `USD`, `EUR`, `JPY`) + +#### Example API Requests + +- US Dollar: `GET /v2/public/asset-image/currency/USD` +- Euro: `GET /v2/public/asset-image/currency/EUR` +- Japanese Yen: `GET /v2/public/asset-image/currency/JPY` + +#### Response + +- A binary image file (Blob) From d4de975d732ac83eef827b4f6008af8348aab3ff Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Fri, 10 May 2024 11:47:01 +0200 Subject: [PATCH 11/29] chore: adds missing documentation for `get-analytics-config` endpoint --- docs/specs/meta-clients/web3modal/api.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index ee1807a4..4278947a 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -206,3 +206,15 @@ Fetches image for known fiat currencies using the currency's symbol. #### Response - A binary image file (Blob) + +### GET `/v2/get-analytics-config` + +Fetches the analytics configuration for the project based on the mandatory `projectId=` query parameter. + +#### Response + +```typescript +{ + isAanlyticsEnabled: boolean, +} +``` From 9c7bc6e85309a9c8731ea9a437f4c4a9a310925d Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Fri, 10 May 2024 11:48:22 +0200 Subject: [PATCH 12/29] chore: remove redundant `/public/` path segments --- docs/specs/meta-clients/web3modal/api.md | 68 ++++++++++++------------ 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index 4278947a..c3bee49d 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -117,7 +117,7 @@ Returns the image logo for the specified wallet ID. - A binary image file (Blob) -### GET `/v2/public/asset-image/network/{asset_id}` +### GET `/v2/asset-image/network/{asset_id}` Fetches image for public assets like network logos using well-defined CAIP identifiers. @@ -127,31 +127,31 @@ Fetches image for public assets like network logos using well-defined CAIP ident #### Example API Requests -- Ethereum: `GET /v2/public/asset-image/network/eip155-1` -- Arbitrum: `GET /v2/public/asset-image/network/eip155-42161` -- Avalanche: `GET /v2/public/asset-image/network/eip155-43114` -- Binance Smart Chain: `GET /v2/public/asset-image/network/eip155-56` -- Fantom: `GET /v2/public/asset-image/network/eip155-250` -- Optimism: `GET /v2/public/asset-image/network/eip155-10` -- Polygon: `GET /v2/public/asset-image/network/eip155-137` -- Gnosis: `GET /v2/public/asset-image/network/eip155-100` -- Evmos: `GET /v2/public/asset-image/network/eip155-9001` -- ZkSync: `GET /v2/public/asset-image/network/eip155-324` -- Filecoin: `GET /v2/public/asset-image/network/fil-314` -- IoTeX: `GET /v2/public/asset-image/network/eip155-4689` -- Metis: `GET /v2/public/asset-image/network/eip155-1088` -- Moonbeam: `GET /v2/public/asset-image/network/eip155-1284` -- Moonriver: `GET /v2/public/asset-image/network/eip155-1285` -- Zora: `GET /v2/public/asset-image/network/eip155-7777777` -- Celo: `GET /v2/public/asset-image/network/eip155-42220` -- Base: `GET /v2/public/asset-image/network/eip155-8453` -- Aurora: `GET /v2/public/asset-image/network/eip155-1313161554` +- Ethereum: `GET /v2/asset-image/network/eip155-1` +- Arbitrum: `GET /v2/asset-image/network/eip155-42161` +- Avalanche: `GET /v2/asset-image/network/eip155-43114` +- Binance Smart Chain: `GET /v2/asset-image/network/eip155-56` +- Fantom: `GET /v2/asset-image/network/eip155-250` +- Optimism: `GET /v2/asset-image/network/eip155-10` +- Polygon: `GET /v2/asset-image/network/eip155-137` +- Gnosis: `GET /v2/asset-image/network/eip155-100` +- Evmos: `GET /v2/asset-image/network/eip155-9001` +- ZkSync: `GET /v2/asset-image/network/eip155-324` +- Filecoin: `GET /v2/asset-image/network/fil-314` +- IoTeX: `GET /v2/asset-image/network/eip155-4689` +- Metis: `GET /v2/asset-image/network/eip155-1088` +- Moonbeam: `GET /v2/asset-image/network/eip155-1284` +- Moonriver: `GET /v2/asset-image/network/eip155-1285` +- Zora: `GET /v2/asset-image/network/eip155-7777777` +- Celo: `GET /v2/asset-image/network/eip155-42220` +- Base: `GET /v2/asset-image/network/eip155-8453` +- Aurora: `GET /v2/asset-image/network/eip155-1313161554` #### Response - A binary image file (Blob) -### GET `/v2/public/asset-image/connector/{connector_id}` +### GET `/v2/asset-image/connector/{connector_id}` Fetches image for connector logos using descriptive names. @@ -161,17 +161,17 @@ Fetches image for connector logos using descriptive names. #### Example API Requests -- Coinbase Wallet: `GET /v2/public/asset-image/connector/coinbase-wallet` -- Safe: `GET /v2/public/asset-image/connector/safe` -- Ledger: `GET /v2/public/asset-image/connector/ledger` -- WalletConnect: `GET /v2/public/asset-image/connector/wallet-connect` -- Injected (Generic Web3 Injected Connectors): `GET /v2/public/asset-image/connector/injected` +- Coinbase Wallet: `GET /v2/asset-image/connector/coinbase-wallet` +- Safe: `GET /v2/asset-image/connector/safe` +- Ledger: `GET /v2/asset-image/connector/ledger` +- WalletConnect: `GET /v2/asset-image/connector/wallet-connect` +- Injected (Generic Web3 Injected Connectors): `GET /v2/asset-image/connector/injected` #### Response - A binary image file (Blob) -### GET `/v2/public/asset-image/token/{token_symbol}` +### GET `/v2/asset-image/token/{token_symbol}` Fetches image for known tokens using the token's ticker symbol. @@ -181,15 +181,15 @@ Fetches image for known tokens using the token's ticker symbol. #### Example API Requests -- Ethereum: `GET /v2/public/asset-image/token/ETH` -- USD Coin: `GET /v2/public/asset-image/token/USDC` -- Wrapped Bitcoin: `GET /v2/public/asset-image/token/WBTC` +- Ethereum: `GET /v2/asset-image/token/ETH` +- USD Coin: `GET /v2/asset-image/token/USDC` +- Wrapped Bitcoin: `GET /v2/asset-image/token/WBTC` #### Response - A binary image file (Blob) -### GET `/v2/public/asset-image/currency/{currency_symbol}` +### GET `/v2/asset-image/currency/{currency_symbol}` Fetches image for known fiat currencies using the currency's symbol. @@ -199,9 +199,9 @@ Fetches image for known fiat currencies using the currency's symbol. #### Example API Requests -- US Dollar: `GET /v2/public/asset-image/currency/USD` -- Euro: `GET /v2/public/asset-image/currency/EUR` -- Japanese Yen: `GET /v2/public/asset-image/currency/JPY` +- US Dollar: `GET /v2/asset-image/currency/USD` +- Euro: `GET /v2/asset-image/currency/EUR` +- Japanese Yen: `GET /v2/asset-image/currency/JPY` #### Response From 95d26f0da2086068b1c68c4ca8481d42c22695cd Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Fri, 10 May 2024 17:46:44 +0200 Subject: [PATCH 13/29] fix: remove redundant `get-` prefix from `analytics-config` route --- docs/specs/meta-clients/web3modal/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index c3bee49d..409c75a0 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -207,7 +207,7 @@ Fetches image for known fiat currencies using the currency's symbol. - A binary image file (Blob) -### GET `/v2/get-analytics-config` +### GET `/v2/analytics-config` Fetches the analytics configuration for the project based on the mandatory `projectId=` query parameter. From 1e98cea325c26286b547dcb492320166c0c1ce01 Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Thu, 30 May 2024 16:06:47 +0200 Subject: [PATCH 14/29] fix: typo --- docs/specs/meta-clients/web3modal/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index 409c75a0..d647f09f 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -215,6 +215,6 @@ Fetches the analytics configuration for the project based on the mandatory `proj ```typescript { - isAanlyticsEnabled: boolean, + isAnalyticsEnabled: boolean, } ``` From 0fff040ef39688d7df51051943bc03ce7b039cc3 Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Thu, 30 May 2024 16:17:20 +0200 Subject: [PATCH 15/29] feat: adds granular image dimension params to spec --- docs/specs/meta-clients/web3modal/api.md | 82 ++++++++++++++---------- 1 file changed, 47 insertions(+), 35 deletions(-) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index d647f09f..73959340 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -105,103 +105,108 @@ Returns a list of Android-facing wallet data, including the public Explorer ID a } ``` -### GET `/v2/wallet-image/{wallet_id}` +### GET `/v2/wallet-image/{size}/{wallet_id}` Returns the image logo for the specified wallet ID. #### Route Parameters - `wallet_id`: The unique identifier for the wallet +- `size`: The predefined image size, described as `{width}x{height}` (see [Known Image Sizes](#known-image-sizes)) #### Response - A binary image file (Blob) -### GET `/v2/asset-image/network/{asset_id}` +### GET `/v2/asset-image/network/{size}/{asset_id}` Fetches image for public assets like network logos using well-defined CAIP identifiers. #### Route Parameters - `asset_id`: CAIP identifier for the network (e.g., `eip155-1`) +- `size`: The predefined image size, described as `{width}x{height}` (see [Known Image Sizes](#known-image-sizes)) #### Example API Requests -- Ethereum: `GET /v2/asset-image/network/eip155-1` -- Arbitrum: `GET /v2/asset-image/network/eip155-42161` -- Avalanche: `GET /v2/asset-image/network/eip155-43114` -- Binance Smart Chain: `GET /v2/asset-image/network/eip155-56` -- Fantom: `GET /v2/asset-image/network/eip155-250` -- Optimism: `GET /v2/asset-image/network/eip155-10` -- Polygon: `GET /v2/asset-image/network/eip155-137` -- Gnosis: `GET /v2/asset-image/network/eip155-100` -- Evmos: `GET /v2/asset-image/network/eip155-9001` -- ZkSync: `GET /v2/asset-image/network/eip155-324` -- Filecoin: `GET /v2/asset-image/network/fil-314` -- IoTeX: `GET /v2/asset-image/network/eip155-4689` -- Metis: `GET /v2/asset-image/network/eip155-1088` -- Moonbeam: `GET /v2/asset-image/network/eip155-1284` -- Moonriver: `GET /v2/asset-image/network/eip155-1285` -- Zora: `GET /v2/asset-image/network/eip155-7777777` -- Celo: `GET /v2/asset-image/network/eip155-42220` -- Base: `GET /v2/asset-image/network/eip155-8453` -- Aurora: `GET /v2/asset-image/network/eip155-1313161554` +- Ethereum: `GET /v2/asset-image/network/56x56/eip155-1` +- Arbitrum: `GET /v2/asset-image/network/56x56/eip155-42161` +- Avalanche: `GET /v2/asset-image/network/56x56/eip155-43114` +- Binance Smart Chain: `GET /v2/asset-image/network/56x56/eip155-56` +- Fantom: `GET /v2/asset-image/network/56x56/eip155-250` +- Optimism: `GET /v2/asset-image/network/56x56/eip155-10` +- Polygon: `GET /v2/asset-image/network/56x56/eip155-137` +- Gnosis: `GET /v2/asset-image/network/56x56/eip155-100` +- Evmos: `GET /v2/asset-image/network/56x56/eip155-9001` +- ZkSync: `GET /v2/asset-image/network/56x56/eip155-324` +- Filecoin: `GET /v2/asset-image/network/56x56/fil-314` +- IoTeX: `GET /v2/asset-image/network/56x56/eip155-4689` +- Metis: `GET /v2/asset-image/network/56x56/eip155-1088` +- Moonbeam: `GET /v2/asset-image/network/56x56/eip155-1284` +- Moonriver: `GET /v2/asset-image/network/56x56/eip155-1285` +- Zora: `GET /v2/asset-image/network/56x56/eip155-7777777` +- Celo: `GET /v2/asset-image/network/56x56/eip155-42220` +- Base: `GET /v2/asset-image/network/56x56/eip155-8453` +- Aurora: `GET /v2/asset-image/network/56x56/eip155-1313161554` #### Response - A binary image file (Blob) -### GET `/v2/asset-image/connector/{connector_id}` +### GET `/v2/asset-image/connector/{size}/{connector_id}` Fetches image for connector logos using descriptive names. #### Route Parameters - `connector_id`: Descriptive name for the connector (e.g., `coinbase-wallet`) +- `size`: The predefined image size, described as `{width}x{height}` (see [Known Image Sizes](#known-image-sizes)) #### Example API Requests -- Coinbase Wallet: `GET /v2/asset-image/connector/coinbase-wallet` -- Safe: `GET /v2/asset-image/connector/safe` -- Ledger: `GET /v2/asset-image/connector/ledger` -- WalletConnect: `GET /v2/asset-image/connector/wallet-connect` -- Injected (Generic Web3 Injected Connectors): `GET /v2/asset-image/connector/injected` +- Coinbase Wallet: `GET /v2/asset-image/connector/56x56/coinbase-wallet` +- Safe: `GET /v2/asset-image/connector/56x56/safe` +- Ledger: `GET /v2/asset-image/connector/56x56/ledger` +- WalletConnect: `GET /v2/asset-image/connector/56x56/wallet-connect` +- Injected (Generic Web3 Injected Connectors): `GET /v2/asset-image/connector/56x56/injected` #### Response - A binary image file (Blob) -### GET `/v2/asset-image/token/{token_symbol}` +### GET `/v2/asset-image/token/{size}/{token_symbol}` Fetches image for known tokens using the token's ticker symbol. #### Route Parameters - `token_symbol`: The token's ticker symbol (e.g., `ETH`, `USDC`, `WBTC`) +- `size`: The predefined image size, described as `{width}x{height}` (see [Known Image Sizes](#known-image-sizes)) #### Example API Requests -- Ethereum: `GET /v2/asset-image/token/ETH` -- USD Coin: `GET /v2/asset-image/token/USDC` -- Wrapped Bitcoin: `GET /v2/asset-image/token/WBTC` +- Ethereum: `GET /v2/asset-image/token/56x56/ETH` +- USD Coin: `GET /v2/asset-image/token/56x56/USDC` +- Wrapped Bitcoin: `GET /v2/asset-image/token/56x56/WBTC` #### Response - A binary image file (Blob) -### GET `/v2/asset-image/currency/{currency_symbol}` +### GET `/v2/asset-image/currency/{size}/{currency_symbol}` Fetches image for known fiat currencies using the currency's symbol. #### Route Parameters - `currency_symbol`: The currency's symbol (e.g., `USD`, `EUR`, `JPY`) +- `size`: The predefined image size, described as `{width}x{height}` (see [Known Image Sizes](#known-image-sizes)) #### Example API Requests -- US Dollar: `GET /v2/asset-image/currency/USD` -- Euro: `GET /v2/asset-image/currency/EUR` -- Japanese Yen: `GET /v2/asset-image/currency/JPY` +- US Dollar: `GET /v2/asset-image/currency/56x56/USD` +- Euro: `GET /v2/asset-image/currency/56x56/EUR` +- Japanese Yen: `GET /v2/asset-image/currency/56x56/JPY` #### Response @@ -218,3 +223,10 @@ Fetches the analytics configuration for the project based on the mandatory `proj isAnalyticsEnabled: boolean, } ``` + +## Known Image Sizes + +- `56x56` +- `80x80` +- `112x112` + `160x160` From fcc664ad3eb2cfd7de12690930495472b607fbd5 Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Wed, 5 Jun 2024 14:42:16 +0200 Subject: [PATCH 16/29] chore: adds `POST /v2/wallets` endpoint variant --- docs/specs/meta-clients/web3modal/api.md | 39 +++++++++++++++++++----- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index 73959340..9bc8e2d4 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -22,7 +22,7 @@ All API endpoints expect the following mandatory query parameters: ## API Endpoints -### GET `/v2/wallets` +### `GET /v2/wallets` Fetches wallet data based on provided query parameters. @@ -69,7 +69,30 @@ Fetches wallet data based on provided query parameters. } ``` -### GET `/v2/ios-data` +### `POST /v2/wallets` + +> **Note**: The `POST` method is used as an escape hatch mechanism to bypass URL length restrictions +> when excluding/include a large number of wallet IDs. +> +> It is recommended to use the simpler `GET` method whenever possible. + +Fetches wallet data based on the same parameters used by `GET /v2/wallets`, but provided as a JSON object, stringified to `text/plain`. + +#### Request Body + +```typescript +{ + "page": number, + "entries": number, + "search": string | null, + "include": string | null, + "exclude": string | null, + "chains": string | null, + "platform": string | null +} +``` + +### `GET /v2/ios-data` Returns a list of iOS-facing wallet data, including the public Explorer ID and iOS deep link schema. @@ -87,7 +110,7 @@ Returns a list of iOS-facing wallet data, including the public Explorer ID and i } ``` -### GET `/v2/android-data` +### `GET /v2/android-data` Returns a list of Android-facing wallet data, including the public Explorer ID and Android App ID. @@ -105,7 +128,7 @@ Returns a list of Android-facing wallet data, including the public Explorer ID a } ``` -### GET `/v2/wallet-image/{size}/{wallet_id}` +### `GET /v2/wallet-image/{size}/{wallet_id}` Returns the image logo for the specified wallet ID. @@ -118,7 +141,7 @@ Returns the image logo for the specified wallet ID. - A binary image file (Blob) -### GET `/v2/asset-image/network/{size}/{asset_id}` +### `GET /v2/asset-image/network/{size}/{asset_id}` Fetches image for public assets like network logos using well-defined CAIP identifiers. @@ -153,7 +176,7 @@ Fetches image for public assets like network logos using well-defined CAIP ident - A binary image file (Blob) -### GET `/v2/asset-image/connector/{size}/{connector_id}` +### `GET /v2/asset-image/connector/{size}/{connector_id}` Fetches image for connector logos using descriptive names. @@ -174,7 +197,7 @@ Fetches image for connector logos using descriptive names. - A binary image file (Blob) -### GET `/v2/asset-image/token/{size}/{token_symbol}` +### `GET /v2/asset-image/token/{size}/{token_symbol}` Fetches image for known tokens using the token's ticker symbol. @@ -212,7 +235,7 @@ Fetches image for known fiat currencies using the currency's symbol. - A binary image file (Blob) -### GET `/v2/analytics-config` +### `GET /v2/analytics-config` Fetches the analytics configuration for the project based on the mandatory `projectId=` query parameter. From 87420ad73cea25074c0335dfd9e44e1097f81427 Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Wed, 12 Jun 2024 20:36:31 +0200 Subject: [PATCH 17/29] fix: provide both mobile.deep_link/mobile.universal_link over opaque mobile_link --- docs/specs/meta-clients/web3modal/api.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index 9bc8e2d4..0c9e7d9f 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -53,11 +53,14 @@ Fetches wallet data based on provided query parameters. "homepage": string, "image_id": string, "order": number, - "mobile_link": string | null, "desktop_link": string | null, "webapp_link": string | null, "app_store": string | null, "play_store": string | null, + "mobile": { + deep_link: string | null, + universal_link: string | null + } "injected": [ { "namespace": string, From 2d8db88e3c626d110cb44cd7be5a574737c1900b Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Wed, 12 Jun 2024 20:44:23 +0200 Subject: [PATCH 18/29] refactor: simplify GET/POST /v2/wallets` to only `POST` variant --- docs/specs/meta-clients/web3modal/api.md | 52 +++++++----------------- 1 file changed, 14 insertions(+), 38 deletions(-) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index 0c9e7d9f..12f58b00 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -22,24 +22,23 @@ All API endpoints expect the following mandatory query parameters: ## API Endpoints -### `GET /v2/wallets` - -Fetches wallet data based on provided query parameters. - -#### Query Parameters - -**Required** +### `POST /v2/wallets` -- `page`: The page number of results (e.g., `1`) -- `entries`: Number of entries per page (e.g., `100`) +Fetches wallet data based on following request body provided as a stringified JSON object (`Content-Type: text/plain`). -**Optional** +#### Request Body -- `search`: Optional search term (e.g., `MetaMask`) -- `include`: Optional comma-separated list of wallet IDs to include -- `exclude`: Optional comma-separated list of wallet IDs to exclude -- `chains`: Optional comma-separated list of chain identifiers (e.g., `eip155:1`) -- `platform`: Optional platform filter (`ios` or `android`) +```typescript +{ + "page": number, // Required - The page number of results (e.g., `1`) + "entries": number, // Required - Number of entries per page (e.g., `100`) + "search": string | null, // Optional search term (e.g., `MetaMask`) + "include": string | null, // Optional comma-separated list of wallet IDs to include + "exclude": string | null, // Optional comma-separated list of wallet IDs to exclude + "chains": string | null, // Optional comma-separated list of chain identifiers (e.g., `eip155:1`) + "platform": string | null // Optional platform filter (`ios` or `android`) +} +``` #### Response @@ -72,29 +71,6 @@ Fetches wallet data based on provided query parameters. } ``` -### `POST /v2/wallets` - -> **Note**: The `POST` method is used as an escape hatch mechanism to bypass URL length restrictions -> when excluding/include a large number of wallet IDs. -> -> It is recommended to use the simpler `GET` method whenever possible. - -Fetches wallet data based on the same parameters used by `GET /v2/wallets`, but provided as a JSON object, stringified to `text/plain`. - -#### Request Body - -```typescript -{ - "page": number, - "entries": number, - "search": string | null, - "include": string | null, - "exclude": string | null, - "chains": string | null, - "platform": string | null -} -``` - ### `GET /v2/ios-data` Returns a list of iOS-facing wallet data, including the public Explorer ID and iOS deep link schema. From d84b320b24a975534c877e43310502446d59fbf2 Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Wed, 12 Jun 2024 20:56:54 +0200 Subject: [PATCH 19/29] refactor: break out compound `sv=` param into query key for each part --- docs/specs/meta-clients/web3modal/api.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index 12f58b00..8934fd36 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -13,9 +13,15 @@ All API endpoints expect the following mandatory query parameters: - `st=`: SDK type - Options: `w3m | wcm` - Example: `st=w3m` +- `sf=`: SDK framework + - Options: `html | react | vue` + - Example: `fw=react` +- `sa=`: SDK adapter + - Options: `evm-wagmi | evm-ethers | evm-ethers5` + - Example: `ad=evm-wagmi` - `sv=`: SDK version - - Options: `${framework}-${library}-${version}` - - Example: `sv=react-wagmi-4.0.0` + - Options: `string` + - Example: `sv=5.0.0` - `projectId=`: The project ID for tracking and analytics - Options: `string` - Example: `projectId=702e2d45...` From 00580b235ecb3f0daa27b44b92b319a2dd8ca114 Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Wed, 3 Jul 2024 22:43:52 +0700 Subject: [PATCH 20/29] chore: mandate use of `Accept-Encoding` compression headers --- docs/specs/meta-clients/web3modal/api.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index 8934fd36..2bd6afe1 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -26,6 +26,14 @@ All API endpoints expect the following mandatory query parameters: - Options: `string` - Example: `projectId=702e2d45...` +## Headers + +All API endpoints expect the following simple (i.e. non-preflight-dependent) headers: + +- `Accept-Encoding` + - Options: `gzip | br` + - Example: `Accept-Encoding: gzip, br` + ## API Endpoints ### `POST /v2/wallets` From 9c1205468265dfc53f221d993b0b9d067aee108e Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Wed, 17 Jul 2024 11:34:39 +0200 Subject: [PATCH 21/29] Update docs/specs/meta-clients/web3modal/api.md Co-authored-by: Chris Smith <1979423+chris13524@users.noreply.github.com> --- docs/specs/meta-clients/web3modal/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index 2bd6afe1..f56772fb 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -87,7 +87,7 @@ Fetches wallet data based on following request body provided as a stringified JS ### `GET /v2/ios-data` -Returns a list of iOS-facing wallet data, including the public Explorer ID and iOS deep link schema. +Returns a list of iOS-facing wallet data, including the public Explorer ID and iOS deep link schema. This allows apps to check exhaustively what wallets are installed. #### Response From e0f756cc1b8ebdbadcfcd51048f07b9cf215d67d Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Wed, 17 Jul 2024 11:34:47 +0200 Subject: [PATCH 22/29] Update docs/specs/meta-clients/web3modal/api.md Co-authored-by: Chris Smith <1979423+chris13524@users.noreply.github.com> --- docs/specs/meta-clients/web3modal/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index f56772fb..ce9968f6 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -105,7 +105,7 @@ Returns a list of iOS-facing wallet data, including the public Explorer ID and i ### `GET /v2/android-data` -Returns a list of Android-facing wallet data, including the public Explorer ID and Android App ID. +Returns a list of Android-facing wallet data, including the public Explorer ID and Android App ID. This allows apps to check exhaustively what wallets are installed. #### Response From f23a56dd63b35810d6ecb922c7140c1e7f7aaa38 Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Fri, 19 Jul 2024 14:14:14 +0700 Subject: [PATCH 23/29] fix: wording --- docs/specs/meta-clients/web3modal/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index ce9968f6..98fcfd06 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -136,7 +136,7 @@ Returns the image logo for the specified wallet ID. ### `GET /v2/asset-image/network/{size}/{asset_id}` -Fetches image for public assets like network logos using well-defined CAIP identifiers. +Fetches images for network logos using well-defined CAIP identifiers. #### Route Parameters From 58c9c6d4a735e841c677cf7ffffc1d4be1d0087e Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Fri, 19 Jul 2024 14:15:14 +0700 Subject: [PATCH 24/29] fix: align query param example keys --- docs/specs/meta-clients/web3modal/api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index 98fcfd06..505f2ec8 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -15,10 +15,10 @@ All API endpoints expect the following mandatory query parameters: - Example: `st=w3m` - `sf=`: SDK framework - Options: `html | react | vue` - - Example: `fw=react` + - Example: `sf=react` - `sa=`: SDK adapter - Options: `evm-wagmi | evm-ethers | evm-ethers5` - - Example: `ad=evm-wagmi` + - Example: `sa=evm-wagmi` - `sv=`: SDK version - Options: `string` - Example: `sv=5.0.0` From 8812c593ea682a490a1de23fe5650aec63d32bb9 Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Wed, 7 Aug 2024 13:34:15 +0200 Subject: [PATCH 25/29] Update docs/specs/meta-clients/web3modal/api.md Co-authored-by: Cali <32299095+Cali93@users.noreply.github.com> --- docs/specs/meta-clients/web3modal/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index 505f2ec8..719347a0 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -14,7 +14,7 @@ All API endpoints expect the following mandatory query parameters: - Options: `w3m | wcm` - Example: `st=w3m` - `sf=`: SDK framework - - Options: `html | react | vue` + - Options: `html | react | vue | react-native | flutter | swift | kotlin | unity` - Example: `sf=react` - `sa=`: SDK adapter - Options: `evm-wagmi | evm-ethers | evm-ethers5` From dce37ae3df7b1fc5de3f0b60590a67f2b66b435e Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Wed, 7 Aug 2024 13:35:17 +0200 Subject: [PATCH 26/29] Update docs/specs/meta-clients/web3modal/api.md Co-authored-by: Cali <32299095+Cali93@users.noreply.github.com> --- docs/specs/meta-clients/web3modal/api.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index 719347a0..5c3434ff 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -81,6 +81,8 @@ Fetches wallet data based on following request body provided as a stringified JS } ] | null } + "rdns": stringĀ | null + "chains": string[] ] } ``` From 6d258274cecee308ffeb6f83cec8cdfa6ecd6639 Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Wed, 7 Aug 2024 13:44:40 +0200 Subject: [PATCH 27/29] chore: replace page/entries with offset/limit parameters --- docs/specs/meta-clients/web3modal/api.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index 5c3434ff..990b3c39 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -44,12 +44,12 @@ Fetches wallet data based on following request body provided as a stringified JS ```typescript { - "page": number, // Required - The page number of results (e.g., `1`) - "entries": number, // Required - Number of entries per page (e.g., `100`) - "search": string | null, // Optional search term (e.g., `MetaMask`) + "offset": number, // Required - The number of items to skip before returning results (e.g. `0`) + "limit": number, // Required - Number of items to return per request (e.g. `100`) + "search": string | null, // Optional search term (e.g. `MetaMask`) "include": string | null, // Optional comma-separated list of wallet IDs to include "exclude": string | null, // Optional comma-separated list of wallet IDs to exclude - "chains": string | null, // Optional comma-separated list of chain identifiers (e.g., `eip155:1`) + "chains": string | null, // Optional comma-separated list of chain identifiers (e.g. `eip155:1`) "platform": string | null // Optional platform filter (`ios` or `android`) } ``` From dd12fb06697de3d2d91b8b4677b895865e1bf825 Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Thu, 8 Aug 2024 22:20:42 +0200 Subject: [PATCH 28/29] chore: use `coinbaseWalletSDK` identifier --- docs/specs/meta-clients/web3modal/api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index 990b3c39..d716dba6 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -177,12 +177,12 @@ Fetches image for connector logos using descriptive names. #### Route Parameters -- `connector_id`: Descriptive name for the connector (e.g., `coinbase-wallet`) +- `connector_id`: Descriptive name for the connector (e.g., `coinbaseWalletSDK`) - `size`: The predefined image size, described as `{width}x{height}` (see [Known Image Sizes](#known-image-sizes)) #### Example API Requests -- Coinbase Wallet: `GET /v2/asset-image/connector/56x56/coinbase-wallet` +- Coinbase Wallet: `GET /v2/asset-image/connector/56x56/coinbaseWalletSDK` - Safe: `GET /v2/asset-image/connector/56x56/safe` - Ledger: `GET /v2/asset-image/connector/56x56/ledger` - WalletConnect: `GET /v2/asset-image/connector/56x56/wallet-connect` From f7248baf3a1af73828c13f91d9b4b76f5046aac1 Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Thu, 8 Aug 2024 22:45:37 +0200 Subject: [PATCH 29/29] chore: add env= and os= optional query params --- docs/specs/meta-clients/web3modal/api.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/specs/meta-clients/web3modal/api.md b/docs/specs/meta-clients/web3modal/api.md index d716dba6..589e2ab7 100644 --- a/docs/specs/meta-clients/web3modal/api.md +++ b/docs/specs/meta-clients/web3modal/api.md @@ -26,6 +26,17 @@ All API endpoints expect the following mandatory query parameters: - Options: `string` - Example: `projectId=702e2d45...` +### Optional Query Parameters + +All API endpoints support the following optional query parameters: + +- `env=`: Environment + - Options: `string` + - Example: `env=react-native@0.74.1` +- `os=`: Operating System + - Options: `string` + - Example: `os=ios@17.4` + ## Headers All API endpoints expect the following simple (i.e. non-preflight-dependent) headers: