@multiplatform.one/gpg 6.1.0 → 6.4.0
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 +56 -0
- package/dist/cjs/SignInWithGpg.cjs +2 -2
- package/dist/cjs/SignInWithGpg.native.js +2 -2
- package/dist/cjs/SignInWithGpg.native.js.map +1 -1
- package/dist/esm/SignInWithGpg.mjs +2 -2
- package/dist/esm/SignInWithGpg.native.js +2 -2
- package/package.json +11 -9
- package/src/SignInWithGpg.tsx +2 -2
- package/types/GpgButton.d.ts +8 -0
- package/types/GpgButton.d.ts.map +1 -0
- package/types/GpgContext.d.ts +31 -0
- package/types/GpgContext.d.ts.map +1 -0
- package/types/GpgProvider.d.ts +10 -0
- package/types/GpgProvider.d.ts.map +1 -0
- package/types/SignInWithGpg.d.ts +4 -0
- package/types/SignInWithGpg.d.ts.map +1 -0
- package/types/index.d.ts +8 -0
- package/types/index.d.ts.map +1 -0
- package/types/screens.d.ts +19 -0
- package/types/screens.d.ts.map +1 -0
- package/types/useGpg.d.ts +16 -0
- package/types/useGpg.d.ts.map +1 -0
package/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# @multiplatform.one/gpg
|
|
2
|
+
|
|
3
|
+
Sign-In With GPG (SIWG) for the multiplatform.one connectkit modal — a
|
|
4
|
+
connection-free signer where the user signs a challenge in their terminal and
|
|
5
|
+
pastes the result back. Pulls in **no wagmi/viem**: it depends only on
|
|
6
|
+
`@multiplatform.one/connectkit`, so a GPG-only app can skip the wallet stack.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
pnpm add @multiplatform.one/gpg @multiplatform.one/connectkit
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Peers: `react`, `@tanstack/react-query`.
|
|
15
|
+
|
|
16
|
+
## What it owns
|
|
17
|
+
|
|
18
|
+
- **`GpgProvider`** — GPG auth state + challenge/nonce lifecycle
|
|
19
|
+
(`GPG_NONCE_QUERY_KEY`)
|
|
20
|
+
- **`useGpg()`** — status, sign-in/sign-out actions (`GpgStatusState`)
|
|
21
|
+
- **`SignInWithGpg`** / `SignInWithGpgButton` (alias `GPGButton`) — drop-in
|
|
22
|
+
sign-in surface and trigger button
|
|
23
|
+
- **`gpgScreen`**, `GpgScreenRegistrar`, `GpgBridge` — registers the GPG
|
|
24
|
+
screen into the connectkit modal's screen registry
|
|
25
|
+
|
|
26
|
+
## What it must not do
|
|
27
|
+
|
|
28
|
+
- No blockchain wallets, no viem/wagmi — wallet signers live in
|
|
29
|
+
`@multiplatform.one/web3`
|
|
30
|
+
- No modal shell of its own — it registers screens into
|
|
31
|
+
`@multiplatform.one/connectkit`
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
import { ConnectKitProvider } from "@multiplatform.one/connectkit";
|
|
37
|
+
import { GpgBridge, GpgProvider, SignInWithGpgButton } from "@multiplatform.one/gpg";
|
|
38
|
+
|
|
39
|
+
export function App() {
|
|
40
|
+
return (
|
|
41
|
+
<GpgProvider>
|
|
42
|
+
<ConnectKitProvider bridge={GpgBridge}>
|
|
43
|
+
<SignInWithGpgButton />
|
|
44
|
+
</ConnectKitProvider>
|
|
45
|
+
</GpgProvider>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
`GpgProvider` must wrap **outside** `ConnectKitProvider`. In an app that also
|
|
51
|
+
ships wallets, `@multiplatform.one/web3` mounts `GpgScreenRegistrar` alongside
|
|
52
|
+
its own screens instead of `GpgBridge`.
|
|
53
|
+
|
|
54
|
+
## License
|
|
55
|
+
|
|
56
|
+
Apache-2.0
|
|
@@ -43,7 +43,7 @@ const textarea = {
|
|
|
43
43
|
resize: "vertical"
|
|
44
44
|
};
|
|
45
45
|
const label = {
|
|
46
|
-
textAlign: "
|
|
46
|
+
textAlign: "start",
|
|
47
47
|
fontSize: 14,
|
|
48
48
|
fontWeight: 500,
|
|
49
49
|
margin: "4px 0"
|
|
@@ -122,7 +122,7 @@ const SignInWithGpg = () => {
|
|
|
122
122
|
style: {
|
|
123
123
|
color: "var(--ck-body-color-danger, #c9190b)",
|
|
124
124
|
fontSize: 13,
|
|
125
|
-
textAlign: "
|
|
125
|
+
textAlign: "start"
|
|
126
126
|
},
|
|
127
127
|
children: error
|
|
128
128
|
})]
|
|
@@ -65,7 +65,7 @@ var textarea = {
|
|
|
65
65
|
resize: "vertical"
|
|
66
66
|
};
|
|
67
67
|
var label = {
|
|
68
|
-
textAlign: "
|
|
68
|
+
textAlign: "start",
|
|
69
69
|
fontSize: 14,
|
|
70
70
|
fontWeight: 500,
|
|
71
71
|
margin: "4px 0"
|
|
@@ -148,7 +148,7 @@ var SignInWithGpg = function SignInWithGpg2() {
|
|
|
148
148
|
style: {
|
|
149
149
|
color: "var(--ck-body-color-danger, #c9190b)",
|
|
150
150
|
fontSize: 13,
|
|
151
|
-
textAlign: "
|
|
151
|
+
textAlign: "start"
|
|
152
152
|
},
|
|
153
153
|
children: error
|
|
154
154
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["to","__toESM","mod","isNodeMode","target","__create","__getProtoOf","__copyProps","__esModule","__defProp","value","enumerable","__toCommonJS","SignInWithGpg_exports","__export","default","SignInWithGpg_default","module","exports","import_jsx_runtime","require","import_react","import_connectkit","import_useGpg","_instanceof","left","right","Symbol","hasInstance","textarea","width","boxSizing","fontFamily","fontSize","lineHeight","padding","borderRadius","border","background","color","resize","label","textAlign","fontWeight","margin","SignInWithGpg","SignInWithGpg2","context","useContext","message","command","signIn","isLoading","isReady","useGpg","pasted","setPasted","useState","error","setError","busy","setBusy","onSubmit","onSubmit2","setTimeout","setOpen","e","Error","jsx","PageContent","style","children","jsxs","ModalContent","paddingBottom","gap","ModalBody","display","flexDirection"],"sources":["../../src/SignInWithGpg.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;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A,
|
|
1
|
+
{"version":3,"names":["to","__toESM","mod","isNodeMode","target","__create","__getProtoOf","__copyProps","__esModule","__defProp","value","enumerable","__toCommonJS","SignInWithGpg_exports","__export","default","SignInWithGpg_default","module","exports","import_jsx_runtime","require","import_react","import_connectkit","import_useGpg","_instanceof","left","right","Symbol","hasInstance","textarea","width","boxSizing","fontFamily","fontSize","lineHeight","padding","borderRadius","border","background","color","resize","label","textAlign","fontWeight","margin","SignInWithGpg","SignInWithGpg2","context","useContext","message","command","signIn","isLoading","isReady","useGpg","pasted","setPasted","useState","error","setError","busy","setBusy","onSubmit","onSubmit2","setTimeout","setOpen","e","Error","jsx","PageContent","style","children","jsxs","ModalContent","paddingBottom","gap","ModalBody","display","flexDirection"],"sources":["../../src/SignInWithGpg.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;EAAA,OAAAA,EAAA;AAAA;AAAA,IAAAC,OAAA,GAAAA,CAAAC,GAAA,EAAAC,UAAA,EAAAC,MAAA,MAAAA,MAAA,GAAAF,GAAA,WAAAG,QAAA,CAAAC,YAAA,CAAAJ,GAAA,SAAAK,WAAA;AAAA;AAAA;AAAA;AAEA;AAQAJ,UAAA,KAAAD,GAAuB,KAAAA,GAAA,CAAAM,UAAA,GAAAC,SAAA,CAAAL,MAAA;EAAAM,KAAA,EAAAR,GAAA;EAAAS,UAAA;AAAA,KAAAP,MAAA,EAgDfF,GA3CR;AAAgC,IAC9BU,YAAO,GAAAV,GAAA,IAAAK,WAAA,CAAAE,SAAA;EAAAC,KAAA;AAAA,IAAAR,GAAA;AAAA,IACPW,qBAAW;AAAAC,QACX,CAAAD,qBAAY;EACZE,OAAA,EAAAA,CAAA,KAAUC;AAAA,EACV;AAAYC,MACZ,CAAAC,OAAS,GAAAN,YAAA,CAAAC,qBAAA;AAAA,IACTM,kBAAc,GAAAC,OAAA;AAAA,IACdC,YAAQ,GAAApB,OAAA,CAAAmB,OAAA;AAAA,IACRE,iBAAY,GAAAF,OAAA;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,OAAA;IAAA;EACO;EACC,OACP,eAAiB,IAAA1C,kBAAmB,CAAAiD,GAAK,EAAA9C,iBAAA,CAAA+C,WAAA;IAAAC,KACzC;MAAYxC,KACZ;IAAO;IACTyC,QAAA,qBAAApD,kBAAA,CAAAqD,IAAA,EAAAlD,iBAAA,CAAAmD,YAAA;MACAH,KAAA;QAGCI,aACC;QAACC,GAAA;MAAA;MAAAJ,QACC,EAAO,gBACE,IAAApD,kBAAA,CAAAiD,GAAA,EAAA9C,iBAAA,CAAAsD,SAAA;QACPN,KAAA,EAAA7B,KAAU;QACV8B,QAAA;MACF,IAEC,mBAAApD,kBAAA,CAAAqD,IAAA;QAAAF,KAAA;UACHO,OAAA;UAGNC,aAAA;UAEJH,GAAA;QAEO","ignoreList":[]}
|
|
@@ -16,7 +16,7 @@ const textarea = {
|
|
|
16
16
|
resize: "vertical"
|
|
17
17
|
};
|
|
18
18
|
const label = {
|
|
19
|
-
textAlign: "
|
|
19
|
+
textAlign: "start",
|
|
20
20
|
fontSize: 14,
|
|
21
21
|
fontWeight: 500,
|
|
22
22
|
margin: "4px 0"
|
|
@@ -95,7 +95,7 @@ const SignInWithGpg = () => {
|
|
|
95
95
|
style: {
|
|
96
96
|
color: "var(--ck-body-color-danger, #c9190b)",
|
|
97
97
|
fontSize: 13,
|
|
98
|
-
textAlign: "
|
|
98
|
+
textAlign: "start"
|
|
99
99
|
},
|
|
100
100
|
children: error
|
|
101
101
|
})]
|
|
@@ -25,7 +25,7 @@ var textarea = {
|
|
|
25
25
|
resize: "vertical"
|
|
26
26
|
};
|
|
27
27
|
var label = {
|
|
28
|
-
textAlign: "
|
|
28
|
+
textAlign: "start",
|
|
29
29
|
fontSize: 14,
|
|
30
30
|
fontWeight: 500,
|
|
31
31
|
margin: "4px 0"
|
|
@@ -108,7 +108,7 @@ var SignInWithGpg = function SignInWithGpg2() {
|
|
|
108
108
|
style: {
|
|
109
109
|
color: "var(--ck-body-color-danger, #c9190b)",
|
|
110
110
|
fontSize: 13,
|
|
111
|
-
textAlign: "
|
|
111
|
+
textAlign: "start"
|
|
112
112
|
},
|
|
113
113
|
children: error
|
|
114
114
|
})]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/gpg",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.4.0",
|
|
4
4
|
"description": "Sign-In With GPG (SIWG) screen + GpgProvider for the connectkit modal — no viem",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"connectkit",
|
|
@@ -22,29 +22,31 @@
|
|
|
22
22
|
"author": "BitSpur <support@risserlabs.com> (https://risserlabs.com)",
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
25
|
-
"url": "https://gitlab.com/bitspur/
|
|
25
|
+
"url": "git+https://gitlab.com/bitspur/frappe/multiplatform.one.git",
|
|
26
|
+
"directory": "public/gpg"
|
|
26
27
|
},
|
|
27
28
|
"source": "src/index.ts",
|
|
28
29
|
"files": [
|
|
29
30
|
"dist",
|
|
30
31
|
"src",
|
|
31
|
-
"types"
|
|
32
|
+
"types",
|
|
33
|
+
"!types/.tsbuildinfo"
|
|
32
34
|
],
|
|
33
35
|
"sideEffects": false,
|
|
34
36
|
"main": "src/index.ts",
|
|
35
37
|
"module": "src/index.ts",
|
|
36
|
-
"types": "
|
|
38
|
+
"types": "types/index.d.ts",
|
|
37
39
|
"exports": {
|
|
38
40
|
"./package.json": "./package.json",
|
|
39
41
|
".": {
|
|
40
42
|
"source": "./src/index.ts",
|
|
41
43
|
"react-native": {
|
|
42
|
-
"types": "./
|
|
44
|
+
"types": "./types/index.d.ts",
|
|
43
45
|
"import": "./src/index.ts",
|
|
44
46
|
"require": "./src/index.ts",
|
|
45
47
|
"default": "./src/index.ts"
|
|
46
48
|
},
|
|
47
|
-
"types": "./
|
|
49
|
+
"types": "./types/index.d.ts",
|
|
48
50
|
"import": "./dist/esm/index.mjs",
|
|
49
51
|
"require": "./dist/cjs/index.cjs"
|
|
50
52
|
}
|
|
@@ -53,14 +55,14 @@
|
|
|
53
55
|
"access": "public"
|
|
54
56
|
},
|
|
55
57
|
"dependencies": {
|
|
56
|
-
"@multiplatform.one/connectkit": "6.
|
|
58
|
+
"@multiplatform.one/connectkit": "6.4.0"
|
|
57
59
|
},
|
|
58
60
|
"devDependencies": {
|
|
59
61
|
"@tamagui/build": "2.0.0-rc.41",
|
|
60
62
|
"@types/react": "~19.2.14",
|
|
61
63
|
"react": "19.2.5",
|
|
62
64
|
"typescript": "~5.9.3",
|
|
63
|
-
"@multiplatform.one/config": "6.
|
|
65
|
+
"@multiplatform.one/config": "6.4.0"
|
|
64
66
|
},
|
|
65
67
|
"peerDependencies": {
|
|
66
68
|
"@tanstack/react-query": "^5.62.0",
|
|
@@ -68,6 +70,6 @@
|
|
|
68
70
|
},
|
|
69
71
|
"scripts": {
|
|
70
72
|
"typecheck": "tsc --noEmit",
|
|
71
|
-
"build": "rm -rf dist types 2>/dev/null && tamagui-build --ts-project ./tsconfig.build.json && node scripts/fix-dist-specifiers.mjs"
|
|
73
|
+
"build": "rm -rf dist types 2>/dev/null && tamagui-build --ts-project ./tsconfig.build.json --exclude '\\.spec\\.|\\.test\\.|\\.stories\\.' && node scripts/fix-dist-specifiers.mjs"
|
|
72
74
|
}
|
|
73
75
|
}
|
package/src/SignInWithGpg.tsx
CHANGED
|
@@ -27,7 +27,7 @@ const textarea: CSSProperties = {
|
|
|
27
27
|
resize: "vertical",
|
|
28
28
|
};
|
|
29
29
|
const label: CSSProperties = {
|
|
30
|
-
textAlign: "
|
|
30
|
+
textAlign: "start",
|
|
31
31
|
fontSize: 14,
|
|
32
32
|
fontWeight: 500,
|
|
33
33
|
margin: "4px 0",
|
|
@@ -87,7 +87,7 @@ const SignInWithGpg: React.FC = () => {
|
|
|
87
87
|
style={{
|
|
88
88
|
color: "var(--ck-body-color-danger, #c9190b)",
|
|
89
89
|
fontSize: 13,
|
|
90
|
-
textAlign: "
|
|
90
|
+
textAlign: "start",
|
|
91
91
|
}}
|
|
92
92
|
>
|
|
93
93
|
{error}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type ButtonProps = {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
};
|
|
5
|
+
export declare const GPGButton: React.FC<ButtonProps>;
|
|
6
|
+
declare const GPGButtonComponent: React.FC<ButtonProps>;
|
|
7
|
+
export default GPGButtonComponent;
|
|
8
|
+
//# sourceMappingURL=GpgButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GpgButton.d.ts","sourceRoot":"","sources":["../src/GpgButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAmB3C,CAAC;AAEF,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAI7C,CAAC;AACF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { useQuery } from "@tanstack/react-query";
|
|
2
|
+
export declare enum GpgStatusState {
|
|
3
|
+
READY = "ready",
|
|
4
|
+
LOADING = "loading",
|
|
5
|
+
SUCCESS = "success",
|
|
6
|
+
ERROR = "error"
|
|
7
|
+
}
|
|
8
|
+
export type GpgConfig = {
|
|
9
|
+
getNonce: () => Promise<string>;
|
|
10
|
+
onSign: (cred: {
|
|
11
|
+
username: string;
|
|
12
|
+
password: string;
|
|
13
|
+
message: string;
|
|
14
|
+
}) => Promise<boolean | void> | boolean | void;
|
|
15
|
+
buildMessage?: (args: {
|
|
16
|
+
nonce: string;
|
|
17
|
+
}) => string;
|
|
18
|
+
enabled?: boolean;
|
|
19
|
+
nonceRefetchInterval?: number | false;
|
|
20
|
+
};
|
|
21
|
+
export type GpgContextValue = Required<Pick<GpgConfig, "getNonce" | "onSign" | "enabled" | "nonceRefetchInterval">> & {
|
|
22
|
+
buildMessage?: GpgConfig["buildMessage"];
|
|
23
|
+
nonce: ReturnType<typeof useQuery<string | null>>;
|
|
24
|
+
message: string | null;
|
|
25
|
+
command: string | null;
|
|
26
|
+
status: GpgStatusState;
|
|
27
|
+
signIn: (pastedBlob: string) => Promise<boolean>;
|
|
28
|
+
resetStatus: () => void;
|
|
29
|
+
};
|
|
30
|
+
export declare const GpgContext: import("react").Context<GpgContextValue | null>;
|
|
31
|
+
//# sourceMappingURL=GpgContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GpgContext.d.ts","sourceRoot":"","sources":["../src/GpgContext.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAOjD,oBAAY,cAAc;IACxB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,UAAU;CAChB;AAED,MAAM,MAAM,SAAS,GAAG;IAEtB,QAAQ,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IAMhC,MAAM,EAAE,CAAC,IAAI,EAAE;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;KACjB,KAAK,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,OAAO,GAAG,IAAI,CAAC;IAG/C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM,CAAC;IACnD,OAAO,CAAC,EAAE,OAAO,CAAC;IAGlB,oBAAoB,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,QAAQ,CACpC,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,sBAAsB,CAAC,CAC5E,GAAG;IACF,YAAY,CAAC,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACzC,KAAK,EAAE,UAAU,CAAC,OAAO,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;IAElD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACjD,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,UAAU,iDAA8C,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { GpgConfig } from "./GpgContext";
|
|
3
|
+
type Props = GpgConfig & {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
onSignIn?: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const GPG_NONCE_QUERY_KEY = "ckGpgNonce";
|
|
8
|
+
export declare const GpgProvider: ({ children, enabled, nonceRefetchInterval, buildMessage, onSignIn, ...gpgConfig }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=GpgProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GpgProvider.d.ts","sourceRoot":"","sources":["../src/GpgProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAyC,MAAM,OAAO,CAAC;AAIzE,OAAO,EAAc,SAAS,EAAkB,MAAM,cAAc,CAAC;AAErE,KAAK,KAAK,GAAG,SAAS,GAAG;IACvB,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,mBAAmB,eAAe,CAAC;AAkBhD,eAAO,MAAM,WAAW,GAAI,mFAOzB,KAAK,4CAqGP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignInWithGpg.d.ts","sourceRoot":"","sources":["../src/SignInWithGpg.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAC;AAmCvD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EA+D1B,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { useGpg } from "./useGpg";
|
|
2
|
+
export { GpgProvider, GPG_NONCE_QUERY_KEY } from "./GpgProvider";
|
|
3
|
+
export { GpgContext, GpgStatusState } from "./GpgContext";
|
|
4
|
+
export type { GpgConfig, GpgContextValue } from "./GpgContext";
|
|
5
|
+
export { default as SignInWithGpg } from "./SignInWithGpg";
|
|
6
|
+
export { default as SignInWithGpgButton, GPGButton } from "./GpgButton";
|
|
7
|
+
export { gpgScreen, GpgScreenRegistrar, GpgBridge } from "./screens";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC1D,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExE,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type ConnectCallbackProps, type ScreenDef } from "@multiplatform.one/connectkit";
|
|
3
|
+
export declare const gpgScreen: ScreenDef;
|
|
4
|
+
/**
|
|
5
|
+
* Mount inside ConnectKitProvider (under ScreenRegistryProvider) to publish the GPG
|
|
6
|
+
* screen to the modal. Renders nothing. web3 mounts this alongside its wallet
|
|
7
|
+
* screens; a gpg-only app uses {@link GpgBridge}.
|
|
8
|
+
*/
|
|
9
|
+
export declare const GpgScreenRegistrar: React.FC;
|
|
10
|
+
/**
|
|
11
|
+
* The signer bridge for a GPG-only app (no wagmi/web3). Pass to ConnectKitProvider's
|
|
12
|
+
* `bridge` prop: it registers the GPG screen and injects a ModalState advertising
|
|
13
|
+
* GPG sign-in is available. Open the screen via the SignInWithGpgButton (which calls
|
|
14
|
+
* `openScreen('signInWithGpg')`).
|
|
15
|
+
*/
|
|
16
|
+
export declare const GpgBridge: React.FC<{
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
} & ConnectCallbackProps>;
|
|
19
|
+
//# sourceMappingURL=screens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screens.d.ts","sourceRoot":"","sources":["../src/screens.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAIL,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACf,MAAM,+BAA+B,CAAC;AAOvC,eAAO,MAAM,SAAS,EAAE,SAOvB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAGtC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,GAAG,oBAAoB,CAUrF,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { GpgStatusState } from "./GpgContext";
|
|
2
|
+
type HookProps = {
|
|
3
|
+
message: string | null;
|
|
4
|
+
command: string | null;
|
|
5
|
+
status: GpgStatusState;
|
|
6
|
+
error?: Error | any;
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
isSuccess: boolean;
|
|
9
|
+
isError: boolean;
|
|
10
|
+
isReady: boolean;
|
|
11
|
+
signIn: (pastedBlob: string) => Promise<boolean>;
|
|
12
|
+
reset: () => void;
|
|
13
|
+
};
|
|
14
|
+
export declare const useGpg: () => HookProps | any;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=useGpg.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGpg.d.ts","sourceRoot":"","sources":["../src/useGpg.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,cAAc,EAAE,MAAM,cAAc,CAAC;AAE1D,KAAK,SAAS,GAAG;IAEf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB,MAAM,EAAE,cAAc,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,GAAG,GAAG,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IAEjB,MAAM,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACjD,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB,CAAC;AAIF,eAAO,MAAM,MAAM,QAAO,SAAS,GAAG,GAmCrC,CAAC"}
|