@shadow-corp/nearconnect 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +546 -0
- package/build/InjectedWallet.d.ts +22 -0
- package/build/InjectedWallet.js +58 -0
- package/build/InjectedWallet.js.map +1 -0
- package/build/NearConnector.d.ts +151 -0
- package/build/NearConnector.js +536 -0
- package/build/NearConnector.js.map +1 -0
- package/build/ParentFrameWallet.d.ts +22 -0
- package/build/ParentFrameWallet.js +66 -0
- package/build/ParentFrameWallet.js.map +1 -0
- package/build/SandboxedWallet/code.d.ts +7 -0
- package/build/SandboxedWallet/code.js +324 -0
- package/build/SandboxedWallet/code.js.map +1 -0
- package/build/SandboxedWallet/executor.d.ts +23 -0
- package/build/SandboxedWallet/executor.js +338 -0
- package/build/SandboxedWallet/executor.js.map +1 -0
- package/build/SandboxedWallet/iframe.d.ts +18 -0
- package/build/SandboxedWallet/iframe.js +78 -0
- package/build/SandboxedWallet/iframe.js.map +1 -0
- package/build/SandboxedWallet/index.d.ts +24 -0
- package/build/SandboxedWallet/index.js +54 -0
- package/build/SandboxedWallet/index.js.map +1 -0
- package/build/actions/index.d.ts +3 -0
- package/build/actions/index.js +105 -0
- package/build/actions/index.js.map +1 -0
- package/build/actions/types.d.ts +76 -0
- package/build/actions/types.js +3 -0
- package/build/actions/types.js.map +1 -0
- package/build/connection/health.d.ts +213 -0
- package/build/connection/health.js +391 -0
- package/build/connection/health.js.map +1 -0
- package/build/connection/index.d.ts +4 -0
- package/build/connection/index.js +48 -0
- package/build/connection/index.js.map +1 -0
- package/build/connection/reconnect.d.ts +261 -0
- package/build/connection/reconnect.js +454 -0
- package/build/connection/reconnect.js.map +1 -0
- package/build/connection/retry.d.ts +187 -0
- package/build/connection/retry.js +427 -0
- package/build/connection/retry.js.map +1 -0
- package/build/connection/state.d.ts +222 -0
- package/build/connection/state.js +431 -0
- package/build/connection/state.js.map +1 -0
- package/build/errors.d.ts +177 -0
- package/build/errors.js +546 -0
- package/build/errors.js.map +1 -0
- package/build/hardware/errors.d.ts +36 -0
- package/build/hardware/errors.js +127 -0
- package/build/hardware/errors.js.map +1 -0
- package/build/hardware/index.d.ts +7 -0
- package/build/hardware/index.js +39 -0
- package/build/hardware/index.js.map +1 -0
- package/build/hardware/near-app.d.ts +95 -0
- package/build/hardware/near-app.js +291 -0
- package/build/hardware/near-app.js.map +1 -0
- package/build/hardware/transport.d.ts +94 -0
- package/build/hardware/transport.js +267 -0
- package/build/hardware/transport.js.map +1 -0
- package/build/hardware/types.d.ts +98 -0
- package/build/hardware/types.js +72 -0
- package/build/hardware/types.js.map +1 -0
- package/build/helpers/analytics.d.ts +191 -0
- package/build/helpers/analytics.js +304 -0
- package/build/helpers/analytics.js.map +1 -0
- package/build/helpers/base58.d.ts +6 -0
- package/build/helpers/base58.js +47 -0
- package/build/helpers/base58.js.map +1 -0
- package/build/helpers/events.d.ts +42 -0
- package/build/helpers/events.js +68 -0
- package/build/helpers/events.js.map +1 -0
- package/build/helpers/html.d.ts +8 -0
- package/build/helpers/html.js +30 -0
- package/build/helpers/html.js.map +1 -0
- package/build/helpers/indexdb.d.ts +14 -0
- package/build/helpers/indexdb.js +166 -0
- package/build/helpers/indexdb.js.map +1 -0
- package/build/helpers/manifest.d.ts +147 -0
- package/build/helpers/manifest.js +329 -0
- package/build/helpers/manifest.js.map +1 -0
- package/build/helpers/queue.d.ts +11 -0
- package/build/helpers/queue.js +48 -0
- package/build/helpers/queue.js.map +1 -0
- package/build/helpers/session.d.ts +119 -0
- package/build/helpers/session.js +289 -0
- package/build/helpers/session.js.map +1 -0
- package/build/helpers/simulation.d.ts +128 -0
- package/build/helpers/simulation.js +441 -0
- package/build/helpers/simulation.js.map +1 -0
- package/build/helpers/storage.d.ts +58 -0
- package/build/helpers/storage.js +190 -0
- package/build/helpers/storage.js.map +1 -0
- package/build/helpers/trust.d.ts +157 -0
- package/build/helpers/trust.js +340 -0
- package/build/helpers/trust.js.map +1 -0
- package/build/helpers/url.d.ts +1 -0
- package/build/helpers/url.js +13 -0
- package/build/helpers/url.js.map +1 -0
- package/build/helpers/uuid.d.ts +1 -0
- package/build/helpers/uuid.js +14 -0
- package/build/helpers/uuid.js.map +1 -0
- package/build/index.d.ts +21 -0
- package/build/index.js +167 -0
- package/build/index.js.map +1 -0
- package/build/popups/IframeWalletPopup.d.ts +16 -0
- package/build/popups/IframeWalletPopup.js +38 -0
- package/build/popups/IframeWalletPopup.js.map +1 -0
- package/build/popups/NearWalletsPopup.d.ts +25 -0
- package/build/popups/NearWalletsPopup.js +153 -0
- package/build/popups/NearWalletsPopup.js.map +1 -0
- package/build/popups/Popup.d.ts +22 -0
- package/build/popups/Popup.js +94 -0
- package/build/popups/Popup.js.map +1 -0
- package/build/popups/styles.d.ts +1 -0
- package/build/popups/styles.js +257 -0
- package/build/popups/styles.js.map +1 -0
- package/build/security/audit-log.d.ts +123 -0
- package/build/security/audit-log.js +268 -0
- package/build/security/audit-log.js.map +1 -0
- package/build/security/csp.d.ts +68 -0
- package/build/security/csp.js +328 -0
- package/build/security/csp.js.map +1 -0
- package/build/security/index.d.ts +10 -0
- package/build/security/index.js +42 -0
- package/build/security/index.js.map +1 -0
- package/build/security/origin-guard.d.ts +90 -0
- package/build/security/origin-guard.js +244 -0
- package/build/security/origin-guard.js.map +1 -0
- package/build/security/rate-limiter.d.ts +84 -0
- package/build/security/rate-limiter.js +212 -0
- package/build/security/rate-limiter.js.map +1 -0
- package/build/security/secure-storage.d.ts +77 -0
- package/build/security/secure-storage.js +242 -0
- package/build/security/secure-storage.js.map +1 -0
- package/build/security/transaction-guard.d.ts +71 -0
- package/build/security/transaction-guard.js +239 -0
- package/build/security/transaction-guard.js.map +1 -0
- package/build/types.d.ts +508 -0
- package/build/types.js +3 -0
- package/build/types.js.map +1 -0
- package/build/ui/AccountSwitcherModal.d.ts +53 -0
- package/build/ui/AccountSwitcherModal.js +239 -0
- package/build/ui/AccountSwitcherModal.js.map +1 -0
- package/build/ui/Modal.d.ts +84 -0
- package/build/ui/Modal.js +278 -0
- package/build/ui/Modal.js.map +1 -0
- package/build/ui/TransactionModal.d.ts +84 -0
- package/build/ui/TransactionModal.js +406 -0
- package/build/ui/TransactionModal.js.map +1 -0
- package/build/ui/WalletSelectorModal.d.ts +97 -0
- package/build/ui/WalletSelectorModal.js +481 -0
- package/build/ui/WalletSelectorModal.js.map +1 -0
- package/build/ui/icons.d.ts +19 -0
- package/build/ui/icons.js +65 -0
- package/build/ui/icons.js.map +1 -0
- package/build/ui/index.d.ts +10 -0
- package/build/ui/index.js +31 -0
- package/build/ui/index.js.map +1 -0
- package/build/ui/styles.d.ts +5 -0
- package/build/ui/styles.js +973 -0
- package/build/ui/styles.js.map +1 -0
- package/build/ui/theme.d.ts +133 -0
- package/build/ui/theme.js +204 -0
- package/build/ui/theme.js.map +1 -0
- package/build/wallets/external/index.d.ts +4 -0
- package/build/wallets/external/index.js +9 -0
- package/build/wallets/external/index.js.map +1 -0
- package/build/wallets/external/manager.d.ts +152 -0
- package/build/wallets/external/manager.js +586 -0
- package/build/wallets/external/manager.js.map +1 -0
- package/build/wallets/privileged/index.d.ts +5 -0
- package/build/wallets/privileged/index.js +12 -0
- package/build/wallets/privileged/index.js.map +1 -0
- package/build/wallets/privileged/ledger.d.ts +132 -0
- package/build/wallets/privileged/ledger.js +563 -0
- package/build/wallets/privileged/ledger.js.map +1 -0
- package/build/wallets/privileged/manager.d.ts +54 -0
- package/build/wallets/privileged/manager.js +174 -0
- package/build/wallets/privileged/manager.js.map +1 -0
- package/package.json +33 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trust.js","sourceRoot":"","sources":["../../src/helpers/trust.ts"],"names":[],"mappings":";;;AAyfA,0CAGC;AAvaD;;GAEG;AACH,MAAM,aAAa,GAMd;IACH,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAA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AAiB,EAAE,CAAC;QAC3E,CAAC;IACH,CAAC;CACF;AAxWD,kCAwWC;AAED;;GAEG;AACH,SAAgB,eAAe,CAAC,MAAsB;IACpD,MAAM,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;IACjC,OAAO,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const parseUrl: (url: string) => URL | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseUrl = void 0;
|
|
4
|
+
const parseUrl = (url) => {
|
|
5
|
+
try {
|
|
6
|
+
return new URL(url);
|
|
7
|
+
}
|
|
8
|
+
catch {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
exports.parseUrl = parseUrl;
|
|
13
|
+
//# sourceMappingURL=url.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url.js","sourceRoot":"","sources":["../../src/helpers/url.ts"],"names":[],"mappings":";;;AAAO,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAE,EAAE;IACtC,IAAI,CAAC;QACH,OAAO,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;IACtB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC,CAAC;AANW,QAAA,QAAQ,YAMnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const uuid4: () => string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uuid4 = void 0;
|
|
4
|
+
const uuid4 = () => {
|
|
5
|
+
if (typeof window !== "undefined" && typeof window.crypto !== "undefined" && typeof window.crypto.randomUUID === "function")
|
|
6
|
+
return window.crypto.randomUUID();
|
|
7
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
|
|
8
|
+
const r = (Math.random() * 16) | 0;
|
|
9
|
+
const v = c === "x" ? r : (r & 0x3) | 0x8;
|
|
10
|
+
return v.toString(16);
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
exports.uuid4 = uuid4;
|
|
14
|
+
//# sourceMappingURL=uuid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uuid.js","sourceRoot":"","sources":["../../src/helpers/uuid.ts"],"names":[],"mappings":";;;AAAO,MAAM,KAAK,GAAG,GAAG,EAAE;IACxB,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,MAAM,CAAC,MAAM,KAAK,WAAW,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,UAAU,KAAK,UAAU;QACzH,OAAO,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;IAEpC,OAAO,sCAAsC,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC;QACxE,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;QACnC,MAAM,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;QAC1C,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AATW,QAAA,KAAK,SAShB"}
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export { type DataStorage, LocalStorage, SessionStorage, MemoryStorage, IndexedDBStorage, EncryptedStorage, } from "./helpers/storage";
|
|
2
|
+
export { SessionManager, type SessionManagerOptions, type SessionValidationResult } from "./helpers/session";
|
|
3
|
+
export { Analytics, type AnalyticsAdapter, type AnalyticsEvent, type AnalyticsEventType, type AnalyticsOptions, ConsoleAnalyticsAdapter, NoopAnalyticsAdapter, BatchingAnalyticsAdapter, } from "./helpers/analytics";
|
|
4
|
+
export { TransactionSimulator, quickGasEstimate, type SimulationResult, type GasEstimate, type ActionGasEstimate, type SimulationWarning, type SimulationWarningType, } from "./helpers/simulation";
|
|
5
|
+
export { FederatedManifestManager, validateManifest, mergeManifests, DEFAULT_MANIFEST_SOURCES, type ManifestSource, type FetchedManifest, type CombinedManifest, type FederatedManifestOptions, } from "./helpers/manifest";
|
|
6
|
+
export { TrustScorer, quickTrustCheck, type TrustScore, type TrustScoreComponents, type TrustLevel, type TrustWarning, type TrustWarningType, type TrustSignal, type TrustSignalType, type TrustScorerOptions, } from "./helpers/trust";
|
|
7
|
+
export { ParentFrameWallet } from "./ParentFrameWallet";
|
|
8
|
+
export { SandboxWallet } from "./SandboxedWallet";
|
|
9
|
+
export { InjectedWallet } from "./InjectedWallet";
|
|
10
|
+
export { NearConnector, type ConnectedAccount } from "./NearConnector";
|
|
11
|
+
export { nearActionsToConnectorActions } from "./actions";
|
|
12
|
+
export type { ConnectorAction } from "./actions/types";
|
|
13
|
+
export { ErrorCode, WalletError, WalletNotFoundError, UserRejectedError, ConnectionTimeoutError, NetworkMismatchError, TransactionError, SessionError, SandboxError, SigningError, RpcError, ManifestError, wrapError, isWalletError, hasErrorCode, deserializeError, getUserFriendlyMessage, getRecoveryOptions, } from "./errors";
|
|
14
|
+
export type { RecoveryAction, RecoveryOption, SerializedWalletError } from "./errors";
|
|
15
|
+
export type { Network, Account, AccountInfo, Logger, Optional, RequiredKeys, DeepPartial, Awaited, SignMessageParams, SignedMessage, Transaction, SignAndSendTransactionParams, SignAndSendTransactionsParams, SignInParams, SignOutParams, GetAccountsParams, WalletManifest, WalletManifestRepository, WalletFeatures, WalletPermissions, WalletPlatform, NearWalletBase, Session, EventMap, EventType, EventCallback, EventNearWalletInjected, WalletEvents, AbstractWalletConnect, WalletConnectMetadata, NearConnectorOptions, PersistenceOptions, FinalExecutionOutcome, Action, } from "./types";
|
|
16
|
+
export { type ThemeMode, type ThemeColors, type ThemeTypography, type ThemeSpacing, type ThemeBorderRadius, type ThemeAnimation, type ThemeBranding, type Theme, type ThemeOverrides, createDarkTheme, createLightTheme, mergeTheme, getSystemTheme, themeToCssVars, darkTheme, lightTheme, icons, type IconName, generateStyles, Modal, type ModalOptions, WalletSelectorModal, type WalletSelectorOptions, type WalletUIInfo, type WalletCategory, TransactionModal, type TransactionModalOptions, AccountSwitcherModal, type AccountSwitcherOptions, type AccountUIInfo, } from "./ui";
|
|
17
|
+
export { type RetryConfig, type TimeoutConfig, type CircuitBreakerConfig, type CircuitState, type CancellableOperation, DEFAULT_RETRY_CONFIG, DEFAULT_TIMEOUT_CONFIG, DEFAULT_CIRCUIT_BREAKER_CONFIG, calculateBackoffDelay, isRetryableError, withRetry, withTimeout, withRetryAndTimeout, createRetryWrapper, createTimeoutWrapper, makeCancellable, CircuitBreaker, type ConnectionStatus, type ConnectionState, type StateHistoryEntry, type StateMachineConfig, DEFAULT_STATE_MACHINE_CONFIG, createStateMachine, getStatusDescription, ConnectionStateMachine, type HealthStatus, type ConnectionHealth, type HealthCheckResult, type HealthConfig, type HealthEventMap, type HealthCheckFn, DEFAULT_HEALTH_CONFIG, createWalletHealthCheck, createHealthMonitor, HealthMonitor, type ReconnectTriggers, type ReconnectConfig, type QueuedOperation, type ReconnectState, type ReconnectEventMap, type ReconnectFn, DEFAULT_RECONNECT_TRIGGERS, DEFAULT_RECONNECT_CONFIG, createReconnectionManager, ReconnectionManager, } from "./connection";
|
|
18
|
+
export { type HardwareWalletType, type HardwareConfig, type LedgerConfig, type TrezorConfig, type LedgerModel, type LedgerDeviceInfo, type APDUCommand, type APDUResponse, type HardwareWaitingEvent, type HardwareConfirmEvent, type HardwareRejectedEvent, HardwareErrorCode, NEAR_CLA, NEAR_INS, LEDGER_STATUS, DEFAULT_DERIVATION_PATH, LEDGER_PRODUCT_IDS, HardwareError, createHardwareError, handleLedgerStatus, isHardwareError, isUserRejection, isDeviceNotFound, isAppNotOpen, LedgerTransport, detectLedgerModel, LedgerNearApp, type NearAppVersion, type PublicKeyResult, type SignatureResult, } from "./hardware";
|
|
19
|
+
export { LedgerWallet, createLedgerWallet, type LedgerWalletAccount, type LedgerTransactionResult, type LedgerSignedTransaction, type LedgerSignMessageParams, type LedgerSignedMessage, PrivilegedWalletManager, type PrivilegedWalletManagerConfig, type PrivilegedWalletManagerEvents, } from "./wallets/privileged";
|
|
20
|
+
export { ExternalWalletManager, type ExternalWalletType, type ExternalWalletConfig, type ExternalWalletManagerConfig, type ExternalWalletAccount, type ExternalTransactionResult, type ExternalSignMessageParams, type ExternalSignedMessage, type ExternalWalletManifest, type PendingRequest, } from "./wallets/external";
|
|
21
|
+
export { TransactionGuard, createDefaultTransactionGuard, type SecurityTransaction, type TransactionLimits, type TransactionRisk, OriginGuard, createSecureMessageHandler, type TrustedOrigins, type OriginGuardConfig, SecureStorage, createSecureStorage, type SecureStorageOptions, RateLimiter, connectLimiter, signLimiter, rpcLimiter, rateLimit, withRateLimit, type RateLimitConfig, type RateLimitResult, AuditLog, createAuditLog, type AuditEvent, type AuditEventType, type AuditLogConfig, generateCSP, getRecommendedCSP, mergeCSP, applyCSPMetaTag, runSecurityChecklist, getSecuritySummary, verifySecureContext, DEFAULT_CSP_DIRECTIVES, type CSPDirectives, type SecurityCheck, } from "./security";
|
package/build/index.js
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generateStyles = exports.icons = exports.lightTheme = exports.darkTheme = exports.themeToCssVars = exports.getSystemTheme = exports.mergeTheme = exports.createLightTheme = exports.createDarkTheme = exports.getRecoveryOptions = exports.getUserFriendlyMessage = exports.deserializeError = exports.hasErrorCode = exports.isWalletError = exports.wrapError = exports.ManifestError = exports.RpcError = exports.SigningError = exports.SandboxError = exports.SessionError = exports.TransactionError = exports.NetworkMismatchError = exports.ConnectionTimeoutError = exports.UserRejectedError = exports.WalletNotFoundError = exports.WalletError = exports.ErrorCode = exports.nearActionsToConnectorActions = exports.NearConnector = exports.InjectedWallet = exports.SandboxWallet = exports.ParentFrameWallet = exports.quickTrustCheck = exports.TrustScorer = exports.DEFAULT_MANIFEST_SOURCES = exports.mergeManifests = exports.validateManifest = exports.FederatedManifestManager = exports.quickGasEstimate = exports.TransactionSimulator = exports.BatchingAnalyticsAdapter = exports.NoopAnalyticsAdapter = exports.ConsoleAnalyticsAdapter = exports.Analytics = exports.SessionManager = exports.EncryptedStorage = exports.IndexedDBStorage = exports.MemoryStorage = exports.SessionStorage = exports.LocalStorage = void 0;
|
|
4
|
+
exports.createDefaultTransactionGuard = exports.TransactionGuard = exports.ExternalWalletManager = exports.PrivilegedWalletManager = exports.createLedgerWallet = exports.LedgerWallet = exports.LedgerNearApp = exports.detectLedgerModel = exports.LedgerTransport = exports.isAppNotOpen = exports.isDeviceNotFound = exports.isUserRejection = exports.isHardwareError = exports.handleLedgerStatus = exports.createHardwareError = exports.HardwareError = exports.LEDGER_PRODUCT_IDS = exports.DEFAULT_DERIVATION_PATH = exports.LEDGER_STATUS = exports.NEAR_INS = exports.NEAR_CLA = exports.HardwareErrorCode = exports.ReconnectionManager = exports.createReconnectionManager = exports.DEFAULT_RECONNECT_CONFIG = exports.DEFAULT_RECONNECT_TRIGGERS = exports.HealthMonitor = exports.createHealthMonitor = exports.createWalletHealthCheck = exports.DEFAULT_HEALTH_CONFIG = exports.ConnectionStateMachine = exports.getStatusDescription = exports.createStateMachine = exports.DEFAULT_STATE_MACHINE_CONFIG = exports.CircuitBreaker = exports.makeCancellable = exports.createTimeoutWrapper = exports.createRetryWrapper = exports.withRetryAndTimeout = exports.withTimeout = exports.withRetry = exports.isRetryableError = exports.calculateBackoffDelay = exports.DEFAULT_CIRCUIT_BREAKER_CONFIG = exports.DEFAULT_TIMEOUT_CONFIG = exports.DEFAULT_RETRY_CONFIG = exports.AccountSwitcherModal = exports.TransactionModal = exports.WalletSelectorModal = exports.Modal = void 0;
|
|
5
|
+
exports.DEFAULT_CSP_DIRECTIVES = exports.verifySecureContext = exports.getSecuritySummary = exports.runSecurityChecklist = exports.applyCSPMetaTag = exports.mergeCSP = exports.getRecommendedCSP = exports.generateCSP = exports.createAuditLog = exports.AuditLog = exports.withRateLimit = exports.rateLimit = exports.rpcLimiter = exports.signLimiter = exports.connectLimiter = exports.RateLimiter = exports.createSecureStorage = exports.SecureStorage = exports.createSecureMessageHandler = exports.OriginGuard = void 0;
|
|
6
|
+
var storage_1 = require("./helpers/storage");
|
|
7
|
+
Object.defineProperty(exports, "LocalStorage", { enumerable: true, get: function () { return storage_1.LocalStorage; } });
|
|
8
|
+
Object.defineProperty(exports, "SessionStorage", { enumerable: true, get: function () { return storage_1.SessionStorage; } });
|
|
9
|
+
Object.defineProperty(exports, "MemoryStorage", { enumerable: true, get: function () { return storage_1.MemoryStorage; } });
|
|
10
|
+
Object.defineProperty(exports, "IndexedDBStorage", { enumerable: true, get: function () { return storage_1.IndexedDBStorage; } });
|
|
11
|
+
Object.defineProperty(exports, "EncryptedStorage", { enumerable: true, get: function () { return storage_1.EncryptedStorage; } });
|
|
12
|
+
var session_1 = require("./helpers/session");
|
|
13
|
+
Object.defineProperty(exports, "SessionManager", { enumerable: true, get: function () { return session_1.SessionManager; } });
|
|
14
|
+
var analytics_1 = require("./helpers/analytics");
|
|
15
|
+
Object.defineProperty(exports, "Analytics", { enumerable: true, get: function () { return analytics_1.Analytics; } });
|
|
16
|
+
Object.defineProperty(exports, "ConsoleAnalyticsAdapter", { enumerable: true, get: function () { return analytics_1.ConsoleAnalyticsAdapter; } });
|
|
17
|
+
Object.defineProperty(exports, "NoopAnalyticsAdapter", { enumerable: true, get: function () { return analytics_1.NoopAnalyticsAdapter; } });
|
|
18
|
+
Object.defineProperty(exports, "BatchingAnalyticsAdapter", { enumerable: true, get: function () { return analytics_1.BatchingAnalyticsAdapter; } });
|
|
19
|
+
var simulation_1 = require("./helpers/simulation");
|
|
20
|
+
Object.defineProperty(exports, "TransactionSimulator", { enumerable: true, get: function () { return simulation_1.TransactionSimulator; } });
|
|
21
|
+
Object.defineProperty(exports, "quickGasEstimate", { enumerable: true, get: function () { return simulation_1.quickGasEstimate; } });
|
|
22
|
+
var manifest_1 = require("./helpers/manifest");
|
|
23
|
+
Object.defineProperty(exports, "FederatedManifestManager", { enumerable: true, get: function () { return manifest_1.FederatedManifestManager; } });
|
|
24
|
+
Object.defineProperty(exports, "validateManifest", { enumerable: true, get: function () { return manifest_1.validateManifest; } });
|
|
25
|
+
Object.defineProperty(exports, "mergeManifests", { enumerable: true, get: function () { return manifest_1.mergeManifests; } });
|
|
26
|
+
Object.defineProperty(exports, "DEFAULT_MANIFEST_SOURCES", { enumerable: true, get: function () { return manifest_1.DEFAULT_MANIFEST_SOURCES; } });
|
|
27
|
+
var trust_1 = require("./helpers/trust");
|
|
28
|
+
Object.defineProperty(exports, "TrustScorer", { enumerable: true, get: function () { return trust_1.TrustScorer; } });
|
|
29
|
+
Object.defineProperty(exports, "quickTrustCheck", { enumerable: true, get: function () { return trust_1.quickTrustCheck; } });
|
|
30
|
+
var ParentFrameWallet_1 = require("./ParentFrameWallet");
|
|
31
|
+
Object.defineProperty(exports, "ParentFrameWallet", { enumerable: true, get: function () { return ParentFrameWallet_1.ParentFrameWallet; } });
|
|
32
|
+
var SandboxedWallet_1 = require("./SandboxedWallet");
|
|
33
|
+
Object.defineProperty(exports, "SandboxWallet", { enumerable: true, get: function () { return SandboxedWallet_1.SandboxWallet; } });
|
|
34
|
+
var InjectedWallet_1 = require("./InjectedWallet");
|
|
35
|
+
Object.defineProperty(exports, "InjectedWallet", { enumerable: true, get: function () { return InjectedWallet_1.InjectedWallet; } });
|
|
36
|
+
var NearConnector_1 = require("./NearConnector");
|
|
37
|
+
Object.defineProperty(exports, "NearConnector", { enumerable: true, get: function () { return NearConnector_1.NearConnector; } });
|
|
38
|
+
var actions_1 = require("./actions");
|
|
39
|
+
Object.defineProperty(exports, "nearActionsToConnectorActions", { enumerable: true, get: function () { return actions_1.nearActionsToConnectorActions; } });
|
|
40
|
+
// Error handling
|
|
41
|
+
var errors_1 = require("./errors");
|
|
42
|
+
// Error codes
|
|
43
|
+
Object.defineProperty(exports, "ErrorCode", { enumerable: true, get: function () { return errors_1.ErrorCode; } });
|
|
44
|
+
// Base error class
|
|
45
|
+
Object.defineProperty(exports, "WalletError", { enumerable: true, get: function () { return errors_1.WalletError; } });
|
|
46
|
+
// Specific error classes
|
|
47
|
+
Object.defineProperty(exports, "WalletNotFoundError", { enumerable: true, get: function () { return errors_1.WalletNotFoundError; } });
|
|
48
|
+
Object.defineProperty(exports, "UserRejectedError", { enumerable: true, get: function () { return errors_1.UserRejectedError; } });
|
|
49
|
+
Object.defineProperty(exports, "ConnectionTimeoutError", { enumerable: true, get: function () { return errors_1.ConnectionTimeoutError; } });
|
|
50
|
+
Object.defineProperty(exports, "NetworkMismatchError", { enumerable: true, get: function () { return errors_1.NetworkMismatchError; } });
|
|
51
|
+
Object.defineProperty(exports, "TransactionError", { enumerable: true, get: function () { return errors_1.TransactionError; } });
|
|
52
|
+
Object.defineProperty(exports, "SessionError", { enumerable: true, get: function () { return errors_1.SessionError; } });
|
|
53
|
+
Object.defineProperty(exports, "SandboxError", { enumerable: true, get: function () { return errors_1.SandboxError; } });
|
|
54
|
+
Object.defineProperty(exports, "SigningError", { enumerable: true, get: function () { return errors_1.SigningError; } });
|
|
55
|
+
Object.defineProperty(exports, "RpcError", { enumerable: true, get: function () { return errors_1.RpcError; } });
|
|
56
|
+
Object.defineProperty(exports, "ManifestError", { enumerable: true, get: function () { return errors_1.ManifestError; } });
|
|
57
|
+
// Utility functions
|
|
58
|
+
Object.defineProperty(exports, "wrapError", { enumerable: true, get: function () { return errors_1.wrapError; } });
|
|
59
|
+
Object.defineProperty(exports, "isWalletError", { enumerable: true, get: function () { return errors_1.isWalletError; } });
|
|
60
|
+
Object.defineProperty(exports, "hasErrorCode", { enumerable: true, get: function () { return errors_1.hasErrorCode; } });
|
|
61
|
+
Object.defineProperty(exports, "deserializeError", { enumerable: true, get: function () { return errors_1.deserializeError; } });
|
|
62
|
+
Object.defineProperty(exports, "getUserFriendlyMessage", { enumerable: true, get: function () { return errors_1.getUserFriendlyMessage; } });
|
|
63
|
+
Object.defineProperty(exports, "getRecoveryOptions", { enumerable: true, get: function () { return errors_1.getRecoveryOptions; } });
|
|
64
|
+
// UI components
|
|
65
|
+
var ui_1 = require("./ui");
|
|
66
|
+
Object.defineProperty(exports, "createDarkTheme", { enumerable: true, get: function () { return ui_1.createDarkTheme; } });
|
|
67
|
+
Object.defineProperty(exports, "createLightTheme", { enumerable: true, get: function () { return ui_1.createLightTheme; } });
|
|
68
|
+
Object.defineProperty(exports, "mergeTheme", { enumerable: true, get: function () { return ui_1.mergeTheme; } });
|
|
69
|
+
Object.defineProperty(exports, "getSystemTheme", { enumerable: true, get: function () { return ui_1.getSystemTheme; } });
|
|
70
|
+
Object.defineProperty(exports, "themeToCssVars", { enumerable: true, get: function () { return ui_1.themeToCssVars; } });
|
|
71
|
+
Object.defineProperty(exports, "darkTheme", { enumerable: true, get: function () { return ui_1.darkTheme; } });
|
|
72
|
+
Object.defineProperty(exports, "lightTheme", { enumerable: true, get: function () { return ui_1.lightTheme; } });
|
|
73
|
+
// Icons
|
|
74
|
+
Object.defineProperty(exports, "icons", { enumerable: true, get: function () { return ui_1.icons; } });
|
|
75
|
+
// Styles
|
|
76
|
+
Object.defineProperty(exports, "generateStyles", { enumerable: true, get: function () { return ui_1.generateStyles; } });
|
|
77
|
+
// Modals
|
|
78
|
+
Object.defineProperty(exports, "Modal", { enumerable: true, get: function () { return ui_1.Modal; } });
|
|
79
|
+
Object.defineProperty(exports, "WalletSelectorModal", { enumerable: true, get: function () { return ui_1.WalletSelectorModal; } });
|
|
80
|
+
Object.defineProperty(exports, "TransactionModal", { enumerable: true, get: function () { return ui_1.TransactionModal; } });
|
|
81
|
+
Object.defineProperty(exports, "AccountSwitcherModal", { enumerable: true, get: function () { return ui_1.AccountSwitcherModal; } });
|
|
82
|
+
// Connection reliability
|
|
83
|
+
var connection_1 = require("./connection");
|
|
84
|
+
Object.defineProperty(exports, "DEFAULT_RETRY_CONFIG", { enumerable: true, get: function () { return connection_1.DEFAULT_RETRY_CONFIG; } });
|
|
85
|
+
Object.defineProperty(exports, "DEFAULT_TIMEOUT_CONFIG", { enumerable: true, get: function () { return connection_1.DEFAULT_TIMEOUT_CONFIG; } });
|
|
86
|
+
Object.defineProperty(exports, "DEFAULT_CIRCUIT_BREAKER_CONFIG", { enumerable: true, get: function () { return connection_1.DEFAULT_CIRCUIT_BREAKER_CONFIG; } });
|
|
87
|
+
Object.defineProperty(exports, "calculateBackoffDelay", { enumerable: true, get: function () { return connection_1.calculateBackoffDelay; } });
|
|
88
|
+
Object.defineProperty(exports, "isRetryableError", { enumerable: true, get: function () { return connection_1.isRetryableError; } });
|
|
89
|
+
Object.defineProperty(exports, "withRetry", { enumerable: true, get: function () { return connection_1.withRetry; } });
|
|
90
|
+
Object.defineProperty(exports, "withTimeout", { enumerable: true, get: function () { return connection_1.withTimeout; } });
|
|
91
|
+
Object.defineProperty(exports, "withRetryAndTimeout", { enumerable: true, get: function () { return connection_1.withRetryAndTimeout; } });
|
|
92
|
+
Object.defineProperty(exports, "createRetryWrapper", { enumerable: true, get: function () { return connection_1.createRetryWrapper; } });
|
|
93
|
+
Object.defineProperty(exports, "createTimeoutWrapper", { enumerable: true, get: function () { return connection_1.createTimeoutWrapper; } });
|
|
94
|
+
Object.defineProperty(exports, "makeCancellable", { enumerable: true, get: function () { return connection_1.makeCancellable; } });
|
|
95
|
+
Object.defineProperty(exports, "CircuitBreaker", { enumerable: true, get: function () { return connection_1.CircuitBreaker; } });
|
|
96
|
+
Object.defineProperty(exports, "DEFAULT_STATE_MACHINE_CONFIG", { enumerable: true, get: function () { return connection_1.DEFAULT_STATE_MACHINE_CONFIG; } });
|
|
97
|
+
Object.defineProperty(exports, "createStateMachine", { enumerable: true, get: function () { return connection_1.createStateMachine; } });
|
|
98
|
+
Object.defineProperty(exports, "getStatusDescription", { enumerable: true, get: function () { return connection_1.getStatusDescription; } });
|
|
99
|
+
Object.defineProperty(exports, "ConnectionStateMachine", { enumerable: true, get: function () { return connection_1.ConnectionStateMachine; } });
|
|
100
|
+
Object.defineProperty(exports, "DEFAULT_HEALTH_CONFIG", { enumerable: true, get: function () { return connection_1.DEFAULT_HEALTH_CONFIG; } });
|
|
101
|
+
Object.defineProperty(exports, "createWalletHealthCheck", { enumerable: true, get: function () { return connection_1.createWalletHealthCheck; } });
|
|
102
|
+
Object.defineProperty(exports, "createHealthMonitor", { enumerable: true, get: function () { return connection_1.createHealthMonitor; } });
|
|
103
|
+
Object.defineProperty(exports, "HealthMonitor", { enumerable: true, get: function () { return connection_1.HealthMonitor; } });
|
|
104
|
+
Object.defineProperty(exports, "DEFAULT_RECONNECT_TRIGGERS", { enumerable: true, get: function () { return connection_1.DEFAULT_RECONNECT_TRIGGERS; } });
|
|
105
|
+
Object.defineProperty(exports, "DEFAULT_RECONNECT_CONFIG", { enumerable: true, get: function () { return connection_1.DEFAULT_RECONNECT_CONFIG; } });
|
|
106
|
+
Object.defineProperty(exports, "createReconnectionManager", { enumerable: true, get: function () { return connection_1.createReconnectionManager; } });
|
|
107
|
+
Object.defineProperty(exports, "ReconnectionManager", { enumerable: true, get: function () { return connection_1.ReconnectionManager; } });
|
|
108
|
+
// Hardware wallet support (Privileged tier)
|
|
109
|
+
var hardware_1 = require("./hardware");
|
|
110
|
+
Object.defineProperty(exports, "HardwareErrorCode", { enumerable: true, get: function () { return hardware_1.HardwareErrorCode; } });
|
|
111
|
+
Object.defineProperty(exports, "NEAR_CLA", { enumerable: true, get: function () { return hardware_1.NEAR_CLA; } });
|
|
112
|
+
Object.defineProperty(exports, "NEAR_INS", { enumerable: true, get: function () { return hardware_1.NEAR_INS; } });
|
|
113
|
+
Object.defineProperty(exports, "LEDGER_STATUS", { enumerable: true, get: function () { return hardware_1.LEDGER_STATUS; } });
|
|
114
|
+
Object.defineProperty(exports, "DEFAULT_DERIVATION_PATH", { enumerable: true, get: function () { return hardware_1.DEFAULT_DERIVATION_PATH; } });
|
|
115
|
+
Object.defineProperty(exports, "LEDGER_PRODUCT_IDS", { enumerable: true, get: function () { return hardware_1.LEDGER_PRODUCT_IDS; } });
|
|
116
|
+
// Errors
|
|
117
|
+
Object.defineProperty(exports, "HardwareError", { enumerable: true, get: function () { return hardware_1.HardwareError; } });
|
|
118
|
+
Object.defineProperty(exports, "createHardwareError", { enumerable: true, get: function () { return hardware_1.createHardwareError; } });
|
|
119
|
+
Object.defineProperty(exports, "handleLedgerStatus", { enumerable: true, get: function () { return hardware_1.handleLedgerStatus; } });
|
|
120
|
+
Object.defineProperty(exports, "isHardwareError", { enumerable: true, get: function () { return hardware_1.isHardwareError; } });
|
|
121
|
+
Object.defineProperty(exports, "isUserRejection", { enumerable: true, get: function () { return hardware_1.isUserRejection; } });
|
|
122
|
+
Object.defineProperty(exports, "isDeviceNotFound", { enumerable: true, get: function () { return hardware_1.isDeviceNotFound; } });
|
|
123
|
+
Object.defineProperty(exports, "isAppNotOpen", { enumerable: true, get: function () { return hardware_1.isAppNotOpen; } });
|
|
124
|
+
// Transport
|
|
125
|
+
Object.defineProperty(exports, "LedgerTransport", { enumerable: true, get: function () { return hardware_1.LedgerTransport; } });
|
|
126
|
+
Object.defineProperty(exports, "detectLedgerModel", { enumerable: true, get: function () { return hardware_1.detectLedgerModel; } });
|
|
127
|
+
// NEAR App
|
|
128
|
+
Object.defineProperty(exports, "LedgerNearApp", { enumerable: true, get: function () { return hardware_1.LedgerNearApp; } });
|
|
129
|
+
// Privileged wallet tier (hardware wallets)
|
|
130
|
+
var privileged_1 = require("./wallets/privileged");
|
|
131
|
+
Object.defineProperty(exports, "LedgerWallet", { enumerable: true, get: function () { return privileged_1.LedgerWallet; } });
|
|
132
|
+
Object.defineProperty(exports, "createLedgerWallet", { enumerable: true, get: function () { return privileged_1.createLedgerWallet; } });
|
|
133
|
+
Object.defineProperty(exports, "PrivilegedWalletManager", { enumerable: true, get: function () { return privileged_1.PrivilegedWalletManager; } });
|
|
134
|
+
// External wallet tier (mobile + WalletConnect)
|
|
135
|
+
var external_1 = require("./wallets/external");
|
|
136
|
+
Object.defineProperty(exports, "ExternalWalletManager", { enumerable: true, get: function () { return external_1.ExternalWalletManager; } });
|
|
137
|
+
// Security layers
|
|
138
|
+
var security_1 = require("./security");
|
|
139
|
+
// Transaction verification
|
|
140
|
+
Object.defineProperty(exports, "TransactionGuard", { enumerable: true, get: function () { return security_1.TransactionGuard; } });
|
|
141
|
+
Object.defineProperty(exports, "createDefaultTransactionGuard", { enumerable: true, get: function () { return security_1.createDefaultTransactionGuard; } });
|
|
142
|
+
// Origin verification
|
|
143
|
+
Object.defineProperty(exports, "OriginGuard", { enumerable: true, get: function () { return security_1.OriginGuard; } });
|
|
144
|
+
Object.defineProperty(exports, "createSecureMessageHandler", { enumerable: true, get: function () { return security_1.createSecureMessageHandler; } });
|
|
145
|
+
// Secure storage
|
|
146
|
+
Object.defineProperty(exports, "SecureStorage", { enumerable: true, get: function () { return security_1.SecureStorage; } });
|
|
147
|
+
Object.defineProperty(exports, "createSecureStorage", { enumerable: true, get: function () { return security_1.createSecureStorage; } });
|
|
148
|
+
// Rate limiting
|
|
149
|
+
Object.defineProperty(exports, "RateLimiter", { enumerable: true, get: function () { return security_1.RateLimiter; } });
|
|
150
|
+
Object.defineProperty(exports, "connectLimiter", { enumerable: true, get: function () { return security_1.connectLimiter; } });
|
|
151
|
+
Object.defineProperty(exports, "signLimiter", { enumerable: true, get: function () { return security_1.signLimiter; } });
|
|
152
|
+
Object.defineProperty(exports, "rpcLimiter", { enumerable: true, get: function () { return security_1.rpcLimiter; } });
|
|
153
|
+
Object.defineProperty(exports, "rateLimit", { enumerable: true, get: function () { return security_1.rateLimit; } });
|
|
154
|
+
Object.defineProperty(exports, "withRateLimit", { enumerable: true, get: function () { return security_1.withRateLimit; } });
|
|
155
|
+
// Audit logging
|
|
156
|
+
Object.defineProperty(exports, "AuditLog", { enumerable: true, get: function () { return security_1.AuditLog; } });
|
|
157
|
+
Object.defineProperty(exports, "createAuditLog", { enumerable: true, get: function () { return security_1.createAuditLog; } });
|
|
158
|
+
// CSP and security checklist
|
|
159
|
+
Object.defineProperty(exports, "generateCSP", { enumerable: true, get: function () { return security_1.generateCSP; } });
|
|
160
|
+
Object.defineProperty(exports, "getRecommendedCSP", { enumerable: true, get: function () { return security_1.getRecommendedCSP; } });
|
|
161
|
+
Object.defineProperty(exports, "mergeCSP", { enumerable: true, get: function () { return security_1.mergeCSP; } });
|
|
162
|
+
Object.defineProperty(exports, "applyCSPMetaTag", { enumerable: true, get: function () { return security_1.applyCSPMetaTag; } });
|
|
163
|
+
Object.defineProperty(exports, "runSecurityChecklist", { enumerable: true, get: function () { return security_1.runSecurityChecklist; } });
|
|
164
|
+
Object.defineProperty(exports, "getSecuritySummary", { enumerable: true, get: function () { return security_1.getSecuritySummary; } });
|
|
165
|
+
Object.defineProperty(exports, "verifySecureContext", { enumerable: true, get: function () { return security_1.verifySecureContext; } });
|
|
166
|
+
Object.defineProperty(exports, "DEFAULT_CSP_DIRECTIVES", { enumerable: true, get: function () { return security_1.DEFAULT_CSP_DIRECTIVES; } });
|
|
167
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,6CAO2B;AALzB,uGAAA,YAAY,OAAA;AACZ,yGAAA,cAAc,OAAA;AACd,wGAAA,aAAa,OAAA;AACb,2GAAA,gBAAgB,OAAA;AAChB,2GAAA,gBAAgB,OAAA;AAElB,6CAA6G;AAApG,yGAAA,cAAc,OAAA;AACvB,iDAS6B;AAR3B,sGAAA,SAAS,OAAA;AAKT,oHAA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AkB,OAAA;AAClB,2GAAA,eAAe,OAAA;AACf,2GAAA,eAAe,OAAA;AACf,4GAAA,gBAAgB,OAAA;AAChB,wGAAA,YAAY,OAAA;AAEZ,YAAY;AACZ,2GAAA,eAAe,OAAA;AACf,6GAAA,iBAAiB,OAAA;AAEjB,WAAW;AACX,yGAAA,aAAa,OAAA;AAMf,4CAA4C;AAC5C,mDAW8B;AAV5B,0GAAA,YAAY,OAAA;AACZ,gHAAA,kBAAkB,OAAA;AAMlB,qHAAA,uBAAuB,OAAA;AAKzB,gDAAgD;AAChD,+CAW4B;AAV1B,iHAAA,qBAAqB,OAAA;AAYvB,kBAAkB;AAClB,uCA+CoB;AA9ClB,2BAA2B;AAC3B,4GAAA,gBAAgB,OAAA;AAChB,yHAAA,6BAA6B,OAAA;AAK7B,sBAAsB;AACtB,uGAAA,WAAW,OAAA;AACX,sHAAA,0BAA0B,OAAA;AAI1B,iBAAiB;AACjB,yGAAA,aAAa,OAAA;AACb,+GAAA,mBAAmB,OAAA;AAGnB,gBAAgB;AAChB,uGAAA,WAAW,OAAA;AACX,0GAAA,cAAc,OAAA;AACd,uGAAA,WAAW,OAAA;AACX,sGAAA,UAAU,OAAA;AACV,qGAAA,SAAS,OAAA;AACT,yGAAA,aAAa,OAAA;AAIb,gBAAgB;AAChB,oGAAA,QAAQ,OAAA;AACR,0GAAA,cAAc,OAAA;AAKd,6BAA6B;AAC7B,uGAAA,WAAW,OAAA;AACX,6GAAA,iBAAiB,OAAA;AACjB,oGAAA,QAAQ,OAAA;AACR,2GAAA,eAAe,OAAA;AACf,gHAAA,oBAAoB,OAAA;AACpB,8GAAA,kBAAkB,OAAA;AAClB,+GAAA,mBAAmB,OAAA;AACnB,kHAAA,sBAAsB,OAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Popup } from "./Popup";
|
|
2
|
+
export declare class IframeWalletPopup extends Popup<{}> {
|
|
3
|
+
readonly delegate: {
|
|
4
|
+
iframe: HTMLIFrameElement;
|
|
5
|
+
onApprove: () => void;
|
|
6
|
+
onReject: () => void;
|
|
7
|
+
};
|
|
8
|
+
constructor(delegate: {
|
|
9
|
+
iframe: HTMLIFrameElement;
|
|
10
|
+
onApprove: () => void;
|
|
11
|
+
onReject: () => void;
|
|
12
|
+
});
|
|
13
|
+
handlers(): void;
|
|
14
|
+
create(): void;
|
|
15
|
+
get dom(): import("../helpers/html").HtmlString;
|
|
16
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IframeWalletPopup = void 0;
|
|
4
|
+
const html_1 = require("../helpers/html");
|
|
5
|
+
const Popup_1 = require("./Popup");
|
|
6
|
+
class IframeWalletPopup extends Popup_1.Popup {
|
|
7
|
+
delegate;
|
|
8
|
+
constructor(delegate) {
|
|
9
|
+
super(delegate);
|
|
10
|
+
this.delegate = delegate;
|
|
11
|
+
}
|
|
12
|
+
handlers() {
|
|
13
|
+
super.handlers();
|
|
14
|
+
this.addListener("button", "click", () => this.delegate.onApprove());
|
|
15
|
+
}
|
|
16
|
+
create() {
|
|
17
|
+
super.create({ show: false });
|
|
18
|
+
const modalBody = this.root.querySelector(".modal-body");
|
|
19
|
+
modalBody.appendChild(this.delegate.iframe);
|
|
20
|
+
this.delegate.iframe.style.width = "100%";
|
|
21
|
+
this.delegate.iframe.style.height = "720px";
|
|
22
|
+
this.delegate.iframe.style.border = "none";
|
|
23
|
+
}
|
|
24
|
+
get dom() {
|
|
25
|
+
return (0, html_1.html) ` <div class="modal-container">
|
|
26
|
+
<div class="modal-content">
|
|
27
|
+
<div class="modal-body" style="padding: 0; overflow: auto;"></div>
|
|
28
|
+
<div class="footer">
|
|
29
|
+
<img src="https://tgapp.herewallet.app/images/hot/hot-icon.png" alt="HOT Connector" />
|
|
30
|
+
<p>HOT Connector</p>
|
|
31
|
+
<p class="get-wallet-link">Don't have a wallet?</p>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>`;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.IframeWalletPopup = IframeWalletPopup;
|
|
38
|
+
//# sourceMappingURL=IframeWalletPopup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IframeWalletPopup.js","sourceRoot":"","sources":["../../src/popups/IframeWalletPopup.ts"],"names":[],"mappings":";;;AAAA,0CAAuC;AACvC,mCAAgC;AAEhC,MAAa,iBAAkB,SAAQ,aAAS;IACzB;IAArB,YAAqB,QAAoF;QACvG,KAAK,CAAC,QAAQ,CAAC,CAAC;QADG,aAAQ,GAAR,QAAQ,CAA4E;IAEzG,CAAC;IAED,QAAQ;QACN,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC;IACvE,CAAC;IAED,MAAM;QACJ,KAAK,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;QAC9B,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,aAAa,CAAiB,CAAC;QACzE,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC5C,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC;QAC1C,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC;QAC5C,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;IAC7C,CAAC;IAED,IAAI,GAAG;QACL,OAAO,IAAA,WAAI,EAAA;;;;;;;;;WASJ,CAAC;IACV,CAAC;CACF;AA/BD,8CA+BC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { WalletManifest } from "../types";
|
|
2
|
+
import { Popup } from "./Popup";
|
|
3
|
+
export declare class NearWalletsPopup extends Popup<{
|
|
4
|
+
wallets: WalletManifest[];
|
|
5
|
+
showSettings: boolean;
|
|
6
|
+
}> {
|
|
7
|
+
readonly delegate: {
|
|
8
|
+
wallets: WalletManifest[];
|
|
9
|
+
onAddDebugManifest: (wallet: string) => Promise<WalletManifest>;
|
|
10
|
+
onRemoveDebugManifest: (id: string) => Promise<void>;
|
|
11
|
+
onSelect: (id: string) => void;
|
|
12
|
+
onReject: () => void;
|
|
13
|
+
};
|
|
14
|
+
constructor(delegate: {
|
|
15
|
+
wallets: WalletManifest[];
|
|
16
|
+
onAddDebugManifest: (wallet: string) => Promise<WalletManifest>;
|
|
17
|
+
onRemoveDebugManifest: (id: string) => Promise<void>;
|
|
18
|
+
onSelect: (id: string) => void;
|
|
19
|
+
onReject: () => void;
|
|
20
|
+
});
|
|
21
|
+
handlers(): void;
|
|
22
|
+
create(): void;
|
|
23
|
+
walletDom(wallet: WalletManifest): import("../helpers/html").HtmlString;
|
|
24
|
+
get dom(): import("../helpers/html").HtmlString;
|
|
25
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NearWalletsPopup = void 0;
|
|
4
|
+
const html_1 = require("../helpers/html");
|
|
5
|
+
const url_1 = require("../helpers/url");
|
|
6
|
+
const Popup_1 = require("./Popup");
|
|
7
|
+
const debugManifest = {
|
|
8
|
+
id: "custom-wallet",
|
|
9
|
+
name: "Custom Wallet",
|
|
10
|
+
icon: "https://www.mynearwallet.com/images/webclip.png",
|
|
11
|
+
description: "Custom wallet for NEAR.",
|
|
12
|
+
website: "",
|
|
13
|
+
version: "1.0.0",
|
|
14
|
+
executor: "your-executor-url.js",
|
|
15
|
+
type: "sandbox",
|
|
16
|
+
platform: {},
|
|
17
|
+
features: {
|
|
18
|
+
signMessage: true,
|
|
19
|
+
signInWithoutAddKey: true,
|
|
20
|
+
signAndSendTransaction: true,
|
|
21
|
+
signAndSendTransactions: true,
|
|
22
|
+
},
|
|
23
|
+
permissions: {
|
|
24
|
+
storage: true,
|
|
25
|
+
allowsOpen: [],
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
class NearWalletsPopup extends Popup_1.Popup {
|
|
29
|
+
delegate;
|
|
30
|
+
constructor(delegate) {
|
|
31
|
+
super(delegate);
|
|
32
|
+
this.delegate = delegate;
|
|
33
|
+
this.update({ wallets: delegate.wallets, showSettings: false });
|
|
34
|
+
}
|
|
35
|
+
handlers() {
|
|
36
|
+
super.handlers();
|
|
37
|
+
this.addListener(".settings-button", "click", () => this.update({ showSettings: true }));
|
|
38
|
+
this.addListener(".back-button", "click", () => this.update({ showSettings: false }));
|
|
39
|
+
this.root.querySelectorAll(".connect-item").forEach((item) => {
|
|
40
|
+
if (!(item instanceof HTMLDivElement))
|
|
41
|
+
return;
|
|
42
|
+
this.addListener(item, "click", () => this.delegate.onSelect(item.dataset.type));
|
|
43
|
+
});
|
|
44
|
+
this.root.querySelectorAll(".remove-wallet-button").forEach((item) => {
|
|
45
|
+
if (!(item instanceof SVGSVGElement))
|
|
46
|
+
return;
|
|
47
|
+
this.addListener(item, "click", async (e) => {
|
|
48
|
+
e.stopPropagation();
|
|
49
|
+
await this.delegate.onRemoveDebugManifest(item.dataset.type);
|
|
50
|
+
const wallets = this.state.wallets.filter((wallet) => wallet.id !== item.dataset.type);
|
|
51
|
+
this.update({ wallets });
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
this.addListener(".add-debug-manifest-button", "click", async () => {
|
|
55
|
+
try {
|
|
56
|
+
const wallet = this.root.querySelector("#debug-manifest-input")?.value ?? "";
|
|
57
|
+
const manifest = await this.delegate.onAddDebugManifest(wallet);
|
|
58
|
+
this.update({ showSettings: false, wallets: [manifest, ...this.state.wallets] });
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
alert(`Something went wrong: ${error}`);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
create() {
|
|
66
|
+
super.create({ show: true });
|
|
67
|
+
}
|
|
68
|
+
walletDom(wallet) {
|
|
69
|
+
const removeButton = (0, html_1.html) `
|
|
70
|
+
<svg
|
|
71
|
+
class="remove-wallet-button"
|
|
72
|
+
data-type="${wallet.id}"
|
|
73
|
+
width="24"
|
|
74
|
+
height="24"
|
|
75
|
+
viewBox="0 0 24 24"
|
|
76
|
+
fill="none"
|
|
77
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
78
|
+
style="margin-right: 4px;"
|
|
79
|
+
>
|
|
80
|
+
<path d="M18 6L6 18" stroke="rgba(255,255,255,0.5)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
|
81
|
+
<path d="M6 6L18 18" stroke="rgba(255,255,255,0.5)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
|
82
|
+
</svg>
|
|
83
|
+
`;
|
|
84
|
+
return (0, html_1.html) `
|
|
85
|
+
<div class="connect-item" data-type="${wallet.id}">
|
|
86
|
+
<img style="background: #333" src="${wallet.icon}" alt="${wallet.name}" />
|
|
87
|
+
<div class="connect-item-info">
|
|
88
|
+
<span>${wallet.name}</span>
|
|
89
|
+
<span class="wallet-address">${(0, url_1.parseUrl)(wallet.website)?.hostname}</span>
|
|
90
|
+
</div>
|
|
91
|
+
${wallet.debug ? removeButton : ""}
|
|
92
|
+
</div>
|
|
93
|
+
`;
|
|
94
|
+
}
|
|
95
|
+
get dom() {
|
|
96
|
+
if (this.state.showSettings) {
|
|
97
|
+
return (0, html_1.html) `
|
|
98
|
+
<div class="modal-container">
|
|
99
|
+
<div class="modal-content">
|
|
100
|
+
<div class="modal-header">
|
|
101
|
+
<button class="back-button" style="left: 16px; right: unset;">
|
|
102
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
103
|
+
<path d="M15 18L9 12L15 6" stroke="rgba(255,255,255,0.5)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
|
104
|
+
</svg>
|
|
105
|
+
</button>
|
|
106
|
+
<p>Settings</p>
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
<div class="modal-body">
|
|
110
|
+
<p style="text-align: left;">
|
|
111
|
+
You can add your wallet to dapp for debug,
|
|
112
|
+
<a href="https://github.com/azbang/hot-connector" target="_blank">read the documentation.</a> Paste your manifest and click "Add".
|
|
113
|
+
</p>
|
|
114
|
+
|
|
115
|
+
<textarea style="width: 100%;" id="debug-manifest-input" rows="10">${JSON.stringify(debugManifest, null, 2)}</textarea>
|
|
116
|
+
<button class="add-debug-manifest-button">Add</button>
|
|
117
|
+
</div>
|
|
118
|
+
|
|
119
|
+
<div class="footer">
|
|
120
|
+
<img src="https://tgapp.herewallet.app/images/hot/hot-icon.png" alt="HOT Connector" />
|
|
121
|
+
<p>HOT Connector</p>
|
|
122
|
+
<p class="get-wallet-link">Don't have a wallet?</p>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
`;
|
|
127
|
+
}
|
|
128
|
+
return (0, html_1.html) `<div class="modal-container">
|
|
129
|
+
<div class="modal-content">
|
|
130
|
+
<div class="modal-header">
|
|
131
|
+
<p>Select wallet</p>
|
|
132
|
+
<button class="settings-button">
|
|
133
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
134
|
+
<circle cx="12" cy="12" r="2" fill="rgba(255,255,255,0.5)" />
|
|
135
|
+
<circle cx="19" cy="12" r="2" fill="rgba(255,255,255,0.5)" />
|
|
136
|
+
<circle cx="5" cy="12" r="2" fill="rgba(255,255,255,0.5)" />
|
|
137
|
+
</svg>
|
|
138
|
+
</button>
|
|
139
|
+
</div>
|
|
140
|
+
|
|
141
|
+
<div class="modal-body">${this.state.wallets.map((wallet) => this.walletDom(wallet))}</div>
|
|
142
|
+
|
|
143
|
+
<div class="footer">
|
|
144
|
+
<img src="https://tgapp.herewallet.app/images/hot/hot-icon.png" alt="HOT Connector" />
|
|
145
|
+
<p>HOT Connector</p>
|
|
146
|
+
<p class="get-wallet-link">Don't have a wallet?</p>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
</div>`;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
exports.NearWalletsPopup = NearWalletsPopup;
|
|
153
|
+
//# sourceMappingURL=NearWalletsPopup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NearWalletsPopup.js","sourceRoot":"","sources":["../../src/popups/NearWalletsPopup.ts"],"names":[],"mappings":";;;AAAA,0CAAuC;AACvC,wCAA0C;AAE1C,mCAAgC;AAEhC,MAAM,aAAa,GAAG;IACpB,EAAE,EAAE,eAAe;IACnB,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,iDAAiD;IACvD,WAAW,EAAE,yBAAyB;IACtC,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,OAAO;IAChB,QAAQ,EAAE,sBAAsB;IAChC,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE;QACR,WAAW,EAAE,IAAI;QACjB,mBAAmB,EAAE,IAAI;QACzB,sBAAsB,EAAE,IAAI;QAC5B,uBAAuB,EAAE,IAAI;KAC9B;IACD,WAAW,EAAE;QACX,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,EAAE;KACf;CACF,CAAC;AAEF,MAAa,gBAAiB,SAAQ,aAA2D;IAEpF;IADX,YACW,QAMR;QAED,KAAK,CAAC,QAAQ,CAAC,CAAC;QARP,aAAQ,GAAR,QAAQ,CAMhB;QAGD,IAAI,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,QAAQ;Q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AAC,KAAK,CAAC,YAAY,EAAE,CAAC;YAC5B,OAAO,IAAA,WAAI,EAAA;;;;;;;;;;;;;;;;;;mFAkBkE,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;;;;;;;;;;;OAWlH,CAAC;QACJ,CAAC;QAED,OAAO,IAAA,WAAI,EAAA;;;;;;;;;;;;;kCAamB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAsB,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;;;;;;;;WAQjG,CAAC;IACV,CAAC;CACF;AAxID,4CAwIC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare class Popup<T extends Record<string, any>> {
|
|
2
|
+
readonly delegate: {
|
|
3
|
+
onReject: () => void;
|
|
4
|
+
};
|
|
5
|
+
isClosed: boolean;
|
|
6
|
+
root: HTMLDivElement;
|
|
7
|
+
state: T;
|
|
8
|
+
constructor(delegate: {
|
|
9
|
+
onReject: () => void;
|
|
10
|
+
});
|
|
11
|
+
get dom(): import("../helpers/html").HtmlString;
|
|
12
|
+
disposables: (() => void)[];
|
|
13
|
+
addListener(querySelector: string | Element, event: string, callback: (e: Event) => void): void;
|
|
14
|
+
handlers(): void;
|
|
15
|
+
update(state: Partial<T>): void;
|
|
16
|
+
create({ show }: {
|
|
17
|
+
show?: boolean;
|
|
18
|
+
}): void;
|
|
19
|
+
show(): void;
|
|
20
|
+
hide(): void;
|
|
21
|
+
destroy(): void;
|
|
22
|
+
}
|