aboutsummaryrefslogtreecommitdiff
path: root/src/external/stellar-freighter-api/index.min.js.map
diff options
context:
space:
mode:
Diffstat (limited to 'src/external/stellar-freighter-api/index.min.js.map')
-rw-r--r--src/external/stellar-freighter-api/index.min.js.map1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/external/stellar-freighter-api/index.min.js.map b/src/external/stellar-freighter-api/index.min.js.map
new file mode 100644
index 0000000..8b512ab
--- /dev/null
+++ b/src/external/stellar-freighter-api/index.min.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.min.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAsB,aAAID,IAE1BD,EAAmB,aAAIC,GACxB,CATD,CASGK,MAAM,I,mBCRT,ICDYC,EAqDAC,EDpDRC,EAAsB,CEA1BA,EAAwB,CAACP,EAASQ,KACjC,IAAI,IAAIC,KAAOD,EACXD,EAAoBG,EAAEF,EAAYC,KAASF,EAAoBG,EAAEV,EAASS,IAC5EE,OAAOC,eAAeZ,EAASS,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDF,EAAwB,CAACQ,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFT,EAAyBP,IACH,oBAAXoB,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeZ,EAASoB,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeZ,EAAS,aAAc,CAAEsB,OAAO,GAAO,G,wRHL9D,SAAYjB,GACV,kCACA,8BACA,4BACA,kCACA,kDACA,8BACA,4CACA,4CACA,4CACA,oDACA,sEACA,oCACA,sCACA,gCACA,8BACA,wBACA,sCACA,wBACA,oCACA,sDACA,0CACA,0DACA,0EACA,0CACA,gDACA,kDACA,sBACA,0CACA,kCACA,gCACA,0DACA,gCACA,g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iBAAmBF,EAAkB1D,SAC1C9D,KAAK2H,2BAA6BH,EAAkBvD,oBAEpDjE,KAAKyH,eAAiBF,EAAa/E,UACnCxC,KAAK0H,eAAiBF,EAAkB1D,QACxC9D,KAAK2H,yBAA2BH,EAAkBvD,kBAElDoD,EAAG,CACDhD,QAASkD,EAAa/E,UACtBsB,QAAS0D,EAAkB1D,QAC3BG,kBAAmBuD,EAAkBvD,qBAIzC3B,YAAW,IAAMtC,KAAKoH,UAAUC,IAAKrH,KAAKmH,QAAQ,EAjDlDnH,KAAKmH,QAAUA,EACfnH,KAAKyH,eAAiB,GACtBzH,KAAK0H,eAAiB,GACtB1H,KAAK2H,yBAA2B,GAChC3H,KAAKsH,WAAY,CACnB,CAEA,KAAAM,CAAMP,GACJ,OAAK/C,GAGLtE,KAAKsH,WAAY,EACjBtH,KAAKoH,UAAUC,GAER,CAAC,GALC,CAAE5D,MAAOT,EAMpB,CAqCA,IAAA6E,GACE7H,KAAKsH,WAAY,CACnB,EC9DK,MAAMhD,EAA8B,oBAAX5C,OAgBhC,GACE0C,WAAU,EACVI,SAAQ,EACRK,gBAAe,EACfU,YAAW,EACXQ,cAAa,EACbxD,YAAW,EACX+D,WAAU,EACVE,kBAAiB,EACjBC,UAAS,EACTG,WAAU,EACVI,cAAa,EACbC,mBAAkB,G","sources":["webpack://freighterApi/webpack/universalModuleDefinition","webpack://freighterApi/webpack/bootstrap","webpack://freighterApi/./src/home/kaotisk/src/stellar/freighter/@shared/constants/services.ts","webpack://freighterApi/webpack/runtime/define property getters","webpack://freighterApi/webpack/runtime/hasOwnProperty shorthand","webpack://freighterApi/webpack/runtime/make namespace object","webpack://freighterApi/./src/home/kaotisk/src/stellar/freighter/@shared/api/helpers/extensionMessaging.ts","webpack://freighterApi/./src/home/kaotisk/src/stellar/freighter/@shared/api/external.ts","webpack://freighterApi/./src/home/kaotisk/src/stellar/freighter/@stellar/freighter-api/src/getAddress.ts","webpack://freighterApi/./src/home/kaotisk/src/stellar/freighter/@stellar/freighter-api/src/addToken.ts","webpack://freighterApi/./src/home/kaotisk/src/stellar/freighter/@stellar/freighter-api/src/signTransaction.ts","webpack://freighterApi/./src/home/kaotisk/src/stellar/freighter/@stellar/freighter-api/src/signMessage.ts","webpack://freighterApi/./src/home/kaotisk/src/stellar/freighter/@stellar/freighter-api/src/signAuthEntry.ts","webpack://freighterApi/./src/home/kaotisk/src/stellar/freighter/@stellar/freighter-api/src/isConnected.ts","webpack://freighterApi/./src/home/kaotisk/src/stellar/freighter/@stellar/freighter-api/src/getNetwork.ts","webpack://freighterApi/./src/home/kaotisk/src/stellar/freighter/@stellar/freighter-api/src/getNetworkDetails.ts","webpack://freighterApi/./src/home/kaotisk/src/stellar/freighter/@stellar/freighter-api/src/isAllowed.ts","webpack://freighterApi/./src/home/kaotisk/src/stellar/freighter/@stellar/freighter-api/src/setAllowed.ts","webpack://freighterApi/./src/home/kaotisk/src/stellar/freighter/@stellar/freighter-api/src/requestAccess.ts","webpack://freighterApi/./src/home/kaotisk/src/stellar/freighter/@stellar/freighter-api/src/watchWalletChanges.ts","webpack://freighterApi/./src/home/kaotisk/src/stellar/freighter/@stellar/freighter-api/src/index.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"freighterApi\"] = factory();\n\telse\n\t\troot[\"freighterApi\"] = factory();\n})(this, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","export enum SERVICE_TYPES {\n CREATE_ACCOUNT = \"CREATE_ACCOUNT\",\n FUND_ACCOUNT = \"FUND_ACCOUNT\",\n ADD_ACCOUNT = \"ADD_ACCOUNT\",\n IMPORT_ACCOUNT = \"IMPORT_ACCOUNT\",\n IMPORT_HARDWARE_WALLET = \"IMPORT_HARDWARE_WALLET\",\n LOAD_ACCOUNT = \"LOAD_ACCOUNT\",\n MAKE_ACCOUNT_ACTIVE = \"MAKE_ACCOUNT_ACTIVE\",\n UPDATE_ACCOUNT_NAME = \"UPDATE_ACCOUNT_NAME\",\n GET_MNEMONIC_PHRASE = \"GET_MNEMONIC_PHRASE\",\n CONFIRM_MNEMONIC_PHRASE = \"CONFIRM_MNEMONIC_PHRASE\",\n CONFIRM_MIGRATED_MNEMONIC_PHRASE = \"CONFIRM_MIGRATED_MNEMONIC_PHRASE\",\n RECOVER_ACCOUNT = \"RECOVER_ACCOUNT\",\n CONFIRM_PASSWORD = \"CONFIRM_PASSWORD\",\n REJECT_ACCESS = \"REJECT_ACCESS\",\n GRANT_ACCESS = \"GRANT_ACCESS\",\n ADD_TOKEN = \"ADD_TOKEN\",\n SIGN_TRANSACTION = \"SIGN_TRANSACTION\",\n SIGN_BLOB = \"SIGN_BLOB\",\n SIGN_AUTH_ENTRY = \"SIGN_AUTH_ENTRY\",\n HANDLE_SIGNED_HW_PAYLOAD = \"HANDLE_SIGNED_HW_PAYLOAD\",\n REJECT_TRANSACTION = \"REJECT_TRANSACTION\",\n SIGN_FREIGHTER_TRANSACTION = \"SIGN_FREIGHTER_TRANSACTION\",\n SIGN_FREIGHTER_SOROBAN_TRANSACTION = \"SIGN_FREIGHTER_SOROBAN_TRANSACTION\",\n ADD_RECENT_ADDRESS = \"ADD_RECENT_ADDRESS\",\n LOAD_RECENT_ADDRESSES = \"LOAD_RECENT_ADDRESSES\",\n LOAD_LAST_USED_ACCOUNT = \"LOAD_LAST_USED_ACCOUNT\",\n SIGN_OUT = \"SIGN_OUT\",\n SHOW_BACKUP_PHRASE = \"SHOW_BACKUP_PHRASE\",\n SAVE_ALLOWLIST = \"SAVE_ALLOWLIST\",\n SAVE_SETTINGS = \"SAVE_SETTINGS\",\n SAVE_EXPERIMENTAL_FEATURES = \"SAVE_EXPERIMENTAL_FEATURES\",\n LOAD_SETTINGS = \"LOAD_SETTINGS\",\n GET_CACHED_ASSET_ICON = \"GET_CACHED_ASSET_ICON\",\n CACHE_ASSET_ICON = \"CACHE_ASSET_ICON\",\n GET_CACHED_ASSET_DOMAIN = \"GET_CACHED_ASSET_DOMAIN\",\n CACHE_ASSET_DOMAIN = \"CACHE_ASSET_DOMAIN\",\n GET_MEMO_REQUIRED_ACCOUNTS = \"GET_MEMO_REQUIRED_ACCOUNTS\",\n ADD_CUSTOM_NETWORK = \"ADD_CUSTOM_NETWORK\",\n CHANGE_NETWORK = \"CHANGE_NETWORK\",\n REMOVE_CUSTOM_NETWORK = \"REMOVE_CUSTOM_NETWORK\",\n EDIT_CUSTOM_NETWORK = \"EDIT_CUSTOM_NETWORK\",\n RESET_EXP_DATA = \"RESET_EXP_DATA\",\n ADD_TOKEN_ID = \"ADD_TOKEN_ID\",\n GET_TOKEN_IDS = \"GET_TOKEN_IDS\",\n REMOVE_TOKEN_ID = \"REMOVE_TOKEN_ID\",\n GET_MIGRATABLE_ACCOUNTS = \"GET_MIGRATABLE_ACCOUNTS\",\n GET_MIGRATED_MNEMONIC_PHRASE = \"GET_MIGRATED_MNEMONIC_PHRASE\",\n MIGRATE_ACCOUNTS = \"MIGRATE_ACCOUNTS\",\n ADD_ASSETS_LIST = \"ADD_ASSETS_LIST\",\n MODIFY_ASSETS_LIST = \"MODIFY_ASSETS_LIST\",\n}\n\nexport enum EXTERNAL_SERVICE_TYPES {\n REQUEST_ACCESS = \"REQUEST_ACCESS\",\n REQUEST_PUBLIC_KEY = \"REQUEST_PUBLIC_KEY\",\n SUBMIT_TOKEN = \"SUBMIT_TOKEN\",\n SUBMIT_TRANSACTION = \"SUBMIT_TRANSACTION\",\n SUBMIT_BLOB = \"SUBMIT_BLOB\",\n SUBMIT_AUTH_ENTRY = \"SUBMIT_AUTH_ENTRY\",\n REQUEST_NETWORK = \"REQUEST_NETWORK\",\n REQUEST_NETWORK_DETAILS = \"REQUEST_NETWORK_DETAILS\",\n REQUEST_CONNECTION_STATUS = \"REQUEST_CONNECTION_STATUS\",\n REQUEST_ALLOWED_STATUS = \"REQUEST_ALLOWED_STATUS\",\n SET_ALLOWED_STATUS = \"SET_ALLOWED_STATUS\",\n REQUEST_USER_INFO = \"REQUEST_USER_INFO\",\n}\n\nexport const EXTERNAL_MSG_REQUEST = \"FREIGHTER_EXTERNAL_MSG_REQUEST\";\nexport const EXTERNAL_MSG_RESPONSE = \"FREIGHTER_EXTERNAL_MSG_RESPONSE\";\n\ndeclare const DEV_SERVER: string;\nconst _DEV_SERVER = DEV_SERVER;\nexport { _DEV_SERVER as DEV_SERVER };\n\ndeclare const DEV_EXTENSION: string;\nconst _DEV_EXTENSION = DEV_EXTENSION;\nexport { _DEV_EXTENSION as DEV_EXTENSION };\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import browser from \"webextension-polyfill\";\nimport {\n DEV_SERVER,\n EXTERNAL_MSG_RESPONSE,\n EXTERNAL_MSG_REQUEST,\n EXTERNAL_SERVICE_TYPES,\n SERVICE_TYPES,\n} from \"../../constants/services\";\nimport { Response } from \"../types\";\n\ninterface Msg {\n [key: string]: any;\n type: EXTERNAL_SERVICE_TYPES | SERVICE_TYPES;\n}\n\nexport const sendMessageToContentScript = (msg: Msg): Promise<Response> => {\n /* \n In the case of multiple calls coming in sequentially, we use this MESSAGE_ID to make sure we're responding to\n the appropriate message sender. Otherwise, we can run into race conditions where we simply resolve all \n sent messages with the first thing that comes back.\n */\n const MESSAGE_ID = Date.now() + Math.random();\n\n window.postMessage(\n { source: EXTERNAL_MSG_REQUEST, messageId: MESSAGE_ID, ...msg },\n window.location.origin,\n );\n return new Promise((resolve) => {\n let requestTimeout = 0 as any;\n\n /* \n In the case that Freighter is not installed at all, any messages to \n background from freighter-api will hang forever and not respond in any way. \n This is especially a problem for the isConnected method, because this is \n likely to be called in a situation where Freighter isn't installed.\n To prevent this, we add a timeout to automatically resolve in the event \n Freighter doesn't respond in a timely fashion to this method.\n */\n if (\n msg.type === EXTERNAL_SERVICE_TYPES.REQUEST_CONNECTION_STATUS ||\n msg.type === EXTERNAL_SERVICE_TYPES.REQUEST_PUBLIC_KEY\n ) {\n requestTimeout = setTimeout(() => {\n resolve({\n isConnected: false,\n publicKey: \"\",\n } as Response);\n window.removeEventListener(\"message\", messageListener);\n }, 2000);\n }\n\n const messageListener = (event: { source: any; data: Response }) => {\n // We only accept messages from ourselves\n if (event.source !== window) return;\n // Only respond to messages tagged as being from our content script\n if (event?.data?.source !== EXTERNAL_MSG_RESPONSE) return;\n // Only respond to messages that this instance of sendMessageToContentScript sent\n if (event?.data?.messagedId !== MESSAGE_ID) return;\n\n resolve(event.data);\n window.removeEventListener(\"message\", messageListener);\n clearTimeout(requestTimeout);\n };\n window.addEventListener(\"message\", messageListener, false);\n });\n};\n\nexport const sendMessageToBackground = async (msg: Msg): Promise<Response> => {\n let res;\n if (DEV_SERVER) {\n // treat this as an external call because we're making the call from the browser, not the popup\n res = await sendMessageToContentScript(msg);\n } else {\n res = (await browser.runtime.sendMessage(msg)) as Response;\n }\n\n return res as Response;\n};\n\nexport const FreighterApiNodeError = {\n code: -1,\n message: \"Node environment is not supported\",\n};\n\nexport const FreighterApiInternalError = {\n code: -1,\n message:\n \"The wallet encountered an internal error. Please try again or contact the wallet if the problem persists.\",\n};\n\nexport const FreighterApiDeclinedError = {\n code: -4,\n message: \"The user rejected this request.\",\n};\n","import { EXTERNAL_SERVICE_TYPES } from \"../constants/services\";\nimport { NetworkDetails } from \"../constants/stellar\";\nimport {\n sendMessageToContentScript,\n FreighterApiInternalError,\n} from \"./helpers/extensionMessaging\";\nimport { FreighterApiError } from \"./types\";\n\nexport const requestAccess = async (): Promise<{\n publicKey: string;\n error?: FreighterApiError;\n}> => {\n let response;\n try {\n response = await sendMessageToContentScript({\n type: EXTERNAL_SERVICE_TYPES.REQUEST_ACCESS,\n });\n } catch (e) {\n console.error(e);\n }\n\n const { publicKey } = response || { publicKey: \"\" };\n\n return { publicKey, error: response?.apiError };\n};\n\nexport const requestPublicKey = async (): Promise<{\n publicKey: string;\n error?: FreighterApiError;\n}> => {\n let response;\n try {\n response = await sendMessageToContentScript({\n type: EXTERNAL_SERVICE_TYPES.REQUEST_PUBLIC_KEY,\n });\n } catch (e) {\n console.error(e);\n }\n\n return { publicKey: response?.publicKey || \"\", error: response?.apiError };\n};\n\nexport const submitToken = async (args: {\n contractId: string;\n networkPassphrase?: string;\n}): Promise<{\n contractId?: string;\n error?: FreighterApiError;\n}> => {\n let response;\n try {\n response = await sendMessageToContentScript({\n contractId: args.contractId,\n networkPassphrase: args.networkPassphrase,\n type: EXTERNAL_SERVICE_TYPES.SUBMIT_TOKEN,\n });\n } catch (e) {\n return {\n error: FreighterApiInternalError,\n };\n }\n\n return {\n contractId: response.contractId,\n error: response?.apiError,\n };\n};\n\nexport const submitTransaction = async (\n transactionXdr: string,\n opts?:\n | string\n | {\n accountToSign?: string;\n networkPassphrase?: string;\n },\n accountToSign?: string,\n): Promise<{\n signedTransaction: string;\n signerAddress: string;\n error?: FreighterApiError;\n}> => {\n let network;\n let _accountToSign;\n let networkPassphrase;\n\n /* \n As of v1.3.0, this method now accepts an object as its second param. \n Previously, it accepted optional second and third string parameters.\n This logic maintains backwards compatibility for older versions\n */\n if (typeof opts === \"object\") {\n _accountToSign = opts.accountToSign;\n networkPassphrase = opts.networkPassphrase;\n } else {\n network = opts;\n _accountToSign = accountToSign;\n }\n\n let response;\n try {\n response = await sendMessageToContentScript({\n transactionXdr,\n network,\n networkPassphrase,\n accountToSign: _accountToSign,\n type: EXTERNAL_SERVICE_TYPES.SUBMIT_TRANSACTION,\n });\n } catch (e) {\n return {\n signedTransaction: \"\",\n signerAddress: \"\",\n error: FreighterApiInternalError,\n };\n }\n const { signedTransaction, signerAddress } = response;\n\n return { signedTransaction, signerAddress, error: response?.apiError };\n};\n\nexport const submitMessage = async (\n blob: string,\n version: string,\n opts?: {\n address?: string;\n networkPassphrase?: string;\n },\n): Promise<{\n signedMessage: Buffer | null;\n signerAddress: string;\n error?: FreighterApiError;\n}> => {\n let response;\n const _opts = opts || {};\n const accountToSign = _opts.address;\n try {\n response = await sendMessageToContentScript({\n blob,\n accountToSign,\n apiVersion: version,\n type: EXTERNAL_SERVICE_TYPES.SUBMIT_BLOB,\n });\n } catch (e) {\n return {\n signedMessage: null,\n signerAddress: \"\",\n error: FreighterApiInternalError,\n };\n }\n const { signedBlob, signerAddress } = response;\n\n return {\n signedMessage: signedBlob || null,\n signerAddress,\n error: response?.apiError,\n };\n};\n\nexport const submitAuthEntry = async (\n entryXdr: string,\n opts?: {\n address?: string;\n networkPassphrase?: string;\n },\n): Promise<{\n signedAuthEntry: Buffer | null;\n signerAddress: string;\n error?: FreighterApiError;\n}> => {\n const _opts = opts || {};\n const accountToSign = _opts.address;\n let response;\n try {\n response = await sendMessageToContentScript({\n entryXdr,\n accountToSign,\n networkPassphrase: opts?.networkPassphrase,\n type: EXTERNAL_SERVICE_TYPES.SUBMIT_AUTH_ENTRY,\n });\n } catch (e) {\n console.error(e);\n return {\n signedAuthEntry: null,\n signerAddress: \"\",\n error: FreighterApiInternalError,\n };\n }\n const { signedAuthEntry, signerAddress } = response;\n\n return {\n signedAuthEntry: signedAuthEntry || null,\n signerAddress,\n error: response?.apiError,\n };\n};\n\nexport const requestNetwork = async (): Promise<{\n network: string;\n networkPassphrase: string;\n error?: FreighterApiError;\n}> => {\n let response;\n try {\n response = await sendMessageToContentScript({\n type: EXTERNAL_SERVICE_TYPES.REQUEST_NETWORK_DETAILS,\n });\n } catch (e) {\n console.error(e);\n }\n\n const { networkDetails } = response || {\n networkDetails: { network: \"\", networkPassphrase: \"\" },\n };\n\n return {\n network: networkDetails?.network,\n networkPassphrase: networkDetails?.networkPassphrase,\n error: response?.apiError,\n };\n};\n\nexport const requestNetworkDetails = async (): Promise<{\n network: string;\n networkUrl: string;\n networkPassphrase: string;\n sorobanRpcUrl?: string;\n error?: FreighterApiError;\n}> => {\n let response;\n try {\n response = await sendMessageToContentScript({\n type: EXTERNAL_SERVICE_TYPES.REQUEST_NETWORK_DETAILS,\n });\n } catch (e) {\n console.error(e);\n }\n\n const { networkDetails, apiError } = response || {\n networkDetails: {\n network: \"\",\n networkName: \"\",\n networkUrl: \"\",\n networkPassphrase: \"\",\n sorobanRpcUrl: undefined,\n apiError: \"\",\n } as NetworkDetails,\n };\n\n const { network, networkUrl, networkPassphrase, sorobanRpcUrl } =\n networkDetails;\n\n return {\n network,\n networkUrl,\n networkPassphrase,\n sorobanRpcUrl,\n error: apiError,\n };\n};\n\nexport const requestConnectionStatus = async (): Promise<{\n isConnected: boolean;\n}> => {\n let response = {\n isConnected: false,\n };\n\n try {\n response = await sendMessageToContentScript({\n type: EXTERNAL_SERVICE_TYPES.REQUEST_CONNECTION_STATUS,\n });\n } catch (e) {\n console.error(e);\n }\n\n return { isConnected: response.isConnected };\n};\n\nexport const requestAllowedStatus = async (): Promise<{\n isAllowed: boolean;\n error?: FreighterApiError;\n}> => {\n let response;\n\n try {\n response = await sendMessageToContentScript({\n type: EXTERNAL_SERVICE_TYPES.REQUEST_ALLOWED_STATUS,\n });\n } catch (e) {\n console.error(e);\n }\n\n const { isAllowed } = response || { isAllowed: false };\n\n return { isAllowed, error: response?.apiError };\n};\n\nexport const setAllowedStatus = async (): Promise<{\n isAllowed: boolean;\n error?: FreighterApiError;\n}> => {\n let response;\n\n try {\n response = await sendMessageToContentScript({\n type: EXTERNAL_SERVICE_TYPES.SET_ALLOWED_STATUS,\n });\n } catch (e) {\n console.error(e);\n }\n\n const { isAllowed } = response || {\n isAllowed: false,\n };\n\n return { isAllowed, error: response?.apiError };\n};\n","import { requestPublicKey } from \"@shared/api/external\";\nimport { FreighterApiError } from \"@shared/api/types\";\nimport { FreighterApiNodeError } from \"@shared/api/helpers/extensionMessaging\";\nimport { isBrowser } from \".\";\n\nexport const getAddress = async (): Promise<\n { address: string } & { error?: FreighterApiError }\n> => {\n let address = \"\";\n if (isBrowser) {\n const req = await requestPublicKey();\n address = req.publicKey;\n\n if (req.error) {\n return { address, error: req.error };\n }\n\n return { address };\n }\n\n return { address, error: FreighterApiNodeError };\n};\n","import { submitToken } from \"@shared/api/external\";\nimport { FreighterApiError } from \"@shared/api/types\";\nimport { FreighterApiNodeError } from \"@shared/api/helpers/extensionMessaging\";\nimport { isBrowser } from \".\";\n\nexport const addToken = async (args: {\n contractId: string;\n networkPassphrase?: string;\n}): Promise<{ contractId: string } & { error?: FreighterApiError }> => {\n if (isBrowser) {\n const req = await submitToken(args);\n\n if (req.error) {\n return { contractId: \"\", error: req.error };\n }\n\n return { contractId: req.contractId || \"\" };\n }\n\n return { contractId: \"\", error: FreighterApiNodeError };\n};\n","import { submitTransaction } from \"@shared/api/external\";\nimport { FreighterApiError } from \"@shared/api/types\";\nimport { FreighterApiNodeError } from \"@shared/api/helpers/extensionMessaging\";\nimport { isBrowser } from \".\";\n\nexport const signTransaction = async (\n transactionXdr: string,\n opts?: {\n networkPassphrase?: string;\n address?: string;\n }\n): Promise<\n { signedTxXdr: string; signerAddress: string } & {\n error?: FreighterApiError;\n }\n> => {\n if (isBrowser) {\n const req = await submitTransaction(transactionXdr, opts);\n\n if (req.error) {\n return { signedTxXdr: \"\", signerAddress: \"\", error: req.error };\n }\n\n return {\n signedTxXdr: req.signedTransaction,\n signerAddress: req.signerAddress,\n };\n }\n\n return { signedTxXdr: \"\", signerAddress: \"\", error: FreighterApiNodeError };\n};\n","import packageJson from \"../package.json\";\nimport { Buffer } from \"buffer\";\n\nimport { submitMessage } from \"@shared/api/external\";\nimport { FreighterApiError } from \"@shared/api/types\";\nimport { FreighterApiNodeError } from \"@shared/api/helpers/extensionMessaging\";\nimport { isBrowser } from \".\";\n\ntype SignMessageV3Response = {\n signedMessage: Buffer | null;\n signerAddress: string;\n} & {\n error?: FreighterApiError;\n};\n\ntype SignMessageV4Response = {\n signedMessage: string;\n signerAddress: string;\n} & {\n error?: FreighterApiError;\n};\n\nexport const signMessage = async (\n message: string,\n opts?: {\n networkPassphrase?: string;\n address?: string;\n }\n): Promise<SignMessageV3Response | SignMessageV4Response> => {\n if (isBrowser) {\n const req = await submitMessage(message, packageJson.version, opts);\n\n if (req.error) {\n return { signedMessage: null, signerAddress: \"\", error: req.error };\n }\n\n return {\n signedMessage: req.signedMessage,\n signerAddress: req.signerAddress,\n };\n }\n\n return {\n signedMessage: null,\n signerAddress: \"\",\n error: FreighterApiNodeError,\n };\n};\n","import { submitAuthEntry } from \"@shared/api/external\";\nimport { FreighterApiError } from \"@shared/api/types\";\nimport { FreighterApiNodeError } from \"@shared/api/helpers/extensionMessaging\";\nimport { isBrowser } from \".\";\n\nexport const signAuthEntry = async (\n entryXdr: string,\n opts?: {\n networkPassphrase?: string;\n address?: string;\n }\n): Promise<\n { signedAuthEntry: Buffer | null; signerAddress: string } & {\n error?: FreighterApiError;\n }\n> => {\n if (isBrowser) {\n const req = await submitAuthEntry(entryXdr, opts);\n\n if (req.error) {\n return { signedAuthEntry: null, signerAddress: \"\", error: req.error };\n }\n\n return {\n signedAuthEntry: req.signedAuthEntry,\n signerAddress: req.signerAddress,\n };\n }\n\n return {\n signedAuthEntry: null,\n signerAddress: \"\",\n error: FreighterApiNodeError,\n };\n};\n","import { requestConnectionStatus } from \"@shared/api/external\";\nimport { FreighterApiError } from \"@shared/api/types\";\nimport { FreighterApiNodeError } from \"@shared/api/helpers/extensionMessaging\";\nimport { isBrowser } from \".\";\n\nexport const isConnected = async (): Promise<\n { isConnected: boolean } & { error?: FreighterApiError }\n> => {\n if (isBrowser) {\n if (window.freighter) {\n return Promise.resolve({ isConnected: window.freighter });\n }\n\n return requestConnectionStatus();\n }\n\n return { isConnected: false, error: FreighterApiNodeError };\n};\n","import { requestNetwork } from \"@shared/api/external\";\nimport { FreighterApiError } from \"@shared/api/types\";\nimport { FreighterApiNodeError } from \"@shared/api/helpers/extensionMessaging\";\nimport { isBrowser } from \".\";\n\nexport const getNetwork = async (): Promise<\n { network: string; networkPassphrase: string } & {\n error?: FreighterApiError;\n }\n> => {\n if (isBrowser) {\n const req = await requestNetwork();\n\n if (req.error) {\n return { network: \"\", networkPassphrase: \"\", error: req.error };\n }\n\n return { network: req.network, networkPassphrase: req.networkPassphrase };\n }\n\n return { network: \"\", networkPassphrase: \"\", error: FreighterApiNodeError };\n};\n","import { requestNetworkDetails } from \"@shared/api/external\";\nimport { FreighterApiError } from \"@shared/api/types\";\nimport { FreighterApiNodeError } from \"@shared/api/helpers/extensionMessaging\";\nimport { isBrowser } from \".\";\n\nexport const getNetworkDetails = async (): Promise<\n {\n network: string;\n networkUrl: string;\n networkPassphrase: string;\n sorobanRpcUrl?: string;\n } & { error?: FreighterApiError }\n> => {\n if (isBrowser) {\n const req = await requestNetworkDetails();\n\n if (req.error) {\n return {\n network: \"\",\n networkUrl: \"\",\n networkPassphrase: \"\",\n error: req.error,\n };\n }\n\n return {\n network: req.network,\n networkUrl: req.networkUrl,\n networkPassphrase: req.networkPassphrase,\n sorobanRpcUrl: req.sorobanRpcUrl,\n };\n }\n\n return {\n network: \"\",\n networkUrl: \"\",\n networkPassphrase: \"\",\n error: FreighterApiNodeError,\n };\n};\n","import { requestAllowedStatus } from \"@shared/api/external\";\nimport { FreighterApiError } from \"@shared/api/types\";\nimport { FreighterApiNodeError } from \"@shared/api/helpers/extensionMessaging\";\nimport { isBrowser } from \".\";\n\nexport const isAllowed = async (): Promise<\n { isAllowed: boolean } & { error?: FreighterApiError }\n> => {\n let isAllowed = false;\n if (isBrowser) {\n const req = await requestAllowedStatus();\n isAllowed = req.isAllowed;\n\n if (req.error) {\n return { isAllowed, error: req.error };\n }\n\n return { isAllowed };\n }\n\n return { isAllowed, error: FreighterApiNodeError };\n};\n","import { setAllowedStatus } from \"@shared/api/external\";\nimport { FreighterApiError } from \"@shared/api/types\";\nimport { FreighterApiNodeError } from \"@shared/api/helpers/extensionMessaging\";\nimport { isBrowser } from \".\";\n\nexport const setAllowed = async (): Promise<\n { isAllowed: boolean } & { error?: FreighterApiError }\n> => {\n let isAllowed = false;\n if (isBrowser) {\n const req = await setAllowedStatus();\n isAllowed = req.isAllowed;\n\n if (req.error) {\n return { isAllowed, error: req.error };\n }\n\n return { isAllowed };\n }\n\n return { isAllowed, error: FreighterApiNodeError };\n};\n","import { requestAccess as requestAccessApi } from \"@shared/api/external\";\nimport { FreighterApiError } from \"@shared/api/types\";\nimport { FreighterApiNodeError } from \"@shared/api/helpers/extensionMessaging\";\nimport { isBrowser } from \".\";\n\nexport const requestAccess = async (): Promise<\n { address: string } & { error?: FreighterApiError }\n> => {\n let address = \"\";\n if (isBrowser) {\n const req = await requestAccessApi();\n address = req.publicKey;\n\n if (req.error) {\n return { address, error: req.error };\n }\n\n return { address };\n }\n\n return { address, error: FreighterApiNodeError };\n};\n","import { requestPublicKey } from \"@shared/api/external\";\nimport { requestNetworkDetails } from \"@shared/api/external\";\nimport { FreighterApiNodeError } from \"@shared/api/helpers/extensionMessaging\";\nimport { FreighterApiError } from \"@shared/api/types\";\nimport { isBrowser } from \".\";\n\ninterface CallbackParams {\n address: string;\n network: string;\n networkPassphrase: string;\n error?: FreighterApiError;\n}\n\nexport class WatchWalletChanges {\n timeout: number;\n currentAddress: string;\n currentNetwork: string;\n currentNetworkPassphrase: string;\n isRunning: boolean;\n\n constructor(timeout = 3000) {\n this.timeout = timeout;\n this.currentAddress = \"\";\n this.currentNetwork = \"\";\n this.currentNetworkPassphrase = \"\";\n this.isRunning = false;\n }\n\n watch(cb: (params: CallbackParams) => void): { error?: FreighterApiError } {\n if (!isBrowser) {\n return { error: FreighterApiNodeError };\n }\n this.isRunning = true;\n this.fetchInfo(cb);\n\n return {};\n }\n\n fetchInfo = async (cb: (params: CallbackParams) => void) => {\n if (!this.isRunning) {\n return;\n }\n const publicKeyReq = await requestPublicKey();\n const networkDetailsReq = await requestNetworkDetails();\n\n if (publicKeyReq.error || networkDetailsReq.error) {\n cb({\n address: \"\",\n network: \"\",\n networkPassphrase: \"\",\n error: publicKeyReq.error || networkDetailsReq.error,\n });\n }\n\n if (\n this.currentAddress !== publicKeyReq.publicKey ||\n this.currentNetwork !== networkDetailsReq.network ||\n this.currentNetworkPassphrase !== networkDetailsReq.networkPassphrase\n ) {\n this.currentAddress = publicKeyReq.publicKey;\n this.currentNetwork = networkDetailsReq.network;\n this.currentNetworkPassphrase = networkDetailsReq.networkPassphrase;\n\n cb({\n address: publicKeyReq.publicKey,\n network: networkDetailsReq.network,\n networkPassphrase: networkDetailsReq.networkPassphrase,\n });\n }\n\n setTimeout(() => this.fetchInfo(cb), this.timeout);\n };\n\n stop() {\n this.isRunning = false;\n }\n}\n","import { getAddress } from \"./getAddress\";\nimport { addToken } from \"./addToken\";\nimport { signTransaction } from \"./signTransaction\";\nimport { signMessage } from \"./signMessage\";\nimport { signAuthEntry } from \"./signAuthEntry\";\nimport { isConnected } from \"./isConnected\";\nimport { getNetwork } from \"./getNetwork\";\nimport { getNetworkDetails } from \"./getNetworkDetails\";\nimport { isAllowed } from \"./isAllowed\";\nimport { setAllowed } from \"./setAllowed\";\nimport { requestAccess } from \"./requestAccess\";\nimport { WatchWalletChanges } from \"./watchWalletChanges\";\n\nexport const isBrowser = typeof window !== \"undefined\";\n\nexport {\n getAddress,\n addToken,\n signTransaction,\n signMessage,\n signAuthEntry,\n isConnected,\n getNetwork,\n getNetworkDetails,\n isAllowed,\n setAllowed,\n requestAccess,\n WatchWalletChanges,\n};\nexport default {\n getAddress,\n addToken,\n signTransaction,\n signMessage,\n signAuthEntry,\n isConnected,\n getNetwork,\n getNetworkDetails,\n isAllowed,\n setAllowed,\n requestAccess,\n WatchWalletChanges,\n};\n"],"names":["root","factory","exports","module","define","amd","this","SERVICE_TYPES","EXTERNAL_SERVICE_TYPES","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","sendMessageToContentScript","msg","MESSAGE_ID","Date","now","Math","random","window","postMessage","source","messageId","location","origin","Promise","resolve","requestTimeout","type","REQUEST_CONNECTION_STATUS","REQUEST_PUBLIC_KEY","setTimeout","isConnected","publicKey","removeEventListener","messageListener","event","data","messagedId","clearTimeout","addEventListener","FreighterApiNodeError","code","message","FreighterApiInternalError","requestPublicKey","async","response","e","console","error","apiError","requestNetworkDetails","REQUEST_NETWORK_DETAILS","networkDetails","network","networkName","networkUrl","networkPassphrase","sorobanRpcUrl","undefined","getAddress","address","isBrowser","req","addToken","args","contractId","SUBMIT_TOKEN","submitToken","signTransaction","transactionXdr","opts","_accountToSign","accountToSign","submitTransaction","SUBMIT_TRANSACTION","signedTransaction","signerAddress","signedTxXdr","signMessage","blob","version","apiVersion","SUBMIT_BLOB","signedMessage","signedBlob","submitMessage","signAuthEntry","entryXdr","SUBMIT_AUTH_ENTRY","signedAuthEntry","submitAuthEntry","freighter","requestConnectionStatus","getNetwork","requestNetwork","getNetworkDetails","isAllowed","REQUEST_ALLOWED_STATUS","requestAllowedStatus","setAllowed","SET_ALLOWED_STATUS","setAllowedStatus","REQUEST_ACCESS","requestAccess","WatchWalletChanges","constructor","timeout","fetchInfo","cb","isRunning","publicKeyReq","networkDetailsReq","currentAddress","currentNetwork","currentNetworkPassphrase","watch","stop"],"sourceRoot":""} \ No newline at end of file