@phala/pay-server 0.11.1 → 0.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -185,17 +185,20 @@ import { NetworkIcon, AssetIcon } from "@phala/pay-react";
185
185
 
186
186
  Import `@phala/pay-react/styles.css` for alignment. The default
187
187
  size is 18px. Icons use SVG width/height attributes and React elements, so they need no inline
188
- styles, data URI allowance, or extra CSP directives, including with `style-src 'self'`.
188
+ styles, including with `style-src 'self'`. Each logo is a PNG embedded as a `data:` URI in an SVG
189
+ `<image>`, so the page requests nothing for it; allow it with `img-src data:` in your CSP.
189
190
 
190
191
  Framework-free hosts can call `networkIcon(chainId)` or `assetIcon(symbol)` from `@phala/pay`
191
192
  for decorative SVG markup. Keep the
192
- name visible alongside it; when used alone, supply an accessible label on the host wrapper.
193
-
194
- Only six branded SVGs from `@web3icons/core@4.0.57` are vendored, under the MIT license in
195
- `THIRD_PARTY_NOTICES`. Regenerate both the markup and JSX modules with
196
- `npx -y pnpm@12.6.0 run icons:generate`; the script packs the pinned package into a temporary
197
- directory, rejects unexpected SVG tags/attributes, and cleans up. No web3icons runtime package
198
- is installed.
193
+ name visible alongside it; when used alone, supply an accessible label on the host wrapper. Some
194
+ logos are square images; `NetworkIcon` and `AssetIcon` draw every logo round, as CoinMarketCap
195
+ does, and so does `border-radius: 50%` on your wrapper's `svg`.
196
+
197
+ The logos are CoinMarketCap's 64px images: each token's own, and for a network the asset
198
+ CoinMarketCap shows for it (Ethereum's is ETH's). They are vendored, not fetched at runtime, and
199
+ are trademarks of their owners (`THIRD_PARTY_NOTICES`). Regenerate the core and React modules with
200
+ `npx -y pnpm@12.6.0 run icons:generate` in `sdk/js`; the script downloads each image, rejects one
201
+ whose SHA-256 differs from its pin, and checks that it is a 64x64 PNG.
199
202
 
200
203
  ## Development
201
204
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phala/pay-server",
3
- "version": "0.11.1",
3
+ "version": "0.11.3",
4
4
  "description": "Phala Pay merchant server SDK",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/Phala-Network/phala-pay/tree/main/sdk/js-server#readme",
@@ -21,8 +21,7 @@
21
21
  }
22
22
  },
23
23
  "files": [
24
- "dist",
25
- "THIRD_PARTY_NOTICES"
24
+ "dist"
26
25
  ],
27
26
  "publishConfig": {
28
27
  "access": "public"
@@ -1,25 +0,0 @@
1
- web3icons (@web3icons/core@4.0.57)
2
- https://github.com/0xa3k5/web3icons
3
- Vendored branded token and network SVGs.
4
-
5
- MIT License
6
-
7
- Copyright (c) 2024 0xa3k5
8
-
9
- Permission is hereby granted, free of charge, to any person obtaining a copy
10
- of this software and associated documentation files (the "Software"), to deal
11
- in the Software without restriction, including without limitation the rights
12
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- copies of the Software, and to permit persons to whom the Software is
14
- furnished to do so, subject to the following conditions:
15
-
16
- The above copyright notice and this permission notice shall be included in all
17
- copies or substantial portions of the Software.
18
-
19
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
- SOFTWARE.