UNPKG

sparrow-providers

Version:

A JavaScript Ubiq provider that connects to the wallet over a stream.

35 lines 2.89 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const messages = { errors: { disconnected: () => 'Sparrow: Disconnected from chain. Attempting to connect.', permanentlyDisconnected: () => 'Sparrow: Disconnected from Sparrow background. Page reload required.', sendSiteMetadata: () => `Sparrow: Failed to send site metadata. This is an internal error, please report this bug.`, unsupportedSync: (method) => `Sparrow: The Sparrow Ubiq provider does not support synchronous methods like ${method} without a callback parameter.`, invalidDuplexStream: () => 'Must provide a Node.js-style duplex stream.', invalidRequestArgs: () => `Expected a single, non-array, object argument.`, invalidRequestMethod: () => `'args.method' must be a non-empty string.`, invalidRequestParams: () => `'args.params' must be an object or array if provided.`, invalidLoggerObject: () => `'args.logger' must be an object if provided.`, invalidLoggerMethod: (method) => `'args.logger' must include required method '${method}'.`, }, info: { connected: (chainId) => `Sparrow: Connected to chain with ID "${chainId}".`, }, warnings: { // deprecated methods enableDeprecation: `Sparrow: '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`, sendDeprecation: `Sparrow: '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`, // deprecated events events: { close: `Sparrow: 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`, data: `Sparrow: 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`, networkChanged: `Sparrow: 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`, notification: `Sparrow: 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`, }, // misc experimentalMethods: `Sparrow: 'ethereum._Sparrow' exposes non-standard, experimental methods. They may be removed or changed without warning.`, }, }; exports.default = messages; //# sourceMappingURL=messages.js.map