const d = (t) => t?.sourceAppPid, u = (t) => t?.sourceAppPid || window?.blocklet?.appPid;
function i(t) {
  return t?.did;
}
function o(t) {
  return t?.connectedAccounts || t?.extraConfigs?.connectedAccounts || [];
}
function s(t) {
  return t?.sourceProvider || t?.extraConfigs?.sourceProvider || "wallet";
}
function l(t) {
  return o(t).map((c) => c.provider);
}
function A(t) {
  return o(t).map((e) => e.did);
}
function r(t) {
  return o(t).find((e) => e.provider === "wallet");
}
function p(t) {
  return r(t)?.did;
}
export {
  o as getConnectedAccounts,
  A as getConnectedDids,
  u as getCurrentAppPid,
  i as getPermanentDid,
  d as getSourceAppPid,
  s as getSourceProvider,
  l as getSourceProviders,
  r as getWallet,
  p as getWalletDid
};
