@moon-x/core 0.4.0 → 0.5.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/{chunk-6LTEG7VN.mjs → chunk-I56GRKAG.mjs} +19 -0
- package/dist/{chunk-VVL65GIB.mjs → chunk-JU5MWLXH.mjs} +14 -0
- package/dist/index.d.mts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.js +14 -0
- package/dist/index.mjs +1 -1
- package/dist/{interfaces-pNTEOKaK.d.ts → interfaces-1vfik3Ef.d.ts} +1 -1
- package/dist/{interfaces-cdKh3sLA.d.mts → interfaces-BdIeMGGD.d.mts} +1 -1
- package/dist/lib/index.d.mts +32 -2
- package/dist/lib/index.d.ts +32 -2
- package/dist/lib/index.js +21 -0
- package/dist/lib/index.mjs +5 -1
- package/dist/{post-message-CmgAfkOS.d.mts → post-message-Z6cLf0mS.d.mts} +3 -0
- package/dist/{post-message-CmgAfkOS.d.ts → post-message-Z6cLf0mS.d.ts} +3 -0
- package/dist/react/ethereum.d.mts +0 -1
- package/dist/react/ethereum.d.ts +0 -1
- package/dist/react/index.d.mts +41 -3
- package/dist/react/index.d.ts +41 -3
- package/dist/react/index.js +138 -12
- package/dist/react/index.mjs +137 -12
- package/dist/react/solana.d.mts +0 -1
- package/dist/react/solana.d.ts +0 -1
- package/dist/sdk/index.d.mts +63 -9
- package/dist/sdk/index.d.ts +63 -9
- package/dist/sdk/index.js +270 -17
- package/dist/sdk/index.mjs +255 -18
- package/dist/types/index.d.mts +135 -3
- package/dist/types/index.d.ts +135 -3
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +14 -0
- package/dist/utils/index.mjs +1 -1
- package/dist/web/index.d.mts +2 -2
- package/dist/web/index.d.ts +2 -2
- package/dist/web/index.mjs +1 -1
- package/package.json +3 -1
- package/dist/chain-C9dvKXUY.d.mts +0 -48
- package/dist/chain-C9dvKXUY.d.ts +0 -48
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { F as FORWARDED_ERROR_FIELDS, P as PostMessageClient, a as PostMessageMethod, b as PostMessageServer, c as PostMessageType } from '../post-message-
|
|
1
|
+
export { F as FORWARDED_ERROR_FIELDS, P as PostMessageClient, a as PostMessageMethod, b as PostMessageServer, c as PostMessageType } from '../post-message-Z6cLf0mS.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Get the appropriate MoonKey API URL based on environment configuration
|
package/dist/utils/index.js
CHANGED
|
@@ -143,6 +143,20 @@ var PostMessageMethod = {
|
|
|
143
143
|
// dispatcher boring.
|
|
144
144
|
SIGN_HASH: "SIGN_HASH",
|
|
145
145
|
SIGN_7702_AUTHORIZATION: "SIGN_7702_AUTHORIZATION",
|
|
146
|
+
// Provision a SES (Secure Ephemeral Signer) over one or more of the
|
|
147
|
+
// user's MPC wallets. Iframe verifies the Nitro attestation, decrypts
|
|
148
|
+
// the selected keyshares, HPKE-seals them to the verified enclave
|
|
149
|
+
// pubkey, and returns a freshly-generated Ed25519 signer keypair.
|
|
150
|
+
// MoonX never persists the private key — the parent must hand it to
|
|
151
|
+
// the user immediately.
|
|
152
|
+
PROVISION_EPHEMERAL_SIGNER: "PROVISION_EPHEMERAL_SIGNER",
|
|
153
|
+
// List the user's active provisioned ephemeral signers from the
|
|
154
|
+
// wallets backend. Read-only; doesn't touch SES or the enclave.
|
|
155
|
+
LIST_EPHEMERAL_SIGNERS: "LIST_EPHEMERAL_SIGNERS",
|
|
156
|
+
// Soft-revoke a previously-provisioned ephemeral signer. The wallets
|
|
157
|
+
// backend updates revoked_at locally and forwards the revoke to SES
|
|
158
|
+
// so the enclave drops the policy.
|
|
159
|
+
REVOKE_EPHEMERAL_SIGNER: "REVOKE_EPHEMERAL_SIGNER",
|
|
146
160
|
VERIFY_EMAIL_OTP: "VERIFY_EMAIL_OTP",
|
|
147
161
|
VERIFY_OAUTH: "VERIFY_OAUTH",
|
|
148
162
|
START_OAUTH: "START_OAUTH",
|
package/dist/utils/index.mjs
CHANGED
package/dist/web/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as PostMessageClient } from '../post-message-
|
|
2
|
-
import { T as Transport, P as PasskeyAssertor, K as KvStorage } from '../interfaces-
|
|
1
|
+
import { P as PostMessageClient } from '../post-message-Z6cLf0mS.mjs';
|
|
2
|
+
import { T as Transport, P as PasskeyAssertor, K as KvStorage } from '../interfaces-BdIeMGGD.mjs';
|
|
3
3
|
|
|
4
4
|
declare const getCachedPostMessageClient: (contentWindow: Window) => PostMessageClient;
|
|
5
5
|
/**
|
package/dist/web/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as PostMessageClient } from '../post-message-
|
|
2
|
-
import { T as Transport, P as PasskeyAssertor, K as KvStorage } from '../interfaces-
|
|
1
|
+
import { P as PostMessageClient } from '../post-message-Z6cLf0mS.js';
|
|
2
|
+
import { T as Transport, P as PasskeyAssertor, K as KvStorage } from '../interfaces-1vfik3Ef.js';
|
|
3
3
|
|
|
4
4
|
declare const getCachedPostMessageClient: (contentWindow: Window) => PostMessageClient;
|
|
5
5
|
/**
|
package/dist/web/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moon-x/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -58,6 +58,8 @@
|
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
+
"@noble/curves": "1.8.0",
|
|
62
|
+
"@noble/hashes": "1.8.0",
|
|
61
63
|
"@simplewebauthn/browser": "^13.2.2"
|
|
62
64
|
},
|
|
63
65
|
"devDependencies": {
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
type RpcUrls = {
|
|
2
|
-
http: readonly string[];
|
|
3
|
-
webSocket?: readonly string[];
|
|
4
|
-
};
|
|
5
|
-
type NativeCurrency = {
|
|
6
|
-
name: string;
|
|
7
|
-
symbol: string;
|
|
8
|
-
decimals: number;
|
|
9
|
-
};
|
|
10
|
-
type BlockExplorer = {
|
|
11
|
-
name: string;
|
|
12
|
-
url: string;
|
|
13
|
-
};
|
|
14
|
-
type Chain = {
|
|
15
|
-
id: number;
|
|
16
|
-
name: string;
|
|
17
|
-
network?: string;
|
|
18
|
-
nativeCurrency: NativeCurrency;
|
|
19
|
-
blockExplorers?: {
|
|
20
|
-
[key: string]: BlockExplorer;
|
|
21
|
-
default: BlockExplorer;
|
|
22
|
-
};
|
|
23
|
-
rpcUrls: {
|
|
24
|
-
[key: string]: RpcUrls;
|
|
25
|
-
default: RpcUrls;
|
|
26
|
-
};
|
|
27
|
-
testnet?: boolean;
|
|
28
|
-
};
|
|
29
|
-
type ChainLikeWithId = {
|
|
30
|
-
id: number;
|
|
31
|
-
};
|
|
32
|
-
type RpcConfig = {
|
|
33
|
-
rpcUrls?: {
|
|
34
|
-
[chainId: number]: string;
|
|
35
|
-
};
|
|
36
|
-
rpcTimeout?: number;
|
|
37
|
-
};
|
|
38
|
-
interface EthereumChainConfig {
|
|
39
|
-
defaultChain?: any;
|
|
40
|
-
supportedChains?: any[];
|
|
41
|
-
rpcs?: {
|
|
42
|
-
'ethereum:mainnet': {
|
|
43
|
-
rpc: string;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export type { BlockExplorer as B, Chain as C, EthereumChainConfig as E, NativeCurrency as N, RpcConfig as R, ChainLikeWithId as a, RpcUrls as b };
|
package/dist/chain-C9dvKXUY.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
type RpcUrls = {
|
|
2
|
-
http: readonly string[];
|
|
3
|
-
webSocket?: readonly string[];
|
|
4
|
-
};
|
|
5
|
-
type NativeCurrency = {
|
|
6
|
-
name: string;
|
|
7
|
-
symbol: string;
|
|
8
|
-
decimals: number;
|
|
9
|
-
};
|
|
10
|
-
type BlockExplorer = {
|
|
11
|
-
name: string;
|
|
12
|
-
url: string;
|
|
13
|
-
};
|
|
14
|
-
type Chain = {
|
|
15
|
-
id: number;
|
|
16
|
-
name: string;
|
|
17
|
-
network?: string;
|
|
18
|
-
nativeCurrency: NativeCurrency;
|
|
19
|
-
blockExplorers?: {
|
|
20
|
-
[key: string]: BlockExplorer;
|
|
21
|
-
default: BlockExplorer;
|
|
22
|
-
};
|
|
23
|
-
rpcUrls: {
|
|
24
|
-
[key: string]: RpcUrls;
|
|
25
|
-
default: RpcUrls;
|
|
26
|
-
};
|
|
27
|
-
testnet?: boolean;
|
|
28
|
-
};
|
|
29
|
-
type ChainLikeWithId = {
|
|
30
|
-
id: number;
|
|
31
|
-
};
|
|
32
|
-
type RpcConfig = {
|
|
33
|
-
rpcUrls?: {
|
|
34
|
-
[chainId: number]: string;
|
|
35
|
-
};
|
|
36
|
-
rpcTimeout?: number;
|
|
37
|
-
};
|
|
38
|
-
interface EthereumChainConfig {
|
|
39
|
-
defaultChain?: any;
|
|
40
|
-
supportedChains?: any[];
|
|
41
|
-
rpcs?: {
|
|
42
|
-
'ethereum:mainnet': {
|
|
43
|
-
rpc: string;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export type { BlockExplorer as B, Chain as C, EthereumChainConfig as E, NativeCurrency as N, RpcConfig as R, ChainLikeWithId as a, RpcUrls as b };
|