@web3auth/ws-embed
Version:
Embed script
21 lines (18 loc) • 1.1 kB
JavaScript
;
var messages = {
errors: {
disconnected: () => "Web3Auth: Lost connection to Web3Auth.",
permanentlyDisconnected: () => "Web3Auth: Disconnected from iframe. Page reload required.",
unsupportedSync: method => `Web3Auth: The Web3Auth Ethereum provider does not support synchronous methods like ${method} without a callback parameter.`,
invalidDuplexStream: () => "Must provide a Node.js-style duplex stream.",
invalidOptions: maxEventListeners => `Invalid options. Received: { maxEventListeners: ${maxEventListeners}}`,
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 => `Web3Auth: Connected to chain with ID "${chainId}".`
}};
module.exports = messages;