@moon-x/core 0.2.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 +39 -0
- package/dist/chain-C9dvKXUY.d.mts +48 -0
- package/dist/chain-C9dvKXUY.d.ts +48 -0
- package/dist/chunk-264CEGDS.mjs +46 -0
- package/dist/chunk-CDT4MC7S.mjs +1532 -0
- package/dist/chunk-CMYR6AOY.mjs +0 -0
- package/dist/chunk-GQKIA37O.mjs +20 -0
- package/dist/chunk-IMLBIIJ4.mjs +36 -0
- package/dist/chunk-MOREUKOG.mjs +18 -0
- package/dist/chunk-SOKLPX7V.mjs +270 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +402 -0
- package/dist/index.mjs +33 -0
- package/dist/interfaces-9k0eKCc4.d.ts +120 -0
- package/dist/interfaces-fNhwnCeY.d.mts +120 -0
- package/dist/lib/index.d.mts +410 -0
- package/dist/lib/index.d.ts +410 -0
- package/dist/lib/index.js +1622 -0
- package/dist/lib/index.mjs +89 -0
- package/dist/passkey-cache-B9PT3AWX.d.mts +47 -0
- package/dist/passkey-cache-B9PT3AWX.d.ts +47 -0
- package/dist/passkey-metadata-QqFF2SWQ.d.mts +25 -0
- package/dist/passkey-metadata-QqFF2SWQ.d.ts +25 -0
- package/dist/post-message-C_99BCBh.d.mts +70 -0
- package/dist/post-message-C_99BCBh.d.ts +70 -0
- package/dist/react/ethereum.d.mts +26 -0
- package/dist/react/ethereum.d.ts +26 -0
- package/dist/react/ethereum.js +99 -0
- package/dist/react/ethereum.mjs +56 -0
- package/dist/react/index.d.mts +182 -0
- package/dist/react/index.d.ts +182 -0
- package/dist/react/index.js +586 -0
- package/dist/react/index.mjs +328 -0
- package/dist/react/solana.d.mts +17 -0
- package/dist/react/solana.d.ts +17 -0
- package/dist/react/solana.js +75 -0
- package/dist/react/solana.mjs +35 -0
- package/dist/sdk/index.d.mts +126 -0
- package/dist/sdk/index.d.ts +126 -0
- package/dist/sdk/index.js +864 -0
- package/dist/sdk/index.mjs +579 -0
- package/dist/types/index.d.mts +1190 -0
- package/dist/types/index.d.ts +1190 -0
- package/dist/types/index.js +64 -0
- package/dist/types/index.mjs +10 -0
- package/dist/utils/index.d.mts +11 -0
- package/dist/utils/index.d.ts +11 -0
- package/dist/utils/index.js +365 -0
- package/dist/utils/index.mjs +25 -0
- package/dist/web/index.d.mts +20 -0
- package/dist/web/index.d.ts +20 -0
- package/dist/web/index.js +470 -0
- package/dist/web/index.mjs +155 -0
- package/package.json +111 -0
|
File without changes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// src/utils/get-api-url.ts
|
|
2
|
+
var getMoonKeyApiUrl = () => {
|
|
3
|
+
if (process.env?.NEXT_PUBLIC_MOONKEY_API_URL) {
|
|
4
|
+
return process.env.NEXT_PUBLIC_MOONKEY_API_URL;
|
|
5
|
+
}
|
|
6
|
+
if (process.env?.NEXT_PUBLIC_MOONKEY_IFRAME_URL) {
|
|
7
|
+
const iframeUrl = process.env.NEXT_PUBLIC_MOONKEY_IFRAME_URL;
|
|
8
|
+
if (iframeUrl.includes("staging") || iframeUrl.includes("auth-staging")) {
|
|
9
|
+
return "https://api.moonx-dev.com";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
if (process.env?.NEXT_PUBLIC_VERCEL_ENV === "preview") {
|
|
13
|
+
return "https://api.moonx-dev.com";
|
|
14
|
+
}
|
|
15
|
+
return "https://api.moonx-dev.com";
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
getMoonKeyApiUrl
|
|
20
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// src/types/wallet.ts
|
|
2
|
+
var WALLET_ERROR_CODES = {
|
|
3
|
+
WALLET_NOT_CONNECTED: "WALLET_NOT_CONNECTED",
|
|
4
|
+
USER_REJECTED: "USER_REJECTED",
|
|
5
|
+
INVALID_MESSAGE: "INVALID_MESSAGE",
|
|
6
|
+
INVALID_TRANSACTION: "INVALID_TRANSACTION",
|
|
7
|
+
NETWORK_ERROR: "NETWORK_ERROR",
|
|
8
|
+
UNKNOWN_ERROR: "UNKNOWN_ERROR"
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// src/types/index.ts
|
|
12
|
+
var WalletCreationError = /* @__PURE__ */ ((WalletCreationError2) => {
|
|
13
|
+
WalletCreationError2["SESSION_INVALID"] = "Session is invalid - cannot create wallet";
|
|
14
|
+
WalletCreationError2["FAILED_TO_CREATE_WALLET"] = "Failed to create wallet";
|
|
15
|
+
return WalletCreationError2;
|
|
16
|
+
})(WalletCreationError || {});
|
|
17
|
+
var Network = /* @__PURE__ */ ((Network2) => {
|
|
18
|
+
Network2["Bitcoin"] = "bitcoin";
|
|
19
|
+
Network2["Solana"] = "solana";
|
|
20
|
+
Network2["Ripple"] = "ripple";
|
|
21
|
+
Network2["Ethereum"] = "ethereum";
|
|
22
|
+
Network2["Polygon"] = "polygon";
|
|
23
|
+
Network2["Arbitrum"] = "arbitrum";
|
|
24
|
+
Network2["Optimism"] = "optimism";
|
|
25
|
+
Network2["Base"] = "base";
|
|
26
|
+
Network2["ZkSync"] = "zksync";
|
|
27
|
+
Network2["BinanceSmartChain"] = "bsc";
|
|
28
|
+
Network2["Tron"] = "tron";
|
|
29
|
+
return Network2;
|
|
30
|
+
})(Network || {});
|
|
31
|
+
|
|
32
|
+
export {
|
|
33
|
+
WALLET_ERROR_CODES,
|
|
34
|
+
WalletCreationError,
|
|
35
|
+
Network
|
|
36
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// src/react/sdk-context.ts
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
3
|
+
var SDKContext = createContext(null);
|
|
4
|
+
var SDKProvider = SDKContext.Provider;
|
|
5
|
+
var useMoonKeySDK = () => {
|
|
6
|
+
const sdk = useContext(SDKContext);
|
|
7
|
+
if (!sdk) {
|
|
8
|
+
throw new Error(
|
|
9
|
+
"MoonKey hook called outside a <MoonKeyProvider> \u2014 wrap your app in the provider from @moon-x/react-sdk (web) or @moon-x/react-native-sdk (RN)."
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
return sdk;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export {
|
|
16
|
+
SDKProvider,
|
|
17
|
+
useMoonKeySDK
|
|
18
|
+
};
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
// src/utils/post-message.ts
|
|
2
|
+
var FORWARDED_ERROR_FIELDS = [
|
|
3
|
+
"error_type",
|
|
4
|
+
"error_code",
|
|
5
|
+
"status_code"
|
|
6
|
+
];
|
|
7
|
+
var generateUUID = () => {
|
|
8
|
+
if (typeof crypto !== "undefined" && crypto.randomUUID) {
|
|
9
|
+
return crypto.randomUUID();
|
|
10
|
+
}
|
|
11
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
|
|
12
|
+
const r = Math.random() * 16 | 0;
|
|
13
|
+
const v = c === "x" ? r : r & 3 | 8;
|
|
14
|
+
return v.toString(16);
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
var PostMessageType = {
|
|
18
|
+
AUTH: "auth",
|
|
19
|
+
INIT: "init",
|
|
20
|
+
WALLET: "wallet",
|
|
21
|
+
EXTERNAL_WALLET: "external_wallet"
|
|
22
|
+
};
|
|
23
|
+
var PostMessageMethod = {
|
|
24
|
+
CLOSE: "CLOSE",
|
|
25
|
+
CREATE_WALLET: "CREATE_WALLET",
|
|
26
|
+
IMPORT_KEY: "IMPORT_KEY",
|
|
27
|
+
FUND_WALLET: "FUND_WALLET",
|
|
28
|
+
GET_APP_CONFIG: "GET_APP_CONFIG",
|
|
29
|
+
GET_BALANCE: "GET_BALANCE",
|
|
30
|
+
GET_CONFIRM_TRANSACTION: "GET_CONFIRM_TRANSACTION",
|
|
31
|
+
GET_CONFIRM_ETHEREUM_TRANSACTION: "GET_CONFIRM_ETHEREUM_TRANSACTION",
|
|
32
|
+
GET_CURRENT_SESSION: "GET_CURRENT_SESSION",
|
|
33
|
+
GET_TOKEN_ACCOUNTS_BY_OWNER: "GET_TOKEN_ACCOUNTS_BY_OWNER",
|
|
34
|
+
GET_USER: "GET_USER",
|
|
35
|
+
GET_WALLET: "GET_WALLET",
|
|
36
|
+
GET_WALLETS: "GET_WALLETS",
|
|
37
|
+
IS_AUTHENTICATED: "IS_AUTHENTICATED",
|
|
38
|
+
LOGIN_CREATE: "LOGIN_CREATE",
|
|
39
|
+
LOGOUT: "LOGOUT",
|
|
40
|
+
PREFETCH_CAPTCHA: "PREFETCH_CAPTCHA",
|
|
41
|
+
READY: "READY",
|
|
42
|
+
SEND_TRANSACTION: "SEND_TRANSACTION",
|
|
43
|
+
SIGN_MESSAGE: "SIGN_MESSAGE",
|
|
44
|
+
SIGN_TRANSACTION: "SIGN_TRANSACTION",
|
|
45
|
+
SIGN_TYPED_DATA: "SIGN_TYPED_DATA",
|
|
46
|
+
// Sign a pre-computed 32-byte digest as ECDSA. Caller-supplied hash
|
|
47
|
+
// — no EIP-191 prefix, no tx parsing, no domain separator. Useful
|
|
48
|
+
// for ZK circuits / custom auth flows / anywhere the digest is
|
|
49
|
+
// computed externally. Mirrors Privy's `secp256k1_sign` provider
|
|
50
|
+
// method but exposed as its own postMessage to keep the iframe
|
|
51
|
+
// dispatcher boring.
|
|
52
|
+
SIGN_HASH: "SIGN_HASH",
|
|
53
|
+
SIGN_7702_AUTHORIZATION: "SIGN_7702_AUTHORIZATION",
|
|
54
|
+
VERIFY_EMAIL_OTP: "VERIFY_EMAIL_OTP",
|
|
55
|
+
VERIFY_OAUTH: "VERIFY_OAUTH",
|
|
56
|
+
START_OAUTH: "START_OAUTH",
|
|
57
|
+
WALLET_REGISTRATION_NONCE: "WALLET_REGISTRATION_NONCE",
|
|
58
|
+
VERIFY_SIWE_WALLET_REGISTRATION: "VERIFY_SIWE_WALLET_REGISTRATION",
|
|
59
|
+
ATTACH_OAUTH: "ATTACH_OAUTH",
|
|
60
|
+
DETACH_OAUTH: "DETACH_OAUTH",
|
|
61
|
+
// Passkey as a post-identity enrollment / unlock ceremony. The two
|
|
62
|
+
// methods below split the ceremony so the parent owns the WebAuthn
|
|
63
|
+
// API call (where user activation lives) and the iframe owns the
|
|
64
|
+
// begin/verify HTTP calls (where the session JWT lives).
|
|
65
|
+
PASSKEY_REGISTER_BEGIN: "PASSKEY_REGISTER_BEGIN",
|
|
66
|
+
PASSKEY_REGISTER_VERIFY: "PASSKEY_REGISTER_VERIFY",
|
|
67
|
+
GET_PASSKEY_STATUS: "GET_PASSKEY_STATUS",
|
|
68
|
+
// Parent-side passkey assertion plumbing. Parent calls GET_DEK_INFO
|
|
69
|
+
// to learn which credential IDs to put in allowCredentials and to
|
|
70
|
+
// know whether bootstrap-vs-unwrap path applies, then runs
|
|
71
|
+
// navigator.credentials.get itself (where iframe-cross-origin
|
|
72
|
+
// activation rules don't bite). Wallet-op postMessages then carry
|
|
73
|
+
// the resulting user_handle_b64url + credential_id_b64url back into
|
|
74
|
+
// the iframe so encrypted-keyshare helpers can unwrap the DEK.
|
|
75
|
+
GET_DEK_INFO: "GET_DEK_INFO",
|
|
76
|
+
// Multi-passkey management on an existing user. ADD_PASSKEY_WRAP is
|
|
77
|
+
// the iframe half of the parent-driven add-passkey flow: parent runs
|
|
78
|
+
// both WebAuthn ceremonies (assert old credential, register new
|
|
79
|
+
// credential), then posts the two resulting (userHandle, credId)
|
|
80
|
+
// pairs here so the iframe can unlock the DEK with the old
|
|
81
|
+
// credential and seal a new wrap with the new credential.
|
|
82
|
+
ADD_PASSKEY_WRAP: "ADD_PASSKEY_WRAP",
|
|
83
|
+
REMOVE_PASSKEY: "REMOVE_PASSKEY"
|
|
84
|
+
};
|
|
85
|
+
var PostMessageClient = class {
|
|
86
|
+
constructor(target, origin = "*") {
|
|
87
|
+
this.target = target;
|
|
88
|
+
this.origin = origin;
|
|
89
|
+
}
|
|
90
|
+
async send(type, method, payload) {
|
|
91
|
+
const id = generateUUID();
|
|
92
|
+
return new Promise((resolve, reject) => {
|
|
93
|
+
const timeout = setTimeout(() => {
|
|
94
|
+
window.removeEventListener("message", handler);
|
|
95
|
+
reject(new Error("Timeout: No response from iframe"));
|
|
96
|
+
}, 3e4);
|
|
97
|
+
const handler = (event) => {
|
|
98
|
+
if (this.origin !== "*" && event.origin !== this.origin) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const response = event.data;
|
|
102
|
+
if (response.id === id) {
|
|
103
|
+
clearTimeout(timeout);
|
|
104
|
+
window.removeEventListener("message", handler);
|
|
105
|
+
if (response.success) {
|
|
106
|
+
resolve(response.data);
|
|
107
|
+
} else {
|
|
108
|
+
const err = new Error(response.error);
|
|
109
|
+
for (const key of FORWARDED_ERROR_FIELDS) {
|
|
110
|
+
const value = response[key];
|
|
111
|
+
if (value !== void 0) {
|
|
112
|
+
err[key] = value;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
reject(err);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
window.addEventListener("message", handler);
|
|
120
|
+
this.target.postMessage(
|
|
121
|
+
{
|
|
122
|
+
id,
|
|
123
|
+
type,
|
|
124
|
+
method,
|
|
125
|
+
payload
|
|
126
|
+
},
|
|
127
|
+
this.origin
|
|
128
|
+
);
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
async sendOneWay(type, method, payload) {
|
|
132
|
+
const id = generateUUID();
|
|
133
|
+
const envelope = {
|
|
134
|
+
id,
|
|
135
|
+
type,
|
|
136
|
+
method,
|
|
137
|
+
payload
|
|
138
|
+
};
|
|
139
|
+
if (typeof window !== "undefined" && typeof window.ReactNativeWebView !== "undefined") {
|
|
140
|
+
try {
|
|
141
|
+
window.ReactNativeWebView.postMessage(JSON.stringify(envelope));
|
|
142
|
+
} catch {
|
|
143
|
+
}
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
this.target.postMessage(envelope, this.origin);
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
var isReactNativeWebView = () => typeof window !== "undefined" && typeof window.ReactNativeWebView !== "undefined";
|
|
150
|
+
var sendReactNativeReply = (response) => {
|
|
151
|
+
try {
|
|
152
|
+
window.ReactNativeWebView.postMessage(JSON.stringify(response));
|
|
153
|
+
} catch {
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
var PostMessageServer = class {
|
|
157
|
+
constructor(originValidator) {
|
|
158
|
+
this.trustedSources = /* @__PURE__ */ new Set();
|
|
159
|
+
this.handlers = /* @__PURE__ */ new Map();
|
|
160
|
+
this.originValidator = originValidator;
|
|
161
|
+
window.addEventListener("message", this.handleMessage.bind(this));
|
|
162
|
+
}
|
|
163
|
+
addTrustedSource(source) {
|
|
164
|
+
this.trustedSources.add(source);
|
|
165
|
+
}
|
|
166
|
+
removeTrustedSource(source) {
|
|
167
|
+
this.trustedSources.delete(source);
|
|
168
|
+
}
|
|
169
|
+
register(type, method, handler) {
|
|
170
|
+
const key = `${type}:${method}`;
|
|
171
|
+
this.handlers.set(key, handler);
|
|
172
|
+
}
|
|
173
|
+
cleanup() {
|
|
174
|
+
window.removeEventListener("message", this.handleMessage.bind(this));
|
|
175
|
+
this.handlers.clear();
|
|
176
|
+
}
|
|
177
|
+
static isLocalhostOrigin(origin) {
|
|
178
|
+
try {
|
|
179
|
+
const url = new URL(origin);
|
|
180
|
+
return url.hostname === "localhost" || url.hostname === "127.0.0.1" || url.hostname === "[::1]";
|
|
181
|
+
} catch {
|
|
182
|
+
return false;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
isValidPostMessageRequest(data) {
|
|
186
|
+
return data && typeof data === "object" && typeof data.id === "string" && typeof data.type === "string" && typeof data.method === "string";
|
|
187
|
+
}
|
|
188
|
+
async handleMessage(event) {
|
|
189
|
+
if (!this.isValidPostMessageRequest(event.data)) {
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
if (!event.origin || event.origin === "null") {
|
|
193
|
+
console.error("[PostMessageServer] Invalid or null origin received");
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
const request = event.data;
|
|
197
|
+
const rnMode = isReactNativeWebView();
|
|
198
|
+
const reply = (response) => {
|
|
199
|
+
if (rnMode) {
|
|
200
|
+
sendReactNativeReply(response);
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
if (event.source && event.origin) {
|
|
204
|
+
event.source.postMessage(response, { targetOrigin: event.origin });
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
if (this.originValidator && !rnMode) {
|
|
208
|
+
const publishableKey = request.payload?.publishableKey;
|
|
209
|
+
try {
|
|
210
|
+
const isAllowed = await this.originValidator(
|
|
211
|
+
event.origin,
|
|
212
|
+
publishableKey
|
|
213
|
+
);
|
|
214
|
+
if (!isAllowed) {
|
|
215
|
+
reply({
|
|
216
|
+
id: request.id,
|
|
217
|
+
type: request.type,
|
|
218
|
+
success: false,
|
|
219
|
+
error: `Origin ${event.origin} is not whitelisted. Please add it to your MoonKey dashboard.`
|
|
220
|
+
});
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
} catch (error) {
|
|
224
|
+
reply({
|
|
225
|
+
id: request.id,
|
|
226
|
+
type: request.type,
|
|
227
|
+
success: false,
|
|
228
|
+
error: "Origin validation failed"
|
|
229
|
+
});
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
const key = `${request.type}:${request.method}`;
|
|
234
|
+
const handler = this.handlers.get(key);
|
|
235
|
+
if (handler) {
|
|
236
|
+
try {
|
|
237
|
+
const data = await handler(request.payload);
|
|
238
|
+
reply({
|
|
239
|
+
id: request.id,
|
|
240
|
+
type: request.type,
|
|
241
|
+
success: true,
|
|
242
|
+
data
|
|
243
|
+
});
|
|
244
|
+
} catch (error) {
|
|
245
|
+
const extras = {};
|
|
246
|
+
if (error && typeof error === "object") {
|
|
247
|
+
for (const key2 of FORWARDED_ERROR_FIELDS) {
|
|
248
|
+
const value = error[key2];
|
|
249
|
+
if (value !== void 0) extras[key2] = value;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
reply({
|
|
253
|
+
...extras,
|
|
254
|
+
id: request.id,
|
|
255
|
+
type: request.type,
|
|
256
|
+
success: false,
|
|
257
|
+
error: error instanceof Error ? error.message : "Unknown error"
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
export {
|
|
265
|
+
FORWARDED_ERROR_FIELDS,
|
|
266
|
+
PostMessageType,
|
|
267
|
+
PostMessageMethod,
|
|
268
|
+
PostMessageClient,
|
|
269
|
+
PostMessageServer
|
|
270
|
+
};
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { AccessTokenClaims, AppConfigRequest, AppConfigResponse, AttachOAuthTokenRequest, AttachOAuthTokenResponse, AuthAppearance, AuthFlow, AuthFlowComponent, AuthLoginMethod, AuthProviderConfig, BaseGetBalanceParams, BaseGetBalanceResult, BaseGetTokenAccountsParams, BaseSendTransactionParams, BaseSendTransactionResult, BaseSignMessageParams, BaseSignMessageResult, BaseSignTransactionParams, BaseSignTransactionResult, BaseTokenClaims, BaseUIOptions, BaseWalletHooks, ContractUIOptions, CreateWalletResponse, DefaultFundingMethod, DeleteSessionRequest, DeleteSessionResponse, DetachOAuthTokenRequest, DeviceFingerprint, DisplayMode, EmailOtpConfig, EmailOtpFlowState, EthereumFundingConfig, EthereumGetBalanceParams, EthereumGetBalanceResult, EthereumGetTokenAccountsByOwnerParams, EthereumGetTokenAccountsByOwnerResult, EthereumSendTransactionParams, EthereumSendTransactionRequest, EthereumSendTransactionResult, EthereumSign7702AuthorizationParams, EthereumSign7702AuthorizationResult, EthereumSignHashParams, EthereumSignHashResult, EthereumSignMessageParams, EthereumSignMessageResult, EthereumSignTransactionParams, EthereumSignTransactionResult, EthereumSignTypedDataParams, EthereumSignTypedDataResult, EthereumSwitchChainParams, ExportKeyConfig, Factor, FlexibleTheme, FundWalletConfig, FundingEvents, FundingMethod, FundingUIConfig, GetCurrentSessionRequest, GetCurrentSessionResponse, Hex, IdentityTokenClaims, IdpProvider, IsAuthenticatedRequest, IsAuthenticatedResponse, LoginTokenBundle, LogoutRequest, LogoutResponse, MessageTypeProperty, MessageTypes, MoonKeyThemeConfig, MoonPaySignRequest, MoonPaySignResponse, MpcKeyShares, Network, OAuthRequest, OAuthResponse, OnrampFundingSettings, PasskeyEnrollConfig, PasskeySettings, PreferredCardProvider, PrefillConfig, PublicEthereumWallet, PublicSessionData, PublicWallet, RefreshSessionRequest, RefreshSessionResponse, RetrieveWalletKeyRequest, RetrieveWalletKeyResponse, SdkSettings, SendEmailOtpRequest, SendEmailOtpResponse, SendTransactionConfig, SendTransactionRequest, SessionData, SharesDeviceRequest, SharesDeviceResponse, Sign7702AuthorizationError, Sign7702AuthorizationParams, Sign7702AuthorizationResponse, Sign7702AuthorizationResult, SignMessageConfig, SignTransactionConfig, SignTypedDataError, SignTypedDataParams, SignTypedDataResponse, SignTypedDataResult, SmsSettings, SolanaChain, SolanaFundingConfig, SolanaGetBalanceParams, SolanaGetBalanceResult, SolanaGetTokenAccountsByOwnerParams, SolanaGetTokenAccountsByOwnerResult, SolanaSendTransactionParams, SolanaSendTransactionResult, SolanaSignMessageParams, SolanaSignMessageResult, SolanaSignTransactionParams, SolanaSignTransactionResult, TransactionCommitment, TransactionEncoding, TransactionUIOptions, TypedMessage, UseFundWalletInterface, UsersMePublicResponse, UsersMeRequest, UsersMeResponse, VerifiedSession, VerifyEmailOtpRequest, VerifyEmailOtpResponse, VerifyEmailOtpUser, VerifyOAuthTokenRequest, VerifyOAuthTokenResponse, VerifySiweWalletRegistrationRequest, WALLET_ERROR_CODES, Wallet, WalletChain, WalletChainType, WalletConnectConfig, WalletCreationError, WalletError, WalletErrorCode, WalletKeyRequest, WalletListEntry, WalletRegistrationNonceRequest, WalletRegistrationNonceResponse, WalletType, WalletVerifyRequest } from './types/index.mjs';
|
|
2
|
+
export { getIframeOrigin, getIframeUrl, getMoonKeyApiUrl } from './utils/index.mjs';
|
|
3
|
+
export { F as FORWARDED_ERROR_FIELDS, P as PostMessageClient, a as PostMessageMethod, b as PostMessageServer, c as PostMessageType } from './post-message-C_99BCBh.mjs';
|
|
4
|
+
export { B as BlockExplorer, C as Chain, a as ChainLikeWithId, E as EthereumChainConfig, N as NativeCurrency, R as RpcConfig, b as RpcUrls } from './chain-C9dvKXUY.mjs';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { AccessTokenClaims, AppConfigRequest, AppConfigResponse, AttachOAuthTokenRequest, AttachOAuthTokenResponse, AuthAppearance, AuthFlow, AuthFlowComponent, AuthLoginMethod, AuthProviderConfig, BaseGetBalanceParams, BaseGetBalanceResult, BaseGetTokenAccountsParams, BaseSendTransactionParams, BaseSendTransactionResult, BaseSignMessageParams, BaseSignMessageResult, BaseSignTransactionParams, BaseSignTransactionResult, BaseTokenClaims, BaseUIOptions, BaseWalletHooks, ContractUIOptions, CreateWalletResponse, DefaultFundingMethod, DeleteSessionRequest, DeleteSessionResponse, DetachOAuthTokenRequest, DeviceFingerprint, DisplayMode, EmailOtpConfig, EmailOtpFlowState, EthereumFundingConfig, EthereumGetBalanceParams, EthereumGetBalanceResult, EthereumGetTokenAccountsByOwnerParams, EthereumGetTokenAccountsByOwnerResult, EthereumSendTransactionParams, EthereumSendTransactionRequest, EthereumSendTransactionResult, EthereumSign7702AuthorizationParams, EthereumSign7702AuthorizationResult, EthereumSignHashParams, EthereumSignHashResult, EthereumSignMessageParams, EthereumSignMessageResult, EthereumSignTransactionParams, EthereumSignTransactionResult, EthereumSignTypedDataParams, EthereumSignTypedDataResult, EthereumSwitchChainParams, ExportKeyConfig, Factor, FlexibleTheme, FundWalletConfig, FundingEvents, FundingMethod, FundingUIConfig, GetCurrentSessionRequest, GetCurrentSessionResponse, Hex, IdentityTokenClaims, IdpProvider, IsAuthenticatedRequest, IsAuthenticatedResponse, LoginTokenBundle, LogoutRequest, LogoutResponse, MessageTypeProperty, MessageTypes, MoonKeyThemeConfig, MoonPaySignRequest, MoonPaySignResponse, MpcKeyShares, Network, OAuthRequest, OAuthResponse, OnrampFundingSettings, PasskeyEnrollConfig, PasskeySettings, PreferredCardProvider, PrefillConfig, PublicEthereumWallet, PublicSessionData, PublicWallet, RefreshSessionRequest, RefreshSessionResponse, RetrieveWalletKeyRequest, RetrieveWalletKeyResponse, SdkSettings, SendEmailOtpRequest, SendEmailOtpResponse, SendTransactionConfig, SendTransactionRequest, SessionData, SharesDeviceRequest, SharesDeviceResponse, Sign7702AuthorizationError, Sign7702AuthorizationParams, Sign7702AuthorizationResponse, Sign7702AuthorizationResult, SignMessageConfig, SignTransactionConfig, SignTypedDataError, SignTypedDataParams, SignTypedDataResponse, SignTypedDataResult, SmsSettings, SolanaChain, SolanaFundingConfig, SolanaGetBalanceParams, SolanaGetBalanceResult, SolanaGetTokenAccountsByOwnerParams, SolanaGetTokenAccountsByOwnerResult, SolanaSendTransactionParams, SolanaSendTransactionResult, SolanaSignMessageParams, SolanaSignMessageResult, SolanaSignTransactionParams, SolanaSignTransactionResult, TransactionCommitment, TransactionEncoding, TransactionUIOptions, TypedMessage, UseFundWalletInterface, UsersMePublicResponse, UsersMeRequest, UsersMeResponse, VerifiedSession, VerifyEmailOtpRequest, VerifyEmailOtpResponse, VerifyEmailOtpUser, VerifyOAuthTokenRequest, VerifyOAuthTokenResponse, VerifySiweWalletRegistrationRequest, WALLET_ERROR_CODES, Wallet, WalletChain, WalletChainType, WalletConnectConfig, WalletCreationError, WalletError, WalletErrorCode, WalletKeyRequest, WalletListEntry, WalletRegistrationNonceRequest, WalletRegistrationNonceResponse, WalletType, WalletVerifyRequest } from './types/index.js';
|
|
2
|
+
export { getIframeOrigin, getIframeUrl, getMoonKeyApiUrl } from './utils/index.js';
|
|
3
|
+
export { F as FORWARDED_ERROR_FIELDS, P as PostMessageClient, a as PostMessageMethod, b as PostMessageServer, c as PostMessageType } from './post-message-C_99BCBh.js';
|
|
4
|
+
export { B as BlockExplorer, C as Chain, a as ChainLikeWithId, E as EthereumChainConfig, N as NativeCurrency, R as RpcConfig, b as RpcUrls } from './chain-C9dvKXUY.js';
|