Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
bluecco committed Jul 1, 2024
1 parent 385c71e commit 054b0f9
Show file tree
Hide file tree
Showing 21 changed files with 476 additions and 410 deletions.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@
},
"dependencies": {
"@starknet-io/get-starknet": "^4.0.0",
"@starknet-io/types-js": "^0.7.7",
"@starknet-io/get-starknet-core": "^4.0.0",
"@starknet-io/types-js": "^0.7.2",
"@trpc/client": "^10.38.1",
"@trpc/server": "^10.38.1",
"@walletconnect/sign-client": "^2.11.0",
"bowser": "^2.11.0",
"detect-browser": "^5.3.0",
"eventemitter3": "^5.0.1",
"events": "^3.3.0",
"get-starknet-core": "4.0.0-next.5",
"get-starknet-coreV3": "npm:[email protected]",
"lodash-es": "^4.17.21",
"svelte-forms": "^2.3.1",
Expand Down Expand Up @@ -100,7 +100,6 @@
"prettier": "^3.0.3",
"prettier-plugin-import-sort": "^0.0.7",
"semantic-release": "^21.1.1",
"starknet-types": "^0.7.2",
"starknet4": "npm:[email protected]",
"starknet5": "npm:[email protected]",
"svelte": "^4.0.0",
Expand Down
810 changes: 437 additions & 373 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/connectors/argentMobile/helpers/inAppBrowser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { StarknetWindowObject } from "starknet-types"
import type { StarknetWindowObject } from "@starknet-io/types-js"

export const isInArgentMobileAppBrowser = (): boolean => {
if (!window?.starknet_argentX) {
Expand Down
6 changes: 3 additions & 3 deletions src/connectors/argentMobile/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type AccountChangeEventHandler } from "get-starknet-core"
import { type AccountChangeEventHandler } from "@starknet-io/get-starknet-core"
import {
AccountInterface,
ProviderInterface,
Expand All @@ -12,7 +12,7 @@ import {
RpcMessage,
RpcTypeToMessageMap,
type StarknetWindowObject,
} from "starknet-types"
} from "@starknet-io/types-js"
import {
ConnectorNotConnectedError,
ConnectorNotFoundError,
Expand Down Expand Up @@ -65,7 +65,7 @@ export class ArgentMobileConnector extends Connector {
type: "wallet_getPermissions",
})

return (permissions as Permission[]).includes(Permission.Accounts)
return (permissions as Permission[]).includes(Permission.ACCOUNTS)
}

get id(): string {
Expand Down
2 changes: 1 addition & 1 deletion src/connectors/argentMobile/modal/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { StarknetWindowObject } from "starknet-types"
import type { StarknetWindowObject } from "@starknet-io/types-js"
import { login } from "./login"
import type { IArgentLoginOptions } from "./login"
import { StarknetAdapter } from "./starknet/adapter"
Expand Down
7 changes: 5 additions & 2 deletions src/connectors/argentMobile/modal/starknet/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import {
AddInvokeTransactionParameters,
RequestFn,
TypedData,
} from "get-starknet-core"
import type { StarknetWindowObject } from "starknet-types"
} from "@starknet-io/get-starknet-core"
import type { StarknetWindowObject } from "@starknet-io/types-js"
import type { NamespaceAdapterOptions } from "../adapter"
import { NamespaceAdapter } from "../adapter"
import { argentModal } from "../argentModal"
Expand Down Expand Up @@ -103,6 +103,9 @@ export class StarknetAdapter
starknet_addInvokeTransaction: this.handleAddInvokeTransaction,
starknet_signTypedData: this.handleSignTypedData,
starknet_supportedSpecs: this.handleSupportedSpecs,
wallet_addInvokeTransaction: this.handleAddInvokeTransaction,
wallet_signTypedData: this.handleSignTypedData,
wallet_supportedSpecs: this.handleSupportedSpecs,
})
}

Expand Down
2 changes: 1 addition & 1 deletion src/connectors/argentMobile/modal/starknet/signer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type {
Signature,
SignerInterface,
} from "starknet"
import { TypedData } from "starknet-types"
import { TypedData } from "@starknet-io/types-js"
import type { IStarknetRpc } from "./starknet.model"

export class StarknetRemoteSigner implements SignerInterface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
InvokeFunctionResponse,
Signature,
} from "starknet"
import { TypedData } from "starknet-types"
import { TypedData } from "@starknet-io/types-js"

// see https://github.com/WalletConnect/walletconnect-docs/pull/288/files
export interface IStarknetRpc {
Expand Down
2 changes: 1 addition & 1 deletion src/connectors/connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
RpcMessage,
RpcTypeToMessageMap,
StarknetWindowObject,
} from "starknet-types"
} from "@starknet-io/types-js"

/** Connector icons, as base64 encoded svg. */
export type ConnectorIcons = StarknetWindowObject["icon"]
Expand Down
4 changes: 2 additions & 2 deletions src/connectors/injected/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
RpcMessage,
RpcTypeToMessageMap,
type StarknetWindowObject,
} from "starknet-types"
} from "@starknet-io/types-js"
import {
ConnectorNotConnectedError,
ConnectorNotFoundError,
Expand Down Expand Up @@ -117,7 +117,7 @@ export class InjectedConnector extends Connector {
type: "wallet_getPermissions",
})

return permissions?.includes(Permission.Accounts)
return permissions?.includes(Permission.ACCOUNTS)
}

