@1sat/permission-module-ui 0.0.1 → 0.0.2
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/dist/index.js +15 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -410,8 +410,23 @@ function summarizeRequest(req) {
|
|
|
410
410
|
if (req.kind === "transaction") {
|
|
411
411
|
return summarizeTransaction(req);
|
|
412
412
|
}
|
|
413
|
+
if (req.kind === "protocol") {
|
|
414
|
+
return summarizeProtocol(req);
|
|
415
|
+
}
|
|
413
416
|
return summarizeSignature(req);
|
|
414
417
|
}
|
|
418
|
+
function summarizeProtocol(req) {
|
|
419
|
+
const intent = req.intent;
|
|
420
|
+
const rows = [
|
|
421
|
+
{ key: "Protocol", value: "1Sat (p 1sat)" },
|
|
422
|
+
{ key: "Access", value: intent.access ?? "read-only" }
|
|
423
|
+
];
|
|
424
|
+
return {
|
|
425
|
+
title: "Protocol Access",
|
|
426
|
+
subtitle: intent.notes ?? `${shortenOriginator(req.originator)} requests read-only access to derive your 1Sat addresses. Signing remains per-transaction.`,
|
|
427
|
+
rows
|
|
428
|
+
};
|
|
429
|
+
}
|
|
415
430
|
function summarizeTransaction(req) {
|
|
416
431
|
const intent = req.intent;
|
|
417
432
|
const rows = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1sat/permission-module-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "React component for the 1Sat permission module's prompt UX",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
],
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@1sat/permission-module": "0.0.
|
|
31
|
+
"@1sat/permission-module": "0.0.2"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"react": "^18.0.0 || ^19.0.0"
|