Skip to content

Deprecate URL string arguments in wallet creation config #466

@arkanaai

Description

@arkanaai

Summary

Deprecate the following URL string arguments from wallet creation config in favour of explicit provider instances. These were the original API; the provider pattern (arkProvider, indexerProvider, etc.) is now preferred as it supports custom transports (Expo, gRPC, service workers, etc.) and removes ambiguous override precedence.

Arguments to deprecate:

  • arkServerUrl
  • indexerUrl
  • esploraUrl
  • delegatorUrl (ServiceWorker wallet only)

Code that relies on these arguments

arkServerUrl

  • src/wallet/index.ts:43 — defined in BaseWalletConfig
  • src/wallet/serviceWorker/wallet.ts:332 — defined in ServiceWorkerWalletOptions
  • src/wallet/serviceWorker/wallet.ts:454 — stored as protected property
  • src/wallet/wallet.ts:200-210 — extracted, validated, used to construct RestArkProvider
  • src/wallet/wallet.ts:218 — defaults indexerUrl when not set
  • src/worker/messageBus.ts:373 — forwarded to message bus init

indexerUrl

  • src/wallet/index.ts:45 — defined in BaseWalletConfig
  • src/wallet/serviceWorker/wallet.ts:334 — defined in ServiceWorkerWalletOptions
  • src/wallet/serviceWorker/wallet.ts:457 — stored as protected property
  • src/wallet/wallet.ts:217-220 — defaults to arkServerUrl; used to construct RestIndexerProvider
  • src/worker/messageBus.ts:375, 390 — forwarded through message bus config

esploraUrl

  • src/wallet/index.ts:47 — defined in BaseWalletConfig
  • src/wallet/serviceWorker/wallet.ts:336 — defined in ServiceWorkerWalletOptions
  • src/wallet/serviceWorker/wallet.ts:458 — stored as protected property
  • src/wallet/wallet.ts:250-255 — defaults to network-specific ESPLORA_URL; used to construct EsploraProvider
  • src/worker/messageBus.ts:376, 391 — forwarded through message bus config

delegatorUrl (ServiceWorker only)

  • src/wallet/serviceWorker/wallet.ts:345 — defined in ServiceWorkerWalletOptions
  • src/wallet/serviceWorker/wallet.ts:456 — stored as protected property
  • src/wallet/serviceWorker/wallet.ts:536, 554, 865, 1393, 1378, 1411 — conditional check, stored, and forwarded
  • src/worker/messageBus.ts:363-364 — used to instantiate RestDelegatorProvider

Proposed approach

  1. Mark each property @deprecated in its interface/type (TypeDoc annotations to be handled separately).
  2. Keep runtime behaviour unchanged — URL args still construct the relevant provider internally — so existing integrations don't break.
  3. In a future major version, remove the properties entirely.

Out of scope

TypeDoc annotation updates — handled separately by @gringokiwi.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions