@hyperauth/vue 0.1.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/dist/chains.d.ts +5 -0
- package/dist/chains.d.ts.map +1 -0
- package/dist/csp.d.ts +20 -0
- package/dist/csp.d.ts.map +1 -0
- package/dist/env.d.ts +7 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/iframe-bridge.d.ts +20 -0
- package/dist/iframe-bridge.d.ts.map +1 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4248 -0
- package/dist/index.js.map +59 -0
- package/dist/injection-key.d.ts +4 -0
- package/dist/injection-key.d.ts.map +1 -0
- package/dist/policy.d.ts +36 -0
- package/dist/policy.d.ts.map +1 -0
- package/dist/provider.d.ts +29 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/store.d.ts +8 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/types.d.ts +156 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/ui/button.d.ts +48 -0
- package/dist/ui/button.d.ts.map +1 -0
- package/dist/ui/index.d.ts +7 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/modal.d.ts +46 -0
- package/dist/ui/modal.d.ts.map +1 -0
- package/dist/ui/settlement-progress.d.ts +17 -0
- package/dist/ui/settlement-progress.d.ts.map +1 -0
- package/dist/use-account.d.ts +16 -0
- package/dist/use-account.d.ts.map +1 -0
- package/dist/use-hyperauth.d.ts +8 -0
- package/dist/use-hyperauth.d.ts.map +1 -0
- package/dist/use-login.d.ts +20 -0
- package/dist/use-login.d.ts.map +1 -0
- package/dist/use-policy-mint.d.ts +50 -0
- package/dist/use-policy-mint.d.ts.map +1 -0
- package/dist/use-policy-verify.d.ts +27 -0
- package/dist/use-policy-verify.d.ts.map +1 -0
- package/dist/use-registration.d.ts +14 -0
- package/dist/use-registration.d.ts.map +1 -0
- package/dist/use-session.d.ts +17 -0
- package/dist/use-session.d.ts.map +1 -0
- package/dist/use-settlement.d.ts +17 -0
- package/dist/use-settlement.d.ts.map +1 -0
- package/dist/use-signer.d.ts +19 -0
- package/dist/use-signer.d.ts.map +1 -0
- package/dist/use-store.d.ts +13 -0
- package/dist/use-store.d.ts.map +1 -0
- package/dist/use-transaction.d.ts +18 -0
- package/dist/use-transaction.d.ts.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"injection-key.d.ts","sourceRoot":"","sources":["../src/injection-key.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AACxC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,qBAAqB,CAAuB,CAAC"}
|
package/dist/policy.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { UcanPolicy } from './types';
|
|
2
|
+
import type { UCANPolicyPayload } from './use-policy-mint';
|
|
3
|
+
/**
|
|
4
|
+
* Parse a project policy UCAN. The token is a base64url JWT-like string with
|
|
5
|
+
* a JSON payload containing `aud`, `att` (capabilities), and `prf` (origins).
|
|
6
|
+
*
|
|
7
|
+
* Pure decoder — full UCAN signature verification happens inside the enclave.
|
|
8
|
+
* The Vue layer only ingests and surfaces metadata.
|
|
9
|
+
*/
|
|
10
|
+
export declare function parsePolicy(token: string): UcanPolicy;
|
|
11
|
+
export declare function assertOriginAllowed(policy: UcanPolicy, origin: string): void;
|
|
12
|
+
export interface PolicyFacts {
|
|
13
|
+
origins: string[];
|
|
14
|
+
chainId: number;
|
|
15
|
+
paymaster: string;
|
|
16
|
+
maxFeePerUserUsd: number;
|
|
17
|
+
}
|
|
18
|
+
export interface ParsedPolicyToken {
|
|
19
|
+
raw: string;
|
|
20
|
+
header: {
|
|
21
|
+
alg: string;
|
|
22
|
+
typ: string;
|
|
23
|
+
};
|
|
24
|
+
payload: UCANPolicyPayload;
|
|
25
|
+
signature: Uint8Array;
|
|
26
|
+
signedBytes: Uint8Array;
|
|
27
|
+
publicKeyHex: string;
|
|
28
|
+
}
|
|
29
|
+
export declare class PolicyTokenParseError extends Error {
|
|
30
|
+
constructor(message: string);
|
|
31
|
+
}
|
|
32
|
+
export declare function parsePolicyToken(raw: string): ParsedPolicyToken;
|
|
33
|
+
export declare function getPolicyFacts(payload: UCANPolicyPayload): PolicyFacts | null;
|
|
34
|
+
export declare function isPolicyExpired(payload: UCANPolicyPayload, nowSeconds?: number): boolean;
|
|
35
|
+
export declare function isOriginAllowedByFacts(facts: PolicyFacts, origin: string): boolean;
|
|
36
|
+
//# sourceMappingURL=policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../src/policy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAWrD;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAS5E;AAoDD,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IACrC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,SAAS,EAAE,UAAU,CAAC;IACtB,WAAW,EAAE,UAAU,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,qBAAsB,SAAQ,KAAK;gBAClC,OAAO,EAAE,MAAM;CAI5B;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB,CA4C/D;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,iBAAiB,GAAG,WAAW,GAAG,IAAI,CAc7E;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,iBAAiB,EAAE,UAAU,SAAoB,GAAG,OAAO,CAEnG;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAGlF"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type Plugin } from 'vue';
|
|
2
|
+
import type { ClientConfig } from '@hyperauth/client';
|
|
3
|
+
import type { HyperAuthPluginOptions, SupportedChain } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Vue plugin factory that boots the HyperAuth client + optional iframe bridge
|
|
6
|
+
* and provides the resulting context to all descendants.
|
|
7
|
+
*
|
|
8
|
+
* Usage (Vue 3):
|
|
9
|
+
*
|
|
10
|
+
* import { createApp } from 'vue';
|
|
11
|
+
* import { createHyperAuth } from '@hyperauth/vue';
|
|
12
|
+
*
|
|
13
|
+
* createApp(App)
|
|
14
|
+
* .use(createHyperAuth({ projectId: '...', chain: 'base' }))
|
|
15
|
+
* .mount('#app');
|
|
16
|
+
*
|
|
17
|
+
* Usage (Nuxt 3):
|
|
18
|
+
*
|
|
19
|
+
* // plugins/hyperauth.client.ts
|
|
20
|
+
* export default defineNuxtPlugin((nuxtApp) => {
|
|
21
|
+
* nuxtApp.vueApp.use(createHyperAuth({ projectId: '...' }));
|
|
22
|
+
* });
|
|
23
|
+
*
|
|
24
|
+
* SSR-safe: client boot is gated on `isBrowser()`. On the server the context
|
|
25
|
+
* resolves to `{ client: null, status: 'initializing' }`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function createHyperAuth(options?: HyperAuthPluginOptions): Plugin;
|
|
28
|
+
export type { ClientConfig, SupportedChain };
|
|
29
|
+
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,MAAM,EAAE,MAAM,KAAK,CAAC;AAEtD,OAAO,KAAK,EAAE,YAAY,EAAmB,MAAM,mBAAmB,CAAC;AAMvE,OAAO,KAAK,EAEV,sBAAsB,EAGtB,cAAc,EACf,MAAM,SAAS,CAAC;AAIjB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,eAAe,CAAC,OAAO,GAAE,sBAA2B,GAAG,MAAM,CAqH5E;AAcD,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC"}
|
package/dist/store.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Store, StoreState } from './types';
|
|
2
|
+
export declare const initialState: StoreState;
|
|
3
|
+
/**
|
|
4
|
+
* Framework-agnostic external store. Identical in shape to the React package's
|
|
5
|
+
* store — composables in `use-store.ts` adapt it to Vue's reactivity system.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createStore(seed?: Partial<StoreState>): Store;
|
|
8
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEjD,eAAO,MAAM,YAAY,EAAE,UAyB1B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,GAAE,OAAO,CAAC,UAAU,CAAM,GAAG,KAAK,CAkBjE"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import type { HyperAuthClient, ClientConfig, AccountState, EncryptedShares, UserOp } from '@hyperauth/client';
|
|
2
|
+
export type HyperAuthStatus = 'initializing' | 'ready' | 'error' | 'restarting';
|
|
3
|
+
export type AuthStatus = 'unauthenticated' | 'authenticating' | 'authenticated' | 'expired' | 'error';
|
|
4
|
+
export type ProviderKind = 'webauthn' | 'session-key' | 'recovery' | 'unknown';
|
|
5
|
+
export type SupportedChain = 'base' | 'base-sepolia' | 'monad' | 'ethereum';
|
|
6
|
+
export interface User {
|
|
7
|
+
did: string;
|
|
8
|
+
alias?: string;
|
|
9
|
+
enclaveId: string;
|
|
10
|
+
publicKeyHex: string;
|
|
11
|
+
pubkeyX: string;
|
|
12
|
+
pubkeyY: string;
|
|
13
|
+
ethAddress: string;
|
|
14
|
+
smartAccountAddress: string;
|
|
15
|
+
credentialId: string;
|
|
16
|
+
shares?: EncryptedShares;
|
|
17
|
+
}
|
|
18
|
+
/** Legacy identity shape preserved for `useRegistration` consumers. */
|
|
19
|
+
export interface IdentityState {
|
|
20
|
+
did: string;
|
|
21
|
+
enclaveId: string;
|
|
22
|
+
publicKey: string;
|
|
23
|
+
publicKeyHex?: string;
|
|
24
|
+
pubkeyX: string;
|
|
25
|
+
pubkeyY: string;
|
|
26
|
+
ethAddress: string;
|
|
27
|
+
smartAccountAddress: string;
|
|
28
|
+
credentialId: string;
|
|
29
|
+
encryptedShares?: EncryptedShares;
|
|
30
|
+
}
|
|
31
|
+
export interface SessionKey {
|
|
32
|
+
token: string;
|
|
33
|
+
audience: string;
|
|
34
|
+
commands: string[];
|
|
35
|
+
expiresAt: number;
|
|
36
|
+
spendCapWei?: bigint;
|
|
37
|
+
txCap?: number;
|
|
38
|
+
txCount: number;
|
|
39
|
+
}
|
|
40
|
+
export interface CreateSessionOptions {
|
|
41
|
+
audience?: string;
|
|
42
|
+
commands?: string[];
|
|
43
|
+
ttlSeconds?: number;
|
|
44
|
+
spendCapWei?: bigint;
|
|
45
|
+
txCap?: number;
|
|
46
|
+
}
|
|
47
|
+
export interface TransactionIntent {
|
|
48
|
+
to: `0x${string}`;
|
|
49
|
+
value?: bigint;
|
|
50
|
+
data?: `0x${string}`;
|
|
51
|
+
rawCallData?: `0x${string}`;
|
|
52
|
+
}
|
|
53
|
+
export type TransactionPhase = 'idle' | 'building' | 'sponsoring' | 'signing' | 'submitting' | 'confirming' | 'confirmed' | 'error';
|
|
54
|
+
export interface TransactionResult {
|
|
55
|
+
userOpHash: string;
|
|
56
|
+
txHash: string | null;
|
|
57
|
+
blockNumber: number | null;
|
|
58
|
+
sponsored: boolean;
|
|
59
|
+
}
|
|
60
|
+
export type SettlementPhase = 'idle' | 'capturing-fiat' | 'auditing' | 'minting' | 'finalizing' | 'complete' | 'error';
|
|
61
|
+
export interface SettlementStep {
|
|
62
|
+
phase: SettlementPhase;
|
|
63
|
+
label: string;
|
|
64
|
+
status: 'pending' | 'active' | 'done' | 'error';
|
|
65
|
+
detail?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface SettlementParams {
|
|
68
|
+
amount: number;
|
|
69
|
+
currency: 'USD' | 'EUR' | 'GBP';
|
|
70
|
+
sessionToken?: string;
|
|
71
|
+
recipient?: `0x${string}`;
|
|
72
|
+
onSuccess?: (txHash: string) => void;
|
|
73
|
+
onError?: (err: Error) => void;
|
|
74
|
+
}
|
|
75
|
+
export interface SettlementState {
|
|
76
|
+
phase: SettlementPhase;
|
|
77
|
+
steps: SettlementStep[];
|
|
78
|
+
params: SettlementParams | null;
|
|
79
|
+
txHash: string | null;
|
|
80
|
+
error: string | null;
|
|
81
|
+
}
|
|
82
|
+
export interface UcanPolicy {
|
|
83
|
+
token: string;
|
|
84
|
+
allowedOrigins: string[];
|
|
85
|
+
capabilities: string[];
|
|
86
|
+
}
|
|
87
|
+
export interface HyperAuthPluginOptions {
|
|
88
|
+
/** Project policy UCAN token. Required in production. */
|
|
89
|
+
projectId?: string;
|
|
90
|
+
/** Default chain. */
|
|
91
|
+
chain?: SupportedChain;
|
|
92
|
+
/** Override the SDK client config. */
|
|
93
|
+
config?: ClientConfig;
|
|
94
|
+
/**
|
|
95
|
+
* If set and not equal to `window.location.origin`, the enclave is hosted
|
|
96
|
+
* inside a hidden iframe at this origin. This is the COOP/COEP-free path.
|
|
97
|
+
*/
|
|
98
|
+
enclaveOrigin?: string;
|
|
99
|
+
/** Maximum silent restart attempts after a worker crash. Default 3. */
|
|
100
|
+
maxRestartAttempts?: number;
|
|
101
|
+
/** Disable auto-restart entirely (useful for tests). */
|
|
102
|
+
autoRestart?: boolean;
|
|
103
|
+
}
|
|
104
|
+
export interface HyperAuthContextValue {
|
|
105
|
+
client: HyperAuthClient | null;
|
|
106
|
+
status: HyperAuthStatus;
|
|
107
|
+
error: Error | null;
|
|
108
|
+
isReady: boolean;
|
|
109
|
+
user: User | null;
|
|
110
|
+
address: `0x${string}` | null;
|
|
111
|
+
authStatus: AuthStatus;
|
|
112
|
+
session: SessionKey | null;
|
|
113
|
+
provider: ProviderKind;
|
|
114
|
+
policy: UcanPolicy | null;
|
|
115
|
+
chain: SupportedChain;
|
|
116
|
+
store: Store;
|
|
117
|
+
}
|
|
118
|
+
/** Shared mutable state surface that backs all composables. */
|
|
119
|
+
export interface StoreState {
|
|
120
|
+
client: HyperAuthClient | null;
|
|
121
|
+
status: HyperAuthStatus;
|
|
122
|
+
error: Error | null;
|
|
123
|
+
user: User | null;
|
|
124
|
+
authStatus: AuthStatus;
|
|
125
|
+
session: SessionKey | null;
|
|
126
|
+
provider: ProviderKind;
|
|
127
|
+
policy: UcanPolicy | null;
|
|
128
|
+
chain: SupportedChain;
|
|
129
|
+
pendingTransaction: {
|
|
130
|
+
phase: TransactionPhase;
|
|
131
|
+
error: string | null;
|
|
132
|
+
result: TransactionResult | null;
|
|
133
|
+
userOp: UserOp | null;
|
|
134
|
+
};
|
|
135
|
+
settlement: SettlementState;
|
|
136
|
+
accountState: AccountState | null;
|
|
137
|
+
restartAttempts: number;
|
|
138
|
+
}
|
|
139
|
+
export interface Store {
|
|
140
|
+
getState: () => StoreState;
|
|
141
|
+
setState: (patch: Partial<StoreState> | ((s: StoreState) => Partial<StoreState>)) => void;
|
|
142
|
+
subscribe: (listener: () => void) => () => void;
|
|
143
|
+
}
|
|
144
|
+
export type RegistrationPhase = 'idle' | 'checking-alias' | 'creating-passkey' | 'generating-identity' | 'predicting-account' | 'fetching-account-state' | 'creating-registration' | 'sponsoring' | 'authorizing' | 'signing' | 'submitting' | 'confirming' | 'storing-session' | 'complete' | 'error';
|
|
145
|
+
export interface RegistrationOutcome {
|
|
146
|
+
did: string;
|
|
147
|
+
txHash: string;
|
|
148
|
+
blockNumber: number | null;
|
|
149
|
+
smartAccount: string;
|
|
150
|
+
}
|
|
151
|
+
export interface RegistrationStep {
|
|
152
|
+
label: string;
|
|
153
|
+
status: 'pending' | 'active' | 'done' | 'error';
|
|
154
|
+
detail?: string;
|
|
155
|
+
}
|
|
156
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,MAAM,EACP,MAAM,mBAAmB,CAAC;AAM3B,MAAM,MAAM,eAAe,GACvB,cAAc,GACd,OAAO,GACP,OAAO,GACP,YAAY,CAAC;AAEjB,MAAM,MAAM,UAAU,GAClB,iBAAiB,GACjB,gBAAgB,GAChB,eAAe,GACf,SAAS,GACT,OAAO,CAAC;AAEZ,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,aAAa,GAAG,UAAU,GAAG,SAAS,CAAC;AAE/E,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,cAAc,GAAG,OAAO,GAAG,UAAU,CAAC;AAM5E,MAAM,WAAW,IAAI;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,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
1
|
+
import { type ButtonHTMLAttributes, type PropType } from 'vue';
|
|
2
|
+
export interface ButtonProps extends /* @vue-ignore */ ButtonHTMLAttributes {
|
|
3
|
+
loading?: boolean;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Headless button — renders a native `<button>` with a `loading` data
|
|
7
|
+
* attribute and `aria-busy`. The default slot renders the children;
|
|
8
|
+
* the `loading` slot, if present, renders while `loading === true`.
|
|
9
|
+
*
|
|
10
|
+
* <Button :loading="isPending" @click="submit">
|
|
11
|
+
* Sign
|
|
12
|
+
* <template #loading>Signing…</template>
|
|
13
|
+
* </Button>
|
|
14
|
+
*/
|
|
15
|
+
export declare const Button: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
16
|
+
loading: {
|
|
17
|
+
type: PropType<boolean>;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
disabled: {
|
|
21
|
+
type: PropType<boolean>;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
type: {
|
|
25
|
+
type: PropType<"button" | "submit" | "reset">;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
29
|
+
[key: string]: any;
|
|
30
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
31
|
+
loading: {
|
|
32
|
+
type: PropType<boolean>;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
disabled: {
|
|
36
|
+
type: PropType<boolean>;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
type: {
|
|
40
|
+
type: PropType<"button" | "submit" | "reset">;
|
|
41
|
+
default: string;
|
|
42
|
+
};
|
|
43
|
+
}>> & Readonly<{}>, {
|
|
44
|
+
type: "button" | "reset" | "submit";
|
|
45
|
+
loading: boolean;
|
|
46
|
+
disabled: boolean;
|
|
47
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
48
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/ui/button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,oBAAoB,EAAE,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AAEnF,MAAM,WAAW,WAAY,SAAQ,iBAAiB,CAAC,oBAAoB;IACzE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM;;cAGa,QAAQ,CAAC,OAAO,CAAC;;;;cAChB,QAAQ,CAAC,OAAO,CAAC;;;;cACtB,QAAQ,CAAC,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;;;;;;;cAFnC,QAAQ,CAAC,OAAO,CAAC;;;;cAChB,QAAQ,CAAC,OAAO,CAAC;;;;cACtB,QAAQ,CAAC,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;;;;;;;4EAkBjE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Button } from './button';
|
|
2
|
+
export type { ButtonProps } from './button';
|
|
3
|
+
export { Modal, ModalBackdrop, ModalContent, ModalClose } from './modal';
|
|
4
|
+
export type { ModalProps, ModalBackdropProps, ModalContentProps, ModalCloseProps } from './modal';
|
|
5
|
+
export { SettlementProgress } from './settlement-progress';
|
|
6
|
+
export type { SettlementProgressProps } from './settlement-progress';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACzE,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAClG,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,YAAY,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
export interface ModalProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
modal?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const Modal: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
7
|
+
open: {
|
|
8
|
+
type: PropType<boolean>;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
modal: {
|
|
12
|
+
type: PropType<boolean>;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}>[] | null | undefined, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:open"[], "update:open", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
+
open: {
|
|
19
|
+
type: PropType<boolean>;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
modal: {
|
|
23
|
+
type: PropType<boolean>;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
26
|
+
}>> & Readonly<{
|
|
27
|
+
"onUpdate:open"?: ((...args: any[]) => any) | undefined;
|
|
28
|
+
}>, {
|
|
29
|
+
modal: boolean;
|
|
30
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
31
|
+
export interface ModalBackdropProps {
|
|
32
|
+
}
|
|
33
|
+
export declare const ModalBackdrop: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
34
|
+
[key: string]: any;
|
|
35
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
36
|
+
export interface ModalContentProps {
|
|
37
|
+
}
|
|
38
|
+
export declare const ModalContent: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
39
|
+
[key: string]: any;
|
|
40
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
41
|
+
export interface ModalCloseProps {
|
|
42
|
+
}
|
|
43
|
+
export declare const ModalClose: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
44
|
+
[key: string]: any;
|
|
45
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
46
|
+
//# sourceMappingURL=modal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../src/ui/modal.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,QAAQ,EAEd,MAAM,KAAK,CAAC;AAgCb,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,KAAK;;cAGW,QAAQ,CAAC,OAAO,CAAC;;;;cAChB,QAAQ,CAAC,OAAO,CAAC;;;;;;;cADlB,QAAQ,CAAC,OAAO,CAAC;;;;cAChB,QAAQ,CAAC,OAAO,CAAC;;;;;;;4EA8C7C,CAAC;AAEH,MAAM,WAAW,kBAAkB;CAElC;AAED,eAAO,MAAM,aAAa;;2OAcxB,CAAC;AAEH,MAAM,WAAW,iBAAiB;CAAG;AAErC,eAAO,MAAM,YAAY;;2OAiCvB,CAAC;AAEH,MAAM,WAAW,eAAe;CAAG;AAEnC,eAAO,MAAM,UAAU;;2OAkBrB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface SettlementProgressProps {
|
|
2
|
+
}
|
|
3
|
+
/**
|
|
4
|
+
* Headless settlement progress component. With no slots, renders a minimal
|
|
5
|
+
* unstyled `<ol>` reflecting the current settlement state. Use the `default`
|
|
6
|
+
* slot to take over rendering completely:
|
|
7
|
+
*
|
|
8
|
+
* <SettlementProgress v-slot="{ steps, phase, error, txHash }">
|
|
9
|
+
* <MyCustomProgress :steps="steps" :phase="phase" />
|
|
10
|
+
* </SettlementProgress>
|
|
11
|
+
*/
|
|
12
|
+
export declare const SettlementProgress: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
}> | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}>[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
17
|
+
//# sourceMappingURL=settlement-progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settlement-progress.d.ts","sourceRoot":"","sources":["../../src/ui/settlement-progress.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,uBAAuB;CAAG;AAE3C;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB;;;;6OA8C7B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ComputedRef } from 'vue';
|
|
2
|
+
import type { AccountState } from '@hyperauth/client';
|
|
3
|
+
export interface UseAccountReturn {
|
|
4
|
+
/** Counterfactual smart account address — available pre-deployment. */
|
|
5
|
+
address: ComputedRef<`0x${string}` | null>;
|
|
6
|
+
/** EOA address derived from the enclave-held key. */
|
|
7
|
+
ethAddress: ComputedRef<`0x${string}` | null>;
|
|
8
|
+
/** On-chain account state (nonce, deployed). */
|
|
9
|
+
state: ComputedRef<AccountState | null>;
|
|
10
|
+
/** True once the smart account has been deployed on-chain. */
|
|
11
|
+
isDeployed: ComputedRef<boolean>;
|
|
12
|
+
/** Force-refresh the on-chain state. */
|
|
13
|
+
refresh: () => Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
export declare function useAccount(): UseAccountReturn;
|
|
16
|
+
//# sourceMappingURL=use-account.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-account.d.ts","sourceRoot":"","sources":["../src/use-account.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,KAAK,CAAC;AAGxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAStD,MAAM,WAAW,gBAAgB;IAC/B,uEAAuE;IACvE,OAAO,EAAE,WAAW,CAAC,KAAK,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;IAC3C,qDAAqD;IACrD,UAAU,EAAE,WAAW,CAAC,KAAK,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;IAC9C,gDAAgD;IAChD,KAAK,EAAE,WAAW,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;IACxC,8DAA8D;IAC9D,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IACjC,wCAAwC;IACxC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED,wBAAgB,UAAU,IAAI,gBAAgB,CAkC7C"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { HyperAuthContextValue } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Access the HyperAuth context provided by `createHyperAuth()`. The returned
|
|
4
|
+
* object is reactive — destructure fields directly in `<script setup>` and
|
|
5
|
+
* they update whenever the underlying store mutates.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useHyperAuth(): HyperAuthContextValue;
|
|
8
|
+
//# sourceMappingURL=use-hyperauth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-hyperauth.d.ts","sourceRoot":"","sources":["../src/use-hyperauth.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,qBAAqB,CAMpD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ComputedRef } from 'vue';
|
|
2
|
+
import type { User } from './types';
|
|
3
|
+
export interface LoginOptions {
|
|
4
|
+
/** Optional alias hint passed to the WebAuthn ceremony. */
|
|
5
|
+
alias?: string;
|
|
6
|
+
/** RP ID override; defaults to the SDK's configured RP. */
|
|
7
|
+
rpId?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface UseLoginReturn {
|
|
10
|
+
login: (opts?: LoginOptions) => Promise<User>;
|
|
11
|
+
logout: () => Promise<void>;
|
|
12
|
+
isAuthenticating: ComputedRef<boolean>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Drives the WebAuthn ceremony and updates the shared store. The SDK's
|
|
16
|
+
* `authenticatePasskey` returns the credential id; the enclave then runs
|
|
17
|
+
* deterministic key derivation in `generate()` to recover the same DID.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useLogin(): UseLoginReturn;
|
|
20
|
+
//# sourceMappingURL=use-login.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-login.d.ts","sourceRoot":"","sources":["../src/use-login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,KAAK,CAAC;AAKjD,OAAO,KAAK,EAAc,IAAI,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,WAAW,YAAY;IAC3B,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,CAAC,IAAI,CAAC,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,gBAAgB,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACxC;AAID;;;;GAIG;AACH,wBAAgB,QAAQ,IAAI,cAAc,CAyEzC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
2
|
+
export interface PolicyParams {
|
|
3
|
+
origins: string[];
|
|
4
|
+
chainId: number;
|
|
5
|
+
paymaster: string;
|
|
6
|
+
maxFeePerUserUsd: number;
|
|
7
|
+
}
|
|
8
|
+
export interface UCANPolicyPayload {
|
|
9
|
+
iss: string;
|
|
10
|
+
aud: string;
|
|
11
|
+
exp: number;
|
|
12
|
+
cap: Array<{
|
|
13
|
+
with: string;
|
|
14
|
+
can: string;
|
|
15
|
+
}>;
|
|
16
|
+
fct: Array<Record<string, unknown>>;
|
|
17
|
+
prf: string[];
|
|
18
|
+
nnc: string;
|
|
19
|
+
}
|
|
20
|
+
export type PolicyMintStatus = 'idle' | 'minting' | 'minted' | 'error';
|
|
21
|
+
export interface UsePolicyMintOptions {
|
|
22
|
+
wasmUrl?: string;
|
|
23
|
+
audience?: string;
|
|
24
|
+
expirySeconds?: number;
|
|
25
|
+
}
|
|
26
|
+
export interface UsePolicyMintReturn {
|
|
27
|
+
mint: (params: PolicyParams) => Promise<void>;
|
|
28
|
+
reset: () => void;
|
|
29
|
+
status: Ref<PolicyMintStatus>;
|
|
30
|
+
token: Ref<string | null>;
|
|
31
|
+
payload: Ref<UCANPolicyPayload | null>;
|
|
32
|
+
error: ComputedRef<Error | null>;
|
|
33
|
+
ready: Ref<boolean>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Mints a UCAN 0.10.0 project policy for dApp integration.
|
|
37
|
+
*
|
|
38
|
+
* The signing key is a per-session in-memory keypair generated by the
|
|
39
|
+
* enclave's MPC ceremony. Policies issued this way are demo-grade — production
|
|
40
|
+
* code should sign with a real user-controlled DID via
|
|
41
|
+
* `useHyperAuth().client.mintUcan`.
|
|
42
|
+
*/
|
|
43
|
+
export declare function usePolicyMint(options?: UsePolicyMintOptions): UsePolicyMintReturn;
|
|
44
|
+
/**
|
|
45
|
+
* Live preview helper — produces the exact payload `mint()` will send.
|
|
46
|
+
* Uses a placeholder issuer DID since the real demo DID is generated on
|
|
47
|
+
* first mint.
|
|
48
|
+
*/
|
|
49
|
+
export declare function buildPolicyPreview(params: PolicyParams, options?: UsePolicyMintOptions): Promise<UCANPolicyPayload>;
|
|
50
|
+
//# sourceMappingURL=use-policy-mint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-policy-mint.d.ts","sourceRoot":"","sources":["../src/use-policy-mint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,WAAW,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAIhE,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ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
import { type ParsedPolicyToken } from './policy';
|
|
3
|
+
export type PolicyVerifyStatus = 'idle' | 'verifying' | 'valid' | 'invalid' | 'error';
|
|
4
|
+
export interface UsePolicyVerifyOptions {
|
|
5
|
+
/** Override the enclave WASM URL (defaults to the SDK's CDN). */
|
|
6
|
+
wasmUrl?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface UsePolicyVerifyReturn {
|
|
9
|
+
verify: (rawToken: string) => Promise<void>;
|
|
10
|
+
reset: () => void;
|
|
11
|
+
status: Ref<PolicyVerifyStatus>;
|
|
12
|
+
/** Parsed token payload — populated as soon as parsing succeeds. */
|
|
13
|
+
parsed: Ref<ParsedPolicyToken | null>;
|
|
14
|
+
/** True iff the signer's `verify` returned `{ valid: true }`. */
|
|
15
|
+
signatureValid: Ref<boolean | null>;
|
|
16
|
+
error: ComputedRef<Error | null>;
|
|
17
|
+
/** True once the underlying signer worker has booted. */
|
|
18
|
+
ready: Ref<boolean>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Parses a UCAN 0.10.0 policy token minted by `usePolicyMint` and verifies
|
|
22
|
+
* its envelope signature against the issuer's `did:key`. The signer worker
|
|
23
|
+
* performs the cryptography; this composable handles the JWT-style unwrap
|
|
24
|
+
* and the DAG-CBOR re-encoding of the inner sig payload.
|
|
25
|
+
*/
|
|
26
|
+
export declare function usePolicyVerify(options?: UsePolicyVerifyOptions): UsePolicyVerifyReturn;
|
|
27
|
+
//# sourceMappingURL=use-policy-verify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-policy-verify.d.ts","sourceRoot":"","sources":["../src/use-policy-verify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,WAAW,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAEhE,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAEtF,MAAM,WAAW,sBAAsB;IACrC,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,MAAM,EAAE,GAAG,CAAC,kBAAkB,CAAC,CAAC;IAChC,oEAAoE;IACpE,MAAM,EAAE,GAAG,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACtC,iEAAiE;IACjE,cAAc,EAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IACpC,KAAK,EAAE,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;IACjC,yDAAyD;IACzD,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,OAAO,GAAE,sBAA2B,GACnC,qBAAqB,CAqEvB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
2
|
+
import type { IdentityState, RegistrationPhase, RegistrationOutcome, RegistrationStep } from './types';
|
|
3
|
+
export interface UseRegistrationReturn {
|
|
4
|
+
phase: Ref<RegistrationPhase>;
|
|
5
|
+
steps: Ref<RegistrationStep[]>;
|
|
6
|
+
identity: Ref<IdentityState | null>;
|
|
7
|
+
result: Ref<RegistrationOutcome | null>;
|
|
8
|
+
error: Ref<string | null>;
|
|
9
|
+
isRegistering: ComputedRef<boolean>;
|
|
10
|
+
register: (alias: string) => Promise<void>;
|
|
11
|
+
reset: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function useRegistration(): UseRegistrationReturn;
|
|
14
|
+
//# sourceMappingURL=use-registration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-registration.d.ts","sourceRoot":"","sources":["../src/use-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,WAAW,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAEhE,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAoCjB,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAC9B,KAAK,EAAE,GAAG,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAC/B,QAAQ,EAAE,GAAG,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IACpC,MAAM,EAAE,GAAG,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;IACxC,KAAK,EAAE,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC1B,aAAa,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IACpC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,wBAAgB,eAAe,IAAI,qBAAqB,CA8YvD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ComputedRef } from 'vue';
|
|
2
|
+
import type { CreateSessionOptions, SessionKey } from './types';
|
|
3
|
+
export interface UseSessionReturn {
|
|
4
|
+
session: ComputedRef<SessionKey | null>;
|
|
5
|
+
isExpired: ComputedRef<boolean>;
|
|
6
|
+
remainingMs: ComputedRef<number>;
|
|
7
|
+
create: (opts?: CreateSessionOptions) => Promise<SessionKey>;
|
|
8
|
+
revoke: () => void;
|
|
9
|
+
recordTx: () => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* UCAN-based session keys. A session delegates signing authority from the
|
|
13
|
+
* user's smart account to the dApp for a bounded window — eliminating
|
|
14
|
+
* repetitive FaceID prompts for sub-cap, in-window transactions.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useSession(): UseSessionReturn;
|
|
17
|
+
//# sourceMappingURL=use-session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-session.d.ts","sourceRoot":"","sources":["../src/use-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,KAAK,CAAC;AAKjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,UAAU,EAAc,MAAM,SAAS,CAAC;AAO5E,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,WAAW,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IACxC,SAAS,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAChC,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,oBAAoB,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IAC7D,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,IAAI,gBAAgB,CAqE7C"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ComputedRef } from 'vue';
|
|
2
|
+
import type { SettlementParams, SettlementPhase, SettlementStep } from './types';
|
|
3
|
+
export interface UseSettlementReturn {
|
|
4
|
+
phase: ComputedRef<SettlementPhase>;
|
|
5
|
+
steps: ComputedRef<SettlementStep[]>;
|
|
6
|
+
params: ComputedRef<SettlementParams | null>;
|
|
7
|
+
txHash: ComputedRef<string | null>;
|
|
8
|
+
error: ComputedRef<string | null>;
|
|
9
|
+
settle: (params: SettlementParams) => Promise<string>;
|
|
10
|
+
reset: () => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* High-level settlement flow: Apple Pay → fiat-on-ramp → audit → CCTP mint
|
|
14
|
+
* → on-chain finality.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useSettlement(): UseSettlementReturn;
|
|
17
|
+
//# sourceMappingURL=use-settlement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-settlement.d.ts","sourceRoot":"","sources":["../src/use-settlement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,KAAK,CAAC;AAIjD,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,cAAc,EAEf,MAAM,SAAS,CAAC;AAWjB,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,WAAW,CAAC,eAAe,CAAC,CAAC;IACpC,KAAK,EAAE,WAAW,CAAC,cAAc,EAAE,CAAC,CAAC;IACrC,MAAM,EAAE,WAAW,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IAC7C,MAAM,EAAE,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACnC,KAAK,EAAE,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAClC,MAAM,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACtD,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,mBAAmB,CAuGnD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import { type CreateSignerBridgeOptions, type SignerProxy } from '@hyperauth/client';
|
|
3
|
+
export interface UseSignerReturn {
|
|
4
|
+
signer: Ref<SignerProxy | null>;
|
|
5
|
+
ready: Ref<boolean>;
|
|
6
|
+
error: Ref<Error | null>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Spawns a HyperAuth signer Dedicated Worker (loads `enclave.wasm`) and
|
|
10
|
+
* returns a Comlink proxy of `SignerApi`. The worker is created on first
|
|
11
|
+
* mount of the consuming effect scope and terminated when the scope is
|
|
12
|
+
* disposed.
|
|
13
|
+
*
|
|
14
|
+
* For end-user authenticated flows use `createHyperAuth()` + `useHyperAuth()`
|
|
15
|
+
* — those manage signer + vault together. `useSigner` is the bare-bones
|
|
16
|
+
* primitive for tools that only need a stateless signer (e.g. policy builders).
|
|
17
|
+
*/
|
|
18
|
+
export declare function useSigner(options?: CreateSignerBridgeOptions): UseSignerReturn;
|
|
19
|
+
//# sourceMappingURL=use-signer.d.ts.map
|