buckyos 0.7.133 → 0.7.136

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 (58) hide show
  1. package/cli/dist/cli.mjs +1 -1
  2. package/cli/dist/cli.mjs.map +1 -1
  3. package/cli/version.ts +1 -1
  4. package/dist/account.d.ts +11 -0
  5. package/dist/account.d.ts.map +1 -1
  6. package/dist/browser.cjs +1 -1
  7. package/dist/browser.cjs.map +1 -1
  8. package/dist/browser.d.ts +2 -0
  9. package/dist/browser.d.ts.map +1 -1
  10. package/dist/browser.mjs +166 -143
  11. package/dist/browser.mjs.map +1 -1
  12. package/dist/hybrid_sso.d.ts +110 -0
  13. package/dist/hybrid_sso.d.ts.map +1 -0
  14. package/dist/index.cjs +1 -1
  15. package/dist/index.cjs.map +1 -1
  16. package/dist/index.d.ts +2 -0
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.mjs +166 -143
  19. package/dist/index.mjs.map +1 -1
  20. package/dist/krpc_client.d.ts +7 -1
  21. package/dist/krpc_client.d.ts.map +1 -1
  22. package/dist/msg_center_client.d.ts +13 -1
  23. package/dist/msg_center_client.d.ts.map +1 -1
  24. package/dist/ndm_client.d.ts +6 -0
  25. package/dist/ndm_client.d.ts.map +1 -1
  26. package/dist/ndm_proxy-7cf15839.js +13 -0
  27. package/dist/ndm_proxy-7cf15839.js.map +1 -0
  28. package/dist/{ndm_proxy-501cb1e8.mjs → ndm_proxy-b5c95488.mjs} +360 -170
  29. package/dist/ndm_proxy-b5c95488.mjs.map +1 -0
  30. package/dist/ndn_types-324121ae.js +2 -0
  31. package/dist/ndn_types-324121ae.js.map +1 -0
  32. package/dist/{ndn_types-d768245f.mjs → ndn_types-ac9c1e48.mjs} +64 -38
  33. package/dist/ndn_types-ac9c1e48.mjs.map +1 -0
  34. package/dist/node.cjs +1 -1
  35. package/dist/node.cjs.map +1 -1
  36. package/dist/node.d.ts +2 -0
  37. package/dist/node.d.ts.map +1 -1
  38. package/dist/node.mjs +166 -143
  39. package/dist/node.mjs.map +1 -1
  40. package/dist/provision.cjs +1 -1
  41. package/dist/provision.mjs +1 -1
  42. package/dist/runtime.d.ts +30 -1
  43. package/dist/runtime.d.ts.map +1 -1
  44. package/dist/sdk_core.d.ts +14 -1
  45. package/dist/sdk_core.d.ts.map +1 -1
  46. package/dist/{tus_client-b1c35e8c.mjs → tus_client-19baa342.mjs} +2 -2
  47. package/dist/{tus_client-b1c35e8c.mjs.map → tus_client-19baa342.mjs.map} +1 -1
  48. package/dist/{tus_client-d0798623.js → tus_client-2b915a81.js} +2 -2
  49. package/dist/{tus_client-d0798623.js.map → tus_client-2b915a81.js.map} +1 -1
  50. package/dist/verify-hub-client.d.ts +1 -0
  51. package/dist/verify-hub-client.d.ts.map +1 -1
  52. package/package.json +1 -1
  53. package/dist/ndm_proxy-501cb1e8.mjs.map +0 -1
  54. package/dist/ndm_proxy-68b8160c.js +0 -13
  55. package/dist/ndm_proxy-68b8160c.js.map +0 -1
  56. package/dist/ndn_types-44c69036.js +0 -2
  57. package/dist/ndn_types-44c69036.js.map +0 -1
  58. package/dist/ndn_types-d768245f.mjs.map +0 -1
@@ -655,6 +655,7 @@ class ht {
655
655
  }
656
656
  const LEGACY_ACCOUNT_STORAGE_KEY = "buckyos.account_info";
657
657
  const BROWSER_USER_INFO_STORAGE_KEY = "user_info";
658
+ const BROWSER_IDENTITY_STORAGE_KEY = "buckyos.identity";
658
659
  function getAccountStorageKey(appId) {
659
660
  return `buckyos.account_info.${appId}`;
660
661
  }
