Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions packages/app-sdk/src/core/provider/interface.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ToOwnerAccountFn } from ':store/store.js'
import type { ToOwnerAccountFn } from ':store/store.js'
import { EventEmitter } from 'eventemitter3'
import { Address, Hex } from 'viem'
import type { Address, Hex } from 'viem'

export interface RequestArguments {
export type RequestArguments = {
readonly method: string
readonly params?: readonly unknown[] | object
}
Expand All @@ -13,7 +13,7 @@ export interface ProviderRpcError extends Error {
data?: unknown
}

interface ProviderConnectInfo {
type ProviderConnectInfo = {
readonly chainId: string
}

Expand Down Expand Up @@ -51,7 +51,7 @@ export type SpendPermissionConfig = {
extraData?: Hex
}

export interface AppMetadata {
export type AppMetadata = {
/** Application name */
appName: string
/** Application logo image URL; favicon is used if unspecified */
Expand Down Expand Up @@ -88,7 +88,7 @@ export type Preference = {
attribution?: Attribution
/**
* Whether to enable functional telemetry.
* @default true
* @default false
*/
telemetry?: boolean
} & Record<string, unknown>
Expand All @@ -108,7 +108,7 @@ export type SubAccountOptions = {
unstable_enableAutoSpendPermissions?: boolean
}

export interface ConstructorOptions {
export type ConstructorOptions = {
metadata: AppMetadata
preference: Preference
paymasterUrls?: Record<number, string>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import {
import type {
AppMetadata,
ConstructorOptions,
Preference,
ProviderInterface,
SubAccountOptions,
} from ':core/provider/interface.js'
import { AddSubAccountAccount } from ':core/rpc/wallet_addSubAccount.js'
import { WalletConnectResponse } from ':core/rpc/wallet_connect.js'
import { loadTelemetryScript } from ':core/telemetry/initCCA.js'
import type { AddSubAccountAccount } from ':core/rpc/wallet_addSubAccount.js'
import type { WalletConnectResponse } from ':core/rpc/wallet_connect.js'
import { abi } from ':sign/app-sdk/utils/constants.js'
import { SubAccount, ToOwnerAccountFn, store } from ':store/store.js'
import { store, type SubAccount, type ToOwnerAccountFn } from ':store/store.js'
import { assertPresence } from ':util/assertPresence.js'
import { checkCrossOriginOpenerPolicy } from ':util/checkCrossOriginOpenerPolicy.js'
import {
Expand Down Expand Up @@ -74,9 +73,9 @@ export function createBaseAccountSDK(params: CreateProviderOptions) {

validatePreferences(options.preference)

if (options.preference.telemetry !== false) {
void loadTelemetryScript()
}
// if (options.preference.telemetry !== false) {
// void loadTelemetryScript()
// }

// ====================================================================
// Return the provider
Expand Down