@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.
Files changed (38) hide show
  1. package/dist/{chunk-6LTEG7VN.mjs → chunk-I56GRKAG.mjs} +19 -0
  2. package/dist/{chunk-VVL65GIB.mjs → chunk-JU5MWLXH.mjs} +14 -0
  3. package/dist/index.d.mts +2 -3
  4. package/dist/index.d.ts +2 -3
  5. package/dist/index.js +14 -0
  6. package/dist/index.mjs +1 -1
  7. package/dist/{interfaces-pNTEOKaK.d.ts → interfaces-1vfik3Ef.d.ts} +1 -1
  8. package/dist/{interfaces-cdKh3sLA.d.mts → interfaces-BdIeMGGD.d.mts} +1 -1
  9. package/dist/lib/index.d.mts +32 -2
  10. package/dist/lib/index.d.ts +32 -2
  11. package/dist/lib/index.js +21 -0
  12. package/dist/lib/index.mjs +5 -1
  13. package/dist/{post-message-CmgAfkOS.d.mts → post-message-Z6cLf0mS.d.mts} +3 -0
  14. package/dist/{post-message-CmgAfkOS.d.ts → post-message-Z6cLf0mS.d.ts} +3 -0
  15. package/dist/react/ethereum.d.mts +0 -1
  16. package/dist/react/ethereum.d.ts +0 -1
  17. package/dist/react/index.d.mts +41 -3
  18. package/dist/react/index.d.ts +41 -3
  19. package/dist/react/index.js +138 -12
  20. package/dist/react/index.mjs +137 -12
  21. package/dist/react/solana.d.mts +0 -1
  22. package/dist/react/solana.d.ts +0 -1
  23. package/dist/sdk/index.d.mts +63 -9
  24. package/dist/sdk/index.d.ts +63 -9
  25. package/dist/sdk/index.js +270 -17
  26. package/dist/sdk/index.mjs +255 -18
  27. package/dist/types/index.d.mts +135 -3
  28. package/dist/types/index.d.ts +135 -3
  29. package/dist/utils/index.d.mts +1 -1
  30. package/dist/utils/index.d.ts +1 -1
  31. package/dist/utils/index.js +14 -0
  32. package/dist/utils/index.mjs +1 -1
  33. package/dist/web/index.d.mts +2 -2
  34. package/dist/web/index.d.ts +2 -2
  35. package/dist/web/index.mjs +1 -1
  36. package/package.json +3 -1
  37. package/dist/chain-C9dvKXUY.d.mts +0 -48
  38. package/dist/chain-C9dvKXUY.d.ts +0 -48
@@ -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-CmgAfkOS.js';
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
@@ -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",
@@ -9,7 +9,7 @@ import {
9
9
  PostMessageMethod,
10
10
  PostMessageServer,
11
11
  PostMessageType
12
- } from "../chunk-VVL65GIB.mjs";
12
+ } from "../chunk-JU5MWLXH.mjs";
13
13
  import {
14
14
  getMoonKeyApiUrl
15
15
  } from "../chunk-GQKIA37O.mjs";
@@ -1,5 +1,5 @@
1
- import { P as PostMessageClient } from '../post-message-CmgAfkOS.mjs';
2
- import { T as Transport, P as PasskeyAssertor, K as KvStorage } from '../interfaces-cdKh3sLA.mjs';
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
  /**
@@ -1,5 +1,5 @@
1
- import { P as PostMessageClient } from '../post-message-CmgAfkOS.js';
2
- import { T as Transport, P as PasskeyAssertor, K as KvStorage } from '../interfaces-pNTEOKaK.js';
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
  /**
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  PostMessageClient,
7
7
  PostMessageServer
8
- } from "../chunk-VVL65GIB.mjs";
8
+ } from "../chunk-JU5MWLXH.mjs";
9
9
 
10
10
  // src/web/iframe-transport.ts
11
11
  var clientCache = /* @__PURE__ */ new WeakMap();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moon-x/core",
3
- "version": "0.4.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 };
@@ -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 };