async account(
Expand Down
2 changes: 1 addition & 1 deletion src/connectors/webwallet/helpers/openWebwallet.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { StarknetWindowObject } from "starknet-types"
import type { StarknetWindowObject } from "@starknet-io/types-js"
import { mapTargetUrlToNetworkId } from "../../../helpers/mapTargetUrlToNetworkId"
import { getWebWalletStarknetObject } from "../starknetWindowObject/getWebWalletStarknetObject"
import { createModal } from "../starknetWindowObject/wormhole"
Expand Down
6 changes: 3 additions & 3 deletions src/connectors/webwallet/helpers/trpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
deployAccountContractSchema,
} from "../../../window/window"
import { DEFAULT_WEBWALLET_URL } from "../constants"
import { Permission } from "get-starknet-core"
import { Permission } from "@starknet-io/types-js"

const t = initTRPC.create({
isServer: false,
Expand Down Expand Up @@ -95,9 +95,9 @@ const appRouter = t.router({
.output(z.string().array())
.mutation(async () => []),
getPermissions: t.procedure
.output(z.array(z.enum([Permission.Accounts])))
.output(z.array(z.enum([Permission.ACCOUNTS])))
.mutation(async () => {
return [Permission.Accounts]
return [Permission.ACCOUNTS]
}),
addInvokeTransaction: t.procedure
.input(RpcCallSchema.or(RpcCallsArraySchema))
Expand Down
4 changes: 2 additions & 2 deletions src/connectors/webwallet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
RpcTypeToMessageMap,
type AccountChangeEventHandler,
type StarknetWindowObject,
} from "starknet-types"
} from "@starknet-io/types-js"
import {
ConnectorNotConnectedError,
ConnectorNotFoundError,
Expand Down Expand Up @@ -58,7 +58,7 @@ export class WebWalletConnector extends Connector {
type: "wallet_getPermissions",
})

return (permissions as Permission[]).includes(Permission.Accounts)
return (permissions as Permission[]).includes(Permission.ACCOUNTS)
}

get id(): string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type {
RpcTypeToMessageMap,
StarknetWindowObject,
WalletEvents,
} from "starknet-types"
} from "@starknet-io/types-js"
import {
EXECUTE_POPUP_HEIGHT,
EXECUTE_POPUP_WIDTH,
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/getStarknetChainId.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { constants } from "starknet"
import { ChainId } from "starknet-types"
import { ChainId } from "@starknet-io/types-js"

export const getStarknetChainId = (
chainId: ChainId,
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/getWallets.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { WalletProvider } from "get-starknet-core"
import type { StarknetWindowObject } from "starknet-types"
import type { WalletProvider } from "@starknet-io/get-starknet-core"
import type { StarknetWindowObject } from "@starknet-io/types-js"
import { ARGENT_X_ICON } from "../connectors/injected/constants"

export const replaceArgentXIcon = async (
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/mapModalWallets.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { WalletProvider } from "get-starknet-core"
import { WalletProvider } from "@starknet-io/get-starknet-core"
import { isString } from "lodash-es"
import type { StarknetWindowObject } from "starknet-types"
import type { StarknetWindowObject } from "@starknet-io/types-js"
import { StarknetkitConnector } from "../connectors/connector"
import { ARGENT_X_ICON } from "../connectors/injected/constants"
import type { ModalWallet, StoreVersion } from "../window/modal"
Expand Down
11 changes: 5 additions & 6 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { DisconnectOptions } from "get-starknet-core"
import sn from "get-starknet-core"
import snV3 from "get-starknet-coreV3"
import type { StarknetWindowObject } from "starknet-types"
import type { DisconnectOptions } from "@starknet-io/get-starknet"
import sn from "@starknet-io/get-starknet-core"
import type { StarknetWindowObject } from "@starknet-io/types-js"
import { Connector, ConnectorData, StarknetkitConnector } from "./connectors"
import { DEFAULT_WEBWALLET_URL } from "./connectors/webwallet/constants"
import { defaultConnectors } from "./helpers/defaultConnectors"
Expand Down Expand Up @@ -96,7 +95,7 @@ export const connect = async ({
const modalWallets: ModalWallet[] = mapModalWallets({
availableConnectors,
installedWallets,
discoveryWallets: await snV3.getDiscoveryWallets(restOptions),
discoveryWallets: await sn.getDiscoveryWallets(restOptions),
storeVersion,
})

Expand Down Expand Up @@ -175,7 +174,7 @@ export const disconnect = async (options: DisconnectOptions = {}) => {
}
selectedConnector = null

return snV3.disconnect(options)
return sn.disconnect(options)
}

export type {
Expand Down
2 changes: 1 addition & 1 deletion src/modal/Modal.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { onMount } from "svelte"
import type { StarknetWindowObject } from "starknet-types"
import type { StarknetWindowObject } from "@starknet-io/types-js"
import ConnectorButton from "./ConnectorButton.svelte"
import type { StarknetkitConnector } from "../connectors/connector"
import { InjectedConnector } from "../connectors/injected"
Expand Down
4 changes: 2 additions & 2 deletions src/window/modal.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { GetWalletOptions } from "get-starknet-core"
import { StarknetWindowObject } from "starknet-types"
import type { GetWalletOptions } from "@starknet-io/get-starknet-core"
import { StarknetWindowObject } from "@starknet-io/types-js"
import type { ArgentMobileConnectorOptions } from "../connectors/argentMobile"
import type {
ConnectorData,
Expand Down
3 changes: 2 additions & 1 deletion src/window/starknet.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { StarknetWindowObject, Permission } from "get-starknet-core"
import type { StarknetWindowObject } from "@starknet-io/get-starknet-core"
import type { Permission } from "@starknet-io/types-js"
import {
ConnectedStarknetWindowObject as ConnectedStarknetWindowObjectV3,
IStarknetWindowObject as IStarknetWindowObjectV3,
Expand Down

0 comments on commit 054b0f9

Please sign in to comment.