@pushchain/ui-kit
Version:
Push Chain is a true universal L1 that is 100% EVM compatible. It allows developers to deploy once and make their apps instantly compatible with users from all other L1s (Ethereum, Solana, etc) with zero on-chain code change.
97 lines • 4.77 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CHAIN_LOGO = exports.APP_TO_WALLET_ACTION = exports.WALLET_TO_APP_ACTION = exports.PushUI = void 0;
const tslib_1 = require("tslib");
const core_1 = require("@pushchain/core");
const common_1 = require("../components/common");
const types_1 = require("../types");
const BaseMonotone_1 = tslib_1.__importDefault(require("../components/common/icons/BaseMonotone"));
const PushWalletToast_1 = require("../components/PushWalletToast");
exports.PushUI = {
CONSTANTS: {
PUSH_NETWORK: core_1.PushChain.CONSTANTS.PUSH_NETWORK,
CHAIN: {
PUSH: 'pushWallet',
ETHEREUM: 'ethereum',
SOLANA: 'solana',
BASE: 'base',
ARBITRUM: 'arbitrum',
BINANCE: 'binance',
WALLET_CONNECT: 'walletConnect'
},
THEME: { LIGHT: 'light', DARK: 'dark' },
LOGIN: { LAYOUT: { SPLIT: 'split', SIMPLE: 'simple' } },
CONNECTED: {
LAYOUT: { FULL: 'full', HOVER: 'hover' },
INTERACTION: { INTERACTIVE: 'interactive', BLUR: 'blur' },
},
CONNECTION: { STATUS: types_1.ConnectionStatus },
CHAIN_CONFIG: core_1.PushChain.CONSTANTS.CHAIN,
TOAST: {
POSITION: PushWalletToast_1.TOAST_POSITION,
}
},
};
// events send by wallet to the dapp
var WALLET_TO_APP_ACTION;
(function (WALLET_TO_APP_ACTION) {
WALLET_TO_APP_ACTION["CONNECT_EXTERNAL_WALLET"] = "connectWallet";
WALLET_TO_APP_ACTION["CONNECT_SOCIAL"] = "connectSocial";
WALLET_TO_APP_ACTION["APP_CONNECTION_SUCCESS"] = "appConnectionSuccess";
WALLET_TO_APP_ACTION["APP_CONNECTION_REJECTED"] = "appConnectionRejected";
WALLET_TO_APP_ACTION["APP_CONNECTION_CANCELLED"] = "appConnectionCancelled";
WALLET_TO_APP_ACTION["IS_LOGGED_IN"] = "isLoggedIn";
WALLET_TO_APP_ACTION["IS_LOGGED_OUT"] = "loggedOut";
WALLET_TO_APP_ACTION["SIGN_MESSAGE"] = "signatureMessage";
WALLET_TO_APP_ACTION["SIGN_TRANSACTION"] = "signatureTransaction";
WALLET_TO_APP_ACTION["SIGN_TYPED_DATA"] = "signatureTypedData";
WALLET_TO_APP_ACTION["ERROR"] = "error";
WALLET_TO_APP_ACTION["PUSH_SEND_TRANSACTION"] = "pushSendTransaction";
WALLET_TO_APP_ACTION["CLOSE_IFRAME"] = "closeIFrame";
WALLET_TO_APP_ACTION["UPGRADE_ACCOUNT_REQUEST"] = "upgradeAccountRequest";
WALLET_TO_APP_ACTION["UPGRADE_ACCOUNT_SUCCESS"] = "upgradeAccountSuccess";
WALLET_TO_APP_ACTION["UPGRADE_ACCOUNT_ERROR"] = "upgradeAccountError";
})(WALLET_TO_APP_ACTION || (exports.WALLET_TO_APP_ACTION = WALLET_TO_APP_ACTION = {}));
// events send by dapp to the wallet
var APP_TO_WALLET_ACTION;
(function (APP_TO_WALLET_ACTION) {
APP_TO_WALLET_ACTION["NEW_CONNECTION_REQUEST"] = "newConnectionRequest";
APP_TO_WALLET_ACTION["SIGN_MESSAGE"] = "signMessage";
APP_TO_WALLET_ACTION["SIGN_TRANSACTION"] = "signTransaction";
APP_TO_WALLET_ACTION["SIGN_TYPED_DATA"] = "signTypedData";
APP_TO_WALLET_ACTION["ERROR"] = "error";
APP_TO_WALLET_ACTION["LOG_OUT"] = "logOut";
APP_TO_WALLET_ACTION["CONNECTION_STATUS"] = "connectionStatus";
APP_TO_WALLET_ACTION["SOCIAL_CONNECTION_STATUS"] = "socialConnectionStatus";
APP_TO_WALLET_ACTION["WALLET_CONFIG"] = "walletConfig";
APP_TO_WALLET_ACTION["PUSH_SEND_TRANSACTION_RESPONSE"] = "pushSendTransactionResponse";
APP_TO_WALLET_ACTION["READ_ONLY_CONNECTION_STATUS"] = "readOnlyConnectionStatus";
APP_TO_WALLET_ACTION["RECONNECT_WALLET"] = "ReconnectWallet";
APP_TO_WALLET_ACTION["SHOW_UPGRADE_DRAWER"] = "showUpgradeDrawer";
APP_TO_WALLET_ACTION["UPGRADE_ACCOUNT_RESPONSE"] = "upgradeAccountResponse";
})(APP_TO_WALLET_ACTION || (exports.APP_TO_WALLET_ACTION = APP_TO_WALLET_ACTION = {}));
exports.CHAIN_LOGO = {
1: common_1.EthereumMonotone,
11155111: common_1.EthereumMonotone,
137: common_1.PolygonMonotone,
80002: common_1.PolygonMonotone,
97: common_1.BnbMonotone,
56: common_1.BnbMonotone,
42161: common_1.ArbitrumMonotone,
421614: common_1.ArbitrumMonotone,
84532: BaseMonotone_1.default,
11155420: common_1.OptimismMonotone,
10: common_1.OptimismMonotone,
2442: common_1.PolygonMonotone,
1101: common_1.PolygonMonotone,
43114: common_1.AvalancheMonotone,
43113: common_1.AvalancheMonotone,
'5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp': common_1.SolanaMonotone, // mainnet
'4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z': common_1.SolanaMonotone, // testnet
EtWTRABZaYq6iMfeYKouRu166VU2xqa1: common_1.SolanaMonotone, // devnet
9: common_1.PushMonotone,
9000: common_1.PushMonotone,
devnet: common_1.PushMonotone,
};
tslib_1.__exportStar(require("./environment"), exports);
//# sourceMappingURL=index.js.map