@rango-dev/wallets-core 0.53.1-next.1 → 0.53.1-next.3
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/dist/hub/provider/types.d.ts +2 -0
- package/dist/hub/provider/types.d.ts.map +1 -1
- package/dist/hub/store/mod.js +1 -1
- package/dist/hub/store/mod.js.map +2 -2
- package/dist/hub/store/namespaces.d.ts +1 -0
- package/dist/hub/store/namespaces.d.ts.map +1 -1
- package/dist/mod.js +1 -1
- package/dist/mod.js.map +2 -2
- package/dist/namespaces/common/actions.d.ts.map +1 -1
- package/dist/namespaces/common/mod.js +1 -1
- package/dist/namespaces/common/mod.js.map +2 -2
- package/dist/namespaces/evm/actions.d.ts.map +1 -1
- package/dist/namespaces/evm/mod.js +1 -1
- package/dist/namespaces/evm/mod.js.map +3 -3
- package/dist/namespaces/solana/mod.js +1 -1
- package/dist/namespaces/solana/mod.js.map +2 -2
- package/dist/namespaces/sui/mod.js +1 -1
- package/dist/namespaces/sui/mod.js.map +1 -1
- package/dist/namespaces/tron/actions.d.ts +2 -0
- package/dist/namespaces/tron/actions.d.ts.map +1 -0
- package/dist/namespaces/tron/after.d.ts +2 -0
- package/dist/namespaces/tron/after.d.ts.map +1 -0
- package/dist/namespaces/tron/and.d.ts +3 -0
- package/dist/namespaces/tron/and.d.ts.map +1 -0
- package/dist/namespaces/tron/before.d.ts +2 -0
- package/dist/namespaces/tron/before.d.ts.map +1 -0
- package/dist/namespaces/tron/builders.d.ts +5 -0
- package/dist/namespaces/tron/builders.d.ts.map +1 -0
- package/dist/namespaces/tron/constants.d.ts +3 -0
- package/dist/namespaces/tron/constants.d.ts.map +1 -0
- package/dist/namespaces/tron/mod.d.ts +9 -0
- package/dist/namespaces/tron/mod.d.ts.map +1 -0
- package/dist/namespaces/tron/mod.js +2 -0
- package/dist/namespaces/tron/mod.js.map +7 -0
- package/dist/namespaces/tron/types.d.ts +8 -0
- package/dist/namespaces/tron/types.d.ts.map +1 -0
- package/dist/namespaces/tron/utils.d.ts +2 -0
- package/dist/namespaces/tron/utils.d.ts.map +1 -0
- package/dist/namespaces/utxo/mod.js +1 -1
- package/dist/namespaces/utxo/mod.js.map +2 -2
- package/dist/wallets-core.build.json +1 -1
- package/package.json +6 -2
- package/src/hub/provider/types.ts +2 -0
- package/src/hub/store/namespaces.ts +3 -0
- package/src/namespaces/common/actions.ts +1 -0
- package/src/namespaces/evm/actions.ts +4 -1
- package/src/namespaces/tron/actions.ts +3 -0
- package/src/namespaces/tron/after.ts +3 -0
- package/src/namespaces/tron/and.ts +5 -0
- package/src/namespaces/tron/before.ts +3 -0
- package/src/namespaces/tron/builders.ts +15 -0
- package/src/namespaces/tron/constants.ts +8 -0
- package/src/namespaces/tron/mod.ts +8 -0
- package/src/namespaces/tron/types.ts +15 -0
- package/src/namespaces/tron/utils.ts +18 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/namespaces/utxo/actions.ts", "../../../src/namespaces/common/actions.ts", "../../../src/namespaces/utxo/after.ts", "../../../src/namespaces/common/after.ts", "../../../src/namespaces/utxo/and.ts", "../../../src/hub/store/store.ts", "../../../src/hub/store/namespaces.ts", "../../../src/hub/store/providers.ts", "../../../src/builders/action.ts", "../../../src/utils/mod.ts", "../../../src/namespaces/common/helpers.ts", "../../../src/namespaces/common/and.ts", "../../../src/namespaces/common/before.ts", "../../../src/namespaces/utxo/before.ts", "../../../src/namespaces/utxo/builders.ts", "../../../src/namespaces/utxo/utils.ts", "../../../src/namespaces/utxo/constants.ts"],
|
|
4
|
-
"sourcesContent": ["import { recommended as commonRecommended } from '../common/actions.js';\n\nexport const recommended = [...commonRecommended];\n", "import type { Context } from '../../hub/namespaces/mod.js';\n\nexport function disconnect(context: Context): void {\n const [, setState] = context.state();\n setState('network', null);\n setState('accounts', null);\n setState('connected', false);\n setState('connecting', false);\n}\n\nexport const recommended = [['disconnect', disconnect] as const];\n", "import { recommended as commonRecommended } from '../common/after.js';\n\nexport const recommended = [...commonRecommended];\n", "import type { Context } from '../../hub/namespaces/mod.js';\n\nexport function intoConnectionFinished(context: Context) {\n const [, setState] = context.state();\n setState('connecting', false);\n}\n\nexport const recommended = [['connect', intoConnectionFinished] as const];\n", "import { connectAndUpdateStateForSingleNetwork } from '../common/mod.js';\n\nexport const recommended = [\n ['connect', connectAndUpdateStateForSingleNetwork] as const,\n];\n", "import type { StoreApi } from 'zustand/vanilla';\n\nimport { createStore as createZustandStore } from 'zustand/vanilla';\n\nimport { extend, type Store } from './extend.js';\nimport { hubStore, type HubStore } from './hub.js';\nimport { namespacesStore, type NamespaceStore } from './namespaces.js';\nimport { providersStore, type ProviderStore } from './providers.js';\n\n/************ State ************/\n\nexport interface State {\n hub: HubStore;\n providers: ProviderStore;\n namespaces: NamespaceStore;\n}\n\nexport type RawStore = StoreApi<State>;\n\nexport const createStore = (): Store => {\n const store = createZustandStore<State>((...api) => {\n return {\n hub: hubStore(...api),\n providers: providersStore(...api),\n namespaces: namespacesStore(...api),\n };\n });\n\n return extend(store);\n};\n", "/************ Namespace ************/\n\nimport type { StateCreator } from 'zustand';\n\nimport { produce } from 'immer';\n\nimport {\n ConsumableEvents,\n type NamespaceConnectedEvent,\n type NamespaceDisconnectedEvent,\n type NamespaceSwitchedAccountEvent,\n type NamespaceSwitchedNetworkEvent,\n} from './events.js';\nimport { namespaceStateSelector, type State } from './mod.js';\n\n// Currently, namespace doesn't has any config.\nexport type NamespaceConfig = object;\n\nexport interface NamespaceData {\n accounts: null | string[];\n network: null | string;\n connected: boolean;\n connecting: boolean;\n}\n\ninterface NamespaceInfo {\n providerId: string;\n namespaceId: string;\n}\n\ninterface NamespaceItem {\n info: NamespaceInfo;\n data: NamespaceData;\n error: unknown;\n}\n\ntype NamespaceState = {\n events: InstanceType<typeof ConsumableEvents>;\n list: Record<string, NamespaceItem>;\n};\n\ninterface NamespaceActions {\n addNamespace: (id: string, config: NamespaceInfo) => void;\n updateStatus: <K extends keyof NamespaceData>(\n id: string,\n key: K,\n value: NamespaceData[K]\n ) => void;\n\n _produceEventsWhenUpdatingStatus: <K extends keyof NamespaceData>(\n namespace: NamespaceItem,\n id: string,\n key: K,\n value: NamespaceData[K]\n ) => void;\n}\ninterface NamespaceSelectors {\n getNamespaceData(storeId: string): NamespaceData;\n}\n\nexport type NamespaceStore = NamespaceState &\n NamespaceActions &\n NamespaceSelectors;\ntype NamespaceStateCreator = StateCreator<State, [], [], NamespaceStore>;\n\nconst namespacesStore: NamespaceStateCreator = (set, get) => ({\n events: new ConsumableEvents(),\n\n list: {},\n addNamespace: (id, info) => {\n const data: NamespaceData = {\n accounts: null,\n network: null,\n connected: false,\n connecting: false,\n };\n\n const item = {\n data,\n error: '',\n info,\n };\n\n set(\n produce((state: State) => {\n state.namespaces.list[id] = item;\n })\n );\n },\n updateStatus: (id, key, value) => {\n const ns = get().namespaces.list[id];\n if (!ns) {\n throw new Error(`No namespace with '${id}' found.`);\n }\n\n get().namespaces._produceEventsWhenUpdatingStatus(ns, id, key, value);\n\n // Updating state\n set(\n produce((state: State) => {\n state.namespaces.list[id].data[key] = value;\n })\n );\n },\n getNamespaceData(storeId) {\n return namespaceStateSelector(get(), storeId);\n },\n\n _produceEventsWhenUpdatingStatus: (namespace, id, key, value) => {\n if (key === 'accounts') {\n // check for both null and empty array\n const isAccountsEmpty =\n Object.is(value, null) || (Array.isArray(value) && value.length === 0);\n\n if (isAccountsEmpty) {\n const currentConnectedStatus = get().namespaces.list[id].data.connected;\n if (currentConnectedStatus) {\n const event: NamespaceDisconnectedEvent = {\n type: 'namespace_disconnected',\n provider: namespace.info.providerId,\n namespace: namespace.info.namespaceId,\n };\n\n get().namespaces.events.push(event);\n }\n // Skip emitting disconnect event, if the `connected` is false\n } else {\n const currentAccounts = get().namespaces.list[id].data.accounts;\n\n if (!currentAccounts) {\n const event: NamespaceConnectedEvent = {\n type: 'namespace_connected',\n provider: namespace.info.providerId,\n namespace: namespace.info.namespaceId,\n accounts: value as string[],\n };\n\n get().namespaces.events.push(event);\n } else {\n const areSameAccounts =\n // Clone the object from the Zustand store, as it's immutable, to avoid errors during sorting.\n [...currentAccounts].sort().toString() ===\n (value as string[]).sort().toString();\n\n if (!areSameAccounts) {\n const event: NamespaceSwitchedAccountEvent = {\n type: 'namespace_account_switched',\n provider: namespace.info.providerId,\n namespace: namespace.info.namespaceId,\n previousAccounts: currentAccounts,\n accounts: value as string[],\n };\n\n get().namespaces.events.push(event);\n }\n }\n }\n } else if (key === 'network') {\n const currentNetwork = get().namespaces.list[id].data.network;\n\n const event: NamespaceSwitchedNetworkEvent = {\n type: 'namespace_network_switched',\n provider: namespace.info.providerId,\n namespace: namespace.info.namespaceId,\n network: value as string,\n previousNetwork: currentNetwork,\n };\n\n get().namespaces.events.push(event);\n }\n },\n});\n\nexport { namespacesStore };\n", "import type { Namespace } from '../../namespaces/common/types.js';\nimport type { State as InternalProviderState } from '../provider/mod.js';\nimport type { BlockchainMeta, SignerFactory } from 'rango-types';\nimport type { StateCreator } from 'zustand';\n\nimport { produce } from 'immer';\n\nimport { ConsumableEvents, type ProviderDetectedEvent } from './events.js';\nimport { guessProviderStateSelector, type State } from './mod.js';\n\ntype Browsers = 'firefox' | 'chrome' | 'edge' | 'brave' | 'homepage';\ntype Property<N extends string, V> = { name: N; value: V };\n\ntype NamespacesProperty = Property<\n 'namespaces',\n {\n selection: 'single' | 'multiple';\n data: {\n label: string;\n id: string;\n value: Namespace;\n unsupported?: boolean;\n getSupportedChains: (chains: BlockchainMeta[]) => BlockchainMeta[];\n }[];\n }\n>;\ntype DerivationPathProperty = Property<\n 'derivationPath',\n {\n data: {\n id: string;\n label: string;\n namespace: Namespace;\n generateDerivationPath: (index: string) => string;\n }[];\n }\n>;\ntype DetailsProperty = Property<\n 'details',\n {\n mobileWallet?: boolean;\n showOnMobile?: boolean;\n isContractWallet?: boolean;\n }\n>;\ntype SignersProperty = Property<\n 'signers',\n {\n getSigners: () => Promise<SignerFactory>;\n }\n>;\n\nexport type ProviderMetadata = {\n name: string;\n icon: string;\n extensions: Partial<Record<Browsers, string>>;\n properties?: Array<\n | NamespacesProperty\n | DerivationPathProperty\n | DetailsProperty\n | SignersProperty\n >;\n};\n\nexport interface ProviderConfig {\n metadata: ProviderMetadata;\n}\n\nexport type ProviderInfo = ProviderConfig;\n\ninterface ProviderData {\n installed: boolean;\n}\n\ninterface ProviderItem {\n config: ProviderConfig;\n data: ProviderData;\n error: unknown;\n}\n\ntype ProviderState = {\n events: ConsumableEvents;\n list: Record<string, ProviderItem>;\n};\ninterface ProviderActions {\n addProvider: (id: string, config: ProviderConfig) => void;\n removeProvider: (id: string) => void;\n updateStatus: <K extends keyof ProviderData>(\n id: string,\n key: K,\n value: ProviderData[K]\n ) => void;\n\n _produceEventsWhenUpdatingStatus: <K extends keyof ProviderData>(\n provider: ProviderItem,\n id: string,\n key: K,\n value: ProviderData[K]\n ) => void;\n}\n\ninterface ProviderSelectors {\n /**\n * Provider has a limited state to itself, to be compatible with legacy, we try to produce same object as legacy\n * which includes namespace state as well.\n */\n guessNamespacesState: (id: string) => InternalProviderState;\n}\n\nexport type ProviderStore = ProviderState & ProviderActions & ProviderSelectors;\ntype ProvidersStateCreator = StateCreator<State, [], [], ProviderStore>;\n\nconst providersStore: ProvidersStateCreator = (set, get) => ({\n events: new ConsumableEvents(),\n\n list: {},\n addProvider: (id, config) => {\n const item = {\n data: {\n installed: false,\n },\n error: '',\n config,\n };\n\n set(\n produce((state: State) => {\n state.providers.list[id] = item;\n })\n );\n },\n removeProvider: (id) => {\n set(\n produce((state: State) => {\n delete state.providers.list[id];\n })\n );\n },\n updateStatus: (id, key, value) => {\n const provider = get().providers.list[id];\n if (!provider) {\n throw new Error(`No namespace namespace with '${id}' found.`);\n }\n\n get().providers._produceEventsWhenUpdatingStatus(provider, id, key, value);\n\n set(\n produce((state: State) => {\n state.providers.list[id].data[key] = value;\n })\n );\n },\n guessNamespacesState: (providerId: string): InternalProviderState => {\n return guessProviderStateSelector(get(), providerId);\n },\n\n _produceEventsWhenUpdatingStatus: (_provider, id, key, _value) => {\n if (key === 'installed') {\n const event: ProviderDetectedEvent = {\n type: 'provider_detected',\n provider: id,\n };\n\n get().providers.events.push(event);\n }\n },\n});\n\nexport { providersStore };\n", "import type { Actions, Context, Operators } from '../hub/namespaces/types.js';\nimport type { AnyFunction, FunctionWithContext } from '../types/actions.js';\n\nexport interface ActionByBuilder<T, Context> {\n actionName: keyof T;\n and: Operators<T>;\n or: Operators<T>;\n after: Operators<T>;\n before: Operators<T>;\n action: FunctionWithContext<T[keyof T], Context>;\n}\n\n/*\n * TODO:\n * Currently, to use this builder you will write something like this:\n * new ActionBuilder<EvmActions, 'disconnect'>('disconnect').after(....)\n *\n * I couldn't figure it out to be able typescript infer the constructor value as key of actions.\n * Ideal usage:\n * new ActionBuilder<EvmActions>('disconnect').after(....)\n *\n */\nexport class ActionBuilder<T extends Actions<T>, K extends keyof T> {\n readonly name: K;\n #and: Operators<T> = new Map();\n #or: Operators<T> = new Map();\n #after: Operators<T> = new Map();\n #before: Operators<T> = new Map();\n #action: FunctionWithContext<T[keyof T], Context<T>> | undefined;\n\n constructor(name: K) {\n this.name = name;\n }\n\n public and(action: FunctionWithContext<AnyFunction, Context<T>>) {\n if (!this.#and.has(this.name)) {\n this.#and.set(this.name, []);\n }\n this.#and.get(this.name)?.push(action);\n return this;\n }\n\n public or(action: FunctionWithContext<AnyFunction, Context<T>>) {\n if (!this.#or.has(this.name)) {\n this.#or.set(this.name, []);\n }\n this.#or.get(this.name)?.push(action);\n return this;\n }\n\n public before(action: FunctionWithContext<AnyFunction, Context<T>>) {\n if (!this.#before.has(this.name)) {\n this.#before.set(this.name, []);\n }\n this.#before.get(this.name)?.push(action);\n return this;\n }\n\n public after(action: FunctionWithContext<AnyFunction, Context<T>>) {\n if (!this.#after.has(this.name)) {\n this.#after.set(this.name, []);\n }\n this.#after.get(this.name)?.push(action);\n return this;\n }\n\n public action(action: FunctionWithContext<T[keyof T], Context<T>>) {\n this.#action = action;\n return this;\n }\n\n public build(): ActionByBuilder<T, Context<T>> {\n if (!this.#action) {\n throw new Error('Your action builder should includes an action.');\n }\n\n return {\n actionName: this.name,\n action: this.#action,\n before: this.#before,\n after: this.#after,\n and: this.#and,\n or: this.#or,\n };\n }\n}\n", "/*\n * It is not a good idea to re-export all of CAIP because if they have a breaking change, we will break as well.\n * It would be better to create an abstraction over them and export our own interface to ensure it is under our control.\n */\nexport * as CAIP from 'caip';\n\nexport { generateStoreId } from '../hub/helpers.js';\nexport * from './versions.js';\n", "import { AccountId } from 'caip';\n\nexport function isValidCaipAddress(address: string): boolean {\n try {\n AccountId.parse(address);\n return true;\n } catch {\n return false;\n }\n}\n", "import type {\n Accounts,\n AccountsWithActiveChain,\n} from './../../types/accounts.js';\nimport type { Context } from '../../hub/namespaces/mod.js';\n\nimport { isValidCaipAddress } from './helpers.js';\n\nexport function connectAndUpdateStateForSingleNetwork(\n context: Context,\n accounts: Accounts\n) {\n if (!accounts.every(isValidCaipAddress)) {\n throw new Error(\n `Your provider should format account addresses in CAIP-10 format. Your provided accounts: ${accounts}`\n );\n }\n\n const [, setState] = context.state();\n setState('accounts', accounts);\n setState('connected', true);\n return accounts;\n}\n\nexport function connectAndUpdateStateForMultiNetworks(\n context: Context,\n accounts: AccountsWithActiveChain\n) {\n if (!accounts.accounts.every(isValidCaipAddress)) {\n throw new Error(\n `Your provider should format account addresses in CAIP-10 format. Your provided accounts: ${accounts.accounts}`\n );\n }\n\n const [, setState] = context.state();\n setState('accounts', accounts.accounts);\n setState('network', accounts.network);\n setState('connected', true);\n return accounts;\n}\n\nexport const recommended = [];\n", "import type { Context } from '../../hub/namespaces/mod.js';\n\nexport function intoConnecting(context: Context) {\n const [, setState] = context.state();\n setState('connecting', true);\n}\n\n// Please consider if you are going to add something here, make sure it works on all namespaces.\nexport const recommended = [['connect', intoConnecting] as const];\n", "import { recommended as commonRecommended } from '../common/before.js';\n\nexport const recommended = [...commonRecommended];\n", "import type { UtxoActions } from './types.js';\n\nimport { ActionBuilder } from '../../mod.js';\nimport { intoConnectionFinished } from '../common/after.js';\nimport { connectAndUpdateStateForSingleNetwork } from '../common/and.js';\nimport { intoConnecting } from '../common/before.js';\n\nexport const connect = () =>\n new ActionBuilder<UtxoActions, 'connect'>('connect')\n .and(connectAndUpdateStateForSingleNetwork)\n .before(intoConnecting)\n .after(intoConnectionFinished);\n", "import type { CaipAccount } from '../common/mod.js';\n\nimport { AccountId } from 'caip';\n\nimport { CAIP_BITCOIN_CHAIN_ID, CAIP_NAMESPACE } from './constants.js';\n\nexport function formatAccountsToCAIP(accounts: string[]) {\n return accounts.map(\n (account) =>\n AccountId.format({\n address: account.toString(),\n chainId: {\n namespace: CAIP_NAMESPACE,\n reference: CAIP_BITCOIN_CHAIN_ID,\n },\n }) as CaipAccount\n );\n}\n", "export const CAIP_NAMESPACE = 'bip122';\nexport const CAIP_BITCOIN_CHAIN_ID = '000000000019d6689c085ae165831e93';\n"],
|
|
5
|
-
"mappings": "6IAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,ICEO,SAASC,EAAWC,EAAwB,CACjD,GAAM,CAAC,CAAEC,CAAQ,EAAID,EAAQ,MAAM,EACnCC,EAAS,UAAW,IAAI,EACxBA,EAAS,WAAY,IAAI,EACzBA,EAAS,YAAa,EAAK,EAC3BA,EAAS,aAAc,EAAK,CAC9B,
|
|
4
|
+
"sourcesContent": ["import { recommended as commonRecommended } from '../common/actions.js';\n\nexport const recommended = [...commonRecommended];\n", "import type { Context } from '../../hub/namespaces/mod.js';\n\nexport function disconnect(context: Context): void {\n const [, setState] = context.state();\n setState('network', null);\n setState('accounts', null);\n setState('connected', false);\n setState('connecting', false);\n setState('connectArgs', null);\n}\n\nexport const recommended = [['disconnect', disconnect] as const];\n", "import { recommended as commonRecommended } from '../common/after.js';\n\nexport const recommended = [...commonRecommended];\n", "import type { Context } from '../../hub/namespaces/mod.js';\n\nexport function intoConnectionFinished(context: Context) {\n const [, setState] = context.state();\n setState('connecting', false);\n}\n\nexport const recommended = [['connect', intoConnectionFinished] as const];\n", "import { connectAndUpdateStateForSingleNetwork } from '../common/mod.js';\n\nexport const recommended = [\n ['connect', connectAndUpdateStateForSingleNetwork] as const,\n];\n", "import type { StoreApi } from 'zustand/vanilla';\n\nimport { createStore as createZustandStore } from 'zustand/vanilla';\n\nimport { extend, type Store } from './extend.js';\nimport { hubStore, type HubStore } from './hub.js';\nimport { namespacesStore, type NamespaceStore } from './namespaces.js';\nimport { providersStore, type ProviderStore } from './providers.js';\n\n/************ State ************/\n\nexport interface State {\n hub: HubStore;\n providers: ProviderStore;\n namespaces: NamespaceStore;\n}\n\nexport type RawStore = StoreApi<State>;\n\nexport const createStore = (): Store => {\n const store = createZustandStore<State>((...api) => {\n return {\n hub: hubStore(...api),\n providers: providersStore(...api),\n namespaces: namespacesStore(...api),\n };\n });\n\n return extend(store);\n};\n", "/************ Namespace ************/\n\nimport type { StateCreator } from 'zustand';\n\nimport { produce } from 'immer';\n\nimport {\n ConsumableEvents,\n type NamespaceConnectedEvent,\n type NamespaceDisconnectedEvent,\n type NamespaceSwitchedAccountEvent,\n type NamespaceSwitchedNetworkEvent,\n} from './events.js';\nimport { namespaceStateSelector, type State } from './mod.js';\n\n// Currently, namespace doesn't has any config.\nexport type NamespaceConfig = object;\n\nexport interface NamespaceData {\n accounts: null | string[];\n network: null | string;\n connected: boolean;\n connecting: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n connectArgs: Record<string, any> | null;\n}\n\ninterface NamespaceInfo {\n providerId: string;\n namespaceId: string;\n}\n\ninterface NamespaceItem {\n info: NamespaceInfo;\n data: NamespaceData;\n error: unknown;\n}\n\ntype NamespaceState = {\n events: InstanceType<typeof ConsumableEvents>;\n list: Record<string, NamespaceItem>;\n};\n\ninterface NamespaceActions {\n addNamespace: (id: string, config: NamespaceInfo) => void;\n updateStatus: <K extends keyof NamespaceData>(\n id: string,\n key: K,\n value: NamespaceData[K]\n ) => void;\n\n _produceEventsWhenUpdatingStatus: <K extends keyof NamespaceData>(\n namespace: NamespaceItem,\n id: string,\n key: K,\n value: NamespaceData[K]\n ) => void;\n}\ninterface NamespaceSelectors {\n getNamespaceData(storeId: string): NamespaceData;\n}\n\nexport type NamespaceStore = NamespaceState &\n NamespaceActions &\n NamespaceSelectors;\ntype NamespaceStateCreator = StateCreator<State, [], [], NamespaceStore>;\n\nconst namespacesStore: NamespaceStateCreator = (set, get) => ({\n events: new ConsumableEvents(),\n\n list: {},\n addNamespace: (id, info) => {\n const data: NamespaceData = {\n accounts: null,\n network: null,\n connected: false,\n connecting: false,\n connectArgs: null,\n };\n\n const item = {\n data,\n error: '',\n info,\n };\n\n set(\n produce((state: State) => {\n state.namespaces.list[id] = item;\n })\n );\n },\n updateStatus: (id, key, value) => {\n const ns = get().namespaces.list[id];\n if (!ns) {\n throw new Error(`No namespace with '${id}' found.`);\n }\n\n get().namespaces._produceEventsWhenUpdatingStatus(ns, id, key, value);\n\n // Updating state\n set(\n produce((state: State) => {\n state.namespaces.list[id].data[key] = value;\n })\n );\n },\n getNamespaceData(storeId) {\n return namespaceStateSelector(get(), storeId);\n },\n\n _produceEventsWhenUpdatingStatus: (namespace, id, key, value) => {\n if (key === 'accounts') {\n // check for both null and empty array\n const isAccountsEmpty =\n Object.is(value, null) || (Array.isArray(value) && value.length === 0);\n\n if (isAccountsEmpty) {\n const currentConnectedStatus = get().namespaces.list[id].data.connected;\n if (currentConnectedStatus) {\n const event: NamespaceDisconnectedEvent = {\n type: 'namespace_disconnected',\n provider: namespace.info.providerId,\n namespace: namespace.info.namespaceId,\n };\n\n get().namespaces.events.push(event);\n }\n // Skip emitting disconnect event, if the `connected` is false\n } else {\n const currentAccounts = get().namespaces.list[id].data.accounts;\n\n if (!currentAccounts) {\n const event: NamespaceConnectedEvent = {\n type: 'namespace_connected',\n provider: namespace.info.providerId,\n namespace: namespace.info.namespaceId,\n accounts: value as string[],\n };\n\n get().namespaces.events.push(event);\n } else {\n const areSameAccounts =\n // Clone the object from the Zustand store, as it's immutable, to avoid errors during sorting.\n [...currentAccounts].sort().toString() ===\n (value as string[]).sort().toString();\n\n if (!areSameAccounts) {\n const event: NamespaceSwitchedAccountEvent = {\n type: 'namespace_account_switched',\n provider: namespace.info.providerId,\n namespace: namespace.info.namespaceId,\n previousAccounts: currentAccounts,\n accounts: value as string[],\n };\n\n get().namespaces.events.push(event);\n }\n }\n }\n } else if (key === 'network') {\n const currentNetwork = get().namespaces.list[id].data.network;\n\n const event: NamespaceSwitchedNetworkEvent = {\n type: 'namespace_network_switched',\n provider: namespace.info.providerId,\n namespace: namespace.info.namespaceId,\n network: value as string,\n previousNetwork: currentNetwork,\n };\n\n get().namespaces.events.push(event);\n }\n },\n});\n\nexport { namespacesStore };\n", "import type { Namespace } from '../../namespaces/common/types.js';\nimport type { State as InternalProviderState } from '../provider/mod.js';\nimport type { BlockchainMeta, SignerFactory } from 'rango-types';\nimport type { StateCreator } from 'zustand';\n\nimport { produce } from 'immer';\n\nimport { ConsumableEvents, type ProviderDetectedEvent } from './events.js';\nimport { guessProviderStateSelector, type State } from './mod.js';\n\ntype Browsers = 'firefox' | 'chrome' | 'edge' | 'brave' | 'homepage';\ntype Property<N extends string, V> = { name: N; value: V };\n\ntype NamespacesProperty = Property<\n 'namespaces',\n {\n selection: 'single' | 'multiple';\n data: {\n label: string;\n id: string;\n value: Namespace;\n unsupported?: boolean;\n getSupportedChains: (chains: BlockchainMeta[]) => BlockchainMeta[];\n }[];\n }\n>;\ntype DerivationPathProperty = Property<\n 'derivationPath',\n {\n data: {\n id: string;\n label: string;\n namespace: Namespace;\n generateDerivationPath: (index: string) => string;\n }[];\n }\n>;\ntype DetailsProperty = Property<\n 'details',\n {\n mobileWallet?: boolean;\n showOnMobile?: boolean;\n isContractWallet?: boolean;\n }\n>;\ntype SignersProperty = Property<\n 'signers',\n {\n getSigners: () => Promise<SignerFactory>;\n }\n>;\n\nexport type ProviderMetadata = {\n name: string;\n icon: string;\n extensions: Partial<Record<Browsers, string>>;\n properties?: Array<\n | NamespacesProperty\n | DerivationPathProperty\n | DetailsProperty\n | SignersProperty\n >;\n};\n\nexport interface ProviderConfig {\n metadata: ProviderMetadata;\n}\n\nexport type ProviderInfo = ProviderConfig;\n\ninterface ProviderData {\n installed: boolean;\n}\n\ninterface ProviderItem {\n config: ProviderConfig;\n data: ProviderData;\n error: unknown;\n}\n\ntype ProviderState = {\n events: ConsumableEvents;\n list: Record<string, ProviderItem>;\n};\ninterface ProviderActions {\n addProvider: (id: string, config: ProviderConfig) => void;\n removeProvider: (id: string) => void;\n updateStatus: <K extends keyof ProviderData>(\n id: string,\n key: K,\n value: ProviderData[K]\n ) => void;\n\n _produceEventsWhenUpdatingStatus: <K extends keyof ProviderData>(\n provider: ProviderItem,\n id: string,\n key: K,\n value: ProviderData[K]\n ) => void;\n}\n\ninterface ProviderSelectors {\n /**\n * Provider has a limited state to itself, to be compatible with legacy, we try to produce same object as legacy\n * which includes namespace state as well.\n */\n guessNamespacesState: (id: string) => InternalProviderState;\n}\n\nexport type ProviderStore = ProviderState & ProviderActions & ProviderSelectors;\ntype ProvidersStateCreator = StateCreator<State, [], [], ProviderStore>;\n\nconst providersStore: ProvidersStateCreator = (set, get) => ({\n events: new ConsumableEvents(),\n\n list: {},\n addProvider: (id, config) => {\n const item = {\n data: {\n installed: false,\n },\n error: '',\n config,\n };\n\n set(\n produce((state: State) => {\n state.providers.list[id] = item;\n })\n );\n },\n removeProvider: (id) => {\n set(\n produce((state: State) => {\n delete state.providers.list[id];\n })\n );\n },\n updateStatus: (id, key, value) => {\n const provider = get().providers.list[id];\n if (!provider) {\n throw new Error(`No namespace namespace with '${id}' found.`);\n }\n\n get().providers._produceEventsWhenUpdatingStatus(provider, id, key, value);\n\n set(\n produce((state: State) => {\n state.providers.list[id].data[key] = value;\n })\n );\n },\n guessNamespacesState: (providerId: string): InternalProviderState => {\n return guessProviderStateSelector(get(), providerId);\n },\n\n _produceEventsWhenUpdatingStatus: (_provider, id, key, _value) => {\n if (key === 'installed') {\n const event: ProviderDetectedEvent = {\n type: 'provider_detected',\n provider: id,\n };\n\n get().providers.events.push(event);\n }\n },\n});\n\nexport { providersStore };\n", "import type { Actions, Context, Operators } from '../hub/namespaces/types.js';\nimport type { AnyFunction, FunctionWithContext } from '../types/actions.js';\n\nexport interface ActionByBuilder<T, Context> {\n actionName: keyof T;\n and: Operators<T>;\n or: Operators<T>;\n after: Operators<T>;\n before: Operators<T>;\n action: FunctionWithContext<T[keyof T], Context>;\n}\n\n/*\n * TODO:\n * Currently, to use this builder you will write something like this:\n * new ActionBuilder<EvmActions, 'disconnect'>('disconnect').after(....)\n *\n * I couldn't figure it out to be able typescript infer the constructor value as key of actions.\n * Ideal usage:\n * new ActionBuilder<EvmActions>('disconnect').after(....)\n *\n */\nexport class ActionBuilder<T extends Actions<T>, K extends keyof T> {\n readonly name: K;\n #and: Operators<T> = new Map();\n #or: Operators<T> = new Map();\n #after: Operators<T> = new Map();\n #before: Operators<T> = new Map();\n #action: FunctionWithContext<T[keyof T], Context<T>> | undefined;\n\n constructor(name: K) {\n this.name = name;\n }\n\n public and(action: FunctionWithContext<AnyFunction, Context<T>>) {\n if (!this.#and.has(this.name)) {\n this.#and.set(this.name, []);\n }\n this.#and.get(this.name)?.push(action);\n return this;\n }\n\n public or(action: FunctionWithContext<AnyFunction, Context<T>>) {\n if (!this.#or.has(this.name)) {\n this.#or.set(this.name, []);\n }\n this.#or.get(this.name)?.push(action);\n return this;\n }\n\n public before(action: FunctionWithContext<AnyFunction, Context<T>>) {\n if (!this.#before.has(this.name)) {\n this.#before.set(this.name, []);\n }\n this.#before.get(this.name)?.push(action);\n return this;\n }\n\n public after(action: FunctionWithContext<AnyFunction, Context<T>>) {\n if (!this.#after.has(this.name)) {\n this.#after.set(this.name, []);\n }\n this.#after.get(this.name)?.push(action);\n return this;\n }\n\n public action(action: FunctionWithContext<T[keyof T], Context<T>>) {\n this.#action = action;\n return this;\n }\n\n public build(): ActionByBuilder<T, Context<T>> {\n if (!this.#action) {\n throw new Error('Your action builder should includes an action.');\n }\n\n return {\n actionName: this.name,\n action: this.#action,\n before: this.#before,\n after: this.#after,\n and: this.#and,\n or: this.#or,\n };\n }\n}\n", "/*\n * It is not a good idea to re-export all of CAIP because if they have a breaking change, we will break as well.\n * It would be better to create an abstraction over them and export our own interface to ensure it is under our control.\n */\nexport * as CAIP from 'caip';\n\nexport { generateStoreId } from '../hub/helpers.js';\nexport * from './versions.js';\n", "import { AccountId } from 'caip';\n\nexport function isValidCaipAddress(address: string): boolean {\n try {\n AccountId.parse(address);\n return true;\n } catch {\n return false;\n }\n}\n", "import type {\n Accounts,\n AccountsWithActiveChain,\n} from './../../types/accounts.js';\nimport type { Context } from '../../hub/namespaces/mod.js';\n\nimport { isValidCaipAddress } from './helpers.js';\n\nexport function connectAndUpdateStateForSingleNetwork(\n context: Context,\n accounts: Accounts\n) {\n if (!accounts.every(isValidCaipAddress)) {\n throw new Error(\n `Your provider should format account addresses in CAIP-10 format. Your provided accounts: ${accounts}`\n );\n }\n\n const [, setState] = context.state();\n setState('accounts', accounts);\n setState('connected', true);\n return accounts;\n}\n\nexport function connectAndUpdateStateForMultiNetworks(\n context: Context,\n accounts: AccountsWithActiveChain\n) {\n if (!accounts.accounts.every(isValidCaipAddress)) {\n throw new Error(\n `Your provider should format account addresses in CAIP-10 format. Your provided accounts: ${accounts.accounts}`\n );\n }\n\n const [, setState] = context.state();\n setState('accounts', accounts.accounts);\n setState('network', accounts.network);\n setState('connected', true);\n return accounts;\n}\n\nexport const recommended = [];\n", "import type { Context } from '../../hub/namespaces/mod.js';\n\nexport function intoConnecting(context: Context) {\n const [, setState] = context.state();\n setState('connecting', true);\n}\n\n// Please consider if you are going to add something here, make sure it works on all namespaces.\nexport const recommended = [['connect', intoConnecting] as const];\n", "import { recommended as commonRecommended } from '../common/before.js';\n\nexport const recommended = [...commonRecommended];\n", "import type { UtxoActions } from './types.js';\n\nimport { ActionBuilder } from '../../mod.js';\nimport { intoConnectionFinished } from '../common/after.js';\nimport { connectAndUpdateStateForSingleNetwork } from '../common/and.js';\nimport { intoConnecting } from '../common/before.js';\n\nexport const connect = () =>\n new ActionBuilder<UtxoActions, 'connect'>('connect')\n .and(connectAndUpdateStateForSingleNetwork)\n .before(intoConnecting)\n .after(intoConnectionFinished);\n", "import type { CaipAccount } from '../common/mod.js';\n\nimport { AccountId } from 'caip';\n\nimport { CAIP_BITCOIN_CHAIN_ID, CAIP_NAMESPACE } from './constants.js';\n\nexport function formatAccountsToCAIP(accounts: string[]) {\n return accounts.map(\n (account) =>\n AccountId.format({\n address: account.toString(),\n chainId: {\n namespace: CAIP_NAMESPACE,\n reference: CAIP_BITCOIN_CHAIN_ID,\n },\n }) as CaipAccount\n );\n}\n", "export const CAIP_NAMESPACE = 'bip122';\nexport const CAIP_BITCOIN_CHAIN_ID = '000000000019d6689c085ae165831e93';\n"],
|
|
5
|
+
"mappings": "6IAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,ICEO,SAASC,EAAWC,EAAwB,CACjD,GAAM,CAAC,CAAEC,CAAQ,EAAID,EAAQ,MAAM,EACnCC,EAAS,UAAW,IAAI,EACxBA,EAAS,WAAY,IAAI,EACzBA,EAAS,YAAa,EAAK,EAC3BA,EAAS,aAAc,EAAK,EAC5BA,EAAS,cAAe,IAAI,CAC9B,CAPgBC,EAAAH,EAAA,cAST,IAAMI,EAAc,CAAC,CAAC,aAAcJ,CAAU,CAAU,EDTxD,IAAMK,EAAc,CAAC,GAAGA,CAAiB,EEFhD,IAAAC,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,ICEO,SAASC,EAAuBC,EAAkB,CACvD,GAAM,CAAC,CAAEC,CAAQ,EAAID,EAAQ,MAAM,EACnCC,EAAS,aAAc,EAAK,CAC9B,CAHgBC,EAAAH,EAAA,0BAKT,IAAMI,EAAc,CAAC,CAAC,UAAWJ,CAAsB,CAAU,EDLjE,IAAMK,EAAc,CAAC,GAAGA,CAAiB,EEFhD,IAAAC,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,ICEA,OAAS,eAAeC,OAA0B,kBCElD,OAAS,WAAAC,OAAe,QCCxB,OAAS,WAAAC,OAAe,QCiBjB,IAAMC,EAAN,KAA6D,CAtBpE,MAsBoE,CAAAC,EAAA,sBACzD,KACTC,GAAqB,IAAI,IACzBC,GAAoB,IAAI,IACxBC,GAAuB,IAAI,IAC3BC,GAAwB,IAAI,IAC5BC,GAEA,YAAYC,EAAS,CACnB,KAAK,KAAOA,CACd,CAEO,IAAIC,EAAsD,CAC/D,OAAK,KAAKN,GAAK,IAAI,KAAK,IAAI,GAC1B,KAAKA,GAAK,IAAI,KAAK,KAAM,CAAC,CAAC,EAE7B,KAAKA,GAAK,IAAI,KAAK,IAAI,GAAG,KAAKM,CAAM,EAC9B,IACT,CAEO,GAAGA,EAAsD,CAC9D,OAAK,KAAKL,GAAI,IAAI,KAAK,IAAI,GACzB,KAAKA,GAAI,IAAI,KAAK,KAAM,CAAC,CAAC,EAE5B,KAAKA,GAAI,IAAI,KAAK,IAAI,GAAG,KAAKK,CAAM,EAC7B,IACT,CAEO,OAAOA,EAAsD,CAClE,OAAK,KAAKH,GAAQ,IAAI,KAAK,IAAI,GAC7B,KAAKA,GAAQ,IAAI,KAAK,KAAM,CAAC,CAAC,EAEhC,KAAKA,GAAQ,IAAI,KAAK,IAAI,GAAG,KAAKG,CAAM,EACjC,IACT,CAEO,MAAMA,EAAsD,CACjE,OAAK,KAAKJ,GAAO,IAAI,KAAK,IAAI,GAC5B,KAAKA,GAAO,IAAI,KAAK,KAAM,CAAC,CAAC,EAE/B,KAAKA,GAAO,IAAI,KAAK,IAAI,GAAG,KAAKI,CAAM,EAChC,IACT,CAEO,OAAOA,EAAqD,CACjE,YAAKF,GAAUE,EACR,IACT,CAEO,OAAwC,CAC7C,GAAI,CAAC,KAAKF,GACR,MAAM,IAAI,MAAM,gDAAgD,EAGlE,MAAO,CACL,WAAY,KAAK,KACjB,OAAQ,KAAKA,GACb,OAAQ,KAAKD,GACb,MAAO,KAAKD,GACZ,IAAK,KAAKF,GACV,GAAI,KAAKC,EACX,CACF,CACF,ECjFA,UAAYM,OAAU,OCJtB,OAAS,aAAAC,MAAiB,OAEnB,SAASC,EAAmBC,EAA0B,CAC3D,GAAI,CACF,OAAAC,EAAU,MAAMD,CAAO,EAChB,EACT,MAAQ,CACN,MAAO,EACT,CACF,CAPgBE,EAAAH,EAAA,sBCMT,SAASI,EACdC,EACAC,EACA,CACA,GAAI,CAACA,EAAS,MAAMC,CAAkB,EACpC,MAAM,IAAI,MACR,4FAA4FD,CAAQ,EACtG,EAGF,GAAM,CAAC,CAAEE,CAAQ,EAAIH,EAAQ,MAAM,EACnC,OAAAG,EAAS,WAAYF,CAAQ,EAC7BE,EAAS,YAAa,EAAI,EACnBF,CACT,CAdgBG,EAAAL,EAAA,yCCNT,SAASM,EAAeC,EAAkB,CAC/C,GAAM,CAAC,CAAEC,CAAQ,EAAID,EAAQ,MAAM,EACnCC,EAAS,aAAc,EAAI,CAC7B,CAHgBC,EAAAH,EAAA,kBAMT,IAAMI,EAAc,CAAC,CAAC,UAAWJ,CAAc,CAAU,ERNzD,IAAMK,EAAc,CACzB,CAAC,UAAWC,CAAqC,CACnD,ESJA,IAAAC,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,IAEO,IAAMC,EAAc,CAAC,GAAGA,CAAiB,ECFhD,IAAAC,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAOO,IAAMC,EAAUC,EAAA,IACrB,IAAIC,EAAsC,SAAS,EAChD,IAAIC,CAAqC,EACzC,OAAOC,CAAc,EACrB,MAAMC,CAAsB,EAJV,WCPvB,IAAAC,EAAA,GAAAC,EAAAD,EAAA,0BAAAE,IAEA,OAAS,aAAAC,MAAiB,OCFnB,IAAMC,EAAiB,SACjBC,EAAwB,mCDK9B,SAASC,EAAqBC,EAAoB,CACvD,OAAOA,EAAS,IACbC,GACCC,EAAU,OAAO,CACf,QAASD,EAAQ,SAAS,EAC1B,QAAS,CACP,UAAWE,EACX,UAAWC,CACb,CACF,CAAC,CACL,CACF,CAXgBC,EAAAN,EAAA",
|
|
6
6
|
"names": ["actions_exports", "__export", "recommended", "disconnect", "context", "setState", "__name", "recommended", "recommended", "after_exports", "__export", "recommended", "intoConnectionFinished", "context", "setState", "__name", "recommended", "recommended", "and_exports", "__export", "recommended", "createZustandStore", "produce", "produce", "ActionBuilder", "__name", "#and", "#or", "#after", "#before", "#action", "name", "action", "CAIP", "AccountId", "isValidCaipAddress", "address", "AccountId", "__name", "connectAndUpdateStateForSingleNetwork", "context", "accounts", "isValidCaipAddress", "setState", "__name", "intoConnecting", "context", "setState", "__name", "recommended", "recommended", "connectAndUpdateStateForSingleNetwork", "before_exports", "__export", "recommended", "recommended", "builders_exports", "__export", "connect", "connect", "__name", "ActionBuilder", "connectAndUpdateStateForSingleNetwork", "intoConnecting", "intoConnectionFinished", "utils_exports", "__export", "formatAccountsToCAIP", "AccountId", "CAIP_NAMESPACE", "CAIP_BITCOIN_CHAIN_ID", "formatAccountsToCAIP", "accounts", "account", "AccountId", "CAIP_NAMESPACE", "CAIP_BITCOIN_CHAIN_ID", "__name"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/hub/helpers.ts":{"bytes":371,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/namespaces/errors.ts":{"bytes":455,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/namespaces/namespace.ts":{"bytes":13059,"imports":[{"path":"src/hub/helpers.ts","kind":"import-statement","original":"../helpers.js"},{"path":"src/hub/namespaces/errors.ts","kind":"import-statement","original":"./errors.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/namespaces/mod.ts":{"bytes":181,"imports":[{"path":"src/hub/namespaces/namespace.ts","kind":"import-statement","original":"./namespace.js"}],"format":"esm"},"src/hub/provider/provider.ts":{"bytes":9373,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/provider/mod.ts":{"bytes":196,"imports":[{"path":"src/hub/provider/provider.ts","kind":"import-statement","original":"./provider.js"}],"format":"esm"},"src/hub/hub.ts":{"bytes":3436,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/selectors.ts":{"bytes":2228,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/extend.ts":{"bytes":3898,"imports":[{"path":"src/hub/store/selectors.ts","kind":"import-statement","original":"./selectors.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/hub.ts":{"bytes":342,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/events.ts":{"bytes":1956,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/namespaces.ts":{"bytes":4750,"imports":[{"path":"immer","kind":"import-statement","external":true},{"path":"src/hub/store/events.ts","kind":"import-statement","original":"./events.js"},{"path":"src/hub/store/mod.ts","kind":"import-statement","original":"./mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/providers.ts":{"bytes":4043,"imports":[{"path":"immer","kind":"import-statement","external":true},{"path":"src/hub/store/events.ts","kind":"import-statement","original":"./events.js"},{"path":"src/hub/store/mod.ts","kind":"import-statement","original":"./mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/store.ts":{"bytes":808,"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"src/hub/store/extend.ts","kind":"import-statement","original":"./extend.js"},{"path":"src/hub/store/hub.ts","kind":"import-statement","original":"./hub.js"},{"path":"src/hub/store/namespaces.ts","kind":"import-statement","original":"./namespaces.js"},{"path":"src/hub/store/providers.ts","kind":"import-statement","original":"./providers.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/mod.ts":{"bytes":652,"imports":[{"path":"src/hub/store/selectors.ts","kind":"import-statement","original":"./selectors.js"},{"path":"src/hub/store/store.ts","kind":"import-statement","original":"./store.js"}],"format":"esm"},"src/hub/mod.ts":{"bytes":522,"imports":[{"path":"src/hub/namespaces/mod.ts","kind":"import-statement","original":"./namespaces/mod.js"},{"path":"src/hub/provider/mod.ts","kind":"import-statement","original":"./provider/mod.js"},{"path":"src/hub/hub.ts","kind":"import-statement","original":"./hub.js"},{"path":"src/hub/store/mod.ts","kind":"import-statement","original":"./store/mod.js"},{"path":"src/hub/helpers.ts","kind":"import-statement","original":"./helpers.js"}],"format":"esm"},"src/builders/namespace.ts":{"bytes":7991,"imports":[{"path":"src/hub/mod.ts","kind":"import-statement","original":"../hub/mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/builders/provider.ts":{"bytes":1588,"imports":[{"path":"src/hub/provider/mod.ts","kind":"import-statement","original":"../hub/provider/mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/builders/action.ts":{"bytes":2385,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/builders/mod.ts":{"bytes":220,"imports":[{"path":"src/builders/namespace.ts","kind":"import-statement","original":"./namespace.js"},{"path":"src/builders/provider.ts","kind":"import-statement","original":"./provider.js"},{"path":"src/builders/action.ts","kind":"import-statement","original":"./action.js"}],"format":"esm"},"src/utils/versions.ts":{"bytes":1851,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/utils/mod.ts":{"bytes":356,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"src/hub/helpers.ts","kind":"import-statement","original":"../hub/helpers.js"},{"path":"src/utils/versions.ts","kind":"import-statement","original":"./versions.js"}],"format":"esm"},"src/mod.ts":{"bytes":1504,"imports":[{"path":"src/hub/mod.ts","kind":"import-statement","original":"./hub/mod.js"},{"path":"src/builders/mod.ts","kind":"import-statement","original":"./builders/mod.js"},{"path":"src/utils/mod.ts","kind":"import-statement","original":"./utils/mod.js"}],"format":"esm"},"src/legacy/types.ts":{"bytes":7053,"imports":[],"format":"esm"},"src/legacy/persistor.ts":{"bytes":544,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/helpers.ts":{"bytes":1855,"imports":[{"path":"src/legacy/types.ts","kind":"import-statement","original":"./types.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/utils.ts":{"bytes":645,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/wallet.ts":{"bytes":16229,"imports":[{"path":"src/legacy/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/legacy/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/legacy/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/mod.ts":{"bytes":1518,"imports":[{"path":"src/legacy/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/legacy/persistor.ts","kind":"import-statement","original":"./persistor.js"},{"path":"src/legacy/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/legacy/wallet.ts","kind":"import-statement","original":"./wallet.js"},{"path":"src/legacy/utils.ts","kind":"import-statement","original":"./utils.js"}],"format":"esm"},"src/namespaces/common/actions.ts":{"bytes":347,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/evm/constants.ts":{"bytes":83,"imports":[],"format":"esm"},"src/namespaces/evm/utils.ts":{"bytes":3494,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/namespaces/evm/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/evm/actions.ts":{"bytes":3515,"imports":[{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"../common/actions.js"},{"path":"src/namespaces/evm/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/evm/hooks.ts":{"bytes":1217,"imports":[{"path":"src/namespaces/evm/mod.ts","kind":"import-statement","original":"./mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/after.ts":{"bytes":271,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/evm/after.ts":{"bytes":123,"imports":[{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"../common/after.js"}],"format":"esm"},"src/namespaces/common/builders.ts":{"bytes":545,"imports":[{"path":"src/mod.ts","kind":"import-statement","original":"../../mod.js"},{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/utils.ts":{"bytes":987,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/or.ts":{"bytes":734,"imports":[{"path":"src/namespaces/common/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/hooks/changeAccountSubscriber.ts":{"bytes":7467,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/helpers.ts":{"bytes":189,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/and.ts":{"bytes":1144,"imports":[{"path":"src/namespaces/common/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/before.ts":{"bytes":351,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/mod.ts":{"bytes":749,"imports":[{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"src/namespaces/common/builders.ts","kind":"import-statement","original":"./builders.js"},{"path":"src/namespaces/common/or.ts","kind":"import-statement","original":"./or.js"},{"path":"src/namespaces/common/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"./after.js"},{"path":"src/namespaces/common/hooks/changeAccountSubscriber.ts","kind":"import-statement","original":"./hooks/changeAccountSubscriber.js"},{"path":"src/namespaces/common/and.ts","kind":"import-statement","original":"./and.js"},{"path":"src/namespaces/common/before.ts","kind":"import-statement","original":"./before.js"}],"format":"esm"},"src/namespaces/evm/and.ts":{"bytes":170,"imports":[{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"}],"format":"esm"},"src/namespaces/evm/before.ts":{"bytes":106,"imports":[{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"}],"format":"esm"},"src/namespaces/evm/builders.ts":{"bytes":1992,"imports":[{"path":"src/mod.ts","kind":"import-statement","original":"../../mod.js"},{"path":"src/namespaces/common/hooks/changeAccountSubscriber.ts","kind":"import-statement","original":"../common/hooks/changeAccountSubscriber.js"},{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"},{"path":"src/namespaces/evm/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/evm/mod.ts":{"bytes":416,"imports":[{"path":"src/namespaces/evm/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"src/namespaces/evm/hooks.ts","kind":"import-statement","original":"./hooks.js"},{"path":"src/namespaces/evm/after.ts","kind":"import-statement","original":"./after.js"},{"path":"src/namespaces/evm/and.ts","kind":"import-statement","original":"./and.js"},{"path":"src/namespaces/evm/before.ts","kind":"import-statement","original":"./before.js"},{"path":"src/namespaces/evm/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"src/namespaces/evm/builders.ts","kind":"import-statement","original":"./builders.js"},{"path":"src/namespaces/evm/constants.ts","kind":"import-statement","original":"./constants.js"}],"format":"esm"},"src/namespaces/solana/constants.ts":{"bytes":112,"imports":[],"format":"esm"},"src/namespaces/solana/utils.ts":{"bytes":1037,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"src/legacy/mod.ts","kind":"import-statement","original":"../../legacy/mod.js"},{"path":"src/namespaces/solana/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/solana/actions.ts":{"bytes":1262,"imports":[{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"../common/actions.js"},{"path":"src/namespaces/solana/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/solana/hooks.ts":{"bytes":369,"imports":[{"path":"src/namespaces/solana/mod.ts","kind":"import-statement","original":"./mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/solana/after.ts":{"bytes":123,"imports":[{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"../common/after.js"}],"format":"esm"},"src/namespaces/solana/and.ts":{"bytes":170,"imports":[{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"}],"format":"esm"},"src/namespaces/solana/before.ts":{"bytes":124,"imports":[{"path":"src/namespaces/common/before.ts","kind":"import-statement","original":"../common/before.js"}],"format":"esm"},"src/namespaces/solana/builders.ts":{"bytes":1433,"imports":[{"path":"src/mod.ts","kind":"import-statement","original":"../../mod.js"},{"path":"src/namespaces/common/hooks/changeAccountSubscriber.ts","kind":"import-statement","original":"../common/hooks/changeAccountSubscriber.js"},{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"},{"path":"src/namespaces/solana/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/solana/mod.ts":{"bytes":401,"imports":[{"path":"src/namespaces/solana/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"src/namespaces/solana/hooks.ts","kind":"import-statement","original":"./hooks.js"},{"path":"src/namespaces/solana/after.ts","kind":"import-statement","original":"./after.js"},{"path":"src/namespaces/solana/and.ts","kind":"import-statement","original":"./and.js"},{"path":"src/namespaces/solana/before.ts","kind":"import-statement","original":"./before.js"},{"path":"src/namespaces/solana/builders.ts","kind":"import-statement","original":"./builders.js"},{"path":"src/namespaces/solana/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"src/namespaces/solana/constants.ts","kind":"import-statement","original":"./constants.js"}],"format":"esm"},"src/namespaces/cosmos/mod.ts":{"bytes":62,"imports":[],"format":"esm"},"src/namespaces/utxo/actions.ts":{"bytes":125,"imports":[{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"../common/actions.js"}],"format":"esm"},"src/namespaces/utxo/after.ts":{"bytes":123,"imports":[{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"../common/after.js"}],"format":"esm"},"src/namespaces/utxo/and.ts":{"bytes":170,"imports":[{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"}],"format":"esm"},"src/namespaces/utxo/before.ts":{"bytes":124,"imports":[{"path":"src/namespaces/common/before.ts","kind":"import-statement","original":"../common/before.js"}],"format":"esm"},"src/namespaces/utxo/builders.ts":{"bytes":480,"imports":[{"path":"src/mod.ts","kind":"import-statement","original":"../../mod.js"},{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"../common/after.js"},{"path":"src/namespaces/common/and.ts","kind":"import-statement","original":"../common/and.js"},{"path":"src/namespaces/common/before.ts","kind":"import-statement","original":"../common/before.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/utxo/constants.ts":{"bytes":113,"imports":[],"format":"esm"},"src/namespaces/utxo/utils.ts":{"bytes":465,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"src/namespaces/utxo/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/utxo/mod.ts":{"bytes":362,"imports":[{"path":"src/namespaces/utxo/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"src/namespaces/utxo/after.ts","kind":"import-statement","original":"./after.js"},{"path":"src/namespaces/utxo/and.ts","kind":"import-statement","original":"./and.js"},{"path":"src/namespaces/utxo/before.ts","kind":"import-statement","original":"./before.js"},{"path":"src/namespaces/utxo/builders.ts","kind":"import-statement","original":"./builders.js"},{"path":"src/namespaces/utxo/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"src/namespaces/utxo/constants.ts","kind":"import-statement","original":"./constants.js"}],"format":"esm"},"src/namespaces/sui/actions.ts":{"bytes":652,"imports":[{"path":"src/namespaces/sui/mod.ts","kind":"import-statement","original":"./mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/sui/constants.ts":{"bytes":275,"imports":[],"format":"esm"},"src/namespaces/sui/utils.ts":{"bytes":1527,"imports":[{"path":"@mysten/wallet-standard","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"src/namespaces/sui/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/sui/builders.ts":{"bytes":2414,"imports":[{"path":"src/mod.ts","kind":"import-statement","original":"../../mod.js"},{"path":"src/utils/mod.ts","kind":"import-statement","original":"../../utils/mod.js"},{"path":"src/namespaces/common/hooks/changeAccountSubscriber.ts","kind":"import-statement","original":"../common/hooks/changeAccountSubscriber.js"},{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"},{"path":"src/namespaces/sui/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"src/namespaces/sui/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/sui/hooks.ts":{"bytes":401,"imports":[{"path":"src/namespaces/sui/mod.ts","kind":"import-statement","original":"./mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/sui/mod.ts":{"bytes":312,"imports":[{"path":"src/namespaces/sui/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"src/namespaces/sui/builders.ts","kind":"import-statement","original":"./builders.js"},{"path":"src/namespaces/sui/hooks.ts","kind":"import-statement","original":"./hooks.js"},{"path":"src/namespaces/sui/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"src/namespaces/sui/constants.ts","kind":"import-statement","original":"./constants.js"}],"format":"esm"}},"outputs":{"dist/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":82479},"dist/mod.js":{"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["ActionBuilder","Hub","Namespace","NamespaceBuilder","Provider","ProviderBuilder","createStore","defineVersions","guessProviderStateSelector","namespaceStateSelector","pickVersion"],"entryPoint":"src/mod.ts","inputs":{"src/hub/helpers.ts":{"bytesInOutput":131},"src/hub/namespaces/errors.ts":{"bytesInOutput":332},"src/hub/namespaces/namespace.ts":{"bytesInOutput":2633},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/provider.ts":{"bytesInOutput":1781},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/hub.ts":{"bytesInOutput":875},"src/hub/store/selectors.ts":{"bytesInOutput":386},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":157},"src/hub/store/extend.ts":{"bytesInOutput":833},"src/hub/store/hub.ts":{"bytesInOutput":38},"src/hub/store/namespaces.ts":{"bytesInOutput":1386},"src/hub/store/events.ts":{"bytesInOutput":188},"src/hub/store/providers.ts":{"bytesInOutput":637},"src/mod.ts":{"bytesInOutput":0},"src/builders/namespace.ts":{"bytesInOutput":1397},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/provider.ts":{"bytesInOutput":465},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/utils/versions.ts":{"bytesInOutput":356}},"bytes":12699},"dist/utils/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":3724},"dist/utils/mod.js":{"imports":[{"path":"caip","kind":"import-statement","external":true}],"exports":["CAIP","defineVersions","generateStoreId","legacyProviderImportsToVersionsInterface","pickVersion"],"entryPoint":"src/utils/mod.ts","inputs":{"src/utils/mod.ts":{"bytesInOutput":23},"src/hub/helpers.ts":{"bytesInOutput":58},"src/utils/versions.ts":{"bytesInOutput":456}},"bytes":771},"dist/legacy/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":36941},"dist/legacy/mod.js":{"imports":[],"exports":["LegacyEvents","LegacyNetworks","LegacyWallet","Persistor","legacyEagerConnectHandler","legacyFormatAddressWithNetwork","legacyGetBlockChainNameFromId","legacyIsEvmNamespace","legacyReadAccountAddress"],"entryPoint":"src/legacy/mod.ts","inputs":{"src/legacy/types.ts":{"bytesInOutput":1375},"src/legacy/mod.ts":{"bytesInOutput":0},"src/legacy/persistor.ts":{"bytesInOutput":206},"src/legacy/helpers.ts":{"bytesInOutput":610},"src/legacy/utils.ts":{"bytesInOutput":238},"src/legacy/wallet.ts":{"bytesInOutput":6000}},"bytes":8778},"dist/hub/store/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":25098},"dist/hub/store/mod.js":{"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true}],"exports":["createStore","guessProviderStateSelector","namespaceStateSelector"],"entryPoint":"src/hub/store/mod.ts","inputs":{"src/hub/store/selectors.ts":{"bytesInOutput":386},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":157},"src/hub/store/extend.ts":{"bytesInOutput":833},"src/hub/store/hub.ts":{"bytesInOutput":38},"src/hub/store/namespaces.ts":{"bytesInOutput":1386},"src/hub/store/events.ts":{"bytesInOutput":188},"src/hub/store/providers.ts":{"bytesInOutput":637}},"bytes":3822},"dist/namespaces/evm/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":45294},"dist/namespaces/evm/mod.js":{"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["CAIP_ETHEREUM_CHAIN_ID","CAIP_NAMESPACE","actions","after","and","before","builders","hooks","utils"],"entryPoint":"src/namespaces/evm/mod.ts","inputs":{"src/namespaces/evm/actions.ts":{"bytesInOutput":1168},"src/namespaces/common/actions.ts":{"bytesInOutput":149},"src/namespaces/evm/utils.ts":{"bytesInOutput":1287},"src/namespaces/evm/constants.ts":{"bytesInOutput":21},"src/namespaces/evm/mod.ts":{"bytesInOutput":0},"src/namespaces/evm/hooks.ts":{"bytesInOutput":492},"src/namespaces/evm/after.ts":{"bytesInOutput":49},"src/namespaces/common/after.ts":{"bytesInOutput":103},"src/namespaces/evm/and.ts":{"bytesInOutput":58},"src/namespaces/common/mod.ts":{"bytesInOutput":0},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":47},"src/hub/store/namespaces.ts":{"bytesInOutput":33},"src/hub/store/providers.ts":{"bytesInOutput":33},"src/mod.ts":{"bytesInOutput":0},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/namespaces/common/hooks/changeAccountSubscriber.ts":{"bytesInOutput":1023},"src/namespaces/common/helpers.ts":{"bytesInOutput":116},"src/namespaces/common/and.ts":{"bytesInOutput":300},"src/namespaces/common/before.ts":{"bytesInOutput":95},"src/namespaces/evm/before.ts":{"bytesInOutput":49},"src/namespaces/evm/builders.ts":{"bytesInOutput":711}},"bytes":6815},"dist/namespaces/solana/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":35830},"dist/namespaces/solana/mod.js":{"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["CAIP_NAMESPACE","CAIP_SOLANA_CHAIN_ID","actions","after","and","before","builders","hooks","utils"],"entryPoint":"src/namespaces/solana/mod.ts","inputs":{"src/namespaces/solana/actions.ts":{"bytesInOutput":519},"src/namespaces/common/actions.ts":{"bytesInOutput":149},"src/namespaces/solana/utils.ts":{"bytesInOutput":367},"src/legacy/mod.ts":{"bytesInOutput":0},"src/namespaces/solana/constants.ts":{"bytesInOutput":52},"src/namespaces/solana/mod.ts":{"bytesInOutput":0},"src/namespaces/solana/hooks.ts":{"bytesInOutput":135},"src/namespaces/solana/after.ts":{"bytesInOutput":47},"src/namespaces/common/after.ts":{"bytesInOutput":103},"src/namespaces/solana/and.ts":{"bytesInOutput":58},"src/namespaces/common/mod.ts":{"bytesInOutput":0},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":47},"src/hub/store/namespaces.ts":{"bytesInOutput":33},"src/hub/store/providers.ts":{"bytesInOutput":33},"src/mod.ts":{"bytesInOutput":0},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/namespaces/common/hooks/changeAccountSubscriber.ts":{"bytesInOutput":1023},"src/namespaces/common/helpers.ts":{"bytesInOutput":116},"src/namespaces/common/and.ts":{"bytesInOutput":250},"src/namespaces/common/before.ts":{"bytesInOutput":95},"src/namespaces/solana/before.ts":{"bytesInOutput":49},"src/namespaces/solana/builders.ts":{"bytesInOutput":403}},"bytes":4558},"dist/namespaces/cosmos/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/namespaces/cosmos/mod.js":{"imports":[],"exports":[],"entryPoint":"src/namespaces/cosmos/mod.ts","inputs":{"src/namespaces/cosmos/mod.ts":{"bytesInOutput":0}},"bytes":32},"dist/namespaces/utxo/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":21580},"dist/namespaces/utxo/mod.js":{"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["CAIP_BITCOIN_CHAIN_ID","CAIP_NAMESPACE","actions","after","and","before","builders","utils"],"entryPoint":"src/namespaces/utxo/mod.ts","inputs":{"src/namespaces/utxo/actions.ts":{"bytesInOutput":47},"src/namespaces/common/actions.ts":{"bytesInOutput":149},"src/namespaces/utxo/mod.ts":{"bytesInOutput":0},"src/namespaces/utxo/after.ts":{"bytesInOutput":47},"src/namespaces/common/after.ts":{"bytesInOutput":103},"src/namespaces/utxo/and.ts":{"bytesInOutput":56},"src/namespaces/common/mod.ts":{"bytesInOutput":0},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":47},"src/hub/store/namespaces.ts":{"bytesInOutput":33},"src/hub/store/providers.ts":{"bytesInOutput":33},"src/mod.ts":{"bytesInOutput":0},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/namespaces/common/helpers.ts":{"bytesInOutput":114},"src/namespaces/common/and.ts":{"bytesInOutput":250},"src/namespaces/common/before.ts":{"bytesInOutput":95},"src/namespaces/utxo/before.ts":{"bytesInOutput":47},"src/namespaces/utxo/builders.ts":{"bytesInOutput":96},"src/namespaces/utxo/utils.ts":{"bytesInOutput":202},"src/namespaces/utxo/constants.ts":{"bytesInOutput":52}},"bytes":2440},"dist/namespaces/sui/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":35211},"dist/namespaces/sui/mod.js":{"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"@mysten/wallet-standard","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["CAIP_NAMESPACE","CAIP_SUI_CHAIN_ID","actions","builders","getInstance","getInstanceOrThrow","hooks"],"entryPoint":"src/namespaces/sui/mod.ts","inputs":{"src/namespaces/sui/actions.ts":{"bytesInOutput":213},"src/namespaces/sui/mod.ts":{"bytesInOutput":0},"src/namespaces/sui/builders.ts":{"bytesInOutput":681},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":47},"src/hub/store/namespaces.ts":{"bytesInOutput":33},"src/hub/store/providers.ts":{"bytesInOutput":33},"src/mod.ts":{"bytesInOutput":0},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":23},"src/namespaces/common/hooks/changeAccountSubscriber.ts":{"bytesInOutput":1023},"src/namespaces/common/mod.ts":{"bytesInOutput":0},"src/namespaces/common/after.ts":{"bytesInOutput":81},"src/namespaces/common/helpers.ts":{"bytesInOutput":114},"src/namespaces/common/and.ts":{"bytesInOutput":250},"src/namespaces/common/before.ts":{"bytesInOutput":73},"src/namespaces/sui/constants.ts":{"bytesInOutput":20},"src/namespaces/sui/utils.ts":{"bytesInOutput":499},"src/namespaces/sui/hooks.ts":{"bytesInOutput":147}},"bytes":4287},"dist/namespaces/common/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":31380},"dist/namespaces/common/mod.js":{"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["ChangeAccountSubscriberBuilder","actions","afterRecommended","andRecommended","beforeRecommended","builders","connectAndUpdateStateForMultiNetworks","connectAndUpdateStateForSingleNetwork","intoConnecting","intoConnectionFinished","parseErrorAndThrowStandardizeError","standardizeAndThrowError"],"entryPoint":"src/namespaces/common/mod.ts","inputs":{"src/namespaces/common/actions.ts":{"bytesInOutput":200},"src/namespaces/common/mod.ts":{"bytesInOutput":0},"src/namespaces/common/builders.ts":{"bytesInOutput":89},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":47},"src/hub/store/namespaces.ts":{"bytesInOutput":33},"src/hub/store/providers.ts":{"bytesInOutput":33},"src/mod.ts":{"bytesInOutput":0},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/namespaces/common/utils.ts":{"bytesInOutput":326},"src/namespaces/common/or.ts":{"bytesInOutput":53},"src/namespaces/common/after.ts":{"bytesInOutput":103},"src/namespaces/common/hooks/changeAccountSubscriber.ts":{"bytesInOutput":1023},"src/namespaces/common/helpers.ts":{"bytesInOutput":114},"src/namespaces/common/and.ts":{"bytesInOutput":559},"src/namespaces/common/before.ts":{"bytesInOutput":95}},"bytes":3959}}}
|
|
1
|
+
{"inputs":{"src/hub/helpers.ts":{"bytes":371,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/namespaces/errors.ts":{"bytes":455,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/namespaces/namespace.ts":{"bytes":13059,"imports":[{"path":"src/hub/helpers.ts","kind":"import-statement","original":"../helpers.js"},{"path":"src/hub/namespaces/errors.ts","kind":"import-statement","original":"./errors.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/namespaces/mod.ts":{"bytes":181,"imports":[{"path":"src/hub/namespaces/namespace.ts","kind":"import-statement","original":"./namespace.js"}],"format":"esm"},"src/hub/provider/provider.ts":{"bytes":9373,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/provider/mod.ts":{"bytes":196,"imports":[{"path":"src/hub/provider/provider.ts","kind":"import-statement","original":"./provider.js"}],"format":"esm"},"src/hub/hub.ts":{"bytes":3436,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/selectors.ts":{"bytes":2228,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/extend.ts":{"bytes":3898,"imports":[{"path":"src/hub/store/selectors.ts","kind":"import-statement","original":"./selectors.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/hub.ts":{"bytes":342,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/events.ts":{"bytes":1956,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/namespaces.ts":{"bytes":4883,"imports":[{"path":"immer","kind":"import-statement","external":true},{"path":"src/hub/store/events.ts","kind":"import-statement","original":"./events.js"},{"path":"src/hub/store/mod.ts","kind":"import-statement","original":"./mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/providers.ts":{"bytes":4043,"imports":[{"path":"immer","kind":"import-statement","external":true},{"path":"src/hub/store/events.ts","kind":"import-statement","original":"./events.js"},{"path":"src/hub/store/mod.ts","kind":"import-statement","original":"./mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/store.ts":{"bytes":808,"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"src/hub/store/extend.ts","kind":"import-statement","original":"./extend.js"},{"path":"src/hub/store/hub.ts","kind":"import-statement","original":"./hub.js"},{"path":"src/hub/store/namespaces.ts","kind":"import-statement","original":"./namespaces.js"},{"path":"src/hub/store/providers.ts","kind":"import-statement","original":"./providers.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/mod.ts":{"bytes":652,"imports":[{"path":"src/hub/store/selectors.ts","kind":"import-statement","original":"./selectors.js"},{"path":"src/hub/store/store.ts","kind":"import-statement","original":"./store.js"}],"format":"esm"},"src/hub/mod.ts":{"bytes":522,"imports":[{"path":"src/hub/namespaces/mod.ts","kind":"import-statement","original":"./namespaces/mod.js"},{"path":"src/hub/provider/mod.ts","kind":"import-statement","original":"./provider/mod.js"},{"path":"src/hub/hub.ts","kind":"import-statement","original":"./hub.js"},{"path":"src/hub/store/mod.ts","kind":"import-statement","original":"./store/mod.js"},{"path":"src/hub/helpers.ts","kind":"import-statement","original":"./helpers.js"}],"format":"esm"},"src/builders/namespace.ts":{"bytes":7991,"imports":[{"path":"src/hub/mod.ts","kind":"import-statement","original":"../hub/mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/builders/provider.ts":{"bytes":1588,"imports":[{"path":"src/hub/provider/mod.ts","kind":"import-statement","original":"../hub/provider/mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/builders/action.ts":{"bytes":2385,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/builders/mod.ts":{"bytes":220,"imports":[{"path":"src/builders/namespace.ts","kind":"import-statement","original":"./namespace.js"},{"path":"src/builders/provider.ts","kind":"import-statement","original":"./provider.js"},{"path":"src/builders/action.ts","kind":"import-statement","original":"./action.js"}],"format":"esm"},"src/utils/versions.ts":{"bytes":1851,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/utils/mod.ts":{"bytes":356,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"src/hub/helpers.ts","kind":"import-statement","original":"../hub/helpers.js"},{"path":"src/utils/versions.ts","kind":"import-statement","original":"./versions.js"}],"format":"esm"},"src/mod.ts":{"bytes":1504,"imports":[{"path":"src/hub/mod.ts","kind":"import-statement","original":"./hub/mod.js"},{"path":"src/builders/mod.ts","kind":"import-statement","original":"./builders/mod.js"},{"path":"src/utils/mod.ts","kind":"import-statement","original":"./utils/mod.js"}],"format":"esm"},"src/legacy/types.ts":{"bytes":7053,"imports":[],"format":"esm"},"src/legacy/persistor.ts":{"bytes":544,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/helpers.ts":{"bytes":1855,"imports":[{"path":"src/legacy/types.ts","kind":"import-statement","original":"./types.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/utils.ts":{"bytes":645,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/wallet.ts":{"bytes":16229,"imports":[{"path":"src/legacy/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/legacy/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/legacy/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/mod.ts":{"bytes":1518,"imports":[{"path":"src/legacy/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/legacy/persistor.ts","kind":"import-statement","original":"./persistor.js"},{"path":"src/legacy/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/legacy/wallet.ts","kind":"import-statement","original":"./wallet.js"},{"path":"src/legacy/utils.ts","kind":"import-statement","original":"./utils.js"}],"format":"esm"},"src/namespaces/common/actions.ts":{"bytes":380,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/evm/constants.ts":{"bytes":83,"imports":[],"format":"esm"},"src/namespaces/evm/utils.ts":{"bytes":3494,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/namespaces/evm/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/evm/actions.ts":{"bytes":3652,"imports":[{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"../common/actions.js"},{"path":"src/namespaces/evm/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/evm/hooks.ts":{"bytes":1217,"imports":[{"path":"src/namespaces/evm/mod.ts","kind":"import-statement","original":"./mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/after.ts":{"bytes":271,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/evm/after.ts":{"bytes":123,"imports":[{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"../common/after.js"}],"format":"esm"},"src/namespaces/common/builders.ts":{"bytes":545,"imports":[{"path":"src/mod.ts","kind":"import-statement","original":"../../mod.js"},{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/utils.ts":{"bytes":987,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/or.ts":{"bytes":734,"imports":[{"path":"src/namespaces/common/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/hooks/changeAccountSubscriber.ts":{"bytes":7467,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/helpers.ts":{"bytes":189,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/and.ts":{"bytes":1144,"imports":[{"path":"src/namespaces/common/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/before.ts":{"bytes":351,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/mod.ts":{"bytes":749,"imports":[{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"src/namespaces/common/builders.ts","kind":"import-statement","original":"./builders.js"},{"path":"src/namespaces/common/or.ts","kind":"import-statement","original":"./or.js"},{"path":"src/namespaces/common/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"./after.js"},{"path":"src/namespaces/common/hooks/changeAccountSubscriber.ts","kind":"import-statement","original":"./hooks/changeAccountSubscriber.js"},{"path":"src/namespaces/common/and.ts","kind":"import-statement","original":"./and.js"},{"path":"src/namespaces/common/before.ts","kind":"import-statement","original":"./before.js"}],"format":"esm"},"src/namespaces/evm/and.ts":{"bytes":170,"imports":[{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"}],"format":"esm"},"src/namespaces/evm/before.ts":{"bytes":106,"imports":[{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"}],"format":"esm"},"src/namespaces/evm/builders.ts":{"bytes":1992,"imports":[{"path":"src/mod.ts","kind":"import-statement","original":"../../mod.js"},{"path":"src/namespaces/common/hooks/changeAccountSubscriber.ts","kind":"import-statement","original":"../common/hooks/changeAccountSubscriber.js"},{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"},{"path":"src/namespaces/evm/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/evm/mod.ts":{"bytes":416,"imports":[{"path":"src/namespaces/evm/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"src/namespaces/evm/hooks.ts","kind":"import-statement","original":"./hooks.js"},{"path":"src/namespaces/evm/after.ts","kind":"import-statement","original":"./after.js"},{"path":"src/namespaces/evm/and.ts","kind":"import-statement","original":"./and.js"},{"path":"src/namespaces/evm/before.ts","kind":"import-statement","original":"./before.js"},{"path":"src/namespaces/evm/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"src/namespaces/evm/builders.ts","kind":"import-statement","original":"./builders.js"},{"path":"src/namespaces/evm/constants.ts","kind":"import-statement","original":"./constants.js"}],"format":"esm"},"src/namespaces/solana/constants.ts":{"bytes":112,"imports":[],"format":"esm"},"src/namespaces/solana/utils.ts":{"bytes":1037,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"src/legacy/mod.ts","kind":"import-statement","original":"../../legacy/mod.js"},{"path":"src/namespaces/solana/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/solana/actions.ts":{"bytes":1262,"imports":[{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"../common/actions.js"},{"path":"src/namespaces/solana/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/solana/hooks.ts":{"bytes":369,"imports":[{"path":"src/namespaces/solana/mod.ts","kind":"import-statement","original":"./mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/solana/after.ts":{"bytes":123,"imports":[{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"../common/after.js"}],"format":"esm"},"src/namespaces/solana/and.ts":{"bytes":170,"imports":[{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"}],"format":"esm"},"src/namespaces/solana/before.ts":{"bytes":124,"imports":[{"path":"src/namespaces/common/before.ts","kind":"import-statement","original":"../common/before.js"}],"format":"esm"},"src/namespaces/solana/builders.ts":{"bytes":1433,"imports":[{"path":"src/mod.ts","kind":"import-statement","original":"../../mod.js"},{"path":"src/namespaces/common/hooks/changeAccountSubscriber.ts","kind":"import-statement","original":"../common/hooks/changeAccountSubscriber.js"},{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"},{"path":"src/namespaces/solana/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/solana/mod.ts":{"bytes":401,"imports":[{"path":"src/namespaces/solana/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"src/namespaces/solana/hooks.ts","kind":"import-statement","original":"./hooks.js"},{"path":"src/namespaces/solana/after.ts","kind":"import-statement","original":"./after.js"},{"path":"src/namespaces/solana/and.ts","kind":"import-statement","original":"./and.js"},{"path":"src/namespaces/solana/before.ts","kind":"import-statement","original":"./before.js"},{"path":"src/namespaces/solana/builders.ts","kind":"import-statement","original":"./builders.js"},{"path":"src/namespaces/solana/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"src/namespaces/solana/constants.ts","kind":"import-statement","original":"./constants.js"}],"format":"esm"},"src/namespaces/cosmos/mod.ts":{"bytes":62,"imports":[],"format":"esm"},"src/namespaces/utxo/actions.ts":{"bytes":125,"imports":[{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"../common/actions.js"}],"format":"esm"},"src/namespaces/utxo/after.ts":{"bytes":123,"imports":[{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"../common/after.js"}],"format":"esm"},"src/namespaces/utxo/and.ts":{"bytes":170,"imports":[{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"}],"format":"esm"},"src/namespaces/utxo/before.ts":{"bytes":124,"imports":[{"path":"src/namespaces/common/before.ts","kind":"import-statement","original":"../common/before.js"}],"format":"esm"},"src/namespaces/utxo/builders.ts":{"bytes":480,"imports":[{"path":"src/mod.ts","kind":"import-statement","original":"../../mod.js"},{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"../common/after.js"},{"path":"src/namespaces/common/and.ts","kind":"import-statement","original":"../common/and.js"},{"path":"src/namespaces/common/before.ts","kind":"import-statement","original":"../common/before.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/utxo/constants.ts":{"bytes":113,"imports":[],"format":"esm"},"src/namespaces/utxo/utils.ts":{"bytes":465,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"src/namespaces/utxo/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/utxo/mod.ts":{"bytes":362,"imports":[{"path":"src/namespaces/utxo/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"src/namespaces/utxo/after.ts","kind":"import-statement","original":"./after.js"},{"path":"src/namespaces/utxo/and.ts","kind":"import-statement","original":"./and.js"},{"path":"src/namespaces/utxo/before.ts","kind":"import-statement","original":"./before.js"},{"path":"src/namespaces/utxo/builders.ts","kind":"import-statement","original":"./builders.js"},{"path":"src/namespaces/utxo/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"src/namespaces/utxo/constants.ts","kind":"import-statement","original":"./constants.js"}],"format":"esm"},"src/namespaces/sui/actions.ts":{"bytes":652,"imports":[{"path":"src/namespaces/sui/mod.ts","kind":"import-statement","original":"./mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/sui/constants.ts":{"bytes":275,"imports":[],"format":"esm"},"src/namespaces/sui/utils.ts":{"bytes":1527,"imports":[{"path":"@mysten/wallet-standard","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"src/namespaces/sui/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/sui/builders.ts":{"bytes":2414,"imports":[{"path":"src/mod.ts","kind":"import-statement","original":"../../mod.js"},{"path":"src/utils/mod.ts","kind":"import-statement","original":"../../utils/mod.js"},{"path":"src/namespaces/common/hooks/changeAccountSubscriber.ts","kind":"import-statement","original":"../common/hooks/changeAccountSubscriber.js"},{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"},{"path":"src/namespaces/sui/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"src/namespaces/sui/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/sui/hooks.ts":{"bytes":401,"imports":[{"path":"src/namespaces/sui/mod.ts","kind":"import-statement","original":"./mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/sui/mod.ts":{"bytes":312,"imports":[{"path":"src/namespaces/sui/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"src/namespaces/sui/builders.ts","kind":"import-statement","original":"./builders.js"},{"path":"src/namespaces/sui/hooks.ts","kind":"import-statement","original":"./hooks.js"},{"path":"src/namespaces/sui/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"src/namespaces/sui/constants.ts","kind":"import-statement","original":"./constants.js"}],"format":"esm"},"src/namespaces/tron/actions.ts":{"bytes":125,"imports":[{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"../common/actions.js"}],"format":"esm"},"src/namespaces/tron/after.ts":{"bytes":123,"imports":[{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"../common/after.js"}],"format":"esm"},"src/namespaces/tron/and.ts":{"bytes":170,"imports":[{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"}],"format":"esm"},"src/namespaces/tron/before.ts":{"bytes":124,"imports":[{"path":"src/namespaces/common/before.ts","kind":"import-statement","original":"../common/before.js"}],"format":"esm"},"src/namespaces/tron/builders.ts":{"bytes":590,"imports":[{"path":"src/mod.ts","kind":"import-statement","original":"../../mod.js"},{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"../common/after.js"},{"path":"src/namespaces/common/and.ts","kind":"import-statement","original":"../common/and.js"},{"path":"src/namespaces/common/before.ts","kind":"import-statement","original":"../common/before.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/tron/constants.ts":{"bytes":278,"imports":[],"format":"esm"},"src/namespaces/tron/utils.ts":{"bytes":459,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"src/namespaces/tron/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/tron/mod.ts":{"bytes":359,"imports":[{"path":"src/namespaces/tron/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"src/namespaces/tron/after.ts","kind":"import-statement","original":"./after.js"},{"path":"src/namespaces/tron/and.ts","kind":"import-statement","original":"./and.js"},{"path":"src/namespaces/tron/before.ts","kind":"import-statement","original":"./before.js"},{"path":"src/namespaces/tron/builders.ts","kind":"import-statement","original":"./builders.js"},{"path":"src/namespaces/tron/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"src/namespaces/tron/constants.ts","kind":"import-statement","original":"./constants.js"}],"format":"esm"}},"outputs":{"dist/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":82625},"dist/mod.js":{"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["ActionBuilder","Hub","Namespace","NamespaceBuilder","Provider","ProviderBuilder","createStore","defineVersions","guessProviderStateSelector","namespaceStateSelector","pickVersion"],"entryPoint":"src/mod.ts","inputs":{"src/hub/helpers.ts":{"bytesInOutput":131},"src/hub/namespaces/errors.ts":{"bytesInOutput":332},"src/hub/namespaces/namespace.ts":{"bytesInOutput":2633},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/provider.ts":{"bytesInOutput":1781},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/hub.ts":{"bytesInOutput":875},"src/hub/store/selectors.ts":{"bytesInOutput":386},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":157},"src/hub/store/extend.ts":{"bytesInOutput":833},"src/hub/store/hub.ts":{"bytesInOutput":38},"src/hub/store/namespaces.ts":{"bytesInOutput":1403},"src/hub/store/events.ts":{"bytesInOutput":188},"src/hub/store/providers.ts":{"bytesInOutput":637},"src/mod.ts":{"bytesInOutput":0},"src/builders/namespace.ts":{"bytesInOutput":1397},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/provider.ts":{"bytesInOutput":465},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/utils/versions.ts":{"bytesInOutput":356}},"bytes":12716},"dist/utils/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":3724},"dist/utils/mod.js":{"imports":[{"path":"caip","kind":"import-statement","external":true}],"exports":["CAIP","defineVersions","generateStoreId","legacyProviderImportsToVersionsInterface","pickVersion"],"entryPoint":"src/utils/mod.ts","inputs":{"src/utils/mod.ts":{"bytesInOutput":23},"src/hub/helpers.ts":{"bytesInOutput":58},"src/utils/versions.ts":{"bytesInOutput":456}},"bytes":771},"dist/legacy/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":36941},"dist/legacy/mod.js":{"imports":[],"exports":["LegacyEvents","LegacyNetworks","LegacyWallet","Persistor","legacyEagerConnectHandler","legacyFormatAddressWithNetwork","legacyGetBlockChainNameFromId","legacyIsEvmNamespace","legacyReadAccountAddress"],"entryPoint":"src/legacy/mod.ts","inputs":{"src/legacy/types.ts":{"bytesInOutput":1375},"src/legacy/mod.ts":{"bytesInOutput":0},"src/legacy/persistor.ts":{"bytesInOutput":206},"src/legacy/helpers.ts":{"bytesInOutput":610},"src/legacy/utils.ts":{"bytesInOutput":238},"src/legacy/wallet.ts":{"bytesInOutput":6000}},"bytes":8778},"dist/hub/store/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":25244},"dist/hub/store/mod.js":{"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true}],"exports":["createStore","guessProviderStateSelector","namespaceStateSelector"],"entryPoint":"src/hub/store/mod.ts","inputs":{"src/hub/store/selectors.ts":{"bytesInOutput":386},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":157},"src/hub/store/extend.ts":{"bytesInOutput":833},"src/hub/store/hub.ts":{"bytesInOutput":38},"src/hub/store/namespaces.ts":{"bytesInOutput":1403},"src/hub/store/events.ts":{"bytesInOutput":188},"src/hub/store/providers.ts":{"bytesInOutput":637}},"bytes":3839},"dist/namespaces/evm/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":45707},"dist/namespaces/evm/mod.js":{"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["CAIP_ETHEREUM_CHAIN_ID","CAIP_NAMESPACE","actions","after","and","before","builders","hooks","utils"],"entryPoint":"src/namespaces/evm/mod.ts","inputs":{"src/namespaces/evm/actions.ts":{"bytesInOutput":1213},"src/namespaces/common/actions.ts":{"bytesInOutput":171},"src/namespaces/evm/utils.ts":{"bytesInOutput":1287},"src/namespaces/evm/constants.ts":{"bytesInOutput":21},"src/namespaces/evm/mod.ts":{"bytesInOutput":0},"src/namespaces/evm/hooks.ts":{"bytesInOutput":492},"src/namespaces/evm/after.ts":{"bytesInOutput":49},"src/namespaces/common/after.ts":{"bytesInOutput":103},"src/namespaces/evm/and.ts":{"bytesInOutput":58},"src/namespaces/common/mod.ts":{"bytesInOutput":0},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":47},"src/hub/store/namespaces.ts":{"bytesInOutput":33},"src/hub/store/providers.ts":{"bytesInOutput":33},"src/mod.ts":{"bytesInOutput":0},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/namespaces/common/hooks/changeAccountSubscriber.ts":{"bytesInOutput":1023},"src/namespaces/common/helpers.ts":{"bytesInOutput":116},"src/namespaces/common/and.ts":{"bytesInOutput":300},"src/namespaces/common/before.ts":{"bytesInOutput":95},"src/namespaces/evm/before.ts":{"bytesInOutput":49},"src/namespaces/evm/builders.ts":{"bytesInOutput":711}},"bytes":6882},"dist/namespaces/solana/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":36022},"dist/namespaces/solana/mod.js":{"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["CAIP_NAMESPACE","CAIP_SOLANA_CHAIN_ID","actions","after","and","before","builders","hooks","utils"],"entryPoint":"src/namespaces/solana/mod.ts","inputs":{"src/namespaces/solana/actions.ts":{"bytesInOutput":519},"src/namespaces/common/actions.ts":{"bytesInOutput":171},"src/namespaces/solana/utils.ts":{"bytesInOutput":367},"src/legacy/mod.ts":{"bytesInOutput":0},"src/namespaces/solana/constants.ts":{"bytesInOutput":52},"src/namespaces/solana/mod.ts":{"bytesInOutput":0},"src/namespaces/solana/hooks.ts":{"bytesInOutput":135},"src/namespaces/solana/after.ts":{"bytesInOutput":47},"src/namespaces/common/after.ts":{"bytesInOutput":103},"src/namespaces/solana/and.ts":{"bytesInOutput":58},"src/namespaces/common/mod.ts":{"bytesInOutput":0},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":47},"src/hub/store/namespaces.ts":{"bytesInOutput":33},"src/hub/store/providers.ts":{"bytesInOutput":33},"src/mod.ts":{"bytesInOutput":0},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/namespaces/common/hooks/changeAccountSubscriber.ts":{"bytesInOutput":1023},"src/namespaces/common/helpers.ts":{"bytesInOutput":116},"src/namespaces/common/and.ts":{"bytesInOutput":250},"src/namespaces/common/before.ts":{"bytesInOutput":95},"src/namespaces/solana/before.ts":{"bytesInOutput":49},"src/namespaces/solana/builders.ts":{"bytesInOutput":403}},"bytes":4580},"dist/namespaces/cosmos/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/namespaces/cosmos/mod.js":{"imports":[],"exports":[],"entryPoint":"src/namespaces/cosmos/mod.ts","inputs":{"src/namespaces/cosmos/mod.ts":{"bytesInOutput":0}},"bytes":32},"dist/namespaces/utxo/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":21772},"dist/namespaces/utxo/mod.js":{"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["CAIP_BITCOIN_CHAIN_ID","CAIP_NAMESPACE","actions","after","and","before","builders","utils"],"entryPoint":"src/namespaces/utxo/mod.ts","inputs":{"src/namespaces/utxo/actions.ts":{"bytesInOutput":47},"src/namespaces/common/actions.ts":{"bytesInOutput":171},"src/namespaces/utxo/mod.ts":{"bytesInOutput":0},"src/namespaces/utxo/after.ts":{"bytesInOutput":47},"src/namespaces/common/after.ts":{"bytesInOutput":103},"src/namespaces/utxo/and.ts":{"bytesInOutput":56},"src/namespaces/common/mod.ts":{"bytesInOutput":0},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":47},"src/hub/store/namespaces.ts":{"bytesInOutput":33},"src/hub/store/providers.ts":{"bytesInOutput":33},"src/mod.ts":{"bytesInOutput":0},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/namespaces/common/helpers.ts":{"bytesInOutput":114},"src/namespaces/common/and.ts":{"bytesInOutput":250},"src/namespaces/common/before.ts":{"bytesInOutput":95},"src/namespaces/utxo/before.ts":{"bytesInOutput":47},"src/namespaces/utxo/builders.ts":{"bytesInOutput":96},"src/namespaces/utxo/utils.ts":{"bytesInOutput":202},"src/namespaces/utxo/constants.ts":{"bytesInOutput":52}},"bytes":2462},"dist/namespaces/sui/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":35347},"dist/namespaces/sui/mod.js":{"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"@mysten/wallet-standard","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["CAIP_NAMESPACE","CAIP_SUI_CHAIN_ID","actions","builders","getInstance","getInstanceOrThrow","hooks"],"entryPoint":"src/namespaces/sui/mod.ts","inputs":{"src/namespaces/sui/actions.ts":{"bytesInOutput":213},"src/namespaces/sui/mod.ts":{"bytesInOutput":0},"src/namespaces/sui/builders.ts":{"bytesInOutput":681},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":47},"src/hub/store/namespaces.ts":{"bytesInOutput":33},"src/hub/store/providers.ts":{"bytesInOutput":33},"src/mod.ts":{"bytesInOutput":0},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":23},"src/namespaces/common/hooks/changeAccountSubscriber.ts":{"bytesInOutput":1023},"src/namespaces/common/mod.ts":{"bytesInOutput":0},"src/namespaces/common/after.ts":{"bytesInOutput":81},"src/namespaces/common/helpers.ts":{"bytesInOutput":114},"src/namespaces/common/and.ts":{"bytesInOutput":250},"src/namespaces/common/before.ts":{"bytesInOutput":73},"src/namespaces/sui/constants.ts":{"bytesInOutput":20},"src/namespaces/sui/utils.ts":{"bytesInOutput":499},"src/namespaces/sui/hooks.ts":{"bytesInOutput":147}},"bytes":4287},"dist/namespaces/tron/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":22143},"dist/namespaces/tron/mod.js":{"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["CAIP_NAMESPACE","CAIP_TRON_CHAIN_ID","actions","after","and","before","builders","utils"],"entryPoint":"src/namespaces/tron/mod.ts","inputs":{"src/namespaces/tron/actions.ts":{"bytesInOutput":47},"src/namespaces/common/actions.ts":{"bytesInOutput":171},"src/namespaces/tron/mod.ts":{"bytesInOutput":0},"src/namespaces/tron/after.ts":{"bytesInOutput":47},"src/namespaces/common/after.ts":{"bytesInOutput":103},"src/namespaces/tron/and.ts":{"bytesInOutput":56},"src/namespaces/common/mod.ts":{"bytesInOutput":0},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":47},"src/hub/store/namespaces.ts":{"bytesInOutput":33},"src/hub/store/providers.ts":{"bytesInOutput":33},"src/mod.ts":{"bytesInOutput":0},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/namespaces/common/helpers.ts":{"bytesInOutput":114},"src/namespaces/common/and.ts":{"bytesInOutput":250},"src/namespaces/common/before.ts":{"bytesInOutput":95},"src/namespaces/tron/before.ts":{"bytesInOutput":47},"src/namespaces/tron/builders.ts":{"bytesInOutput":170},"src/namespaces/tron/utils.ts":{"bytesInOutput":202},"src/namespaces/tron/constants.ts":{"bytesInOutput":22}},"bytes":2503},"dist/namespaces/common/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":31572},"dist/namespaces/common/mod.js":{"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["ChangeAccountSubscriberBuilder","actions","afterRecommended","andRecommended","beforeRecommended","builders","connectAndUpdateStateForMultiNetworks","connectAndUpdateStateForSingleNetwork","intoConnecting","intoConnectionFinished","parseErrorAndThrowStandardizeError","standardizeAndThrowError"],"entryPoint":"src/namespaces/common/mod.ts","inputs":{"src/namespaces/common/actions.ts":{"bytesInOutput":222},"src/namespaces/common/mod.ts":{"bytesInOutput":0},"src/namespaces/common/builders.ts":{"bytesInOutput":89},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":47},"src/hub/store/namespaces.ts":{"bytesInOutput":33},"src/hub/store/providers.ts":{"bytesInOutput":33},"src/mod.ts":{"bytesInOutput":0},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/namespaces/common/utils.ts":{"bytesInOutput":326},"src/namespaces/common/or.ts":{"bytesInOutput":53},"src/namespaces/common/after.ts":{"bytesInOutput":103},"src/namespaces/common/hooks/changeAccountSubscriber.ts":{"bytesInOutput":1023},"src/namespaces/common/helpers.ts":{"bytesInOutput":114},"src/namespaces/common/and.ts":{"bytesInOutput":559},"src/namespaces/common/before.ts":{"bytesInOutput":95}},"bytes":3981}}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/wallets-core",
|
|
3
|
-
"version": "0.53.1-next.
|
|
3
|
+
"version": "0.53.1-next.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/mod.ts",
|
|
@@ -46,6 +46,10 @@
|
|
|
46
46
|
"./namespaces/utxo": {
|
|
47
47
|
"types": "./dist/namespaces/utxo/mod.d.ts",
|
|
48
48
|
"default": "./dist/namespaces/utxo/mod.js"
|
|
49
|
+
},
|
|
50
|
+
"./namespaces/tron": {
|
|
51
|
+
"types": "./dist/namespaces/tron/mod.d.ts",
|
|
52
|
+
"default": "./dist/namespaces/tron/mod.js"
|
|
49
53
|
}
|
|
50
54
|
},
|
|
51
55
|
"files": [
|
|
@@ -54,7 +58,7 @@
|
|
|
54
58
|
"legacy"
|
|
55
59
|
],
|
|
56
60
|
"scripts": {
|
|
57
|
-
"build": "node ../../scripts/build/command.mjs --path wallets/core --inputs src/mod.ts,src/utils/mod.ts,src/legacy/mod.ts,src/hub/store/mod.ts,src/namespaces/evm/mod.ts,src/namespaces/solana/mod.ts,src/namespaces/cosmos/mod.ts,src/namespaces/utxo/mod.ts,src/namespaces/sui/mod.ts,src/namespaces/common/mod.ts",
|
|
61
|
+
"build": "node ../../scripts/build/command.mjs --path wallets/core --inputs src/mod.ts,src/utils/mod.ts,src/legacy/mod.ts,src/hub/store/mod.ts,src/namespaces/evm/mod.ts,src/namespaces/solana/mod.ts,src/namespaces/cosmos/mod.ts,src/namespaces/utxo/mod.ts,src/namespaces/sui/mod.ts,src/namespaces/tron/mod.ts,src/namespaces/common/mod.ts",
|
|
58
62
|
"ts-check": "tsc --declaration --emitDeclarationOnly -p ./tsconfig.json",
|
|
59
63
|
"clean": "rimraf dist",
|
|
60
64
|
"format": "prettier --write '{.,src}/**/*.{ts,tsx}'",
|
|
@@ -5,6 +5,7 @@ import type { CosmosActions } from '../../namespaces/cosmos/mod.js';
|
|
|
5
5
|
import type { EvmActions } from '../../namespaces/evm/mod.js';
|
|
6
6
|
import type { SolanaActions } from '../../namespaces/solana/mod.js';
|
|
7
7
|
import type { SuiActions } from '../../namespaces/sui/mod.js';
|
|
8
|
+
import type { TronActions } from '../../namespaces/tron/types.js';
|
|
8
9
|
import type { UtxoActions } from '../../namespaces/utxo/mod.js';
|
|
9
10
|
import type { AnyFunction, FunctionWithContext } from '../../types/actions.js';
|
|
10
11
|
import type { Prettify } from '../../types/utils.js';
|
|
@@ -32,6 +33,7 @@ export interface CommonNamespaces {
|
|
|
32
33
|
cosmos: CosmosActions;
|
|
33
34
|
sui: SuiActions;
|
|
34
35
|
utxo: UtxoActions;
|
|
36
|
+
tron: TronActions;
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
export type CommonNamespaceKeys = Prettify<keyof CommonNamespaces>;
|
|
@@ -21,6 +21,8 @@ export interface NamespaceData {
|
|
|
21
21
|
network: null | string;
|
|
22
22
|
connected: boolean;
|
|
23
23
|
connecting: boolean;
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25
|
+
connectArgs: Record<string, any> | null;
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
interface NamespaceInfo {
|
|
@@ -73,6 +75,7 @@ const namespacesStore: NamespaceStateCreator = (set, get) => ({
|
|
|
73
75
|
network: null,
|
|
74
76
|
connected: false,
|
|
75
77
|
connecting: false,
|
|
78
|
+
connectArgs: null,
|
|
76
79
|
};
|
|
77
80
|
|
|
78
81
|
const item = {
|
|
@@ -17,7 +17,10 @@ export function connect(
|
|
|
17
17
|
instance: () => ProviderAPI,
|
|
18
18
|
options?: ConnectOptions
|
|
19
19
|
): FunctionWithContext<EvmActions['connect'], Context> {
|
|
20
|
-
return async (
|
|
20
|
+
return async (context, chain) => {
|
|
21
|
+
// Setting connect args to be used on other actions
|
|
22
|
+
const [, setState] = context.state();
|
|
23
|
+
setState('connectArgs', { chain });
|
|
21
24
|
const evmInstance = instance();
|
|
22
25
|
|
|
23
26
|
if (!evmInstance) {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { TronActions } from './types.js';
|
|
2
|
+
|
|
3
|
+
import { ActionBuilder } from '../../mod.js';
|
|
4
|
+
import { intoConnectionFinished } from '../common/after.js';
|
|
5
|
+
import { connectAndUpdateStateForSingleNetwork } from '../common/and.js';
|
|
6
|
+
import { intoConnecting } from '../common/before.js';
|
|
7
|
+
|
|
8
|
+
export const connect = () =>
|
|
9
|
+
new ActionBuilder<TronActions, 'connect'>('connect')
|
|
10
|
+
.and(connectAndUpdateStateForSingleNetwork)
|
|
11
|
+
.before(intoConnecting)
|
|
12
|
+
.after(intoConnectionFinished);
|
|
13
|
+
|
|
14
|
+
export const canEagerConnect = () =>
|
|
15
|
+
new ActionBuilder<TronActions, 'canEagerConnect'>('canEagerConnect');
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* TODO: I couldn't found tron in caip
|
|
3
|
+
* @see https://namespaces.chainagnostic.org/
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// if the value needs to be change make sure you will update mapCaipNamespaceToLegacyNetworkName as well
|
|
7
|
+
export const CAIP_NAMESPACE = 'tron';
|
|
8
|
+
export const CAIP_TRON_CHAIN_ID = 'tron';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * as actions from './actions.js';
|
|
2
|
+
export * as after from './after.js';
|
|
3
|
+
export * as and from './and.js';
|
|
4
|
+
export * as before from './before.js';
|
|
5
|
+
export * as builders from './builders.js';
|
|
6
|
+
export * as utils from './utils.js';
|
|
7
|
+
export type { ProviderAPI, TronActions } from './types.js';
|
|
8
|
+
export { CAIP_NAMESPACE, CAIP_TRON_CHAIN_ID } from './constants.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Accounts } from '../../types/accounts.js';
|
|
2
|
+
import type {
|
|
3
|
+
AutoImplementedActionsByRecommended,
|
|
4
|
+
CommonActions,
|
|
5
|
+
} from '../common/types.js';
|
|
6
|
+
|
|
7
|
+
export interface TronActions
|
|
8
|
+
extends AutoImplementedActionsByRecommended,
|
|
9
|
+
CommonActions {
|
|
10
|
+
connect: () => Promise<Accounts>;
|
|
11
|
+
canEagerConnect: () => Promise<boolean>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
|
+
export type ProviderAPI = Record<string, any>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CaipAccount } from '../common/mod.js';
|
|
2
|
+
|
|
3
|
+
import { AccountId } from 'caip';
|
|
4
|
+
|
|
5
|
+
import { CAIP_NAMESPACE, CAIP_TRON_CHAIN_ID } from './constants.js';
|
|
6
|
+
|
|
7
|
+
export function formatAccountsToCAIP(accounts: string[]) {
|
|
8
|
+
return accounts.map(
|
|
9
|
+
(account) =>
|
|
10
|
+
AccountId.format({
|
|
11
|
+
address: account.toString(),
|
|
12
|
+
chainId: {
|
|
13
|
+
namespace: CAIP_NAMESPACE,
|
|
14
|
+
reference: CAIP_TRON_CHAIN_ID,
|
|
15
|
+
},
|
|
16
|
+
}) as CaipAccount
|
|
17
|
+
);
|
|
18
|
+
}
|