@dynamic-labs/tempo 0.0.0 → 4.71.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/CHANGELOG.md +7075 -0
- package/LICENSE +21 -0
- package/_virtual/_tslib.cjs +36 -0
- package/_virtual/_tslib.js +32 -0
- package/package.cjs +8 -0
- package/package.js +4 -0
- package/package.json +31 -1
- package/src/connectors/DynamicWaasTempoConnector/DynamicWaasTempoConnector.cjs +552 -0
- package/src/connectors/DynamicWaasTempoConnector/DynamicWaasTempoConnector.d.ts +199 -0
- package/src/connectors/DynamicWaasTempoConnector/DynamicWaasTempoConnector.js +548 -0
- package/src/connectors/DynamicWaasTempoConnector/index.cjs +13 -0
- package/src/connectors/DynamicWaasTempoConnector/index.d.ts +3 -0
- package/src/connectors/DynamicWaasTempoConnector/index.js +9 -0
- package/src/connectors/TempoWalletConnector/TempoWalletConnector.cjs +35 -0
- package/src/connectors/TempoWalletConnector/TempoWalletConnector.d.ts +23 -0
- package/src/connectors/TempoWalletConnector/TempoWalletConnector.js +31 -0
- package/src/connectors/TempoWalletConnector/index.d.ts +2 -0
- package/src/index.cjs +21 -0
- package/src/index.d.ts +5 -0
- package/src/index.js +15 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { Account, CustomSource, Hex, PublicClient, Transport, Chain as ViemChain, WalletClient } from 'viem';
|
|
2
|
+
import { LocalAccount } from 'viem/accounts';
|
|
3
|
+
import { SwitchNetworkOps } from '@dynamic-labs/ethereum-core';
|
|
4
|
+
import { Logger } from '@dynamic-labs/logger';
|
|
5
|
+
import { JwtVerifiedCredential, MFAAction, SignMessageContext } from '@dynamic-labs/sdk-api-core';
|
|
6
|
+
import { IUITransaction } from '@dynamic-labs/types';
|
|
7
|
+
import { WaasExportHandler } from '@dynamic-labs/waas';
|
|
8
|
+
import { IDynamicWaasConnector } from '@dynamic-labs/wallet-connector-core';
|
|
9
|
+
import { TempoWalletConnector } from '../TempoWalletConnector';
|
|
10
|
+
import type { TempoWalletConnectorOpts } from '../TempoWalletConnector';
|
|
11
|
+
declare const DynamicWaasTempoConnector_base: (abstract new (...args: any[]) => {
|
|
12
|
+
[x: string]: any;
|
|
13
|
+
name: string;
|
|
14
|
+
overrideKey: string;
|
|
15
|
+
isEmbeddedWallet: boolean;
|
|
16
|
+
getSignedSessionId?: (() => Promise<string>) | undefined;
|
|
17
|
+
getMfaToken?: ((props?: {
|
|
18
|
+
mfaAction?: MFAAction | undefined;
|
|
19
|
+
} | undefined) => Promise<string | undefined>) | undefined;
|
|
20
|
+
getWalletPassword?: import("@dynamic-labs/wallet-connector-core").GetWalletPasswordFn | undefined;
|
|
21
|
+
getAuthToken?: (() => string) | undefined;
|
|
22
|
+
getElevatedAccessToken?: ((props: {
|
|
23
|
+
scope: import("@dynamic-labs/sdk-api-core").TokenScope;
|
|
24
|
+
}) => Promise<string | undefined>) | undefined;
|
|
25
|
+
environmentId?: string | undefined;
|
|
26
|
+
baseApiUrl?: string | undefined;
|
|
27
|
+
relayUrl?: string | undefined;
|
|
28
|
+
baseClientKeysharesRelayApiUrl?: string | undefined;
|
|
29
|
+
dynamicWaasClient: import("@dynamic-labs-wallet/browser-wallet-client").DynamicWalletClient | undefined;
|
|
30
|
+
chainName: string;
|
|
31
|
+
authMode: "cookie" | "header";
|
|
32
|
+
logger: Logger;
|
|
33
|
+
__exportHandler: WaasExportHandler;
|
|
34
|
+
validateActiveWallet(expectedAddress: string): Promise<void>;
|
|
35
|
+
setGetAuthTokenFunction(getAuthToken: () => string): void;
|
|
36
|
+
setWaasAuthMode(authMode: "cookie" | "header"): void;
|
|
37
|
+
setGetMfaTokenFunction(getMfaToken: (props?: {
|
|
38
|
+
mfaAction?: MFAAction | undefined;
|
|
39
|
+
} | undefined) => Promise<string | undefined>): void;
|
|
40
|
+
setGetElevatedAccessTokenFunction(getElevatedAccessToken: (params: {
|
|
41
|
+
scope: import("@dynamic-labs/sdk-api-core").TokenScope;
|
|
42
|
+
}) => Promise<string | undefined>): void;
|
|
43
|
+
setGetWalletPasswordFunction(getWalletPassword: import("@dynamic-labs/wallet-connector-core").GetWalletPasswordFn): void;
|
|
44
|
+
getPasswordIfNeeded({ accountAddress, }: {
|
|
45
|
+
accountAddress: string;
|
|
46
|
+
}): Promise<string | undefined>;
|
|
47
|
+
setEnvironmentId(environmentId: string): void;
|
|
48
|
+
setBaseApiUrl(baseApiUrl: string): void;
|
|
49
|
+
setBaseClientKeysharesRelayApiUrl(baseClientKeysharesRelayApiUrl?: string | undefined): void;
|
|
50
|
+
setRelayUrl(relayUrl: string): void;
|
|
51
|
+
setGetSignedSessionIdFunction(getSignedSessionId: () => Promise<string>): void;
|
|
52
|
+
delegateKeyShares({ accountAddress, password, }: {
|
|
53
|
+
accountAddress: string;
|
|
54
|
+
password?: string | undefined;
|
|
55
|
+
}): Promise<void>;
|
|
56
|
+
createDynamicWaasClient(traceContext?: import("dist/packages/waas/utils/instrumentation").TraceContext | undefined): Promise<import("@dynamic-labs-wallet/browser-wallet-client").DynamicWalletClient>;
|
|
57
|
+
getWaasWalletClient(traceContext?: import("dist/packages/waas/utils/instrumentation").TraceContext | undefined): Promise<import("@dynamic-labs-wallet/browser-wallet-client").DynamicWalletClient>;
|
|
58
|
+
createWalletAccount({ thresholdSignatureScheme, password, bitcoinConfig, }?: {
|
|
59
|
+
thresholdSignatureScheme?: string | undefined;
|
|
60
|
+
password?: string | undefined;
|
|
61
|
+
bitcoinConfig?: import("@dynamic-labs-wallet/browser-wallet-client").BitcoinConfig | undefined;
|
|
62
|
+
} | undefined): Promise<{
|
|
63
|
+
chainName: string;
|
|
64
|
+
accountAddress: string;
|
|
65
|
+
publicKeyHex: string;
|
|
66
|
+
rawPublicKey: string | Uint8Array | undefined;
|
|
67
|
+
}>;
|
|
68
|
+
importPrivateKey({ privateKey, thresholdSignatureScheme, publicAddressCheck, addressType, legacyWalletId, password, }: {
|
|
69
|
+
privateKey: string;
|
|
70
|
+
thresholdSignatureScheme?: string | undefined;
|
|
71
|
+
publicAddressCheck?: string | undefined;
|
|
72
|
+
addressType?: string | undefined;
|
|
73
|
+
legacyWalletId?: string | undefined;
|
|
74
|
+
password?: string | undefined;
|
|
75
|
+
}): Promise<void>;
|
|
76
|
+
exportPrivateKey({ accountAddress, displayContainer, password, }?: {
|
|
77
|
+
accountAddress?: string | undefined;
|
|
78
|
+
displayContainer?: HTMLIFrameElement | undefined;
|
|
79
|
+
password?: string | undefined;
|
|
80
|
+
} | undefined): Promise<void>;
|
|
81
|
+
getExportHandler(): {
|
|
82
|
+
clear: () => void;
|
|
83
|
+
};
|
|
84
|
+
exportClientKeyshares({ accountAddress, password, }: {
|
|
85
|
+
accountAddress: string;
|
|
86
|
+
password?: string | undefined;
|
|
87
|
+
}): Promise<void>;
|
|
88
|
+
backupKeySharesToGoogleDrive({ accountAddress, password, }: {
|
|
89
|
+
accountAddress: string;
|
|
90
|
+
password?: string | undefined;
|
|
91
|
+
}): Promise<void>;
|
|
92
|
+
exportClientKeysharesFromGoogleDrive({ accountAddress, password, }: {
|
|
93
|
+
accountAddress: string;
|
|
94
|
+
password?: string | undefined;
|
|
95
|
+
}): Promise<void>;
|
|
96
|
+
backupKeySharesToICloud({ accountAddress, password, }: {
|
|
97
|
+
accountAddress: string;
|
|
98
|
+
password?: string | undefined;
|
|
99
|
+
}): Promise<void>;
|
|
100
|
+
displayICloudSignIn({ displayContainer, }: {
|
|
101
|
+
displayContainer: HTMLElement;
|
|
102
|
+
}): Promise<void>;
|
|
103
|
+
hideICloudSignIn(): Promise<void>;
|
|
104
|
+
isICloudAuthenticated(): Promise<boolean>;
|
|
105
|
+
refreshWalletAccountShares({ accountAddress, password, }: {
|
|
106
|
+
accountAddress: string;
|
|
107
|
+
password?: string | undefined;
|
|
108
|
+
}): Promise<void>;
|
|
109
|
+
reshareWalletAccountShares({ accountAddress, thresholdSignatureScheme, password, }: {
|
|
110
|
+
accountAddress: string;
|
|
111
|
+
thresholdSignatureScheme: string;
|
|
112
|
+
password?: string | undefined;
|
|
113
|
+
}): Promise<void>;
|
|
114
|
+
revokeDelegation({ accountAddress, password, }: {
|
|
115
|
+
accountAddress: string;
|
|
116
|
+
password?: string | undefined;
|
|
117
|
+
}): Promise<void>;
|
|
118
|
+
updatePassword({ accountAddress, existingPassword, newPassword, }: {
|
|
119
|
+
accountAddress: string;
|
|
120
|
+
existingPassword?: string | undefined;
|
|
121
|
+
newPassword: string;
|
|
122
|
+
}): Promise<void>;
|
|
123
|
+
setPassword({ accountAddress, newPassword, }: {
|
|
124
|
+
accountAddress: string;
|
|
125
|
+
newPassword: string;
|
|
126
|
+
}): Promise<void>;
|
|
127
|
+
signRawMessage({ accountAddress, message, password, }: {
|
|
128
|
+
accountAddress: string;
|
|
129
|
+
message: string;
|
|
130
|
+
password?: string | undefined;
|
|
131
|
+
}): Promise<string>;
|
|
132
|
+
unlockWallet({ accountAddress, password, }: {
|
|
133
|
+
accountAddress: string;
|
|
134
|
+
password?: string | undefined;
|
|
135
|
+
}): Promise<import("@dynamic-labs-wallet/browser-wallet-client").GetWalletResponse>;
|
|
136
|
+
getWalletRecoveryState({ accountAddress, }: {
|
|
137
|
+
accountAddress: string;
|
|
138
|
+
}): Promise<import("@dynamic-labs-wallet/browser-wallet-client").WalletRecoveryState>;
|
|
139
|
+
endSession(): Promise<void>;
|
|
140
|
+
getActiveAccountAddress(): Promise<string | undefined>;
|
|
141
|
+
getConnectedAccounts(): Promise<string[]>;
|
|
142
|
+
generateTraceId(): string;
|
|
143
|
+
instrument(message: string, context: import("@dynamic-labs/logger").InstrumentOptions & import("dist/packages/waas/utils/instrumentation").InstrumentContext & Record<string, any>): void;
|
|
144
|
+
instrumentAsync<T_1>({ operation, resource, fn, context, }: {
|
|
145
|
+
operation: string;
|
|
146
|
+
resource: string;
|
|
147
|
+
fn: (timing: import("dist/packages/waas/utils/instrumentation").InstrumentationTimer) => Promise<T_1>;
|
|
148
|
+
context?: Record<string, any> | undefined;
|
|
149
|
+
}): Promise<T_1>;
|
|
150
|
+
}) & typeof TempoWalletConnector;
|
|
151
|
+
export declare class DynamicWaasTempoConnector extends DynamicWaasTempoConnector_base implements IDynamicWaasConnector {
|
|
152
|
+
name: string;
|
|
153
|
+
logger: Logger;
|
|
154
|
+
overrideKey: string;
|
|
155
|
+
isEmbeddedWallet: boolean;
|
|
156
|
+
private _verifiedCredential;
|
|
157
|
+
private _verifiedCredentials;
|
|
158
|
+
static lastUsedChainIdStorageKey: string;
|
|
159
|
+
private _selectedChainId;
|
|
160
|
+
constructor(props: TempoWalletConnectorOpts);
|
|
161
|
+
private getLastUsedChainId;
|
|
162
|
+
set verifiedCredentials(verifiedCredentials: JwtVerifiedCredential[] | undefined);
|
|
163
|
+
get verifiedCredentials(): JwtVerifiedCredential[] | undefined;
|
|
164
|
+
set verifiedCredential(verifiedCredential: JwtVerifiedCredential | undefined);
|
|
165
|
+
get verifiedCredential(): JwtVerifiedCredential | undefined;
|
|
166
|
+
setVerifiedCredentials(verifiedCredentials: JwtVerifiedCredential[]): void;
|
|
167
|
+
set lastUsedChainId(chainId: number | undefined);
|
|
168
|
+
get lastUsedChainId(): number | undefined;
|
|
169
|
+
private get currentChainId();
|
|
170
|
+
getNetwork(): Promise<number | undefined>;
|
|
171
|
+
private getEvmNetworkByChainId;
|
|
172
|
+
private currentEvmNetwork;
|
|
173
|
+
switchNetwork({ networkChainId, }: SwitchNetworkOps): Promise<void>;
|
|
174
|
+
private getRpcUrl;
|
|
175
|
+
validateActiveWallet(expectedAddress: string): Promise<void>;
|
|
176
|
+
getActiveAccountAddress(): Promise<string | undefined>;
|
|
177
|
+
getViemAccountCustomSource({ accountAddress, }: {
|
|
178
|
+
accountAddress: string;
|
|
179
|
+
}): Promise<CustomSource>;
|
|
180
|
+
getViemAccount({ accountAddress, }: {
|
|
181
|
+
accountAddress: string;
|
|
182
|
+
}): Promise<LocalAccount>;
|
|
183
|
+
getWalletClient(chainId?: string): WalletClient<Transport, ViemChain, Account> | undefined;
|
|
184
|
+
getPublicClient(): Promise<PublicClient<Transport, ViemChain>>;
|
|
185
|
+
signMessage(message: string): Promise<Hex>;
|
|
186
|
+
signMessageWithContext({ message, context, }: {
|
|
187
|
+
message: string;
|
|
188
|
+
context: SignMessageContext;
|
|
189
|
+
}): Promise<string>;
|
|
190
|
+
getSigner(): Promise<any>;
|
|
191
|
+
getWalletClientByAddress({ accountAddress, }: {
|
|
192
|
+
accountAddress: string;
|
|
193
|
+
}): WalletClient<Transport, ViemChain, Account> | undefined;
|
|
194
|
+
createUiTransaction(from: string): Promise<IUITransaction>;
|
|
195
|
+
getConnectedAccounts(): Promise<string[]>;
|
|
196
|
+
getAddress(): Promise<string>;
|
|
197
|
+
endSession(): Promise<void>;
|
|
198
|
+
}
|
|
199
|
+
export {};
|