@metamask/providers
Version:
A JavaScript Ethereum provider that connects to the wallet over a stream
1 lines • 4.88 kB
Source Map (JSON)
{"version":3,"file":"messages.cjs","sourceRoot":"","sources":["../src/messages.ts"],"names":[],"mappings":";;AAAA,MAAM,QAAQ,GAAG;IACf,MAAM,EAAE;QACN,YAAY,EAAE,GAAG,EAAE,CACjB,2DAA2D;QAC7D,uBAAuB,EAAE,GAAG,EAAE,CAC5B,wEAAwE;QAC1E,gBAAgB,EAAE,GAAG,EAAE,CACrB,4FAA4F;QAC9F,eAAe,EAAE,CAAC,MAAc,EAAE,EAAE,CAClC,sFAAsF,MAAM,gCAAgC;QAC9H,mBAAmB,EAAE,GAAG,EAAE,CAAC,6CAA6C;QACxE,oBAAoB,EAAE,GAAG,EAAE,CACzB,wEAAwE;QAC1E,kBAAkB,EAAE,GAAG,EAAE,CAAC,gDAAgD;QAC1E,oBAAoB,EAAE,GAAG,EAAE,CAAC,2CAA2C;QACvE,oBAAoB,EAAE,GAAG,EAAE,CACzB,uDAAuD;QACzD,mBAAmB,EAAE,GAAG,EAAE,CAAC,8CAA8C;QACzE,mBAAmB,EAAE,CAAC,MAAc,EAAE,EAAE,CACtC,+CAA+C,MAAM,IAAI;KAC5D;IACD,IAAI,EAAE;QACJ,SAAS,EAAE,CAAC,OAAe,EAAE,EAAE,CAC7B,yCAAyC,OAAO,IAAI;KACvD;IACD,QAAQ,EAAE;QACR,qBAAqB;QACrB,iBAAiB,EAAE,4MAA4M;QAC/N,eAAe,EAAE,6NAA6N;QAC9O,oBAAoB;QACpB,MAAM,EAAE;YACN,KAAK,EAAE,6LAA6L;YACpM,IAAI,EAAE,gLAAgL;YACtL,cAAc,EAAE,mMAAmM;YACnN,YAAY,EAAE,uLAAuL;SACtM;QACD,GAAG,EAAE;YACH,qBAAqB,EAAE,6LAA6L;YACpN,oCAAoC,EAAE,4MAA4M;YAClP,+BAA+B,EAAE,kVAAkV;SACpX;QACD,OAAO;QACP,mBAAmB,EAAE,4HAA4H;KAClJ;CACF,CAAC;AACF,kBAAe,QAAQ,CAAC","sourcesContent":["const messages = {\n errors: {\n disconnected: () =>\n 'MetaMask: Disconnected from chain. Attempting to connect.',\n permanentlyDisconnected: () =>\n 'MetaMask: Disconnected from MetaMask background. Page reload required.',\n sendSiteMetadata: () =>\n `MetaMask: Failed to send site metadata. This is an internal error, please report this bug.`,\n unsupportedSync: (method: string) =>\n `MetaMask: The MetaMask Ethereum provider does not support synchronous methods like ${method} without a callback parameter.`,\n invalidDuplexStream: () => 'Must provide a Node.js-style duplex stream.',\n invalidNetworkParams: () =>\n 'MetaMask: Received invalid network parameters. Please report this bug.',\n invalidRequestArgs: () => `Expected a single, non-array, object argument.`,\n invalidRequestMethod: () => `'args.method' must be a non-empty string.`,\n invalidRequestParams: () =>\n `'args.params' must be an object or array if provided.`,\n invalidLoggerObject: () => `'args.logger' must be an object if provided.`,\n invalidLoggerMethod: (method: string) =>\n `'args.logger' must include required method '${method}'.`,\n },\n info: {\n connected: (chainId: string) =>\n `MetaMask: Connected to chain with ID \"${chainId}\".`,\n },\n warnings: {\n // deprecated methods\n enableDeprecation: `MetaMask: 'ethereum.enable()' is deprecated and may be removed in the future. Please use the 'eth_requestAccounts' RPC method instead.\\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1102`,\n sendDeprecation: `MetaMask: 'ethereum.send(...)' is deprecated and may be removed in the future. Please use 'ethereum.sendAsync(...)' or 'ethereum.request(...)' instead.\\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193`,\n // deprecated events\n events: {\n close: `MetaMask: The event 'close' is deprecated and may be removed in the future. Please use 'disconnect' instead.\\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#disconnect`,\n data: `MetaMask: The event 'data' is deprecated and will be removed in the future. Use 'message' instead.\\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#message`,\n networkChanged: `MetaMask: The event 'networkChanged' is deprecated and may be removed in the future. Use 'chainChanged' instead.\\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#chainchanged`,\n notification: `MetaMask: The event 'notification' is deprecated and may be removed in the future. Use 'message' instead.\\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#message`,\n },\n rpc: {\n ethDecryptDeprecation: `MetaMask: The RPC method 'eth_decrypt' is deprecated and may be removed in the future.\\nFor more information, see: https://medium.com/metamask/metamask-api-method-deprecation-2b0564a84686`,\n ethGetEncryptionPublicKeyDeprecation: `MetaMask: The RPC method 'eth_getEncryptionPublicKey' is deprecated and may be removed in the future.\\nFor more information, see: https://medium.com/metamask/metamask-api-method-deprecation-2b0564a84686`,\n walletWatchAssetNFTExperimental: `MetaMask: The RPC method 'wallet_watchAsset' is experimental for ERC721/ERC1155 assets and may change in the future.\\nFor more information, see: https://github.com/MetaMask/metamask-improvement-proposals/blob/main/MIPs/mip-1.md and https://github.com/MetaMask/metamask-improvement-proposals/blob/main/PROCESS-GUIDE.md#proposal-lifecycle`,\n },\n // misc\n experimentalMethods: `MetaMask: 'ethereum._metamask' exposes non-standard, experimental methods. They may be removed or changed without warning.`,\n },\n};\nexport default messages;\n"]}