@seams/wallet 0.9.0 → 0.9.1
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 +3 -3
- package/dist/.build-inputs.sha256 +1 -1
- package/dist/esm/core/signingEngine/chains/evm/bytes.js +15 -1
- package/dist/esm/core/signingEngine/flows/signEvmFamily/signingFlow.js +1 -1
- package/dist/esm/core/signingEngine/flows/signNear/shared/ed25519YaoNormalSigning.js +84 -38
- package/dist/esm/core/signingEngine/flows/signNear/signTransactions.js +49 -2
- package/dist/esm/core/signingEngine/uiConfirm/ui/transaction-display/abi/abiDecode.js +315 -0
- package/dist/esm/core/signingEngine/uiConfirm/ui/transaction-display/abi/enrichDisplayModelWithAbi.js +77 -0
- package/dist/esm/core/signingEngine/uiConfirm/ui/transaction-display/formatters.js +10 -1
- package/dist/esm/core/signingEngine/uiConfirm/ui/transaction-display/renderers/fallback.js +52 -0
- package/dist/esm/core/signingEngine/uiConfirm/ui/transaction-display/renderers/types.js +62 -0
- package/dist/esm/core/signingEngine/uiConfirm/ui/transaction-display/tree.js +249 -0
- package/dist/esm/sdk/{host-B1CdRGoI.js → host-c1__wJwz.js} +1 -1
- package/dist/esm/sdk/{runtime-auth-tgfe70hU.js → runtime-auth-BKFyLISf.js} +1 -1
- package/dist/{public/sdk/runtime-device-link-BUxuQupR.js → esm/sdk/runtime-device-link-ENxdEXQW.js} +1 -1
- package/dist/{public/sdk/runtime-ecdsa-tempo-DOBk_EtI.js → esm/sdk/runtime-ecdsa-tempo-DhGEb9U7.js} +1 -1
- package/dist/esm/sdk/{runtime-email-otp-CsAJKvYC.js → runtime-email-otp-dgsP7XZi.js} +1 -1
- package/dist/esm/sdk/{runtime-export-7REbcnBl.js → runtime-export-D2RCm5Gk.js} +1 -1
- package/dist/esm/sdk/{runtime-near-BA0DQf6H.js → runtime-near-Bf-9MFBQ.js} +1 -1
- package/dist/esm/sdk/{runtime-preferences-cRViPE8a.js → runtime-preferences-LQ8SPE7o.js} +1 -1
- package/dist/esm/sdk/{runtime-recovery-RRc8Yz1y.js → runtime-recovery-BuEzJzuZ.js} +1 -1
- package/dist/esm/sdk/shared-8ffIBYw2.js +6 -0
- package/dist/esm/sdk/signNear-BhTkDm2-.js +1 -0
- package/dist/esm/sdk/wallet-iframe-host-ecdsa.js +1 -1
- package/dist/esm/sdk/wallet-iframe-host-full.js +1 -1
- package/dist/esm/sdk/wallet-iframe-host-near.js +1 -1
- package/dist/esm/sdk/wallet-iframe-host-runtime.js +1 -1
- package/dist/esm/utils/intentDigest.js +59 -1
- package/dist/public/headers.manifest.json +1 -1
- package/dist/public/sdk/{host-B1CdRGoI.js → host-c1__wJwz.js} +1 -1
- package/dist/public/sdk/{runtime-auth-tgfe70hU.js → runtime-auth-BKFyLISf.js} +1 -1
- package/dist/{esm/sdk/runtime-device-link-BUxuQupR.js → public/sdk/runtime-device-link-ENxdEXQW.js} +1 -1
- package/dist/{esm/sdk/runtime-ecdsa-tempo-DOBk_EtI.js → public/sdk/runtime-ecdsa-tempo-DhGEb9U7.js} +1 -1
- package/dist/public/sdk/{runtime-email-otp-CsAJKvYC.js → runtime-email-otp-dgsP7XZi.js} +1 -1
- package/dist/public/sdk/{runtime-export-7REbcnBl.js → runtime-export-D2RCm5Gk.js} +1 -1
- package/dist/public/sdk/{runtime-near-BA0DQf6H.js → runtime-near-Bf-9MFBQ.js} +1 -1
- package/dist/public/sdk/{runtime-preferences-cRViPE8a.js → runtime-preferences-LQ8SPE7o.js} +1 -1
- package/dist/public/sdk/{runtime-recovery-RRc8Yz1y.js → runtime-recovery-BuEzJzuZ.js} +1 -1
- package/dist/public/sdk/shared-8ffIBYw2.js +6 -0
- package/dist/public/sdk/signNear-BhTkDm2-.js +1 -0
- package/dist/public/sdk/wallet-iframe-host-ecdsa.js +1 -1
- package/dist/public/sdk/wallet-iframe-host-full.js +1 -1
- package/dist/public/sdk/wallet-iframe-host-near.js +1 -1
- package/dist/public/sdk/wallet-iframe-host-runtime.js +1 -1
- package/dist/public/wallet-assets.manifest.json +26 -26
- package/dist/public/wallet-service/index.html +4 -4
- package/dist/types/wallet/src/core/signingEngine/flows/signNear/shared/ed25519YaoNormalSigning.d.ts +16 -4
- package/dist/types/wallet/src/core/signingEngine/flows/signNear/shared/signatureOnlySigning.d.ts +3 -3
- package/dist/types/wallet/src/core/signingEngine/nonce/nearTransactionReadiness.d.ts +3 -0
- package/dist/types/wallet/src/core/signingEngine/stepUpConfirmation/confirmOperation.d.ts +3 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/handlers/flows/signing.d.ts +2 -0
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/handlers/handlePromptFromWorker.d.ts +2 -0
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/uiConfirm.types.d.ts +3 -0
- package/package.json +1 -1
- package/dist/esm/sdk/shared-DdfxBUGY.js +0 -6
- package/dist/esm/sdk/signNear-CO5bx24Z.js +0 -1
- package/dist/public/sdk/shared-DdfxBUGY.js +0 -6
- package/dist/public/sdk/signNear-CO5bx24Z.js +0 -1
package/dist/types/wallet/src/core/signingEngine/flows/signNear/shared/ed25519YaoNormalSigning.d.ts
CHANGED
|
@@ -78,7 +78,7 @@ type Ed25519PrepareSessionResult = Awaited<ReturnType<typeof prepareRouterAbNorm
|
|
|
78
78
|
* digest the dialog shows and to the signing digest, so the signature after
|
|
79
79
|
* the confirmation can only use it for the same operation.
|
|
80
80
|
*/
|
|
81
|
-
export type
|
|
81
|
+
export type RouterAbEd25519StartedPrepare = {
|
|
82
82
|
readonly prepare: RouterAbNormalSigningPrepareRequestV2BuildResult;
|
|
83
83
|
readonly displayDigest: string;
|
|
84
84
|
readonly signingDigestB64u: string;
|
|
@@ -103,7 +103,7 @@ type RouterAbEd25519SignatureOnlyNormalSigningArgs = RouterAbEd25519SignatureOnl
|
|
|
103
103
|
authorization: {
|
|
104
104
|
kind: 'reusable_wallet_session';
|
|
105
105
|
};
|
|
106
|
-
startedPrepare?:
|
|
106
|
+
startedPrepare?: RouterAbEd25519StartedPrepare;
|
|
107
107
|
} | {
|
|
108
108
|
materialFacts: NearEd25519YaoOperationMaterialFacts;
|
|
109
109
|
walletSessionState?: never;
|
|
@@ -163,9 +163,9 @@ type RouterAbEd25519SignatureOnlyWarmArgs = RouterAbEd25519SignatureOnlyNormalSi
|
|
|
163
163
|
* signature; a result that is never passed on expires with its lease and
|
|
164
164
|
* keeps the quota use it claimed.
|
|
165
165
|
*/
|
|
166
|
-
export declare function startRouterAbEd25519SignatureOnlyPrepare(args: RouterAbEd25519SignatureOnlyWarmArgs): Promise<
|
|
166
|
+
export declare function startRouterAbEd25519SignatureOnlyPrepare(args: RouterAbEd25519SignatureOnlyWarmArgs): Promise<RouterAbEd25519StartedPrepare | null>;
|
|
167
167
|
/** Leaves a started prepare to expire with its lease. */
|
|
168
|
-
export declare function abandonRouterAbEd25519StartedPrepare(started:
|
|
168
|
+
export declare function abandonRouterAbEd25519StartedPrepare(started: RouterAbEd25519StartedPrepare): void;
|
|
169
169
|
export declare function prepareRouterAbEd25519NearTransactionOperationStepUp(args: {
|
|
170
170
|
ctx: NearSigningRuntimeDeps;
|
|
171
171
|
thresholdSessionId: string;
|
|
@@ -202,10 +202,12 @@ type RouterAbEd25519NearTransactionNormalSigningArgs = RouterAbEd25519NearTransa
|
|
|
202
202
|
authorization: {
|
|
203
203
|
kind: 'reusable_wallet_session';
|
|
204
204
|
};
|
|
205
|
+
startedPrepare?: RouterAbEd25519StartedPrepare | null;
|
|
205
206
|
} | {
|
|
206
207
|
materialFacts: NearEd25519YaoOperationMaterialFacts;
|
|
207
208
|
walletSessionState?: never;
|
|
208
209
|
sessionCoordinator?: never;
|
|
210
|
+
startedPrepare?: never;
|
|
209
211
|
authorization: {
|
|
210
212
|
kind: 'operation_step_up';
|
|
211
213
|
prepared: Extract<PreparedNearOperationStepUp, {
|
|
@@ -216,6 +218,16 @@ type RouterAbEd25519NearTransactionNormalSigningArgs = RouterAbEd25519NearTransa
|
|
|
216
218
|
issuedAuthorization: NearEd25519OperationStepUpAuthorization | null;
|
|
217
219
|
};
|
|
218
220
|
});
|
|
221
|
+
type RouterAbEd25519NearTransactionWarmPrepareArgs = Pick<RouterAbEd25519NearTransactionNormalSigningBase, 'activeClient' | 'walletId' | 'operationId' | 'displayDigest' | 'nearAccountId'> & {
|
|
222
|
+
walletSessionState: AuthorizedRouterAbEd25519WalletSessionState;
|
|
223
|
+
};
|
|
224
|
+
/**
|
|
225
|
+
* Sends the prepare of a warm-session transaction while the confirmation
|
|
226
|
+
* dialog is open. The transaction context is the one the dialog reserved.
|
|
227
|
+
*/
|
|
228
|
+
export declare function startRouterAbEd25519NearTransactionPrepare(args: RouterAbEd25519NearTransactionWarmPrepareArgs & Pick<RouterAbEd25519NearTransactionNormalSigningBase, 'ctx' | 'thresholdSessionId' | 'thresholdKeyMaterial' | 'txSigningRequest'> & {
|
|
229
|
+
transactionContext: TransactionContext;
|
|
230
|
+
}): Promise<RouterAbEd25519StartedPrepare>;
|
|
219
231
|
export declare function tryFinalizeRouterAbEd25519NearTransactionNormalSigning(args: RouterAbEd25519NearTransactionNormalSigningArgs): Promise<RouterAbEd25519NearTransactionNormalSigningResult | null>;
|
|
220
232
|
export {};
|
|
221
233
|
//# sourceMappingURL=ed25519YaoNormalSigning.d.ts.map
|
package/dist/types/wallet/src/core/signingEngine/flows/signNear/shared/signatureOnlySigning.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ import { type ConfirmSignatureOnlySigningOperationRequest, type ConfirmSignature
|
|
|
15
15
|
import { type NearPreparedStepUpAuth } from '../requireNearStepUpAuth';
|
|
16
16
|
import { type PreparedNearOperationStepUp } from './operationStepUpPreparation';
|
|
17
17
|
import { resolveConfirmedNearEd25519YaoCapability, type NearOperationStepUpMaterial, type ResolvedNearOperationStepUpMaterial } from './ed25519YaoCapabilityResolution';
|
|
18
|
-
import { type RouterAbEd25519SignatureOnlyIntentWire, type
|
|
18
|
+
import { type RouterAbEd25519SignatureOnlyIntentWire, type RouterAbEd25519StartedPrepare } from './ed25519YaoNormalSigning';
|
|
19
19
|
/** One delegate-action or NEP-413 signing operation, fixed before its step-up starts. */
|
|
20
20
|
export type NearSignatureOnlyOperation = {
|
|
21
21
|
/** Names the operation in error messages. */
|
|
@@ -63,7 +63,7 @@ type NearSignatureOnlySigningMaterial = {
|
|
|
63
63
|
thresholdSessionId: ThresholdEd25519SessionId;
|
|
64
64
|
displayDigest: string;
|
|
65
65
|
resolved: Awaited<ReturnType<typeof resolveConfirmedNearEd25519YaoCapability>>;
|
|
66
|
-
startedPrepare?:
|
|
66
|
+
startedPrepare?: RouterAbEd25519StartedPrepare;
|
|
67
67
|
} | {
|
|
68
68
|
kind: 'operation_step_up';
|
|
69
69
|
thresholdSessionId: ThresholdEd25519SessionId;
|
|
@@ -117,7 +117,7 @@ export declare function authorizeNearSignatureOnlyOperation(operation: NearSigna
|
|
|
117
117
|
/** A prepare that left while the confirmation dialog was open. */
|
|
118
118
|
export type NearSignatureOnlyStartedPrepare = {
|
|
119
119
|
readonly resolved: Awaited<ReturnType<typeof resolveConfirmedNearEd25519YaoCapability>>;
|
|
120
|
-
readonly started:
|
|
120
|
+
readonly started: RouterAbEd25519StartedPrepare;
|
|
121
121
|
};
|
|
122
122
|
/**
|
|
123
123
|
* Sends the server prepare of a warm-session NEP-413 signature while the
|
|
@@ -22,5 +22,8 @@ export type NearTransactionReadiness = ExclusiveUnion<{
|
|
|
22
22
|
kind: 'funding_required';
|
|
23
23
|
request: NearFundingRequest;
|
|
24
24
|
}>;
|
|
25
|
+
export type NearTransactionContextReady = Extract<NearTransactionReadiness, {
|
|
26
|
+
kind: 'context_ready';
|
|
27
|
+
}>;
|
|
25
28
|
export {};
|
|
26
29
|
//# sourceMappingURL=nearTransactionReadiness.d.ts.map
|
|
@@ -3,13 +3,14 @@ import type { RpcCallPayload, ConfirmationConfig } from '../../types/signer-work
|
|
|
3
3
|
import type { EmailOtpConfirmPrompt, SigningAuthPlan, UserConfirmProgressEvent } from './types';
|
|
4
4
|
import type { SerializableCredential, UserConfirmDecision, UserConfirmRequest, WebAuthnChallenge } from './channel/confirmTypes';
|
|
5
5
|
import type { TxDisplayModel } from '../interfaces/display';
|
|
6
|
-
import type { NearFundingRequest, NearTransactionReadiness } from '../nonce/nearTransactionReadiness';
|
|
6
|
+
import type { NearFundingRequest, NearTransactionContextReady, NearTransactionReadiness } from '../nonce/nearTransactionReadiness';
|
|
7
7
|
import type { NearOperationStepUpPreparationRef } from '../interfaces/operationStepUpPreparation';
|
|
8
8
|
import type { SigningOperationConfirmationStateKind, SigningOperationInteractionEvent } from '../flows/shared/signingStateMachine';
|
|
9
9
|
type SigningConfirmationChain = 'near' | 'evm' | 'tempo';
|
|
10
10
|
export type RequestUserConfirmationBridge = (request: UserConfirmRequest, options?: {
|
|
11
11
|
onProgress?: (progress: UserConfirmProgressEvent) => void;
|
|
12
12
|
onSigningOperationInteractionEvent?: (event: SigningOperationInteractionEvent) => void;
|
|
13
|
+
onNearTransactionContextReady?: (readiness: NearTransactionContextReady) => void;
|
|
13
14
|
}) => Promise<UserConfirmDecision>;
|
|
14
15
|
export type UiConfirmRequestBridgeContext = {
|
|
15
16
|
touchConfirm: {
|
|
@@ -74,6 +75,7 @@ type OrchestrateNearTransactionSigningConfirmationBaseParams = OrchestrateSignin
|
|
|
74
75
|
nearFundingRequest: NearFundingRequest;
|
|
75
76
|
signingOperationStateKind: SigningOperationConfirmationStateKind;
|
|
76
77
|
onSigningOperationInteractionEvent: (event: SigningOperationInteractionEvent) => void;
|
|
78
|
+
onNearTransactionContextReady?: (readiness: NearTransactionContextReady) => void;
|
|
77
79
|
title?: string;
|
|
78
80
|
body?: string;
|
|
79
81
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { UiConfirmContext } from '../../uiConfirm.types';
|
|
2
2
|
import type { NormalizedConfirmationConfig } from '../../../../types/confirmationConfig';
|
|
3
3
|
import type { ThemeMode } from '../../../../types/seams';
|
|
4
|
+
import type { NearTransactionContextReady } from '../../../nonce/nearTransactionReadiness';
|
|
4
5
|
import { type TransactionSummary, type SigningUserConfirmRequest, type IntentDigestUserConfirmRequest } from '../../../stepUpConfirmation/channel/confirmTypes';
|
|
5
6
|
import { type SigningAuthMode } from '../../../stepUpConfirmation/types';
|
|
6
7
|
import { type UserConfirmResponsePort } from '../../../stepUpConfirmation/channel/confirmCommon';
|
|
@@ -16,6 +17,7 @@ export declare function handleTransactionSigningFlow(ctx: UiConfirmContext, requ
|
|
|
16
17
|
theme: ThemeMode;
|
|
17
18
|
surface: ConfirmUISurfaceSource;
|
|
18
19
|
onSigningOperationInteractionEvent?: (event: SigningOperationInteractionEvent) => void;
|
|
20
|
+
onNearTransactionContextReady?: (readiness: NearTransactionContextReady) => void;
|
|
19
21
|
}): Promise<void>;
|
|
20
22
|
export declare function handleIntentDigestSigningFlow(ctx: UiConfirmContext, request: IntentDigestUserConfirmRequest, worker: UserConfirmResponsePort, opts: {
|
|
21
23
|
confirmationConfig: NormalizedConfirmationConfig;
|
package/dist/types/wallet/src/core/signingEngine/uiConfirm/handlers/handlePromptFromWorker.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { type UserConfirmDecision } from '../../stepUpConfirmation/channel/confi
|
|
|
3
3
|
import type { UserConfirmPromptEnvelope } from '../../stepUpConfirmation/channel/confirmTypes';
|
|
4
4
|
import type { ConfirmUISurfaceSource } from '../ui/confirm-ui';
|
|
5
5
|
import type { SigningOperationInteractionEvent } from '../../flows/shared/signingStateMachine';
|
|
6
|
+
import type { NearTransactionContextReady } from '../../nonce/nearTransactionReadiness';
|
|
6
7
|
/**
|
|
7
8
|
* Handles secure confirmation requests from the worker with robust error handling
|
|
8
9
|
* => UserConfirmMessageType.PROMPT_USER_CONFIRM_IN_JS_MAIN_THREAD
|
|
@@ -12,5 +13,6 @@ export declare function handlePromptFromWorker(ctx: UiConfirmContext, message: U
|
|
|
12
13
|
signingSurface: ConfirmUISurfaceSource;
|
|
13
14
|
onDecision?: (decision: UserConfirmDecision) => void;
|
|
14
15
|
onSigningOperationInteractionEvent?: (event: SigningOperationInteractionEvent) => void;
|
|
16
|
+
onNearTransactionContextReady?: (readiness: NearTransactionContextReady) => void;
|
|
15
17
|
}): Promise<void>;
|
|
16
18
|
//# sourceMappingURL=handlePromptFromWorker.d.ts.map
|
|
@@ -29,9 +29,12 @@ import type { WalletIframeSurfaceMeasurement } from '../../../SeamsWeb/walletIfr
|
|
|
29
29
|
import type { WalletIframeRequestId } from '../../types/walletIframeIdentity';
|
|
30
30
|
import type { TxDisplayModel } from '../interfaces/display';
|
|
31
31
|
import type { SigningOperationInteractionEvent } from '../flows/shared/signingStateMachine';
|
|
32
|
+
import type { NearTransactionContextReady } from '../nonce/nearTransactionReadiness';
|
|
32
33
|
export type RequestUserConfirmationOptions = {
|
|
33
34
|
onProgress?: (progress: UserConfirmProgressEvent) => void;
|
|
34
35
|
onSigningOperationInteractionEvent?: (event: SigningOperationInteractionEvent) => void;
|
|
36
|
+
/** Reports the NEAR transaction context as soon as the confirmation reserves it. */
|
|
37
|
+
onNearTransactionContextReady?: (readiness: NearTransactionContextReady) => void;
|
|
35
38
|
};
|
|
36
39
|
export type ExportPrivateKeysWithUiOptions = {
|
|
37
40
|
onViewerLifecycle?: (event: 'opened' | 'closed') => void;
|