@@ -722,6 +723,7 @@ function hashPassword(username, password, nonce = null) {
722
723
  function cleanLocalAccountInfo(appId) {
723
724
  localStorage.removeItem(getAccountStorageKey(appId));
724
725
  localStorage.removeItem(BROWSER_USER_INFO_STORAGE_KEY);
726
+ localStorage.removeItem(BROWSER_IDENTITY_STORAGE_KEY);
725
727
  const legacy = parseAccountInfo(localStorage.getItem(LEGACY_ACCOUNT_STORAGE_KEY));
726
728
  if ((legacy == null ? void 0 : legacy.session_token) && parseTokenAppId(legacy.session_token) === appId) {
727
729
  localStorage.removeItem(LEGACY_ACCOUNT_STORAGE_KEY);
@@ -755,6 +757,26 @@ function saveBrowserUserInfo(userInfo) {
755
757
  function getBrowserUserInfo() {
756
758
  return parseBrowserUserInfo(localStorage.getItem(BROWSER_USER_INFO_STORAGE_KEY));
757
759
  }
760
+ function clearBrowserUserInfo() {
761
+ localStorage.removeItem(BROWSER_USER_INFO_STORAGE_KEY);
762
+ }
763
+ function saveBrowserIdentity(identity) {
764
+ localStorage.setItem(BROWSER_IDENTITY_STORAGE_KEY, JSON.stringify(identity));
765
+ }
766
+ function getBrowserIdentityRaw() {
767
+ const raw = localStorage.getItem(BROWSER_IDENTITY_STORAGE_KEY);
768
+ if (!raw) {
769
+ return null;
770
+ }
771
+ try {
772
+ return JSON.parse(raw);
773
+ } catch {
774
+ return null;
775
+ }
776
+ }
777
+ function clearBrowserIdentity() {
778
+ localStorage.removeItem(BROWSER_IDENTITY_STORAGE_KEY);
779
+ }
758
780
  const DID_OBJECT_SERVICE_TYPE = "DIDObjectService";
759
781
  const DID_OBJECT_SERVICE_ID = "#did-object";
760
782
  const NODE_IDENTITY_SCHEMA_V2 = "buckyos.node_identity.v2";
@@ -3741,44 +3763,48 @@ const ndn_types = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
3741
3763
  verifyNamedObjectFromStr
3742
3764
  }, Symbol.toStringTag, { value: "Module" }));
3743
3765
  export {
3744
- encodeDeviceDocument as $,
3745
- canonicalize$1 as A,
3746
- signJwtEdDSA as B,
3747
- ChunkId as C,
3766
+ oodDescriptionToString as $,
3767
+ getBrowserUserInfo as A,
3768
+ clearBrowserIdentity as B,
3769
+ saveLocalAccountInfo as C,
3748
3770
  DID_OBJECT_SERVICE_TYPE as D,
3749
- sha256Bytes as E,
3750
- FileObject as F,
3751
- DirObject as G,
3752
- newDeviceDocumentByJwk as H,
3753
- verifyJwtEdDSA as I,
3754
- deviceDocumentToOrderedJson as J,
3755
- decodeJwtClaimWithoutVerify as K,
3756
- commonjsGlobal as L,
3757
- DEFAULT_EXPIRE_TIME as M,
3771
+ cleanLocalAccountInfo as E,
3772
+ canonicalize$1 as F,
3773
+ signJwtEdDSA as G,
3774
+ ChunkId as H,
3775
+ FileObject as I,
3776
+ sha256Bytes as J,
3777
+ DirObject as K,
3778
+ newDeviceDocumentByJwk as L,
3779
+ verifyJwtEdDSA as M,
3758
3780
  NODE_IDENTITY_SCHEMA_V2 as N,
3759
3781
  ObjId as O,
3760
- buckyosGetUnixTimestamp as P,
3761
- getPublicKeyXFromPrivatePem as Q,
3762
- getXFromJwk as R,
3782
+ deviceDocumentToOrderedJson as P,
3783
+ decodeJwtClaimWithoutVerify as Q,
3784
+ commonjsGlobal as R,
3763
3785
  SimpleChunkList as S,
3764
- createJwkByX as T,
3765
- newOwnerDocument as U,
3766
- ownerDocumentSetDefaultZoneDid as V,
3767
- ownerDocumentToOrderedJson as W,
3768
- oodDescriptionToString as X,
3769
- parseOODDescription as Y,
3770
- encodeZoneBootDocument as Z,
3771
- newZoneBootDocument as _,
3786
+ DEFAULT_EXPIRE_TIME as T,
3787
+ buckyosGetUnixTimestamp as U,
3788
+ getPublicKeyXFromPrivatePem as V,
3789
+ getXFromJwk as W,
3790
+ createJwkByX as X,
3791
+ newOwnerDocument as Y,
3792
+ ownerDocumentSetDefaultZoneDid as Z,
3793
+ ownerDocumentToOrderedJson as _,
3772
3794
  ndn_types as a,
3773
- newDeviceMiniDocumentByDeviceDocument as a0,
3774
- deviceMiniDocumentToJwt as a1,
3775
- newZoneDocument as a2,
3776
- encodeZoneDocument as a3,
3777
- zoneDocumentToOrderedJson as a4,
3778
- newDeviceMiniDocument as a5,
3779
- newDeviceDocumentByMiniDocument as a6,
3780
- buildNamedObjectByJson as a7,
3781
- getDefaultExportFromCjs as a8,
3795
+ parseOODDescription as a0,
3796
+ encodeZoneBootDocument as a1,
3797
+ newZoneBootDocument as a2,
3798
+ encodeDeviceDocument as a3,
3799
+ newDeviceMiniDocumentByDeviceDocument as a4,
3800
+ deviceMiniDocumentToJwt as a5,
3801
+ newZoneDocument as a6,
3802
+ encodeZoneDocument as a7,
3803
+ zoneDocumentToOrderedJson as a8,
3804
+ newDeviceMiniDocument as a9,
3805
+ newDeviceDocumentByMiniDocument as aa,
3806
+ buildNamedObjectByJson as ab,
3807
+ getDefaultExportFromCjs as ac,
3782
3808
  DID_OBJECT_SERVICE_ID as b,
3783
3809
  isBuckyOSOwnerDocument as c,
3784
3810
  isBuckyOSDeviceMiniDocument as d,
@@ -3800,9 +3826,9 @@ export {
3800
3826
  getDidMethod as t,
3801
3827
  getDidIdentifier as u,
3802
3828
  DID as v,
3803
- getBrowserUserInfo as w,
3804
- saveBrowserUserInfo as x,
3805
- saveLocalAccountInfo as y,
3806
- cleanLocalAccountInfo as z
3829
+ getBrowserIdentityRaw as w,
3830
+ clearBrowserUserInfo as x,
3831
+ saveBrowserIdentity as y,
3832
+ saveBrowserUserInfo as z
3807
3833
  };
3808
- //# sourceMappingURL=ndn_types-d768245f.mjs.map
3834
+ //# sourceMappingURL=ndn_types-ac9c1e48.mjs.map