From 248b8f23761bbbdf99a65416610f7f3a4b39c26c Mon Sep 17 00:00:00 2001 From: Elabar Date: Thu, 20 Apr 2023 22:48:01 +0800 Subject: [PATCH 01/71] feat: added sign message to all wallets and guestbook example --- .../components/content/content.component.html | 1 + .../components/content/content.component.ts | 51 ++++++++++++++++ examples/react/components/Content.tsx | 51 ++++++++++++++++ package.json | 1 + .../coin98-wallet/src/lib/coin98-wallet.ts | 12 ++++ packages/core/docs/api/wallet.md | 35 ++++++++++- packages/core/docs/guides/custom-wallets.md | 6 ++ packages/core/src/index.ts | 4 ++ packages/core/src/lib/helpers/index.ts | 1 + .../lib/helpers/verify-signature/payload.ts | 41 +++++++++++++ .../verify-signature/verify-signature.ts | 60 +++++++++++++++++++ .../verify-signature.types.ts | 21 +++++++ packages/core/src/lib/wallet/wallet.types.ts | 16 +++++ .../finer-wallet/src/lib/finer-injected.ts | 11 ++++ packages/here-wallet/src/lib/selector.ts | 16 +++-- packages/ledger/src/lib/ledger.ts | 11 ++++ packages/math-wallet/src/lib/math-wallet.ts | 11 ++++ .../meteor-wallet/src/lib/meteor-wallet.ts | 12 +++- .../my-near-wallet/src/lib/my-near-wallet.ts | 12 ++++ packages/narwallets/src/lib/narwallets.ts | 11 ++++ packages/near-snap/src/lib/near-snap.ts | 12 ++++ packages/nearfi/src/lib/nearfi.ts | 11 ++++ packages/neth/src/lib/neth.ts | 11 ++++ .../src/lib/nightly-connect.ts | 11 ++++ packages/nightly/src/lib/nightly.ts | 11 ++++ packages/opto-wallet/src/lib/opto-wallet.ts | 12 ++++ packages/sender/src/lib/sender.ts | 11 ++++ .../wallet-connect/src/lib/wallet-connect.ts | 22 ++++++- packages/welldone-wallet/src/lib/welldone.ts | 12 ++++ packages/xdefi/src/lib/xdefi.ts | 11 ++++ 30 files changed, 501 insertions(+), 7 deletions(-) create mode 100644 packages/core/src/lib/helpers/verify-signature/payload.ts create mode 100644 packages/core/src/lib/helpers/verify-signature/verify-signature.ts create mode 100644 packages/core/src/lib/helpers/verify-signature/verify-signature.types.ts diff --git a/examples/angular/src/app/components/content/content.component.html b/examples/angular/src/app/components/content/content.component.html index 43e57a47c..d7263f413 100644 --- a/examples/angular/src/app/components/content/content.component.html +++ b/examples/angular/src/app/components/content/content.component.html @@ -3,6 +3,7 @@ + diff --git a/examples/angular/src/app/components/content/content.component.ts b/examples/angular/src/app/components/content/content.component.ts index 0c6bef36e..66b5dac5c 100644 --- a/examples/angular/src/app/components/content/content.component.ts +++ b/examples/angular/src/app/components/content/content.component.ts @@ -6,6 +6,10 @@ import type { CodeResult, } from "near-api-js/lib/providers/provider"; import type { AccountState, Transaction } from "@near-wallet-selector/core"; +import { + verifyFullKeyBelongsToUser, + verifySignature, +} from "@near-wallet-selector/core"; import type { Message } from "../../interfaces/message"; import type { Submitted } from "../form/form.component"; @@ -161,6 +165,53 @@ export class ContentComponent implements OnInit, OnDestroy { } } + async onSignMessage() { + const wallet = await this.selector.wallet(); + const message = "test message to sign"; + const nonce = Buffer.from(Array.from(Array(32).keys())); + const recipient = "guest-book.testnet"; + + try { + const signedMessage = await wallet.signMessage({ + message, + nonce, + recipient, + }); + if (signedMessage) { + const verifiedSignature = verifySignature({ + message, + nonce, + recipient, + publicKey: signedMessage.publicKey, + signature: signedMessage.signature, + }); + const verifiedFullKeyBelongsToUser = await verifyFullKeyBelongsToUser({ + publicKey: signedMessage.publicKey, + accountId: signedMessage.accountId, + network: this.selector.options.network, + }); + + if (verifiedFullKeyBelongsToUser && verifiedSignature) { + alert( + `Successfully verify signed message: '${message}': \n ${JSON.stringify( + signedMessage + )}` + ); + } else { + alert( + `Failed to verify signed message '${message}': \n ${JSON.stringify( + signedMessage + )}` + ); + } + } + } catch (err) { + const errMsg = + err instanceof Error ? err.message : "Something went wrong"; + alert(errMsg); + } + } + subscribeToEvents() { this.subscription = this.selector.store.observable .pipe( diff --git a/examples/react/components/Content.tsx b/examples/react/components/Content.tsx index cd78fc8cc..453dea676 100644 --- a/examples/react/components/Content.tsx +++ b/examples/react/components/Content.tsx @@ -5,6 +5,8 @@ import type { CodeResult, } from "near-api-js/lib/providers/provider"; import type { Transaction } from "@near-wallet-selector/core"; +import { verifyFullKeyBelongsToUser } from "@near-wallet-selector/core"; +import { verifySignature } from "@near-wallet-selector/core"; import BN from "bn.js"; import type { Account, Message } from "../interfaces"; @@ -256,6 +258,54 @@ const Content: React.FC = () => { [addMessages, getMessages] ); + const handleSignMessage = async () => { + const wallet = await selector.wallet(); + + const message = "test message to sign"; + const nonce = Buffer.from(Array.from(Array(32).keys())); + const recipient = "guest-book.testnet"; + + try { + const signedMessage = await wallet.signMessage({ + message, + nonce, + recipient, + }); + if (signedMessage) { + const verifiedSignature = verifySignature({ + message, + nonce, + recipient, + publicKey: signedMessage.publicKey, + signature: signedMessage.signature, + }); + const verifiedFullKeyBelongsToUser = await verifyFullKeyBelongsToUser({ + publicKey: signedMessage.publicKey, + accountId: signedMessage.accountId, + network: selector.options.network, + }); + + if (verifiedFullKeyBelongsToUser && verifiedSignature) { + alert( + `Successfully verify signed message: '${message}': \n ${JSON.stringify( + signedMessage + )}` + ); + } else { + alert( + `Failed to verify signed message '${message}': \n ${JSON.stringify( + signedMessage + )}` + ); + } + } + } catch (err) { + const errMsg = + err instanceof Error ? err.message : "Something went wrong"; + alert(errMsg); + } + }; + if (loading) { return null; } @@ -277,6 +327,7 @@ const Content: React.FC = () => { + {accounts.length > 1 && ( )} diff --git a/package.json b/package.json index 7bd508969..ade4c8e81 100644 --- a/package.json +++ b/package.json @@ -95,6 +95,7 @@ "better-sqlite3": "^8.2.0", "big.js": "^6.1.1", "bn.js": "^5.2.0", + "borsh": "^0.7.0", "bs58": "^5.0.0", "buffer": "^6.0.3", "copy-to-clipboard": "^3.3.3", diff --git a/packages/coin98-wallet/src/lib/coin98-wallet.ts b/packages/coin98-wallet/src/lib/coin98-wallet.ts index a8c7cf0f0..688a0cf56 100644 --- a/packages/coin98-wallet/src/lib/coin98-wallet.ts +++ b/packages/coin98-wallet/src/lib/coin98-wallet.ts @@ -182,6 +182,18 @@ const Coin98Wallet: WalletBehaviourFactory = async ({ return results; }, + + async signMessage({ message, nonce, recipient, callbackUrl, state }) { + logger.log("Coin98Wallet:signMessage", { + message, + nonce, + recipient, + callbackUrl, + state, + }); + + throw new Error(`Method not supported by ${metadata.name}`); + }, }; }; diff --git a/packages/core/docs/api/wallet.md b/packages/core/docs/api/wallet.md index 110771983..9ef8ff462 100644 --- a/packages/core/docs/api/wallet.md +++ b/packages/core/docs/api/wallet.md @@ -1,4 +1,4 @@ -## API Reference (Wallet) +e## API Reference (Wallet) ### `.id` @@ -293,3 +293,36 @@ Signs one or more transactions before sending to the network. The user must be s }); })(); ``` + +### `.signMessage(params)` + +**Parameters** +- `params` (`object`) + - `message` (`string`): The message that wants to be transmitted. + - `recipient` (`string`): The recipient to whom the message is destined (e.g. "alice.near" or "myapp.com"). + - `nonce` (`Buffer`): A nonce that uniquely identifies this instance of the message, denoted as a 32 bytes array (a fixed `Buffer` in JS/TS). + - `callbackUrl` (`string?`): Optional, applicable to browser wallets (e.g. MyNearWallet). The URL to call after the signing process. Defaults to `window.location.href`. + - `state` (`string?`): Optional, applicable to browser wallets (e.g. MyNearWallet). A state for authentication purposes. + +**Returns** +- `Promise`: Browser wallets won't return the signing outcome as they may need to redirect for signing. For MyNearWallet the outcome is passed to the callback url. + +**Description** + +Allows users to sign a message for a specific recipient using their NEAR account, based on the [NEP413](https://github.com/near/NEPs/pull/413). + +**Example** + +```ts +// MyNearWallet +(async () => { + const wallet = await selector.wallet("my-near-wallet"); + const message = "test message for verification"; + let nonceArray: Uint8Array = new Uint8Array(32); + nonceArray = crypto.getRandomValues(nonceArray); + const nonce = Buffer.from(nonceArray); + const recipient = "myapp.com"; + + await wallet.signMessage({ message, recipient, nonce }); +})(); +``` \ No newline at end of file diff --git a/packages/core/docs/guides/custom-wallets.md b/packages/core/docs/guides/custom-wallets.md index edf980051..79b982833 100644 --- a/packages/core/docs/guides/custom-wallets.md +++ b/packages/core/docs/guides/custom-wallets.md @@ -68,6 +68,12 @@ const MyWallet: WalletBehaviourFactory = ({ signedTxs.map((signedTx) => provider.sendTransaction(signedTx)) ); }, + + async signMessage({ message, nonce, recipient, callbackUrl, state }) { + // A standardized Wallet API method, namely `signMessage`, + // that allows users to sign a message for a specific receiver using their NEAR account + return await wallet.signMessage({ message, nonce, recipient, callbackUrl, state }); + }, }; }; diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index f8a466695..7e90a2a79 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -68,6 +68,8 @@ export type { DeleteAccountAction, AddKeyPermission, AccountImportData, + SignedMessage, + SignMessageParams, } from "./lib/wallet"; export type { FinalExecutionOutcome } from "near-api-js/lib/providers"; @@ -76,6 +78,8 @@ export { waitFor, getActiveAccount, isCurrentBrowserSupported, + verifyFullKeyBelongsToUser, + verifySignature, } from "./lib/helpers"; export { translate, allowOnlyLanguage } from "./lib/translate/translate"; diff --git a/packages/core/src/lib/helpers/index.ts b/packages/core/src/lib/helpers/index.ts index 172440f16..a5fdd5bcb 100644 --- a/packages/core/src/lib/helpers/index.ts +++ b/packages/core/src/lib/helpers/index.ts @@ -1,3 +1,4 @@ export * from "./waitFor"; export * from "./getActiveAccount"; export * from "./detect-browser"; +export * from "./verify-signature/verify-signature"; diff --git a/packages/core/src/lib/helpers/verify-signature/payload.ts b/packages/core/src/lib/helpers/verify-signature/payload.ts new file mode 100644 index 000000000..86382dcb5 --- /dev/null +++ b/packages/core/src/lib/helpers/verify-signature/payload.ts @@ -0,0 +1,41 @@ +import type { SignMessageParams } from "../../wallet"; + +export class Payload { + tag: number; + message: string; + nonce: Buffer; + recipient: string; + callbackUrl?: string; + + constructor(data: SignMessageParams) { + this.tag = 2147484061; + this.message = data.message; + this.nonce = data.nonce; + this.recipient = data.recipient; + if (data.callbackUrl) { + this.callbackUrl = data.callbackUrl; + } + } +} + +export const payloadSchema = new Map([ + [ + Payload, + { + kind: "struct", + fields: [ + ["tag", "u32"], + ["message", "string"], + ["nonce", [32]], + ["recipient", "string"], + [ + "callbackUrl", + { + kind: "option", + type: "string", + }, + ], + ], + }, + ], +]); diff --git a/packages/core/src/lib/helpers/verify-signature/verify-signature.ts b/packages/core/src/lib/helpers/verify-signature/verify-signature.ts new file mode 100644 index 000000000..d843f3247 --- /dev/null +++ b/packages/core/src/lib/helpers/verify-signature/verify-signature.ts @@ -0,0 +1,60 @@ +import { utils, providers } from "near-api-js"; +import { serialize } from "borsh"; +import { sha256 } from "js-sha256"; +import type { + VerifyFullKeyBelongsToUserParams, + VerifySignatureParams, + FetchUserKeysParams, +} from "./verify-signature.types"; +import { Payload, payloadSchema } from "./payload"; +import type { AccessKeyList } from "near-api-js/lib/providers/provider"; + +export const verifySignature = ({ + publicKey, + signature, + message, + nonce, + recipient, + callbackUrl, +}: VerifySignatureParams) => { + const payload = new Payload({ message, nonce, recipient, callbackUrl }); + const borshPayload = serialize(payloadSchema, payload); + const sha = sha256(borshPayload); + const pk = utils.PublicKey.from(publicKey); + return pk.verify( + new Uint8Array(Buffer.from(sha)), + Buffer.from(signature, "base64") + ); +}; + +const fetchAllUserKeys = async ({ + accountId, + network, +}: FetchUserKeysParams): Promise => { + const provider = new providers.JsonRpcProvider({ url: network.nodeUrl }); + const keys = await provider.query({ + request_type: "view_access_key_list", + account_id: accountId, + finality: "final", + }); + return keys as AccessKeyList; +}; + +export const verifyFullKeyBelongsToUser = async ({ + publicKey, + accountId, + network, +}: VerifyFullKeyBelongsToUserParams) => { + const { keys } = await fetchAllUserKeys({ accountId, network }); + + if (!keys) { + return false; + } + + for (const k in keys) { + if (keys[k].public_key === publicKey) { + return keys[k].access_key.permission === "FullAccess"; + } + } + return false; +}; diff --git a/packages/core/src/lib/helpers/verify-signature/verify-signature.types.ts b/packages/core/src/lib/helpers/verify-signature/verify-signature.types.ts new file mode 100644 index 000000000..5b1f34f49 --- /dev/null +++ b/packages/core/src/lib/helpers/verify-signature/verify-signature.types.ts @@ -0,0 +1,21 @@ +import type { Network } from "../../options.types"; + +export interface VerifySignatureParams { + publicKey: string; + signature: string; + message: string; + nonce: Buffer; + recipient: string; + callbackUrl?: string; +} + +export interface VerifyFullKeyBelongsToUserParams { + publicKey: string; + accountId: string; + network: Network; +} + +export interface FetchUserKeysParams { + accountId: string; + network: Network; +} diff --git a/packages/core/src/lib/wallet/wallet.types.ts b/packages/core/src/lib/wallet/wallet.types.ts index 2bb0d6e10..7d65d73f4 100644 --- a/packages/core/src/lib/wallet/wallet.types.ts +++ b/packages/core/src/lib/wallet/wallet.types.ts @@ -44,6 +44,21 @@ export interface VerifiedOwner { keyType: utils.key_pair.KeyType; } +export interface SignMessageParams { + message: string; + recipient: string; + nonce: Buffer; + callbackUrl?: string; + state?: string; +} + +export interface SignedMessage { + accountId: string; + publicKey: string; + signature: string; + state?: string; +} + interface SignAndSendTransactionParams { signerId?: string; receiverId?: string; @@ -65,6 +80,7 @@ interface BaseWalletBehaviour { signAndSendTransactions( params: SignAndSendTransactionsParams ): Promise>; + signMessage(params: SignMessageParams): Promise; } type BaseWallet< diff --git a/packages/finer-wallet/src/lib/finer-injected.ts b/packages/finer-wallet/src/lib/finer-injected.ts index 18af66942..179201501 100644 --- a/packages/finer-wallet/src/lib/finer-injected.ts +++ b/packages/finer-wallet/src/lib/finer-injected.ts @@ -279,6 +279,17 @@ const FinerExtension: WalletBehaviourFactory = async ({ return res.response; }); }, + + async signMessage({ message, nonce, recipient, state }) { + logger.log("FinerWallet:signMessage", { + message, + nonce, + recipient, + state, + }); + + throw new Error(`Method not supported by ${metadata.name}`); + }, }; }; diff --git a/packages/here-wallet/src/lib/selector.ts b/packages/here-wallet/src/lib/selector.ts index 2722f424c..a704da68b 100644 --- a/packages/here-wallet/src/lib/selector.ts +++ b/packages/here-wallet/src/lib/selector.ts @@ -4,9 +4,17 @@ import type BN from "bn.js"; import type { SelectorInit } from "./types"; +// @ts-ignore export const initHereWallet: SelectorInit = async (config) => { - const { store, logger, emitter, options, defaultProvider, defaultStrategy } = - config; + const { + store, + logger, + emitter, + options, + defaultProvider, + defaultStrategy, + metadata, + } = config; const here = new HereWallet({ networkId: options.network.networkId as NetworkId, @@ -113,13 +121,13 @@ export const initHereWallet: SelectorInit = async (config) => { async verifyOwner() { throw Error( - "HereWallet:verifyOwner is deprecated, use signMessage method with impletementation NEP0413 Standart" + "HereWallet:verifyOwner is deprecated, use signMessage method with implementation NEP0413 Standard" ); }, async signMessage(data) { logger.log("HereWallet:signMessage", data); - return await here.signMessage(data); + throw new Error(`Method not supported by ${metadata.name}`); }, async signAndSendTransactions(data) { diff --git a/packages/ledger/src/lib/ledger.ts b/packages/ledger/src/lib/ledger.ts index 69fb7b86a..8b512fc18 100644 --- a/packages/ledger/src/lib/ledger.ts +++ b/packages/ledger/src/lib/ledger.ts @@ -276,6 +276,17 @@ const Ledger: WalletBehaviourFactory = async ({ return await _state.client.getPublicKey({ derivationPath }); }, + + async signMessage({ message, nonce, recipient, state }) { + logger.log("Ledger:signMessage", { + message, + nonce, + recipient, + state, + }); + + throw new Error(`Method not supported by ${metadata.name}`); + }, }; }; diff --git a/packages/math-wallet/src/lib/math-wallet.ts b/packages/math-wallet/src/lib/math-wallet.ts index 5dc75e7d0..657ad25d1 100644 --- a/packages/math-wallet/src/lib/math-wallet.ts +++ b/packages/math-wallet/src/lib/math-wallet.ts @@ -181,6 +181,17 @@ const MathWallet: WalletBehaviourFactory = async ({ return results; }, + + async signMessage({ message, nonce, recipient, state }) { + logger.log("MathWallet:signMessage", { + message, + nonce, + recipient, + state, + }); + + throw new Error(`Method not supported by ${metadata.name}`); + }, }; }; diff --git a/packages/meteor-wallet/src/lib/meteor-wallet.ts b/packages/meteor-wallet/src/lib/meteor-wallet.ts index 11f56e1a7..541fce161 100644 --- a/packages/meteor-wallet/src/lib/meteor-wallet.ts +++ b/packages/meteor-wallet/src/lib/meteor-wallet.ts @@ -45,7 +45,7 @@ const setupWalletState = async ( const createMeteorWalletInjected: WalletBehaviourFactory< InjectedWallet, { params: MeteorWalletParams_Injected } -> = async ({ options, logger, store, params }) => { +> = async ({ options, logger, store, params, metadata }) => { const _state = await setupWalletState(params, options.network); const getAccounts = async (): Promise> => { @@ -162,6 +162,16 @@ const createMeteorWalletInjected: WalletBehaviourFactory< } }, + async signMessage({ message, nonce, recipient, state }) { + logger.log("MeteorWallet:signMessage", { + message, + nonce, + recipient, + state, + }); + throw new Error(`Method not supported by ${metadata.name}`); + }, + async signAndSendTransaction({ signerId, receiverId, actions }) { logger.log("MeteorWallet:signAndSendTransaction", { signerId, diff --git a/packages/my-near-wallet/src/lib/my-near-wallet.ts b/packages/my-near-wallet/src/lib/my-near-wallet.ts index ef2d8d7c2..d4de20c4e 100644 --- a/packages/my-near-wallet/src/lib/my-near-wallet.ts +++ b/packages/my-near-wallet/src/lib/my-near-wallet.ts @@ -224,6 +224,18 @@ const MyNearWallet: WalletBehaviourFactory< }); }, + async signMessage({ message, nonce, recipient, callbackUrl, state }) { + logger.log("MyNearWallet:signMessage", { + message, + nonce, + recipient, + callbackUrl, + state, + }); + + throw new Error(`Method not supported by ${metadata.name}`); + }, + buildImportAccountsUrl() { return `${params.walletUrl}/batch-import`; }, diff --git a/packages/narwallets/src/lib/narwallets.ts b/packages/narwallets/src/lib/narwallets.ts index cfae7bdec..978b14bfe 100644 --- a/packages/narwallets/src/lib/narwallets.ts +++ b/packages/narwallets/src/lib/narwallets.ts @@ -263,6 +263,17 @@ const Narwallets: WalletBehaviourFactory = async ({ Array >; }, + + async signMessage({ message, nonce, recipient, state }) { + logger.log("NarWallet:signMessage", { + message, + nonce, + recipient, + state, + }); + + throw new Error(`Method not supported by ${metadata.name}`); + }, }; }; diff --git a/packages/near-snap/src/lib/near-snap.ts b/packages/near-snap/src/lib/near-snap.ts index 23b595ea3..0fdffdb52 100644 --- a/packages/near-snap/src/lib/near-snap.ts +++ b/packages/near-snap/src/lib/near-snap.ts @@ -15,6 +15,7 @@ const NearSnapWallet: WalletBehaviourFactory = async ({ provider, store, metadata, + logger, }) => { const network = options.network.networkId as "testnet" | "mainnet"; @@ -79,6 +80,17 @@ const NearSnapWallet: WalletBehaviourFactory = async ({ return Promise.all(signedTxs.map((tx) => provider.sendTransaction(tx))); }, + + async signMessage({ message, nonce, recipient, state }) { + logger.log("NearSnap:signMessage", { + message, + nonce, + recipient, + state, + }); + + throw new Error(`Method not supported by ${metadata.name}`); + }, }; }; diff --git a/packages/nearfi/src/lib/nearfi.ts b/packages/nearfi/src/lib/nearfi.ts index b59355545..4eeb39d09 100644 --- a/packages/nearfi/src/lib/nearfi.ts +++ b/packages/nearfi/src/lib/nearfi.ts @@ -223,6 +223,17 @@ const NearFi: WalletBehaviourFactory = async ({ return res.response; }); }, + + async signMessage({ message, nonce, recipient, state }) { + logger.log("NearFi:signMessage", { + message, + nonce, + recipient, + state, + }); + + throw new Error(`Method not supported by ${metadata.name}`); + }, }; }; diff --git a/packages/neth/src/lib/neth.ts b/packages/neth/src/lib/neth.ts index 3bcce1445..239eaa486 100644 --- a/packages/neth/src/lib/neth.ts +++ b/packages/neth/src/lib/neth.ts @@ -176,6 +176,17 @@ const Neth: WalletBehaviourFactory = async ({ signAndSendTransactions: async ({ transactions }) => signTransactions(transactions), + + async signMessage({ message, nonce, recipient, state }) { + logger.log("Neth:signMessage", { + message, + nonce, + recipient, + state, + }); + + throw new Error(`Method not supported by ${metadata.name}`); + }, }; }; diff --git a/packages/nightly-connect/src/lib/nightly-connect.ts b/packages/nightly-connect/src/lib/nightly-connect.ts index 5285b1d23..e3191a999 100644 --- a/packages/nightly-connect/src/lib/nightly-connect.ts +++ b/packages/nightly-connect/src/lib/nightly-connect.ts @@ -270,6 +270,17 @@ const NightlyConnect: WalletBehaviourFactory< return results; }, + + async signMessage({ message, nonce, recipient, state }) { + logger.log("NightlyConnect:signMessage", { + message, + nonce, + recipient, + state, + }); + + throw new Error(`Method not supported by ${metadata.name}`); + }, }; }; diff --git a/packages/nightly/src/lib/nightly.ts b/packages/nightly/src/lib/nightly.ts index 3efcdd6f9..7212c041d 100644 --- a/packages/nightly/src/lib/nightly.ts +++ b/packages/nightly/src/lib/nightly.ts @@ -224,6 +224,17 @@ const Nightly: WalletBehaviourFactory = async ({ async importAccountsInSecureContext(params) { _state.wallet.importWalletsNear(params.accounts); }, + + async signMessage({ message, nonce, recipient, state }) { + logger.log("Nightly:signMessage", { + message, + nonce, + recipient, + state, + }); + + throw new Error(`Method not supported by ${metadata.name}`); + }, }; }; diff --git a/packages/opto-wallet/src/lib/opto-wallet.ts b/packages/opto-wallet/src/lib/opto-wallet.ts index 328ab7a02..dafbc35c0 100644 --- a/packages/opto-wallet/src/lib/opto-wallet.ts +++ b/packages/opto-wallet/src/lib/opto-wallet.ts @@ -227,6 +227,18 @@ const OptoWallet: WalletBehaviourFactory< callbackUrl, }); }, + + async signMessage({ message, nonce, recipient, callbackUrl, state }) { + logger.log("OptoWallet:signMessage", { + message, + nonce, + recipient, + callbackUrl, + state, + }); + + throw new Error(`Method not supported by ${metadata.name}`); + }, }; }; diff --git a/packages/sender/src/lib/sender.ts b/packages/sender/src/lib/sender.ts index b26126a4f..01b8dfc6b 100644 --- a/packages/sender/src/lib/sender.ts +++ b/packages/sender/src/lib/sender.ts @@ -298,6 +298,17 @@ const Sender: WalletBehaviourFactory = async ({ return res.response; }); }, + + async signMessage({ message, nonce, recipient, state }) { + logger.log("Sender:signMessage", { + message, + nonce, + recipient, + state, + }); + + throw new Error(`Method not supported by ${metadata.name}`); + }, }; }; diff --git a/packages/wallet-connect/src/lib/wallet-connect.ts b/packages/wallet-connect/src/lib/wallet-connect.ts index 7544326c9..2557a2c60 100644 --- a/packages/wallet-connect/src/lib/wallet-connect.ts +++ b/packages/wallet-connect/src/lib/wallet-connect.ts @@ -102,7 +102,16 @@ const setupWalletConnectState = async ( const WalletConnect: WalletBehaviourFactory< BridgeWallet, { params: WalletConnectExtraOptions } -> = async ({ id, options, store, params, provider, emitter, logger }) => { +> = async ({ + id, + options, + store, + params, + provider, + emitter, + logger, + metadata, +}) => { const _state = await setupWalletConnectState(id, params, emitter); const getChainId = () => { @@ -607,6 +616,17 @@ const WalletConnect: WalletBehaviourFactory< return results; } }, + + async signMessage({ message, nonce, recipient, state }) { + logger.log("WalletConnect:signMessage", { + message, + nonce, + recipient, + state, + }); + + throw new Error(`Method not supported by ${metadata.name}`); + }, }; }; diff --git a/packages/welldone-wallet/src/lib/welldone.ts b/packages/welldone-wallet/src/lib/welldone.ts index 35e514738..75e493175 100644 --- a/packages/welldone-wallet/src/lib/welldone.ts +++ b/packages/welldone-wallet/src/lib/welldone.ts @@ -54,6 +54,7 @@ const WelldoneWallet: WalletBehaviourFactory = async ({ logger, storage, provider, + metadata, }) => { const _state = await setupWalletState(storage); @@ -354,6 +355,17 @@ const WelldoneWallet: WalletBehaviourFactory = async ({ params: [params], }); }, + + async signMessage({ message, nonce, recipient, state }) { + logger.log("Welldone:signMessage", { + message, + nonce, + recipient, + state, + }); + + throw new Error(`Method not supported by ${metadata.name}`); + }, }; }; diff --git a/packages/xdefi/src/lib/xdefi.ts b/packages/xdefi/src/lib/xdefi.ts index 4a3b711e8..fd8ed91cc 100644 --- a/packages/xdefi/src/lib/xdefi.ts +++ b/packages/xdefi/src/lib/xdefi.ts @@ -146,6 +146,17 @@ const XDEFI: WalletBehaviourFactory = async ({ return result; }, + + async signMessage({ message, nonce, recipient, state }) { + logger.log("Xdefi:signMessage", { + message, + nonce, + recipient, + state, + }); + + throw new Error(`Method not supported by ${metadata.name}`); + }, }; }; From 5fc012447d3a23798a683cde24c152f24863c6cd Mon Sep 17 00:00:00 2001 From: Elabar Date: Tue, 25 Apr 2023 21:48:25 +0800 Subject: [PATCH 02/71] feat: implement sign message for meteor wallet --- package.json | 2 +- packages/core/docs/guides/custom-wallets.md | 5 +++++ packages/meteor-wallet/src/lib/meteor-wallet.ts | 16 ++++++++++++++-- yarn.lock | 8 ++++---- 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index ade4c8e81..96935d0d6 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@ledgerhq/hw-transport": "6.27.1", "@ledgerhq/hw-transport-webhid": "6.27.1", "@metamask/detect-provider": "^2.0.0", - "@meteorwallet/sdk": "^0.6.0", + "@meteorwallet/sdk": "^0.8.0", "@nightlylabs/connect-near": "0.0.15", "@walletconnect/sign-client": "2.5.2", "@web3modal/standalone": "^2.2.2", diff --git a/packages/core/docs/guides/custom-wallets.md b/packages/core/docs/guides/custom-wallets.md index 79b982833..a6ab6b0fa 100644 --- a/packages/core/docs/guides/custom-wallets.md +++ b/packages/core/docs/guides/custom-wallets.md @@ -149,3 +149,8 @@ Where you might have to construct NEAR Transactions and send them yourself, you This method is similar to `signAndSendTransaction` but instead sends a batch of Transactions. > Note: Exactly how this method should behave when transactions fail is still under review with no clear "right" way to do it. NEAR Wallet (website) seems to ignore any transactions that fail and continue executing the rest. Our approach attempts to execute the transactions in a series and bail if any fail (we will look to improve this in the future by implementing a retry feature). + +### `signMessage` + +This method allows users to sign a message for a specific recipient using their NEAR account. +Returns the `SignedMessage` based on the [NEP413](https://github.com/near/NEPs/pull/413). \ No newline at end of file diff --git a/packages/meteor-wallet/src/lib/meteor-wallet.ts b/packages/meteor-wallet/src/lib/meteor-wallet.ts index 541fce161..936f6b7b9 100644 --- a/packages/meteor-wallet/src/lib/meteor-wallet.ts +++ b/packages/meteor-wallet/src/lib/meteor-wallet.ts @@ -45,7 +45,7 @@ const setupWalletState = async ( const createMeteorWalletInjected: WalletBehaviourFactory< InjectedWallet, { params: MeteorWalletParams_Injected } -> = async ({ options, logger, store, params, metadata }) => { +> = async ({ options, logger, store, params }) => { const _state = await setupWalletState(params, options.network); const getAccounts = async (): Promise> => { @@ -169,7 +169,19 @@ const createMeteorWalletInjected: WalletBehaviourFactory< recipient, state, }); - throw new Error(`Method not supported by ${metadata.name}`); + const accountId = _state.wallet.getAccountId(); + const response = await _state.wallet.signMessage({ + message, + nonce, + recipient, + accountId, + state, + }); + if (response.success) { + return response.payload; + } else { + throw new Error(`Couldn't sign message owner: ${response.message}`); + } }, async signAndSendTransaction({ signerId, receiverId, actions }) { diff --git a/yarn.lock b/yarn.lock index e7f7ff083..babc26954 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2639,10 +2639,10 @@ resolved "https://registry.yarnpkg.com/@metamask/detect-provider/-/detect-provider-2.0.0.tgz#4bc2795e5e6f7d8b84b2e845058d2f222c99917d" integrity sha512-sFpN+TX13E9fdBDh9lvQeZdJn4qYoRb/6QF2oZZK/Pn559IhCFacPMU1rMuqyXoFQF3JSJfii2l98B87QDPeCQ== -"@meteorwallet/sdk@^0.6.0": - version "0.6.0" - resolved "https://registry.yarnpkg.com/@meteorwallet/sdk/-/sdk-0.6.0.tgz#006b77410a7874f0c9bfc0d693f199b561f39d19" - integrity sha512-oriaQ1gk1hpQx6V6BxsvUthDd0Bpmv3ho5Ap5pm9P0euEosWtFUVF1dTYndJE10qBG8yLW+EOOX1LZ8taXCiRA== +"@meteorwallet/sdk@^0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@meteorwallet/sdk/-/sdk-0.8.0.tgz#913732c1c5210a05e008a3aedc664b16c728f682" + integrity sha512-C0x9/20t+lCMUlKSPSAbPUWjz8Ls59NwWnz/qSJM5B4qCXN3OSCcrqmpbJpSVa2wCHFhK/HuOqaKlMCr0XsQ0w== dependencies: nanoid "3.3.4" query-string "^7.1.1" From b060ce02036413ce408b8718d6bb84187adbb75f Mon Sep 17 00:00:00 2001 From: Elabar Date: Wed, 26 Apr 2023 21:24:45 +0800 Subject: [PATCH 03/71] fix suggestions --- packages/core/docs/api/wallet.md | 2 +- packages/core/docs/guides/custom-wallets.md | 2 +- .../lib/helpers/verify-signature/payload.ts | 2 ++ .../verify-signature/verify-signature.ts | 31 +++++++++---------- .../verify-signature.types.ts | 3 +- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/core/docs/api/wallet.md b/packages/core/docs/api/wallet.md index 9ef8ff462..ff99b7cf9 100644 --- a/packages/core/docs/api/wallet.md +++ b/packages/core/docs/api/wallet.md @@ -309,7 +309,7 @@ Signs one or more transactions before sending to the network. The user must be s **Description** -Allows users to sign a message for a specific recipient using their NEAR account, based on the [NEP413](https://github.com/near/NEPs/pull/413). +Allows users to sign a message for a specific recipient using their NEAR account, based on the [NEP413](https://github.com/near/NEPs/blob/master/neps/nep-0413.md). **Example** diff --git a/packages/core/docs/guides/custom-wallets.md b/packages/core/docs/guides/custom-wallets.md index a6ab6b0fa..ee19670cc 100644 --- a/packages/core/docs/guides/custom-wallets.md +++ b/packages/core/docs/guides/custom-wallets.md @@ -153,4 +153,4 @@ This method is similar to `signAndSendTransaction` but instead sends a batch of ### `signMessage` This method allows users to sign a message for a specific recipient using their NEAR account. -Returns the `SignedMessage` based on the [NEP413](https://github.com/near/NEPs/pull/413). \ No newline at end of file +Returns the `SignedMessage` based on the [NEP413](https://github.com/near/NEPs/blob/master/neps/nep-0413.md). \ No newline at end of file diff --git a/packages/core/src/lib/helpers/verify-signature/payload.ts b/packages/core/src/lib/helpers/verify-signature/payload.ts index 86382dcb5..ebe1ce99a 100644 --- a/packages/core/src/lib/helpers/verify-signature/payload.ts +++ b/packages/core/src/lib/helpers/verify-signature/payload.ts @@ -8,6 +8,8 @@ export class Payload { callbackUrl?: string; constructor(data: SignMessageParams) { + // The tag's value is a hardcoded value as per + // defined in the NEP [NEP413](https://github.com/near/NEPs/blob/master/neps/nep-0413.md) this.tag = 2147484061; this.message = data.message; this.nonce = data.nonce; diff --git a/packages/core/src/lib/helpers/verify-signature/verify-signature.ts b/packages/core/src/lib/helpers/verify-signature/verify-signature.ts index d843f3247..745b83080 100644 --- a/packages/core/src/lib/helpers/verify-signature/verify-signature.ts +++ b/packages/core/src/lib/helpers/verify-signature/verify-signature.ts @@ -4,10 +4,10 @@ import { sha256 } from "js-sha256"; import type { VerifyFullKeyBelongsToUserParams, VerifySignatureParams, - FetchUserKeysParams, + ViewAccessKeyParams, } from "./verify-signature.types"; import { Payload, payloadSchema } from "./payload"; -import type { AccessKeyList } from "near-api-js/lib/providers/provider"; +import type { AccessKeyView } from "near-api-js/lib/providers/provider"; export const verifySignature = ({ publicKey, @@ -30,14 +30,16 @@ export const verifySignature = ({ const fetchAllUserKeys = async ({ accountId, network, -}: FetchUserKeysParams): Promise => { + publicKey, +}: ViewAccessKeyParams): Promise => { const provider = new providers.JsonRpcProvider({ url: network.nodeUrl }); - const keys = await provider.query({ - request_type: "view_access_key_list", + const key = await provider.query({ + request_type: "view_access_key", account_id: accountId, finality: "final", + public_key: publicKey, }); - return keys as AccessKeyList; + return key as AccessKeyView; }; export const verifyFullKeyBelongsToUser = async ({ @@ -45,16 +47,11 @@ export const verifyFullKeyBelongsToUser = async ({ accountId, network, }: VerifyFullKeyBelongsToUserParams) => { - const { keys } = await fetchAllUserKeys({ accountId, network }); - - if (!keys) { - return false; - } + const { permission } = await fetchAllUserKeys({ + accountId, + network, + publicKey, + }); - for (const k in keys) { - if (keys[k].public_key === publicKey) { - return keys[k].access_key.permission === "FullAccess"; - } - } - return false; + return permission === "FullAccess"; }; diff --git a/packages/core/src/lib/helpers/verify-signature/verify-signature.types.ts b/packages/core/src/lib/helpers/verify-signature/verify-signature.types.ts index 5b1f34f49..bb8ac26b9 100644 --- a/packages/core/src/lib/helpers/verify-signature/verify-signature.types.ts +++ b/packages/core/src/lib/helpers/verify-signature/verify-signature.types.ts @@ -15,7 +15,8 @@ export interface VerifyFullKeyBelongsToUserParams { network: Network; } -export interface FetchUserKeysParams { +export interface ViewAccessKeyParams { accountId: string; network: Network; + publicKey: string; } From f2ab26cb5734961051c3ea24edb4ba73e48b9296 Mon Sep 17 00:00:00 2001 From: Chacha Date: Mon, 24 Jul 2023 10:29:24 +0800 Subject: [PATCH 04/71] feat: Initial implementation of importAccountsInSecureContext on Sender Wallet --- packages/sender/src/lib/injected-sender.ts | 7 +++++++ packages/sender/src/lib/sender.spec.ts | 23 ++++++++++++++++++++++ packages/sender/src/lib/sender.ts | 9 +++++++++ 3 files changed, 39 insertions(+) diff --git a/packages/sender/src/lib/injected-sender.ts b/packages/sender/src/lib/injected-sender.ts index a4f2f8cbc..66cfa455a 100644 --- a/packages/sender/src/lib/injected-sender.ts +++ b/packages/sender/src/lib/injected-sender.ts @@ -2,6 +2,7 @@ // Empty string if we haven't signed in before. import type { Account, providers } from "near-api-js"; +import type { AccountImportData } from "@near-wallet-selector/core"; export interface AccessKey { publicKey: { @@ -119,6 +120,11 @@ export interface SenderEvents { rpcChanged: (response: RpcChangedResponse) => void; } +export interface batchImportParams { + keystore: Array; + network: string; +} + export interface InjectedSender { isSender: boolean; callbacks: Record; @@ -143,4 +149,5 @@ export interface InjectedSender { requestSignTransactions: ( params: RequestSignTransactionsParams ) => Promise; + batchImport: (params: batchImportParams) => void; } diff --git a/packages/sender/src/lib/sender.spec.ts b/packages/sender/src/lib/sender.spec.ts index 2af7b65de..b72840e63 100644 --- a/packages/sender/src/lib/sender.spec.ts +++ b/packages/sender/src/lib/sender.spec.ts @@ -67,6 +67,7 @@ const mockSenderOnWindow = () => { ), }) ), + batchImport: jest.fn(), }; return window.near; @@ -134,6 +135,7 @@ describe("signAndSendTransaction", () => { expect(injectedSender.signAndSendTransaction).toHaveBeenCalled(); }); }); + describe("signAndSendTransactions", () => { it("sign transactions in sender", async () => { const { wallet, injectedSender } = await createSenderWallet(); @@ -147,3 +149,24 @@ describe("signAndSendTransactions", () => { expect(result.length).toEqual(transactions.length); }); }); + +describe("importAccountsInSecureContext", () => { + it("returns import url", async () => { + const { wallet } = await createSenderWallet(); + + expect(typeof wallet.importAccountsInSecureContext).toBe("function"); + + const accountsData = [ + { accountId: "test.testnet", privateKey: "ed25519:test" }, + ]; + + if (wallet.importAccountsInSecureContext) { + await wallet.importAccountsInSecureContext({ accounts: accountsData }); + // @ts-ignore + expect(window.near.batchImport).toHaveBeenCalledWith({ + keystore: accountsData, + network: "testnet", + }); + } + }); +}); diff --git a/packages/sender/src/lib/sender.ts b/packages/sender/src/lib/sender.ts index b26126a4f..f1b8179e6 100644 --- a/packages/sender/src/lib/sender.ts +++ b/packages/sender/src/lib/sender.ts @@ -298,6 +298,15 @@ const Sender: WalletBehaviourFactory = async ({ return res.response; }); }, + + async importAccountsInSecureContext({ accounts }) { + if (window.near && window.near.isSender) { + window.near.batchImport({ + keystore: accounts, + network: options.network.networkId, + }); + } + }, }; }; From cf9e84227f268c514fd99fea24a30aa692adaba3 Mon Sep 17 00:00:00 2001 From: Chacha Date: Mon, 24 Jul 2023 18:54:17 +0800 Subject: [PATCH 05/71] feat: add importAccountsInSecureContext implementation for sender wallet --- packages/sender/src/lib/injected-sender.ts | 2 +- packages/sender/src/lib/sender.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/sender/src/lib/injected-sender.ts b/packages/sender/src/lib/injected-sender.ts index 66cfa455a..4b6060807 100644 --- a/packages/sender/src/lib/injected-sender.ts +++ b/packages/sender/src/lib/injected-sender.ts @@ -149,5 +149,5 @@ export interface InjectedSender { requestSignTransactions: ( params: RequestSignTransactionsParams ) => Promise; - batchImport: (params: batchImportParams) => void; + batchImport: (params: batchImportParams) => Promise; } diff --git a/packages/sender/src/lib/sender.ts b/packages/sender/src/lib/sender.ts index f1b8179e6..15cae127b 100644 --- a/packages/sender/src/lib/sender.ts +++ b/packages/sender/src/lib/sender.ts @@ -301,7 +301,7 @@ const Sender: WalletBehaviourFactory = async ({ async importAccountsInSecureContext({ accounts }) { if (window.near && window.near.isSender) { - window.near.batchImport({ + await window.near.batchImport({ keystore: accounts, network: options.network.networkId, }); From da4c7b03df830f7deafa33f1a84906417e3cf0a6 Mon Sep 17 00:00:00 2001 From: Erdit Kurteshi Date: Thu, 27 Jul 2023 13:22:41 +0200 Subject: [PATCH 06/71] added build step in bump-version workflow --- .github/workflows/bump-version.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 31edc1aa3..d7fc5ef47 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -42,6 +42,9 @@ jobs: if: github.ref == 'refs/heads/main' run: echo "GIT_TAG=$(git describe --exact-match --tags $(git log -n1 --pretty='%h') 2> /dev/null)" >> $GITHUB_ENV + - name: Run Build All + run: yarn build:all + - name: Deploy run: yarn nx run-many --target=deploy --all --exclude=$EXAMPLE_APPS --dry-run env: From 016e1ad6299e5b2b40a3b3c75cdba4ba68dd1bc9 Mon Sep 17 00:00:00 2001 From: Kujtim Prenku Date: Fri, 28 Jul 2023 08:40:14 +0200 Subject: [PATCH 07/71] Make signMessage optional. --- packages/core/src/lib/wallet/wallet.types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/lib/wallet/wallet.types.ts b/packages/core/src/lib/wallet/wallet.types.ts index 7d65d73f4..4186d51f5 100644 --- a/packages/core/src/lib/wallet/wallet.types.ts +++ b/packages/core/src/lib/wallet/wallet.types.ts @@ -80,7 +80,7 @@ interface BaseWalletBehaviour { signAndSendTransactions( params: SignAndSendTransactionsParams ): Promise>; - signMessage(params: SignMessageParams): Promise; + signMessage?(params: SignMessageParams): Promise; } type BaseWallet< From 6c8898c69cee7dbeb7a046c2861a93326e821d95 Mon Sep 17 00:00:00 2001 From: Kujtim Prenku Date: Fri, 28 Jul 2023 08:42:34 +0200 Subject: [PATCH 08/71] Decorate modules to throw consistent error message when signMessage is not implemented. --- .../services/wallet-modules/wallet-modules.service.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/core/src/lib/services/wallet-modules/wallet-modules.service.ts b/packages/core/src/lib/services/wallet-modules/wallet-modules.service.ts index a67958802..6739ec81a 100644 --- a/packages/core/src/lib/services/wallet-modules/wallet-modules.service.ts +++ b/packages/core/src/lib/services/wallet-modules/wallet-modules.service.ts @@ -256,6 +256,7 @@ export class WalletModules { private decorateWallet(wallet: Wallet): Wallet { const _signIn = wallet.signIn; const _signOut = wallet.signOut; + const _signMessage = wallet.signMessage; wallet.signIn = async (params: never) => { const accounts = await _signIn(params); @@ -275,6 +276,16 @@ export class WalletModules { this.onWalletSignedOut(wallet.id); }; + wallet.signMessage = async (params: never) => { + if (_signMessage === undefined) { + throw Error( + `The signMessage method is not supported by ${wallet.metadata.name}` + ); + } + + return _signMessage(params); + }; + return wallet; } From a63dcb4d181c7a41cab83b402b2909aa57c3ec00 Mon Sep 17 00:00:00 2001 From: Kujtim Prenku Date: Fri, 28 Jul 2023 08:53:39 +0200 Subject: [PATCH 09/71] Remove signMessage from wallets that do not support it yet. --- packages/coin98-wallet/src/lib/coin98-wallet.ts | 12 ------------ packages/finer-wallet/src/lib/finer-injected.ts | 11 ----------- packages/ledger/src/lib/ledger.ts | 11 ----------- packages/math-wallet/src/lib/math-wallet.ts | 11 ----------- packages/my-near-wallet/src/lib/my-near-wallet.ts | 12 ------------ packages/narwallets/src/lib/narwallets.ts | 11 ----------- packages/near-snap/src/lib/near-snap.ts | 12 ------------ packages/nearfi/src/lib/nearfi.ts | 11 ----------- packages/neth/src/lib/neth.ts | 11 ----------- packages/nightly-connect/src/lib/nightly-connect.ts | 11 ----------- packages/nightly/src/lib/nightly.ts | 11 ----------- packages/opto-wallet/src/lib/opto-wallet.ts | 12 ------------ packages/sender/src/lib/sender.ts | 11 ----------- packages/wallet-connect/src/lib/wallet-connect.ts | 11 ----------- packages/welldone-wallet/src/lib/welldone.ts | 11 ----------- packages/xdefi/src/lib/xdefi.ts | 11 ----------- 16 files changed, 180 deletions(-) diff --git a/packages/coin98-wallet/src/lib/coin98-wallet.ts b/packages/coin98-wallet/src/lib/coin98-wallet.ts index 688a0cf56..a8c7cf0f0 100644 --- a/packages/coin98-wallet/src/lib/coin98-wallet.ts +++ b/packages/coin98-wallet/src/lib/coin98-wallet.ts @@ -182,18 +182,6 @@ const Coin98Wallet: WalletBehaviourFactory = async ({ return results; }, - - async signMessage({ message, nonce, recipient, callbackUrl, state }) { - logger.log("Coin98Wallet:signMessage", { - message, - nonce, - recipient, - callbackUrl, - state, - }); - - throw new Error(`Method not supported by ${metadata.name}`); - }, }; }; diff --git a/packages/finer-wallet/src/lib/finer-injected.ts b/packages/finer-wallet/src/lib/finer-injected.ts index 179201501..18af66942 100644 --- a/packages/finer-wallet/src/lib/finer-injected.ts +++ b/packages/finer-wallet/src/lib/finer-injected.ts @@ -279,17 +279,6 @@ const FinerExtension: WalletBehaviourFactory = async ({ return res.response; }); }, - - async signMessage({ message, nonce, recipient, state }) { - logger.log("FinerWallet:signMessage", { - message, - nonce, - recipient, - state, - }); - - throw new Error(`Method not supported by ${metadata.name}`); - }, }; }; diff --git a/packages/ledger/src/lib/ledger.ts b/packages/ledger/src/lib/ledger.ts index 8b512fc18..69fb7b86a 100644 --- a/packages/ledger/src/lib/ledger.ts +++ b/packages/ledger/src/lib/ledger.ts @@ -276,17 +276,6 @@ const Ledger: WalletBehaviourFactory = async ({ return await _state.client.getPublicKey({ derivationPath }); }, - - async signMessage({ message, nonce, recipient, state }) { - logger.log("Ledger:signMessage", { - message, - nonce, - recipient, - state, - }); - - throw new Error(`Method not supported by ${metadata.name}`); - }, }; }; diff --git a/packages/math-wallet/src/lib/math-wallet.ts b/packages/math-wallet/src/lib/math-wallet.ts index 657ad25d1..5dc75e7d0 100644 --- a/packages/math-wallet/src/lib/math-wallet.ts +++ b/packages/math-wallet/src/lib/math-wallet.ts @@ -181,17 +181,6 @@ const MathWallet: WalletBehaviourFactory = async ({ return results; }, - - async signMessage({ message, nonce, recipient, state }) { - logger.log("MathWallet:signMessage", { - message, - nonce, - recipient, - state, - }); - - throw new Error(`Method not supported by ${metadata.name}`); - }, }; }; diff --git a/packages/my-near-wallet/src/lib/my-near-wallet.ts b/packages/my-near-wallet/src/lib/my-near-wallet.ts index d4de20c4e..ef2d8d7c2 100644 --- a/packages/my-near-wallet/src/lib/my-near-wallet.ts +++ b/packages/my-near-wallet/src/lib/my-near-wallet.ts @@ -224,18 +224,6 @@ const MyNearWallet: WalletBehaviourFactory< }); }, - async signMessage({ message, nonce, recipient, callbackUrl, state }) { - logger.log("MyNearWallet:signMessage", { - message, - nonce, - recipient, - callbackUrl, - state, - }); - - throw new Error(`Method not supported by ${metadata.name}`); - }, - buildImportAccountsUrl() { return `${params.walletUrl}/batch-import`; }, diff --git a/packages/narwallets/src/lib/narwallets.ts b/packages/narwallets/src/lib/narwallets.ts index 978b14bfe..cfae7bdec 100644 --- a/packages/narwallets/src/lib/narwallets.ts +++ b/packages/narwallets/src/lib/narwallets.ts @@ -263,17 +263,6 @@ const Narwallets: WalletBehaviourFactory = async ({ Array >; }, - - async signMessage({ message, nonce, recipient, state }) { - logger.log("NarWallet:signMessage", { - message, - nonce, - recipient, - state, - }); - - throw new Error(`Method not supported by ${metadata.name}`); - }, }; }; diff --git a/packages/near-snap/src/lib/near-snap.ts b/packages/near-snap/src/lib/near-snap.ts index 0fdffdb52..23b595ea3 100644 --- a/packages/near-snap/src/lib/near-snap.ts +++ b/packages/near-snap/src/lib/near-snap.ts @@ -15,7 +15,6 @@ const NearSnapWallet: WalletBehaviourFactory = async ({ provider, store, metadata, - logger, }) => { const network = options.network.networkId as "testnet" | "mainnet"; @@ -80,17 +79,6 @@ const NearSnapWallet: WalletBehaviourFactory = async ({ return Promise.all(signedTxs.map((tx) => provider.sendTransaction(tx))); }, - - async signMessage({ message, nonce, recipient, state }) { - logger.log("NearSnap:signMessage", { - message, - nonce, - recipient, - state, - }); - - throw new Error(`Method not supported by ${metadata.name}`); - }, }; }; diff --git a/packages/nearfi/src/lib/nearfi.ts b/packages/nearfi/src/lib/nearfi.ts index 4eeb39d09..b59355545 100644 --- a/packages/nearfi/src/lib/nearfi.ts +++ b/packages/nearfi/src/lib/nearfi.ts @@ -223,17 +223,6 @@ const NearFi: WalletBehaviourFactory = async ({ return res.response; }); }, - - async signMessage({ message, nonce, recipient, state }) { - logger.log("NearFi:signMessage", { - message, - nonce, - recipient, - state, - }); - - throw new Error(`Method not supported by ${metadata.name}`); - }, }; }; diff --git a/packages/neth/src/lib/neth.ts b/packages/neth/src/lib/neth.ts index 239eaa486..3bcce1445 100644 --- a/packages/neth/src/lib/neth.ts +++ b/packages/neth/src/lib/neth.ts @@ -176,17 +176,6 @@ const Neth: WalletBehaviourFactory = async ({ signAndSendTransactions: async ({ transactions }) => signTransactions(transactions), - - async signMessage({ message, nonce, recipient, state }) { - logger.log("Neth:signMessage", { - message, - nonce, - recipient, - state, - }); - - throw new Error(`Method not supported by ${metadata.name}`); - }, }; }; diff --git a/packages/nightly-connect/src/lib/nightly-connect.ts b/packages/nightly-connect/src/lib/nightly-connect.ts index e3191a999..5285b1d23 100644 --- a/packages/nightly-connect/src/lib/nightly-connect.ts +++ b/packages/nightly-connect/src/lib/nightly-connect.ts @@ -270,17 +270,6 @@ const NightlyConnect: WalletBehaviourFactory< return results; }, - - async signMessage({ message, nonce, recipient, state }) { - logger.log("NightlyConnect:signMessage", { - message, - nonce, - recipient, - state, - }); - - throw new Error(`Method not supported by ${metadata.name}`); - }, }; }; diff --git a/packages/nightly/src/lib/nightly.ts b/packages/nightly/src/lib/nightly.ts index 7212c041d..3efcdd6f9 100644 --- a/packages/nightly/src/lib/nightly.ts +++ b/packages/nightly/src/lib/nightly.ts @@ -224,17 +224,6 @@ const Nightly: WalletBehaviourFactory = async ({ async importAccountsInSecureContext(params) { _state.wallet.importWalletsNear(params.accounts); }, - - async signMessage({ message, nonce, recipient, state }) { - logger.log("Nightly:signMessage", { - message, - nonce, - recipient, - state, - }); - - throw new Error(`Method not supported by ${metadata.name}`); - }, }; }; diff --git a/packages/opto-wallet/src/lib/opto-wallet.ts b/packages/opto-wallet/src/lib/opto-wallet.ts index dafbc35c0..328ab7a02 100644 --- a/packages/opto-wallet/src/lib/opto-wallet.ts +++ b/packages/opto-wallet/src/lib/opto-wallet.ts @@ -227,18 +227,6 @@ const OptoWallet: WalletBehaviourFactory< callbackUrl, }); }, - - async signMessage({ message, nonce, recipient, callbackUrl, state }) { - logger.log("OptoWallet:signMessage", { - message, - nonce, - recipient, - callbackUrl, - state, - }); - - throw new Error(`Method not supported by ${metadata.name}`); - }, }; }; diff --git a/packages/sender/src/lib/sender.ts b/packages/sender/src/lib/sender.ts index 01b8dfc6b..b26126a4f 100644 --- a/packages/sender/src/lib/sender.ts +++ b/packages/sender/src/lib/sender.ts @@ -298,17 +298,6 @@ const Sender: WalletBehaviourFactory = async ({ return res.response; }); }, - - async signMessage({ message, nonce, recipient, state }) { - logger.log("Sender:signMessage", { - message, - nonce, - recipient, - state, - }); - - throw new Error(`Method not supported by ${metadata.name}`); - }, }; }; diff --git a/packages/wallet-connect/src/lib/wallet-connect.ts b/packages/wallet-connect/src/lib/wallet-connect.ts index 2557a2c60..42393f950 100644 --- a/packages/wallet-connect/src/lib/wallet-connect.ts +++ b/packages/wallet-connect/src/lib/wallet-connect.ts @@ -616,17 +616,6 @@ const WalletConnect: WalletBehaviourFactory< return results; } }, - - async signMessage({ message, nonce, recipient, state }) { - logger.log("WalletConnect:signMessage", { - message, - nonce, - recipient, - state, - }); - - throw new Error(`Method not supported by ${metadata.name}`); - }, }; }; diff --git a/packages/welldone-wallet/src/lib/welldone.ts b/packages/welldone-wallet/src/lib/welldone.ts index 75e493175..86670a75d 100644 --- a/packages/welldone-wallet/src/lib/welldone.ts +++ b/packages/welldone-wallet/src/lib/welldone.ts @@ -355,17 +355,6 @@ const WelldoneWallet: WalletBehaviourFactory = async ({ params: [params], }); }, - - async signMessage({ message, nonce, recipient, state }) { - logger.log("Welldone:signMessage", { - message, - nonce, - recipient, - state, - }); - - throw new Error(`Method not supported by ${metadata.name}`); - }, }; }; diff --git a/packages/xdefi/src/lib/xdefi.ts b/packages/xdefi/src/lib/xdefi.ts index fd8ed91cc..4a3b711e8 100644 --- a/packages/xdefi/src/lib/xdefi.ts +++ b/packages/xdefi/src/lib/xdefi.ts @@ -146,17 +146,6 @@ const XDEFI: WalletBehaviourFactory = async ({ return result; }, - - async signMessage({ message, nonce, recipient, state }) { - logger.log("Xdefi:signMessage", { - message, - nonce, - recipient, - state, - }); - - throw new Error(`Method not supported by ${metadata.name}`); - }, }; }; From cb8de7ec811ac15d3d8f1e546a920f4046dbc22c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Aug 2023 08:52:24 +0000 Subject: [PATCH 10/71] Bump @ledgerhq/hw-transport from 6.28.5 to 6.28.6 Bumps [@ledgerhq/hw-transport](https://github.com/LedgerHQ/ledger-live) from 6.28.5 to 6.28.6. - [Release notes](https://github.com/LedgerHQ/ledger-live/releases) - [Commits](https://github.com/LedgerHQ/ledger-live/compare/@ledgerhq/hw-transport@6.28.5...@ledgerhq/hw-transport@6.28.6) --- updated-dependencies: - dependency-name: "@ledgerhq/hw-transport" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index c750f8877..2a85ba35c 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "@angular/router": "15.2.9", "@here-wallet/core": "^1.4.3", "@jscutlery/semver": "^2.30.1", - "@ledgerhq/hw-transport": "6.28.5", + "@ledgerhq/hw-transport": "6.28.6", "@ledgerhq/hw-transport-webhid": "6.27.16", "@metamask/detect-provider": "^2.0.0", "@meteorwallet/sdk": "^0.8.0", diff --git a/yarn.lock b/yarn.lock index 3e2df99ec..d7f2956a2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2923,20 +2923,20 @@ dependencies: lodash "^4.17.21" -"@ledgerhq/devices@^8.0.4": - version "8.0.4" - resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-8.0.4.tgz#ebc7779adbbec2d046424603a481623eb3fbe306" - integrity sha512-dxOiWZmtEv1tgw70+rW8gviCRZUeGDUnxY6HUPiRqTAc0Ts2AXxiJChgAsPvIywWTGW+S67Nxq1oTZdpRbdt+A== +"@ledgerhq/devices@^8.0.4", "@ledgerhq/devices@^8.0.5": + version "8.0.5" + resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-8.0.5.tgz#2c9b7bb3f8497795851b24c7ffd08c1261cd0783" + integrity sha512-Cy4LOfcYhYGWLd2nRA/CY/AneJT+Q3RyNwzoRx28gqAN21vF3+IZtL0jqs1n78rZ2bTEHyBS1GMOX13s5Y+O4g== dependencies: - "@ledgerhq/errors" "^6.12.7" + "@ledgerhq/errors" "^6.13.0" "@ledgerhq/logs" "^6.10.1" rxjs "6" semver "^7.3.5" -"@ledgerhq/errors@^6.12.7": - version "6.12.7" - resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.12.7.tgz#c7b630488d5713bc7b1e1682d6ab5d08918c69f1" - integrity sha512-1BpjzFErPK7qPFx0oItcX0mNLJMplVAm2Dpl5urZlubewnTyyw5sahIBjU+8LLCWJ2eGEh/0wyvh0jMtR0n2Mg== +"@ledgerhq/errors@^6.12.7", "@ledgerhq/errors@^6.13.0": + version "6.13.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.13.0.tgz#f6d335d6f5c4267a1a8b20668df956a99dfb23ad" + integrity sha512-cMFNX2AN6Gdj4RVIizI/7vWb+JYRu5na0rQSjybf7xGW5MSVdFVRcOg90VvqnDRsNfgFBbJzhpf7o4D7S3yFgg== "@ledgerhq/hw-transport-webhid@6.27.16": version "6.27.16" @@ -2948,13 +2948,13 @@ "@ledgerhq/hw-transport" "^6.28.5" "@ledgerhq/logs" "^6.10.1" -"@ledgerhq/hw-transport@6.28.5", "@ledgerhq/hw-transport@^6.28.5": - version "6.28.5" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-6.28.5.tgz#675193be2f695a596068145351da598316c25831" - integrity sha512-xmw5RhYbqExBBqTvOnOjN/RYNIGMBxFJ+zcYNfkfw/E+uEY3L7xq8Z7sC/n7URTT6xtEctElqduBJnBQE4OQtw== +"@ledgerhq/hw-transport@6.28.6", "@ledgerhq/hw-transport@^6.28.5": + version "6.28.6" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-6.28.6.tgz#bbbddbfc95b1bae874c4a5ef6498a7dfe68a9359" + integrity sha512-0VVB4jIG6ZTRtHusI5kO2jPcc1yFQ+iIcNKiTaaBHytsdGjTfhipje+W4vxo+nCdOKdrkOqB80GwykmKuNNXyA== dependencies: - "@ledgerhq/devices" "^8.0.4" - "@ledgerhq/errors" "^6.12.7" + "@ledgerhq/devices" "^8.0.5" + "@ledgerhq/errors" "^6.13.0" events "^3.3.0" "@ledgerhq/logs@^6.10.1": From 5dabad9f6ec2c5688b04b0f4b26ffefdc91a01eb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Aug 2023 08:53:27 +0000 Subject: [PATCH 11/71] Bump @walletconnect/sign-client from 2.8.6 to 2.9.1 Bumps [@walletconnect/sign-client](https://github.com/walletconnect/walletconnect-monorepo) from 2.8.6 to 2.9.1. - [Release notes](https://github.com/walletconnect/walletconnect-monorepo/releases) - [Commits](https://github.com/walletconnect/walletconnect-monorepo/compare/2.8.6...2.9.1) --- updated-dependencies: - dependency-name: "@walletconnect/sign-client" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 58 +++++++++++++++++++++++++++++++--------------------- 2 files changed, 36 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index c750f8877..da63f30c4 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "@metamask/detect-provider": "^2.0.0", "@meteorwallet/sdk": "^0.8.0", "@nightlylabs/connect-near": "0.0.15", - "@walletconnect/sign-client": "2.8.6", + "@walletconnect/sign-client": "2.9.1", "@walletconnect/modal": "^2.6.0", "better-sqlite3": "^8.4.0", "big.js": "^6.1.1", diff --git a/yarn.lock b/yarn.lock index 3e2df99ec..062bcce97 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5366,24 +5366,24 @@ "@typescript-eslint/types" "5.60.0" eslint-visitor-keys "^3.3.0" -"@walletconnect/core@2.8.6": - version "2.8.6" - resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.8.6.tgz#1db6acae36437dbe7357be7767f1faeda5d4ca6c" - integrity sha512-rnSqm1KJLcww/v6+UH8JeibQkJ3EKgyUDPfEK0stSEkrIUIcXaFlq3Et8S+vgV8bPhI0MVUhAhFL5OJZ3t2ryg== +"@walletconnect/core@2.9.1": + version "2.9.1" + resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.9.1.tgz#1a333933750f5f933d9b7788a8dae44ce1173063" + integrity sha512-xyWeP0eLhEEDQAVJSmqs4n/AClKUM+8os2ZFe7BTuw1tFYjeLNVDtKCHziVOSTh8wEChMsKSGKA4zerQoH8mAQ== dependencies: "@walletconnect/heartbeat" "1.2.1" "@walletconnect/jsonrpc-provider" "1.0.13" "@walletconnect/jsonrpc-types" "1.0.3" "@walletconnect/jsonrpc-utils" "1.0.8" - "@walletconnect/jsonrpc-ws-connection" "^1.0.11" + "@walletconnect/jsonrpc-ws-connection" "1.0.13" "@walletconnect/keyvaluestorage" "^1.0.2" "@walletconnect/logger" "^2.0.1" "@walletconnect/relay-api" "^1.0.9" "@walletconnect/relay-auth" "^1.0.4" "@walletconnect/safe-json" "^1.0.2" "@walletconnect/time" "^1.0.2" - "@walletconnect/types" "2.8.6" - "@walletconnect/utils" "2.8.6" + "@walletconnect/types" "2.9.1" + "@walletconnect/utils" "2.9.1" events "^3.3.0" lodash.isequal "4.5.0" uint8arrays "^3.1.0" @@ -5446,10 +5446,10 @@ "@walletconnect/jsonrpc-types" "^1.0.3" tslib "1.14.1" -"@walletconnect/jsonrpc-ws-connection@^1.0.11": - version "1.0.11" - resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.11.tgz#1ce59d86f273d576ca73385961303ebd44dd923f" - integrity sha512-TiFJ6saasKXD+PwGkm5ZGSw0837nc6EeFmurSPgIT/NofnOV4Tv7CVJqGQN0rQYoJUSYu21cwHNYaFkzNpUN+w== +"@walletconnect/jsonrpc-ws-connection@1.0.13": + version "1.0.13" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.13.tgz#23b0cdd899801bfbb44a6556936ec2b93ef2adf4" + integrity sha512-mfOM7uFH4lGtQxG+XklYuFBj6dwVvseTt5/ahOkkmpcAEgz2umuzu7fTR+h5EmjQBdrmYyEBOWADbeaFNxdySg== dependencies: "@walletconnect/jsonrpc-utils" "^1.0.6" "@walletconnect/safe-json" "^1.0.2" @@ -5532,19 +5532,19 @@ dependencies: tslib "1.14.1" -"@walletconnect/sign-client@2.8.6": - version "2.8.6" - resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.8.6.tgz#7c83fa769d0403efd05172c72bd6b5f678e67a69" - integrity sha512-rOFTKTHP7oJfXgYHX7+SdB8VbcsEE3ZFG/bMdmZboWaBim1mrY3vUyDdKrNr0VgI3AwBiEQezQDfKxBX0pMSQQ== +"@walletconnect/sign-client@2.9.1": + version "2.9.1" + resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.9.1.tgz#e4aa9c7b15849f450fdd1b03754a7517cb5c8811" + integrity sha512-Z7tFRrJ9btA1vU427vsjUS6cPlHQVcTWdKH90khEc2lv3dB6mU8FNO0VJsw+I2D7CW7WaMWF3nnj6Z1FfotbDg== dependencies: - "@walletconnect/core" "2.8.6" + "@walletconnect/core" "2.9.1" "@walletconnect/events" "^1.0.1" "@walletconnect/heartbeat" "1.2.1" "@walletconnect/jsonrpc-utils" "1.0.8" "@walletconnect/logger" "^2.0.1" "@walletconnect/time" "^1.0.2" - "@walletconnect/types" "2.8.6" - "@walletconnect/utils" "2.8.6" + "@walletconnect/types" "2.9.1" + "@walletconnect/utils" "2.9.1" events "^3.3.0" "@walletconnect/time@^1.0.2": @@ -5566,10 +5566,22 @@ "@walletconnect/logger" "^2.0.1" events "^3.3.0" -"@walletconnect/utils@2.8.6": - version "2.8.6" - resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.8.6.tgz#8a4f6b19525e33822f8da1aa94c4eef21482eeda" - integrity sha512-wcy6e5+COYo7tfNnW8YqidnATdJDIW6vDiWWE7A1F78Sl/VflkaevB9cIgyn8eLdxC1SxXgGoeC2oLP90nnHJg== +"@walletconnect/types@2.9.1": + version "2.9.1" + resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.9.1.tgz#cb32ff396cc8880a7395f28716d1e82f407e1372" + integrity sha512-xbGgTPuD6xsb7YMvCESBIH55cjB86QAnnVL50a/ED42YkQzDsOdJ0VGTbrm0tG5cxUOF933rpxZQjxGdP+ovww== + dependencies: + "@walletconnect/events" "^1.0.1" + "@walletconnect/heartbeat" "1.2.1" + "@walletconnect/jsonrpc-types" "1.0.3" + "@walletconnect/keyvaluestorage" "^1.0.2" + "@walletconnect/logger" "^2.0.1" + events "^3.3.0" + +"@walletconnect/utils@2.9.1": + version "2.9.1" + resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.9.1.tgz#92abc24b3af3ead42a3864e019dbf2f651ab2e47" + integrity sha512-tXeQVebF5oPBvhdmuUyVSkSIBYx/egIi4czav1QrnUpwrUS1LsrFhyWBxSbhN7TXY287ULWkEf6aFpWOHdp5EA== dependencies: "@stablelib/chacha20poly1305" "1.0.1" "@stablelib/hkdf" "1.0.1" @@ -5579,7 +5591,7 @@ "@walletconnect/relay-api" "^1.0.9" "@walletconnect/safe-json" "^1.0.2" "@walletconnect/time" "^1.0.2" - "@walletconnect/types" "2.8.6" + "@walletconnect/types" "2.9.1" "@walletconnect/window-getters" "^1.0.1" "@walletconnect/window-metadata" "^1.0.1" detect-browser "5.3.0" From 9c7bf3a56b846b41a22127cd488e27f673d9b996 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Aug 2023 08:53:51 +0000 Subject: [PATCH 12/71] Bump tslib from 2.6.0 to 2.6.1 Bumps [tslib](https://github.com/Microsoft/tslib) from 2.6.0 to 2.6.1. - [Release notes](https://github.com/Microsoft/tslib/releases) - [Commits](https://github.com/Microsoft/tslib/compare/2.6.0...v2.6.1) --- updated-dependencies: - dependency-name: tslib dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index c750f8877..203a7e309 100644 --- a/package.json +++ b/package.json @@ -115,7 +115,7 @@ "rxjs": "^7.8.1", "stream-browserify": "^3.0.0", "stream-http": "^3.2.0", - "tslib": "^2.6.0", + "tslib": "^2.6.1", "tweetnacl": "^1.0.3", "tweetnacl-util": "^0.15.1", "url": "^0.11.0", diff --git a/yarn.lock b/yarn.lock index 3e2df99ec..099d73f9b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17360,10 +17360,10 @@ tslib@2.5.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== -tslib@^2.1.0, tslib@^2.3.0, tslib@^2.3.1, tslib@^2.4.0, tslib@^2.5.0, tslib@^2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.0.tgz#b295854684dbda164e181d259a22cd779dcd7bc3" - integrity sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA== +tslib@^2.1.0, tslib@^2.3.0, tslib@^2.3.1, tslib@^2.4.0, tslib@^2.5.0, tslib@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.1.tgz#fd8c9a0ff42590b25703c0acb3de3d3f4ede0410" + integrity sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig== tsutils@^3.21.0: version "3.21.0" From 22f77863aa5dd2b75aab7e1fe5f15fed03f1f392 Mon Sep 17 00:00:00 2001 From: Kujtim Prenku Date: Tue, 1 Aug 2023 11:15:44 +0200 Subject: [PATCH 13/71] Add await to _signMessage --- .../src/lib/services/wallet-modules/wallet-modules.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/lib/services/wallet-modules/wallet-modules.service.ts b/packages/core/src/lib/services/wallet-modules/wallet-modules.service.ts index 6739ec81a..382bf51e1 100644 --- a/packages/core/src/lib/services/wallet-modules/wallet-modules.service.ts +++ b/packages/core/src/lib/services/wallet-modules/wallet-modules.service.ts @@ -283,7 +283,7 @@ export class WalletModules { ); } - return _signMessage(params); + return await _signMessage(params); }; return wallet; From f435f8ed28a951a4fc8a21b3d9eafbc9bc5df328 Mon Sep 17 00:00:00 2001 From: Erdit Kurteshi Date: Tue, 1 Aug 2023 14:03:23 +0200 Subject: [PATCH 14/71] deleted deploy script from default wallets --- packages/default-wallets/project.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/default-wallets/project.json b/packages/default-wallets/project.json index d573a172f..fb118bee7 100644 --- a/packages/default-wallets/project.json +++ b/packages/default-wallets/project.json @@ -58,12 +58,6 @@ "jestConfig": "packages/default-wallets/jest.config.ts", "passWithNoTests": true } - }, - "deploy": { - "executor": "ngx-deploy-npm:deploy", - "options": { - "access": "public" - } } }, "tags": ["hardware-wallet"] From 73d57aa8058c7104050a36f5cd34ac3be8c17340 Mon Sep 17 00:00:00 2001 From: Kujtim Prenku Date: Tue, 1 Aug 2023 16:09:30 +0200 Subject: [PATCH 15/71] Define signMessage when getting the module/wallet from the selector This adds the signMessage at the types when getting the module/wallet from the selector at runtime so typescript does not complain and there is no need to check if this function is defined or not. --- .../services/wallet-modules/wallet-modules.service.ts | 9 ++++++--- packages/core/src/lib/store.types.ts | 3 ++- packages/core/src/lib/wallet-selector.types.ts | 5 ++++- packages/core/src/lib/wallet/wallet.types.ts | 4 ++++ 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/packages/core/src/lib/services/wallet-modules/wallet-modules.service.ts b/packages/core/src/lib/services/wallet-modules/wallet-modules.service.ts index 382bf51e1..d6438f5e6 100644 --- a/packages/core/src/lib/services/wallet-modules/wallet-modules.service.ts +++ b/packages/core/src/lib/services/wallet-modules/wallet-modules.service.ts @@ -22,6 +22,7 @@ import { } from "../../constants"; import { JsonStorage } from "../storage/json-storage.service"; import type { ProviderService } from "../provider/provider.service.types"; +import type { SignMessageMethod } from "../../wallet"; export class WalletModules { private factories: Array; @@ -32,7 +33,7 @@ export class WalletModules { private provider: ProviderService; private modules: Array; - private instances: Record; + private instances: Record; constructor({ factories, @@ -289,7 +290,9 @@ export class WalletModules { return wallet; } - private async setupInstance(module: WalletModule): Promise { + private async setupInstance( + module: WalletModule + ): Promise { if (!module.metadata.available) { const message = module.type === "injected" ? "not installed" : "not available"; @@ -313,7 +316,7 @@ export class WalletModules { })), } as Wallet; - return this.decorateWallet(wallet); + return this.decorateWallet(wallet) as Wallet & SignMessageMethod; } private getModule(id: string | null) { diff --git a/packages/core/src/lib/store.types.ts b/packages/core/src/lib/store.types.ts index fa8c5ad28..be6626b8d 100644 --- a/packages/core/src/lib/store.types.ts +++ b/packages/core/src/lib/store.types.ts @@ -1,6 +1,7 @@ import type { BehaviorSubject, Observable } from "rxjs"; import type { Wallet, Account } from "./wallet"; +import type { SignMessageMethod } from "./wallet"; export interface ContractState { contractId: string; @@ -11,7 +12,7 @@ export type ModuleState = { id: Variation["id"]; type: Variation["type"]; metadata: Variation["metadata"]; - wallet(): Promise; + wallet(): Promise; }; export type AccountState = Account & { diff --git a/packages/core/src/lib/wallet-selector.types.ts b/packages/core/src/lib/wallet-selector.types.ts index 820e8342b..6b3158663 100644 --- a/packages/core/src/lib/wallet-selector.types.ts +++ b/packages/core/src/lib/wallet-selector.types.ts @@ -7,6 +7,7 @@ import type { ReadOnlyStore } from "./store.types"; import type { Network, NetworkId, Options } from "./options.types"; import type { Subscription, StorageService } from "./services"; import type { SupportedLanguage } from "./translate/translate"; +import type { SignMessageMethod } from "./wallet/wallet.types"; export interface WalletSelectorParams { network: NetworkId | Network; @@ -40,7 +41,9 @@ export interface WalletSelector { options: Options; store: WalletSelectorStore; - wallet(id?: string): Promise; + wallet( + id?: string + ): Promise; isSignedIn(): boolean; diff --git a/packages/core/src/lib/wallet/wallet.types.ts b/packages/core/src/lib/wallet/wallet.types.ts index 4186d51f5..42b035a68 100644 --- a/packages/core/src/lib/wallet/wallet.types.ts +++ b/packages/core/src/lib/wallet/wallet.types.ts @@ -59,6 +59,10 @@ export interface SignedMessage { state?: string; } +export type SignMessageMethod = { + signMessage(params: SignMessageParams): Promise; +}; + interface SignAndSendTransactionParams { signerId?: string; receiverId?: string; From bbc433167cc5f5f49a234fd965363f213cc8d394 Mon Sep 17 00:00:00 2001 From: Elabar Date: Wed, 2 Aug 2023 21:32:55 +0800 Subject: [PATCH 16/71] chore: fix linting issue --- examples/react/components/Content.tsx | 3 ++- packages/core/src/lib/wallet-selector.types.ts | 4 ++-- packages/wallet-connect/src/lib/wallet-connect.ts | 11 +---------- packages/welldone-wallet/src/lib/welldone.ts | 1 - 4 files changed, 5 insertions(+), 14 deletions(-) diff --git a/examples/react/components/Content.tsx b/examples/react/components/Content.tsx index 453dea676..9cb715922 100644 --- a/examples/react/components/Content.tsx +++ b/examples/react/components/Content.tsx @@ -83,7 +83,7 @@ const Content: React.FC = () => { ...data, account_id: accountId, })); - }, [accountId, selector.options]); + }, [accountId, selector]); const getMessages = useCallback(() => { const { network } = selector.options; @@ -103,6 +103,7 @@ const Content: React.FC = () => { useEffect(() => { // TODO: don't just fetch once; subscribe! getMessages().then(setMessages); + // eslint-disable-next-line react-hooks/exhaustive-deps }, []); useEffect(() => { diff --git a/packages/core/src/lib/wallet-selector.types.ts b/packages/core/src/lib/wallet-selector.types.ts index 8e1d11db5..a50079c14 100644 --- a/packages/core/src/lib/wallet-selector.types.ts +++ b/packages/core/src/lib/wallet-selector.types.ts @@ -74,8 +74,8 @@ export interface WalletSelector { * Wallet selector storage service */ store: WalletSelectorStore; - - /** + + /** * Programmatically access wallets and call their methods. * It's advised to use `state.modules` if you only need access to `id`, `type` or `metadata` as it avoids initialising. * You can find more information on Wallet {@link https://github.com/near/wallet-selector/blob/main/packages/core/docs/api/wallet.md | here}. diff --git a/packages/wallet-connect/src/lib/wallet-connect.ts b/packages/wallet-connect/src/lib/wallet-connect.ts index 42393f950..7544326c9 100644 --- a/packages/wallet-connect/src/lib/wallet-connect.ts +++ b/packages/wallet-connect/src/lib/wallet-connect.ts @@ -102,16 +102,7 @@ const setupWalletConnectState = async ( const WalletConnect: WalletBehaviourFactory< BridgeWallet, { params: WalletConnectExtraOptions } -> = async ({ - id, - options, - store, - params, - provider, - emitter, - logger, - metadata, -}) => { +> = async ({ id, options, store, params, provider, emitter, logger }) => { const _state = await setupWalletConnectState(id, params, emitter); const getChainId = () => { diff --git a/packages/welldone-wallet/src/lib/welldone.ts b/packages/welldone-wallet/src/lib/welldone.ts index 86670a75d..35e514738 100644 --- a/packages/welldone-wallet/src/lib/welldone.ts +++ b/packages/welldone-wallet/src/lib/welldone.ts @@ -54,7 +54,6 @@ const WelldoneWallet: WalletBehaviourFactory = async ({ logger, storage, provider, - metadata, }) => { const _state = await setupWalletState(storage); From 93a1be7a5f6356f32633afe538c1773721a77a27 Mon Sep 17 00:00:00 2001 From: kujtimprenkuSQA Date: Thu, 3 Aug 2023 09:52:05 +0200 Subject: [PATCH 17/71] Bumped version to 8.3.0 --- package.json | 2 +- packages/account-export/package.json | 2 +- packages/coin98-wallet/package.json | 2 +- packages/core/docs/api/wallet.md | 4 ++-- packages/core/package.json | 2 +- packages/default-wallets/package.json | 2 +- packages/finer-wallet/package.json | 2 +- packages/here-wallet/package.json | 2 +- packages/ledger/package.json | 2 +- packages/math-wallet/package.json | 2 +- packages/meteor-wallet/package.json | 2 +- packages/modal-ui-js/package.json | 2 +- packages/modal-ui/package.json | 2 +- packages/my-near-wallet/package.json | 2 +- packages/narwallets/package.json | 2 +- packages/near-snap/package.json | 2 +- packages/near-wallet/package.json | 2 +- packages/nearfi/package.json | 2 +- packages/neth/package.json | 2 +- packages/nightly-connect/package.json | 2 +- packages/nightly/package.json | 2 +- packages/opto-wallet/package.json | 2 +- packages/sender/package.json | 2 +- packages/wallet-connect/package.json | 2 +- packages/wallet-utils/package.json | 2 +- packages/welldone-wallet/package.json | 2 +- packages/xdefi/package.json | 2 +- 27 files changed, 28 insertions(+), 28 deletions(-) diff --git a/package.json b/package.json index 32fcb04ec..4cc4fa2d8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "near-wallet-selector", - "version": "8.2.1", + "version": "8.3.0", "description": "NEAR Wallet Selector makes it easy for users to interact with your dApp by providing an abstraction over various wallets within the NEAR ecosystem", "keywords": [ "near", diff --git a/packages/account-export/package.json b/packages/account-export/package.json index 3198d72de..5bd17ce4f 100644 --- a/packages/account-export/package.json +++ b/packages/account-export/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/account-export", - "version": "8.2.1", + "version": "8.3.0", "description": "This is the Export Selector UI package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/coin98-wallet/package.json b/packages/coin98-wallet/package.json index 9049fbedb..8ac34eacc 100644 --- a/packages/coin98-wallet/package.json +++ b/packages/coin98-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/coin98-wallet", - "version": "8.2.1", + "version": "8.3.0", "description": "Coin 98 wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/core/docs/api/wallet.md b/packages/core/docs/api/wallet.md index a615f3743..020a9e167 100644 --- a/packages/core/docs/api/wallet.md +++ b/packages/core/docs/api/wallet.md @@ -1,4 +1,4 @@ -e## API Reference (Wallet) +## API Reference (Wallet) ### `.id` @@ -325,4 +325,4 @@ Allows users to sign a message for a specific recipient using their NEAR account await wallet.signMessage({ message, recipient, nonce }); })(); -``` \ No newline at end of file +``` diff --git a/packages/core/package.json b/packages/core/package.json index f8647cdae..6b0125311 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/core", - "version": "8.2.1", + "version": "8.3.0", "description": "This is the core package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/default-wallets/package.json b/packages/default-wallets/package.json index 9050ecefd..d06953557 100644 --- a/packages/default-wallets/package.json +++ b/packages/default-wallets/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/default-wallets", - "version": "8.2.1", + "version": "8.3.0", "description": "Default wallets package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/finer-wallet/package.json b/packages/finer-wallet/package.json index 68858d5be..24ca4144b 100644 --- a/packages/finer-wallet/package.json +++ b/packages/finer-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/finer-wallet", - "version": "8.2.1", + "version": "8.3.0", "description": "FiNER Wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/here-wallet/package.json b/packages/here-wallet/package.json index 6729ab80b..0329b8777 100644 --- a/packages/here-wallet/package.json +++ b/packages/here-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/here-wallet", - "version": "8.2.1", + "version": "8.3.0", "description": "Here wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/ledger/package.json b/packages/ledger/package.json index a670f7f3b..ac6eb159a 100644 --- a/packages/ledger/package.json +++ b/packages/ledger/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/ledger", - "version": "8.2.1", + "version": "8.3.0", "description": "Ledger package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/math-wallet/package.json b/packages/math-wallet/package.json index 122a57458..8938a23fe 100644 --- a/packages/math-wallet/package.json +++ b/packages/math-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/math-wallet", - "version": "8.2.1", + "version": "8.3.0", "description": "Math wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/meteor-wallet/package.json b/packages/meteor-wallet/package.json index b69b906c8..c302ba217 100644 --- a/packages/meteor-wallet/package.json +++ b/packages/meteor-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/meteor-wallet", - "version": "8.2.1", + "version": "8.3.0", "description": "Meteor wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/modal-ui-js/package.json b/packages/modal-ui-js/package.json index 37eade94e..bffbd8386 100644 --- a/packages/modal-ui-js/package.json +++ b/packages/modal-ui-js/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/modal-ui-js", - "version": "8.2.1", + "version": "8.3.0", "description": "Modal UI package for NEAR wallet Selector", "keywords": [ "near", diff --git a/packages/modal-ui/package.json b/packages/modal-ui/package.json index 81615b32b..834dc4560 100644 --- a/packages/modal-ui/package.json +++ b/packages/modal-ui/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/modal-ui", - "version": "8.2.1", + "version": "8.3.0", "description": "Modal UI package for NEAR wallet Selector", "keywords": [ "near", diff --git a/packages/my-near-wallet/package.json b/packages/my-near-wallet/package.json index 6732e2378..ca7874b4c 100644 --- a/packages/my-near-wallet/package.json +++ b/packages/my-near-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/my-near-wallet", - "version": "8.2.1", + "version": "8.3.0", "description": "My Near Wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/narwallets/package.json b/packages/narwallets/package.json index b2143a005..afbac4c8a 100644 --- a/packages/narwallets/package.json +++ b/packages/narwallets/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/narwallets", - "version": "8.2.1", + "version": "8.3.0", "description": "This is the Narwallets package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/near-snap/package.json b/packages/near-snap/package.json index 74dc956b1..32264c529 100644 --- a/packages/near-snap/package.json +++ b/packages/near-snap/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/near-snap", - "version": "8.2.1", + "version": "8.3.0", "description": "Metamask snap to interact with Near dapps.", "keywords": [ "near", diff --git a/packages/near-wallet/package.json b/packages/near-wallet/package.json index 08cf16e81..4d8f91d60 100644 --- a/packages/near-wallet/package.json +++ b/packages/near-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/near-wallet", - "version": "8.2.1", + "version": "8.3.0", "description": "Near Wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/nearfi/package.json b/packages/nearfi/package.json index 35706cc73..db45db890 100644 --- a/packages/nearfi/package.json +++ b/packages/nearfi/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/nearfi", - "version": "8.2.1", + "version": "8.3.0", "description": "Nearfi package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/neth/package.json b/packages/neth/package.json index 810b12bb6..db5abca7d 100644 --- a/packages/neth/package.json +++ b/packages/neth/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/neth", - "version": "8.2.1", + "version": "8.3.0", "description": "Control NEAR accounts with ETH accounts", "author": "mattlockyer", "keywords": [ diff --git a/packages/nightly-connect/package.json b/packages/nightly-connect/package.json index 5a861c7d8..94058eb8a 100644 --- a/packages/nightly-connect/package.json +++ b/packages/nightly-connect/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/nightly-connect", - "version": "8.2.1", + "version": "8.3.0", "description": "Nightly connect package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/nightly/package.json b/packages/nightly/package.json index 771a69e44..1966245f9 100644 --- a/packages/nightly/package.json +++ b/packages/nightly/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/nightly", - "version": "8.2.1", + "version": "8.3.0", "description": "Nightly wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/opto-wallet/package.json b/packages/opto-wallet/package.json index 20ec25196..8ea1efebf 100644 --- a/packages/opto-wallet/package.json +++ b/packages/opto-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/opto-wallet", - "version": "8.2.1", + "version": "8.3.0", "description": "Opto wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/sender/package.json b/packages/sender/package.json index 96bf56501..6eac1c53a 100644 --- a/packages/sender/package.json +++ b/packages/sender/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/sender", - "version": "8.2.1", + "version": "8.3.0", "description": "Sender wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/wallet-connect/package.json b/packages/wallet-connect/package.json index 905e56bb3..fb4f8c853 100644 --- a/packages/wallet-connect/package.json +++ b/packages/wallet-connect/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/wallet-connect", - "version": "8.2.1", + "version": "8.3.0", "description": "Wallet Connect package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/wallet-utils/package.json b/packages/wallet-utils/package.json index bd444b978..51ba4fc86 100644 --- a/packages/wallet-utils/package.json +++ b/packages/wallet-utils/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/wallet-utils", - "version": "8.2.1", + "version": "8.3.0", "description": "Wallet utils package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/welldone-wallet/package.json b/packages/welldone-wallet/package.json index a6db2acb8..099e6315e 100644 --- a/packages/welldone-wallet/package.json +++ b/packages/welldone-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/welldone-wallet", - "version": "8.2.1", + "version": "8.3.0", "description": "Welldone wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/xdefi/package.json b/packages/xdefi/package.json index d9b308217..8bac4eb38 100644 --- a/packages/xdefi/package.json +++ b/packages/xdefi/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/xdefi", - "version": "8.2.1", + "version": "8.3.0", "description": "This is the XDEFI package for NEAR Wallet Selector.", "keywords": [ "near", From 69561e21b88bed37895f3883d871774e835c10bd Mon Sep 17 00:00:00 2001 From: Erdit Kurteshi Date: Thu, 3 Aug 2023 14:50:12 +0200 Subject: [PATCH 18/71] removed walletconnect/types --- package.json | 3 +-- yarn.lock | 12 ------------ 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/package.json b/package.json index da63f30c4..76cf8788f 100644 --- a/package.json +++ b/package.json @@ -90,8 +90,8 @@ "@metamask/detect-provider": "^2.0.0", "@meteorwallet/sdk": "^0.8.0", "@nightlylabs/connect-near": "0.0.15", - "@walletconnect/sign-client": "2.9.1", "@walletconnect/modal": "^2.6.0", + "@walletconnect/sign-client": "2.9.1", "better-sqlite3": "^8.4.0", "big.js": "^6.1.1", "bn.js": "^5.2.0", @@ -169,7 +169,6 @@ "@types/w3c-web-usb": "^1.0.5", "@typescript-eslint/eslint-plugin": "5.58.0", "@typescript-eslint/parser": "5.58.0", - "@walletconnect/types": "2.8.6", "babel-jest": "29.4.3", "css-loader": "^6.4.0", "cypress": "^9.1.0", diff --git a/yarn.lock b/yarn.lock index 062bcce97..70ba700ae 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5554,18 +5554,6 @@ dependencies: tslib "1.14.1" -"@walletconnect/types@2.8.6": - version "2.8.6" - resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.8.6.tgz#71426144db3fa693170a95f89f5d6e594ab2d901" - integrity sha512-Z/PFa3W1XdxeTcCtdR6lUsFgZfU/69wWJBPyclPwn7cu1+eriuCr6XZXQpJjib3flU+HnwHiXeUuqZaheehPxw== - dependencies: - "@walletconnect/events" "^1.0.1" - "@walletconnect/heartbeat" "1.2.1" - "@walletconnect/jsonrpc-types" "1.0.3" - "@walletconnect/keyvaluestorage" "^1.0.2" - "@walletconnect/logger" "^2.0.1" - events "^3.3.0" - "@walletconnect/types@2.9.1": version "2.9.1" resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.9.1.tgz#cb32ff396cc8880a7395f28716d1e82f407e1372" From a7f457c52f197e4daac9c53f68bcd2084b26678a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?khi=C3=AAm?= <87562184+khiemsoft@users.noreply.github.com> Date: Thu, 3 Aug 2023 20:53:47 +0700 Subject: [PATCH 19/71] Submit Ramper integration --- README.md | 8 +- examples/angular/project.json | 5 + .../wallet-selector-export.component.ts | 2 + .../wallet-selector.component.ts | 2 + .../react/contexts/WalletSelectorContext.tsx | 2 + .../contexts/WalletSelectorExportContext.tsx | 2 + examples/react/project.json | 5 + package.json | 7 +- packages/ramper-wallet/.babelrc | 10 + packages/ramper-wallet/.eslintrc.json | 18 ++ packages/ramper-wallet/README.md | 61 ++++++ packages/ramper-wallet/assets/ramper.png | Bin 0 -> 1931 bytes packages/ramper-wallet/jest.config.js | 14 ++ packages/ramper-wallet/jest.config.ts | 16 ++ packages/ramper-wallet/package.json | 27 +++ packages/ramper-wallet/project.json | 55 +++++ packages/ramper-wallet/src/index.ts | 2 + packages/ramper-wallet/src/lib/icon.ts | 1 + .../src/lib/injected-ramper-wallet.ts | 37 ++++ .../ramper-wallet/src/lib/ramper-wallet.ts | 200 ++++++++++++++++++ packages/ramper-wallet/tsconfig.json | 19 ++ packages/ramper-wallet/tsconfig.lib.json | 10 + packages/ramper-wallet/tsconfig.spec.json | 9 + scripts/release-packages.bash | 1 + tsconfig.base.json | 3 + yarn.lock | 83 ++++++++ 26 files changed, 595 insertions(+), 4 deletions(-) create mode 100644 packages/ramper-wallet/.babelrc create mode 100644 packages/ramper-wallet/.eslintrc.json create mode 100644 packages/ramper-wallet/README.md create mode 100644 packages/ramper-wallet/assets/ramper.png create mode 100644 packages/ramper-wallet/jest.config.js create mode 100644 packages/ramper-wallet/jest.config.ts create mode 100644 packages/ramper-wallet/package.json create mode 100644 packages/ramper-wallet/project.json create mode 100644 packages/ramper-wallet/src/index.ts create mode 100644 packages/ramper-wallet/src/lib/icon.ts create mode 100644 packages/ramper-wallet/src/lib/injected-ramper-wallet.ts create mode 100644 packages/ramper-wallet/src/lib/ramper-wallet.ts create mode 100644 packages/ramper-wallet/tsconfig.json create mode 100644 packages/ramper-wallet/tsconfig.lib.json create mode 100644 packages/ramper-wallet/tsconfig.spec.json diff --git a/README.md b/README.md index f96a09a93..38887b313 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ NEAR Wallet Selector makes it easy for users to interact with your dApp by provi - [NearFi Wallet](https://www.npmjs.com/package/@near-wallet-selector/nearfi) - Mobile wallet. - [Opto Wallet](https://www.npmjs.com/package/@near-wallet-selector/opto-wallet) - Mobile wallet & Browser wallet. - [Finer Wallet](https://www.npmjs.com/package/@near-wallet-selector/finer-wallet) - Mobile wallet & Browser wallet. +- [Ramper Wallet](https://www.npmjs.com/package/@near-wallet-selector/ramper-wallet) - Browser wallet. ## Preview @@ -72,7 +73,8 @@ yarn add \ @near-wallet-selector/opto-wallet \ @near-wallet-selector/finer-wallet \ @near-wallet-selector/neth \ - @near-wallet-selector/xdefi + @near-wallet-selector/xdefi \ + @near-wallet-selector/ramper-wallet # Using NPM. npm install \ @@ -95,7 +97,8 @@ npm install \ @near-wallet-selector/opto-wallet \ @near-wallet-selector/finer-wallet \ @near-wallet-selector/neth \ - @near-wallet-selector/xdefi + @near-wallet-selector/xdefi \ + @near-wallet-selector/ramper-wallet ``` Optionally, you can install our [`modal-ui`](https://www.npmjs.com/package/@near-wallet-selector/modal-ui) or [`modal-ui-js`](https://www.npmjs.com/package/@near-wallet-selector/modal-ui-js) package for a pre-built interface that wraps the `core` API and presents the supported wallets: @@ -132,6 +135,7 @@ import { setupOptoWallet } from "@near-wallet-selector/opto-wallet"; import { setupFinerWallet } from "@near-wallet-selector/finer-wallet"; import { setupNeth } from "@near-wallet-selector/neth"; import { setupXDEFI } from "@near-wallet-selector/xdefi"; +import { setupRamper } from "@near-wallet-selector/ramper-wallet"; const selector = await setupWalletSelector({ network: "testnet", diff --git a/examples/angular/project.json b/examples/angular/project.json index cce43cc1c..81cadcc5c 100644 --- a/examples/angular/project.json +++ b/examples/angular/project.json @@ -113,6 +113,11 @@ "glob": "**/*", "input": "packages/neth/assets/", "output": "assets/" + }, + { + "glob": "**/*", + "input": "packages/ramper-wallet/assets/", + "output": "assets/" } ], "styles": ["examples/angular/src/styles.scss"], diff --git a/examples/angular/src/app/pages/wallet-selector-export/wallet-selector-export.component.ts b/examples/angular/src/app/pages/wallet-selector-export/wallet-selector-export.component.ts index 250088bb0..bef2ee96e 100644 --- a/examples/angular/src/app/pages/wallet-selector-export/wallet-selector-export.component.ts +++ b/examples/angular/src/app/pages/wallet-selector-export/wallet-selector-export.component.ts @@ -21,6 +21,7 @@ import { setupNightlyConnect } from "@near-wallet-selector/nightly-connect"; import { Component } from "@angular/core"; import { setupExportSelectorModal } from "@near-wallet-selector/account-export"; import { setupMyNearWallet } from "@near-wallet-selector/my-near-wallet"; +import { setupRamper } from "@near-wallet-selector/ramper-wallet"; import { setupLedger } from "@near-wallet-selector/ledger"; declare global { @@ -89,6 +90,7 @@ export class WalletSelectorExportComponent implements OnInit { icon: "https://near.org/wp-content/uploads/2020/09/cropped-favicon-192x192.png", }, }), + setupRamper({ networkId: "testnet" }), ], }); /** diff --git a/examples/angular/src/app/pages/wallet-selector/wallet-selector.component.ts b/examples/angular/src/app/pages/wallet-selector/wallet-selector.component.ts index 320f8104d..671b1cf47 100644 --- a/examples/angular/src/app/pages/wallet-selector/wallet-selector.component.ts +++ b/examples/angular/src/app/pages/wallet-selector/wallet-selector.component.ts @@ -22,6 +22,7 @@ import { setupWalletConnect } from "@near-wallet-selector/wallet-connect"; import { setupNightlyConnect } from "@near-wallet-selector/nightly-connect"; import { Component } from "@angular/core"; import { setupMyNearWallet } from "@near-wallet-selector/my-near-wallet"; +import { setupRamper } from "@near-wallet-selector/ramper-wallet"; import { setupLedger } from "@near-wallet-selector/ledger"; import { CONTRACT_ID } from "../../../constants"; @@ -92,6 +93,7 @@ export class WalletSelectorComponent implements OnInit { icon: "https://near.org/wp-content/uploads/2020/09/cropped-favicon-192x192.png", }, }), + setupRamper({ networkId: "testnet" }), ], }); diff --git a/examples/react/contexts/WalletSelectorContext.tsx b/examples/react/contexts/WalletSelectorContext.tsx index b690badfd..a3da0f55d 100644 --- a/examples/react/contexts/WalletSelectorContext.tsx +++ b/examples/react/contexts/WalletSelectorContext.tsx @@ -16,6 +16,7 @@ import { setupWalletConnect } from "@near-wallet-selector/wallet-connect"; import { setupNearSnap } from "@near-wallet-selector/near-snap"; import { setupWelldoneWallet } from "@near-wallet-selector/welldone-wallet"; import { setupXDEFI } from "@near-wallet-selector/xdefi"; +import { setupRamper } from "@near-wallet-selector/ramper-wallet"; import type { ReactNode } from "react"; import React, { useCallback, @@ -77,6 +78,7 @@ export const WalletSelectorContextProvider: React.FC<{ setupHereWallet(), setupCoin98Wallet(), setupNearFi(), + setupRamper(), setupNeth({ gas: "300000000000000", bundle: false, diff --git a/examples/react/contexts/WalletSelectorExportContext.tsx b/examples/react/contexts/WalletSelectorExportContext.tsx index 84465539d..32209b750 100644 --- a/examples/react/contexts/WalletSelectorExportContext.tsx +++ b/examples/react/contexts/WalletSelectorExportContext.tsx @@ -26,6 +26,7 @@ import { setupOptoWallet } from "@near-wallet-selector/opto-wallet"; import { Loading } from "../components/Loading"; import { setupMyNearWallet } from "@near-wallet-selector/my-near-wallet"; import { setupLedger } from "@near-wallet-selector/ledger"; +import { setupRamper } from "@near-wallet-selector/ramper-wallet"; declare global { interface Window { @@ -69,6 +70,7 @@ export const ExportAccountSelectorContextProvider: React.FC<{ setupCoin98Wallet(), setupNearFi(), setupOptoWallet(), + setupRamper(), setupWalletConnect({ projectId: "c4f79cc...", metadata: { diff --git a/examples/react/project.json b/examples/react/project.json index b82cf270e..8d7016851 100644 --- a/examples/react/project.json +++ b/examples/react/project.json @@ -106,6 +106,11 @@ "glob": "**/*", "input": "packages/neth/assets/", "output": "assets/" + }, + { + "glob": "**/*", + "input": "packages/ramper-wallet/assets/", + "output": "assets/" } ] }, diff --git a/package.json b/package.json index 4cc4fa2d8..7d012bf43 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,8 @@ "meteor-wallet", "welldone-wallet", "opto-wallet", - "finer-wallet" + "finer-wallet", + "ramper-wallet" ], "homepage": "https://github.com/near/wallet-selector#README", "bugs": { @@ -65,6 +66,7 @@ "build:default-wallets": "nx run-many --target=build --projects=default-wallets --configuration=production", "build:near-snap": "nx run-many --target=build --projects=near-snap --configuration=production", "build:account-export": "nx run-many --target=build --projects=account-export --configuration=production", + "build:ramper-wallet": "nx run-many --target=build --projects=ramper-wallet --configuration=production", "lint": "nx workspace-lint && nx run-many --target=lint --all --parallel", "lint:fix": "nx run-many --target=lint --all --fix", "serve:react": "nx serve react --host=0.0.0.0", @@ -90,8 +92,9 @@ "@metamask/detect-provider": "^2.0.0", "@meteorwallet/sdk": "^0.8.0", "@nightlylabs/connect-near": "0.0.15", - "@walletconnect/sign-client": "2.8.6", + "@ramper/near": "^0.0.30", "@walletconnect/modal": "^2.6.0", + "@walletconnect/sign-client": "2.8.6", "better-sqlite3": "^8.4.0", "big.js": "^6.1.1", "bn.js": "^5.2.0", diff --git a/packages/ramper-wallet/.babelrc b/packages/ramper-wallet/.babelrc new file mode 100644 index 000000000..b63f0528f --- /dev/null +++ b/packages/ramper-wallet/.babelrc @@ -0,0 +1,10 @@ +{ + "presets": [ + [ + "@nrwl/js/babel", + { + "useBuiltIns": "usage" + } + ] + ] +} diff --git a/packages/ramper-wallet/.eslintrc.json b/packages/ramper-wallet/.eslintrc.json new file mode 100644 index 000000000..9d9c0db55 --- /dev/null +++ b/packages/ramper-wallet/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/packages/ramper-wallet/README.md b/packages/ramper-wallet/README.md new file mode 100644 index 000000000..bfc614f6f --- /dev/null +++ b/packages/ramper-wallet/README.md @@ -0,0 +1,61 @@ +# @near-wallet-selector/ramper-wallet + + +This is the [Ramper](https://docs.ramper.xyz/) package for NEAR Wallet Selector. + +## Installation and Usage + +The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v1.0.0 or above: + +```bash +# Using Yarn +yarn add near-api-js + +# Using NPM. +npm install near-api-js +``` + +```bash +# Using Yarn +yarn add @near-wallet-selector/ramper-wallet + +# Using NPM. +npm install @near-wallet-selector/ramper-wallet +``` + +Then use it in your dApp: + +```ts +import { setupWalletSelector } from "@near-wallet-selector/core"; +import { setupRamper } from "@near-wallet-selector/ramper-wallet"; + +// Ramper for Wallet Selector can be setup without any params or it can take one optional param. +const ramper = setupRamper({ networkId: "testnet" }), + +const selector = await setupWalletSelector({ + network: "testnet", + modules: [ramper], +}); +``` + +## Options + +- `iconUrl`: (`string?`): Image URL for the icon shown in the modal. This can also be a relative path or base64 encoded image. Defaults to `./assets/ramper.png`. +- `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`. + +## Assets + +Assets such as icons can be found in the `/assets` directory of the package. Below is an example using Webpack: + +```ts +import { setupRamper } from "@near-wallet-selector/ramper-wallet"; +import ramperIconUrl from "@near-wallet-selector/ramper-wallet/assets/ramper.png"; + +const ramper = setupRamper({ + iconUrl: ramperIconUrl +}); +``` + +## License + +This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0). diff --git a/packages/ramper-wallet/assets/ramper.png b/packages/ramper-wallet/assets/ramper.png new file mode 100644 index 0000000000000000000000000000000000000000..e594c2cb827b389c08d92d2223fa6d3d7e7df78d GIT binary patch literal 1931 zcmV;62Xy#}P)@LeLEXy(rdxBQC5vpS4tcEROL>muK)E2dBw94U$RjbuoV16`#Iq zYGSO%4EheU%kvNLen0a(^UgaA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`87w+gb;yPXcRU+BSM2#<@<;T)Venc zq27N6fY6T+wxy?V?-PMuC}{ZO03L(DA%x151a=k?EQLm)h9?4x5Gv#1nCV0?RY(Yo zMnOGKLGVOJP_CF5>UAO*3x$k)0zhB*LdqqRd4l`@7NVfFj|kt1j??6V1vkeM!CrDX zjCp7ju1ADYdjE(JL#5Ei5K;eyzlaV_>He*f7-|(B=FLZs%F+JU>%/tsconfig.spec.json", + }, + }, + transform: { + "^.+\\.[tj]sx?$": "ts-jest", + }, + moduleFileExtensions: ["ts", "tsx", "js", "jsx"], + coverageDirectory: "../../coverage/packages/ramper-wallet", +}; diff --git a/packages/ramper-wallet/jest.config.ts b/packages/ramper-wallet/jest.config.ts new file mode 100644 index 000000000..a27bc5cea --- /dev/null +++ b/packages/ramper-wallet/jest.config.ts @@ -0,0 +1,16 @@ +/* eslint-disable */ +export default { + displayName: "ramper-wallet", + preset: "../../jest.preset.js", + globals: {}, + transform: { + "^.+\\.[tj]s$": [ + "ts-jest", + { + tsconfig: "/tsconfig.spec.json", + }, + ], + }, + moduleFileExtensions: ["ts", "tsx", "js", "jsx"], + coverageDirectory: "../../coverage/packages/ramper-wallet", +}; diff --git a/packages/ramper-wallet/package.json b/packages/ramper-wallet/package.json new file mode 100644 index 000000000..bd49e37cb --- /dev/null +++ b/packages/ramper-wallet/package.json @@ -0,0 +1,27 @@ +{ + "name": "@near-wallet-selector/ramper-wallet", + "version": "8.2.1", + "description": "Ramper wallet package for NEAR Wallet Selector.", + "keywords": [ + "near", + "blockchain", + "wallets", + "dapps", + "near-protocol", + "near-blockchain", + "wallet selector", + "injected wallet", + "ramper wallet" + ], + "repository": { + "type": "git", + "url": "https://github.com/near/wallet-selector.git" + }, + "bugs": { + "url": "https://github.com/near/wallet-selector/issues" + }, + "homepage": "https://github.com/near/wallet-selector/tree/main/packages/ramper-wallet", + "peerDependencies": { + "near-api-js": "^1.0.0 || ^2.0.0" + } +} diff --git a/packages/ramper-wallet/project.json b/packages/ramper-wallet/project.json new file mode 100644 index 000000000..50cc49e7c --- /dev/null +++ b/packages/ramper-wallet/project.json @@ -0,0 +1,55 @@ +{ + "name": "ramper-wallet", + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "packages/ramper-wallet/src", + "projectType": "library", + "targets": { + "build": { + "executor": "@nrwl/rollup:rollup", + "outputs": ["{options.outputPath}"], + "options": { + "outputPath": "dist/packages/ramper-wallet", + "tsConfig": "packages/ramper-wallet/tsconfig.lib.json", + "project": "packages/ramper-wallet/package.json", + "entryFile": "packages/ramper-wallet/src/index.ts", + "buildableProjectDepsInPackageJsonType": "dependencies", + "compiler": "babel", + "format": ["esm", "cjs"], + "assets": [ + { + "glob": "packages/ramper-wallet/README.md", + "input": ".", + "output": "." + }, + { + "glob": "packages/ramper-wallet/assets/*", + "input": ".", + "output": "assets" + } + ] + } + }, + "lint": { + "executor": "@nx/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["packages/ramper-wallet/**/*.ts"] + } + }, + "test": { + "executor": "@nx/jest:jest", + "outputs": ["{workspaceRoot}/coverage/packages/ramper-wallet"], + "options": { + "jestConfig": "packages/ramper-wallet/jest.config.ts", + "passWithNoTests": true + } + }, + "deploy": { + "executor": "ngx-deploy-npm:deploy", + "options": { + "access": "public" + } + } + }, + "tags": ["injected-wallet"] +} diff --git a/packages/ramper-wallet/src/index.ts b/packages/ramper-wallet/src/index.ts new file mode 100644 index 000000000..baf1a9082 --- /dev/null +++ b/packages/ramper-wallet/src/index.ts @@ -0,0 +1,2 @@ +export { setupRamper } from "./lib/ramper-wallet"; +export type { RamperWalletParams } from "./lib/ramper-wallet"; diff --git a/packages/ramper-wallet/src/lib/icon.ts b/packages/ramper-wallet/src/lib/icon.ts new file mode 100644 index 000000000..5058c27ee --- /dev/null +++ b/packages/ramper-wallet/src/lib/icon.ts @@ -0,0 +1 @@ +export default `data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0i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OGwyNC45LTEyLjM3LTE3LjI4LDU0Ljk0Yy0xLjEsMy41MS0zLjYxLDYuNDEtNi45Myw4WiIvPjwvZz48L2c+PC9nPjwvc3ZnPg==`; diff --git a/packages/ramper-wallet/src/lib/injected-ramper-wallet.ts b/packages/ramper-wallet/src/lib/injected-ramper-wallet.ts new file mode 100644 index 000000000..11bcb74c3 --- /dev/null +++ b/packages/ramper-wallet/src/lib/injected-ramper-wallet.ts @@ -0,0 +1,37 @@ +import type { Transaction } from "@near-wallet-selector/core"; +import type { + NearNetwork, + RamperInstance, + SignInResult, + SignInWithProvider, + TransactionResultType, + User, +} from "@ramper/near"; +import type { FinalExecutionOutcome } from "near-api-js/lib/providers"; + +type TransactionResult = { + type: TransactionResultType; + result?: string | Error; +}; + +type SendTransactionResult = Omit & { + type: TransactionResultType; + txHashes: Array; + result?: Array | Error; +}; + +type SendTransactionParams = { + transactionActions: Array; + network?: NearNetwork; +}; + +export interface InjectedRamper extends RamperInstance { + signIn: (clientAPIKey?: string) => Promise; + signInWithProvider: SignInWithProvider; + signOut: () => void; + getUser: () => User; + openWallet: () => void; + sendTransaction: ( + params: SendTransactionParams + ) => Promise; +} diff --git a/packages/ramper-wallet/src/lib/ramper-wallet.ts b/packages/ramper-wallet/src/lib/ramper-wallet.ts new file mode 100644 index 000000000..be58d9026 --- /dev/null +++ b/packages/ramper-wallet/src/lib/ramper-wallet.ts @@ -0,0 +1,200 @@ +import type { + InjectedWallet, + WalletBehaviourFactory, + WalletModuleFactory, + Transaction, + NetworkId, + Account, + Optional, +} from "@near-wallet-selector/core"; + +import { createAction } from "@near-wallet-selector/wallet-utils"; + +import { isMobile } from "is-mobile"; +import type { InjectedRamper } from "./injected-ramper-wallet"; +import icon from "./icon"; +import { + init, + AUTH_PROVIDER, + WALLET_PROVIDER, + THEME, + signIn, + sendTransaction, +} from "@ramper/near"; +import type { Action } from "near-api-js/lib/transaction"; + +interface RamperState { + wallet: InjectedRamper; +} + +const setupRamperState = (): RamperState => { + const wallet = window.ramper as InjectedRamper; + return { + wallet, + }; +}; + +const isInstalled = () => { + return !!window.ramper.isLoaded; +}; + +const RamperWallet: WalletBehaviourFactory = async ({ + metadata, + store, + logger, +}) => { + const _state = setupRamperState(); + + const getAccounts = async (): Promise> => { + const { wallets } = _state.wallet.getUser(); + const { publicKey: accountId } = wallets.near; + + if (!accountId) { + return []; + } + + return [ + { + accountId, + }, + ]; + }; + + const transformTransactions = async ( + transactions: Array> + ) => { + const accounts = await getAccounts(); + const { contract } = store.getState(); + + if (!accounts.length || !contract) { + throw new Error("Wallet not signed in"); + } + + return transactions.map((transaction) => { + const parsedActions = transaction.actions.map((action) => + createAction(action) + ); + + return { + receiverId: transaction.receiverId || contract.contractId, + actions: parsedActions, + }; + }); + }; + + return { + async signIn() { + await signIn(); // signIn first because if getUser break function + const existingAccounts = await getAccounts(); + + if (existingAccounts.length) { + return existingAccounts; + } + return getAccounts(); + }, + + async signOut() { + _state.wallet.signOut(); + }, + + async getAccounts() { + return getAccounts(); + }, + + async verifyOwner({ message }) { + logger.log("Ramper:verifyOwner", { message }); + + throw new Error(`Method not supported by ${metadata.name}`); + }, + + async signAndSendTransaction({ + receiverId, + actions, + }: Omit) { + logger.log("signAndSendTransaction", { receiverId, actions }); + + const { contract } = store.getState(); + const accounts = await getAccounts(); + + if (!accounts.length || !contract) { + throw new Error("Wallet not signed in"); + } + + const transactions: Array<{ + receiverId: string; + actions: Array; + }> = await transformTransactions([{ receiverId, actions }]); + + const { result } = await sendTransaction({ + transactionActions: transactions, + }); + + return result[0]; + }, + + async signAndSendTransactions({ transactions }) { + logger.log("signAndSendTransactions", { transactions }); + + const transactionsParsed: Array<{ + receiverId: string; + actions: Array; + }> = await transformTransactions(transactions); + + const { result: results } = await sendTransaction({ + transactionActions: transactionsParsed, + }); + + return results; + }, + }; +}; + +export interface RamperWalletParams { + iconUrl?: string; + deprecated?: boolean; + networkId?: NetworkId; +} + +export function setupRamper({ + iconUrl = icon, + deprecated = false, + networkId = "testnet", +}: RamperWalletParams = {}): WalletModuleFactory { + return async () => { + const mobile = isMobile(); + if (mobile) { + return null; + } + + await init({ + appName: "Ramper Wallet", + authProviders: [ + AUTH_PROVIDER.GOOGLE, + AUTH_PROVIDER.FACEBOOK, + AUTH_PROVIDER.TWITTER, + AUTH_PROVIDER.APPLE, + AUTH_PROVIDER.EMAIL, + ], + walletProviders: [WALLET_PROVIDER.NEAR_WALLET], + network: networkId, + theme: THEME.DARK, + }); + + const installed = await isInstalled(); + + return { + id: "ramper-wallet", + type: "injected", + metadata: { + name: "Ramper", + description: null, + iconUrl, + // Will replace we open beta with stable version + downloadUrl: "https://docs.ramper.xyz/", + deprecated, + available: installed, + }, + init: RamperWallet, + }; + }; +} diff --git a/packages/ramper-wallet/tsconfig.json b/packages/ramper-wallet/tsconfig.json new file mode 100644 index 000000000..8b6d6acaf --- /dev/null +++ b/packages/ramper-wallet/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true + }, + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] +} diff --git a/packages/ramper-wallet/tsconfig.lib.json b/packages/ramper-wallet/tsconfig.lib.json new file mode 100644 index 000000000..e85ef50f6 --- /dev/null +++ b/packages/ramper-wallet/tsconfig.lib.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "declaration": true, + "types": [] + }, + "include": ["**/*.ts"], + "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"] +} diff --git a/packages/ramper-wallet/tsconfig.spec.json b/packages/ramper-wallet/tsconfig.spec.json new file mode 100644 index 000000000..b506d384e --- /dev/null +++ b/packages/ramper-wallet/tsconfig.spec.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node"] + }, + "include": ["jest.config.ts", "**/*.spec.ts"] +} diff --git a/scripts/release-packages.bash b/scripts/release-packages.bash index 67f09bb6f..201b79afa 100644 --- a/scripts/release-packages.bash +++ b/scripts/release-packages.bash @@ -27,6 +27,7 @@ npm publish dist/packages/account-export --tag "${TAG}" --otp "${OTP}" npm publish dist/packages/narwallets --tag "${TAG}" --otp "${OTP}" npm publish dist/packages/xdefi --tag "${TAG}" --otp "${OTP}" npm publish dist/packages/near-snap --tag "${TAG}" --otp "${OTP}" +npm publish dist/packages/ramper-wallet --tag "${TAG}" --otp "${OTP}" # Commented script for default wallets to avoid publishing new versions since the package is now deprecated. #npm publish dist/packages/default-wallets --tag "${TAG}" --otp "${OTP}" diff --git a/tsconfig.base.json b/tsconfig.base.json index fa9420c7f..1773eeea8 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -72,6 +72,9 @@ "packages/welldone-wallet/src/index.ts" ], "@near-wallet-selector/xdefi": ["packages/xdefi/src/index.ts"], + "@near-wallet-selector/ramper-wallet": [ + "packages/ramper-wallet/src/index.ts" + ], "crypto": ["node_modules/crypto-browserify"], "http": ["node_modules/stream-http"], "https": ["node_modules/https-browserify"], diff --git a/yarn.lock b/yarn.lock index 099d73f9b..f62be9b25 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4096,6 +4096,54 @@ schema-utils "^3.0.0" source-map "^0.7.3" +"@ramper/constants@0.0.15": + version "0.0.15" + resolved "https://registry.yarnpkg.com/@ramper/constants/-/constants-0.0.15.tgz#3246e1c62a36a2d48f5c6bf24fe188455bd2c5ae" + integrity sha512-xdM9F0w4rT9AW4DQwJAFDE9MUIj0IbrU1FtYbgkQueg+aOXVXf7tM3Jw+oVhhhfKnjahYgtxFchjEPOTInMHmA== + dependencies: + "@ramper/utils" "0.0.2" + +"@ramper/core@0.0.30": + version "0.0.30" + resolved "https://registry.yarnpkg.com/@ramper/core/-/core-0.0.30.tgz#e6b0421c319c634efcceb6a649026189597c4147" + integrity sha512-f0WzKV9uXmf9K0NvVAKg8z+W3u22WpA5SzS1rJ6zsBm80QZdwScFZhDYNfAHZpaHG1c0iaGpHcrYsl1FXe3PKg== + dependencies: + "@ramper/logger" "0.0.1" + "@ramper/utils" "0.0.2" + jwt-decode "^3.1.2" + jwt-simple "0.5.6" + postmate "1.5.2" + +"@ramper/logger@0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@ramper/logger/-/logger-0.0.1.tgz#181a9b339e8ee2f942b29293c960ac73b0686cca" + integrity sha512-G1A/P9XSS+41VNE2VdOOj8OkYjKSJHdCMs2YOEGPFRZUzuQFaMWOkc2ZxEA9zTdJWpcX0Hptp/d4Y2tXYsZX/A== + +"@ramper/near@^0.0.30": + version "0.0.30" + resolved "https://registry.yarnpkg.com/@ramper/near/-/near-0.0.30.tgz#5303d38627cad26ba2641949ab826233970770b6" + integrity sha512-Qp7fRF4yoBhBFjif2jBEbLj1l+5632JTP6YtokUh21CerNe7SRi7EEQzeTPxCvYG0cz7BFSlx9O9uQZ/6SC48g== + dependencies: + "@ramper/constants" "0.0.15" + "@ramper/core" "0.0.30" + "@ramper/sdk-loader" "0.0.1" + "@ramper/utils" "0.0.2" + +"@ramper/sdk-loader@0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@ramper/sdk-loader/-/sdk-loader-0.0.1.tgz#b67f59f64c7c8775da9828f85b662afc0be26973" + integrity sha512-nmjsh23Gy0jh9xNmoqzYEz2UoPRFzDh1yqYr1/32pK20TPH6xDxEyYiDynLD+/Vpff2ThjDGEyUI67RnvVsiRQ== + +"@ramper/utils@0.0.2": + version "0.0.2" + resolved "https://registry.yarnpkg.com/@ramper/utils/-/utils-0.0.2.tgz#b7405db56ce0c6338f483a4dc0462e7219a9cfaa" + integrity sha512-EZTAFInMXO9UoBWTrgKV8LXQHiwgDe5big+b1at7q1I3xxxdsCOs/9KhvG7uKlmyiDiz2PLTJsnU4qZ3KTWtVQ== + dependencies: + "@types/ua-parser-js" "^0.7.36" + await-to-js "3.0.0" + slugify "^1.6.5" + ua-parser-js "^1.0.2" + "@rollup/plugin-babel@^5.3.0": version "5.3.1" resolved "https://registry.yarnpkg.com/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz#04bc0608f4aa4b2e4b1aebf284344d0f68fda283" @@ -5118,6 +5166,11 @@ resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-2.0.3.tgz#a136f83b0758698df454e328759dbd3d44555311" integrity sha512-NfQ4gyz38SL8sDNrSixxU2Os1a5xcdFxipAFxYEuLUlvU2uDwS4NUpsImcf1//SlWItCVMMLiylsxbmNMToV/g== +"@types/ua-parser-js@^0.7.36": + version "0.7.36" + resolved "https://registry.yarnpkg.com/@types/ua-parser-js/-/ua-parser-js-0.7.36.tgz#9bd0b47f26b5a3151be21ba4ce9f5fa457c5f190" + integrity sha512-N1rW+njavs70y2cApeIw1vLMYXRwfBy+7trgavGuuTfOd7j1Yh7QTRc/yqsPl6ncokt72ZXuxEU0PiCp9bSwNQ== + "@types/uuid@^9.0.1": version "9.0.1" resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-9.0.1.tgz#98586dc36aee8dacc98cc396dbca8d0429647aa6" @@ -6388,6 +6441,11 @@ available-typed-arrays@^1.0.5: resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== +await-to-js@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/await-to-js/-/await-to-js-3.0.0.tgz#70929994185616f4675a91af6167eb61cc92868f" + integrity sha512-zJAaP9zxTcvTHRlejau3ZOY4V7SRpiByf3/dxx2uyKxxor19tpmpV2QRsTKikckwhaPmr2dVpxxMr7jOCYVp5g== + aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" @@ -12311,6 +12369,16 @@ just-diff@^5.0.1: resolved "https://registry.yarnpkg.com/just-diff/-/just-diff-5.0.3.tgz#4c9c514dec5526b25ab977590e3c39a0cf271554" integrity sha512-a8p80xcpJ6sdurk5PxDKb4mav9MeKjA3zFKZpCWBIfvg8mznfnmb13MKZvlrwJ+Lhis0wM3uGAzE0ArhFHvIcg== +jwt-decode@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/jwt-decode/-/jwt-decode-3.1.2.tgz#3fb319f3675a2df0c2895c8f5e9fa4b67b04ed59" + integrity sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A== + +jwt-simple@0.5.6: + version "0.5.6" + resolved "https://registry.yarnpkg.com/jwt-simple/-/jwt-simple-0.5.6.tgz#3357adec55b26547114157be66748995b75b333a" + integrity sha512-40aUybvhH9t2h71ncA1/1SbtTNCVZHgsTsTgqPUxGWDmUDrXyDf2wMNQKEbdBjbf4AI+fQhbECNTV6lWxQKUzg== + karma-source-map-support@1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/karma-source-map-support/-/karma-source-map-support-1.4.0.tgz#58526ceccf7e8730e56effd97a4de8d712ac0d6b" @@ -15021,6 +15089,11 @@ postcss@^8.4.14, postcss@^8.4.19: picocolors "^1.0.0" source-map-js "^1.0.2" +postmate@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/postmate/-/postmate-1.5.2.tgz#d59a78b3780023c5d32225fd40633b364958bdb3" + integrity sha512-EHLlEmrUA/hALls49oBrtE7BzDXXjB9EiO4MZpsoO3R/jRuBmD+2WKQuYAbeuVEpTzrPpUTT79z2cz4qaFgPRg== + prebuild-install@^7.1.0: version "7.1.1" resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-7.1.1.tgz#de97d5b34a70a0c81334fd24641f2a1702352e45" @@ -16377,6 +16450,11 @@ slide@^1.1.5: resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" integrity sha512-NwrtjCg+lZoqhFU8fOwl4ay2ei8PaqCBOUV3/ektPY9trO1yQ1oXEfmHAhKArUVUr/hOHvy5f6AdP17dCM0zMw== +slugify@^1.6.5: + version "1.6.6" + resolved "https://registry.yarnpkg.com/slugify/-/slugify-1.6.6.tgz#2d4ac0eacb47add6af9e04d3be79319cbcc7924b" + integrity sha512-h+z7HKHYXj6wJU+AnS/+IH8Uh9fdcX1Lrhg1/VMdf9PwoBQXFcXiAdsy2tSK0P6gKwJLXp02r90ahUCqHk9rrw== + smart-buffer@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" @@ -17494,6 +17572,11 @@ u3@^0.1.1: resolved "https://registry.yarnpkg.com/u3/-/u3-0.1.1.tgz#5f52044f42ee76cd8de33148829e14528494b73b" integrity sha512-+J5D5ir763y+Am/QY6hXNRlwljIeRMZMGs0cT6qqZVVzzT3X3nFPXVyPOFRMOR4kupB0T8JnCdpWdp6Q/iXn3w== +ua-parser-js@^1.0.2: + version "1.0.35" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-1.0.35.tgz#c4ef44343bc3db0a3cbefdf21822f1b1fc1ab011" + integrity sha512-fKnGuqmTBnIE+/KXSzCn4db8RTigUzw1AN0DmdU6hJovUTbYJKyqj+8Mt1c4VfRDnOVJnENmfYkIPZ946UrSAA== + uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" From 0ab14b1e839fd8d93b10633b5a89be0f39b376d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?khi=C3=AAm?= Date: Fri, 4 Aug 2023 12:00:32 +0700 Subject: [PATCH 20/71] Update Naming --- README.md | 2 +- .../wallet-selector-export.component.ts | 4 +- .../wallet-selector.component.ts | 4 +- .../react/contexts/WalletSelectorContext.tsx | 4 +- .../contexts/WalletSelectorExportContext.tsx | 4 +- packages/ramper-wallet/README.md | 16 ++--- .../assets/{ramper.png => ramper-wallet.png} | Bin packages/ramper-wallet/package.json | 2 +- packages/ramper-wallet/src/index.ts | 2 +- .../src/lib/injected-ramper-wallet.ts | 2 +- .../ramper-wallet/src/lib/ramper-wallet.ts | 59 ++++++++---------- 11 files changed, 45 insertions(+), 54 deletions(-) rename packages/ramper-wallet/assets/{ramper.png => ramper-wallet.png} (100%) diff --git a/README.md b/README.md index 38887b313..c5b7a1a43 100644 --- a/README.md +++ b/README.md @@ -135,7 +135,7 @@ import { setupOptoWallet } from "@near-wallet-selector/opto-wallet"; import { setupFinerWallet } from "@near-wallet-selector/finer-wallet"; import { setupNeth } from "@near-wallet-selector/neth"; import { setupXDEFI } from "@near-wallet-selector/xdefi"; -import { setupRamper } from "@near-wallet-selector/ramper-wallet"; +import { setupRamperWallet } from "@near-wallet-selector/ramper-wallet"; const selector = await setupWalletSelector({ network: "testnet", diff --git a/examples/angular/src/app/pages/wallet-selector-export/wallet-selector-export.component.ts b/examples/angular/src/app/pages/wallet-selector-export/wallet-selector-export.component.ts index bef2ee96e..9166b10e1 100644 --- a/examples/angular/src/app/pages/wallet-selector-export/wallet-selector-export.component.ts +++ b/examples/angular/src/app/pages/wallet-selector-export/wallet-selector-export.component.ts @@ -21,7 +21,7 @@ import { setupNightlyConnect } from "@near-wallet-selector/nightly-connect"; import { Component } from "@angular/core"; import { setupExportSelectorModal } from "@near-wallet-selector/account-export"; import { setupMyNearWallet } from "@near-wallet-selector/my-near-wallet"; -import { setupRamper } from "@near-wallet-selector/ramper-wallet"; +import { setupRamperWallet } from "@near-wallet-selector/ramper-wallet"; import { setupLedger } from "@near-wallet-selector/ledger"; declare global { @@ -90,7 +90,7 @@ export class WalletSelectorExportComponent implements OnInit { icon: "https://near.org/wp-content/uploads/2020/09/cropped-favicon-192x192.png", }, }), - setupRamper({ networkId: "testnet" }), + setupRamperWallet(), ], }); /** diff --git a/examples/angular/src/app/pages/wallet-selector/wallet-selector.component.ts b/examples/angular/src/app/pages/wallet-selector/wallet-selector.component.ts index 671b1cf47..53e23c95a 100644 --- a/examples/angular/src/app/pages/wallet-selector/wallet-selector.component.ts +++ b/examples/angular/src/app/pages/wallet-selector/wallet-selector.component.ts @@ -22,7 +22,7 @@ import { setupWalletConnect } from "@near-wallet-selector/wallet-connect"; import { setupNightlyConnect } from "@near-wallet-selector/nightly-connect"; import { Component } from "@angular/core"; import { setupMyNearWallet } from "@near-wallet-selector/my-near-wallet"; -import { setupRamper } from "@near-wallet-selector/ramper-wallet"; +import { setupRamperWallet } from "@near-wallet-selector/ramper-wallet"; import { setupLedger } from "@near-wallet-selector/ledger"; import { CONTRACT_ID } from "../../../constants"; @@ -93,7 +93,7 @@ export class WalletSelectorComponent implements OnInit { icon: "https://near.org/wp-content/uploads/2020/09/cropped-favicon-192x192.png", }, }), - setupRamper({ networkId: "testnet" }), + setupRamperWallet(), ], }); diff --git a/examples/react/contexts/WalletSelectorContext.tsx b/examples/react/contexts/WalletSelectorContext.tsx index a3da0f55d..db45398dc 100644 --- a/examples/react/contexts/WalletSelectorContext.tsx +++ b/examples/react/contexts/WalletSelectorContext.tsx @@ -16,7 +16,7 @@ import { setupWalletConnect } from "@near-wallet-selector/wallet-connect"; import { setupNearSnap } from "@near-wallet-selector/near-snap"; import { setupWelldoneWallet } from "@near-wallet-selector/welldone-wallet"; import { setupXDEFI } from "@near-wallet-selector/xdefi"; -import { setupRamper } from "@near-wallet-selector/ramper-wallet"; +import { setupRamperWallet } from "@near-wallet-selector/ramper-wallet"; import type { ReactNode } from "react"; import React, { useCallback, @@ -78,7 +78,7 @@ export const WalletSelectorContextProvider: React.FC<{ setupHereWallet(), setupCoin98Wallet(), setupNearFi(), - setupRamper(), + setupRamperWallet(), setupNeth({ gas: "300000000000000", bundle: false, diff --git a/examples/react/contexts/WalletSelectorExportContext.tsx b/examples/react/contexts/WalletSelectorExportContext.tsx index 32209b750..41132e788 100644 --- a/examples/react/contexts/WalletSelectorExportContext.tsx +++ b/examples/react/contexts/WalletSelectorExportContext.tsx @@ -26,7 +26,7 @@ import { setupOptoWallet } from "@near-wallet-selector/opto-wallet"; import { Loading } from "../components/Loading"; import { setupMyNearWallet } from "@near-wallet-selector/my-near-wallet"; import { setupLedger } from "@near-wallet-selector/ledger"; -import { setupRamper } from "@near-wallet-selector/ramper-wallet"; +import { setupRamperWallet } from "@near-wallet-selector/ramper-wallet"; declare global { interface Window { @@ -70,7 +70,7 @@ export const ExportAccountSelectorContextProvider: React.FC<{ setupCoin98Wallet(), setupNearFi(), setupOptoWallet(), - setupRamper(), + setupRamperWallet(), setupWalletConnect({ projectId: "c4f79cc...", metadata: { diff --git a/packages/ramper-wallet/README.md b/packages/ramper-wallet/README.md index bfc614f6f..c2a9e9542 100644 --- a/packages/ramper-wallet/README.md +++ b/packages/ramper-wallet/README.md @@ -1,7 +1,7 @@ # @near-wallet-selector/ramper-wallet -This is the [Ramper](https://docs.ramper.xyz/) package for NEAR Wallet Selector. +This is the [Ramper Wallet](https://docs.ramper.xyz/) package for NEAR Wallet Selector. ## Installation and Usage @@ -27,10 +27,10 @@ Then use it in your dApp: ```ts import { setupWalletSelector } from "@near-wallet-selector/core"; -import { setupRamper } from "@near-wallet-selector/ramper-wallet"; +import { setupRamperWallet } from "@near-wallet-selector/ramper-wallet"; // Ramper for Wallet Selector can be setup without any params or it can take one optional param. -const ramper = setupRamper({ networkId: "testnet" }), +const ramper = setupRamperWallet(), const selector = await setupWalletSelector({ network: "testnet", @@ -40,7 +40,7 @@ const selector = await setupWalletSelector({ ## Options -- `iconUrl`: (`string?`): Image URL for the icon shown in the modal. This can also be a relative path or base64 encoded image. Defaults to `./assets/ramper.png`. +- `iconUrl`: (`string?`): Image URL for the icon shown in the modal. This can also be a relative path or base64 encoded image. Defaults to `./assets/ramper-wallet.png`. - `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`. ## Assets @@ -48,11 +48,11 @@ const selector = await setupWalletSelector({ Assets such as icons can be found in the `/assets` directory of the package. Below is an example using Webpack: ```ts -import { setupRamper } from "@near-wallet-selector/ramper-wallet"; -import ramperIconUrl from "@near-wallet-selector/ramper-wallet/assets/ramper.png"; +import { setupRamperWallet } from "@near-wallet-selector/ramper-wallet"; +import ramperWalletIconUrl from "@near-wallet-selector/ramper-wallet/assets/ramper-wallet.png"; -const ramper = setupRamper({ - iconUrl: ramperIconUrl +const ramper = setupRamperWallet({ + iconUrl: ramperWalletIconUrl }); ``` diff --git a/packages/ramper-wallet/assets/ramper.png b/packages/ramper-wallet/assets/ramper-wallet.png similarity index 100% rename from packages/ramper-wallet/assets/ramper.png rename to packages/ramper-wallet/assets/ramper-wallet.png diff --git a/packages/ramper-wallet/package.json b/packages/ramper-wallet/package.json index bd49e37cb..76a24c120 100644 --- a/packages/ramper-wallet/package.json +++ b/packages/ramper-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/ramper-wallet", - "version": "8.2.1", + "version": "8.3.0", "description": "Ramper wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/ramper-wallet/src/index.ts b/packages/ramper-wallet/src/index.ts index baf1a9082..b2955b45a 100644 --- a/packages/ramper-wallet/src/index.ts +++ b/packages/ramper-wallet/src/index.ts @@ -1,2 +1,2 @@ -export { setupRamper } from "./lib/ramper-wallet"; +export { setupRamperWallet } from "./lib/ramper-wallet"; export type { RamperWalletParams } from "./lib/ramper-wallet"; diff --git a/packages/ramper-wallet/src/lib/injected-ramper-wallet.ts b/packages/ramper-wallet/src/lib/injected-ramper-wallet.ts index 11bcb74c3..451444414 100644 --- a/packages/ramper-wallet/src/lib/injected-ramper-wallet.ts +++ b/packages/ramper-wallet/src/lib/injected-ramper-wallet.ts @@ -25,7 +25,7 @@ type SendTransactionParams = { network?: NearNetwork; }; -export interface InjectedRamper extends RamperInstance { +export interface InjectedRamperWallet extends RamperInstance { signIn: (clientAPIKey?: string) => Promise; signInWithProvider: SignInWithProvider; signOut: () => void; diff --git a/packages/ramper-wallet/src/lib/ramper-wallet.ts b/packages/ramper-wallet/src/lib/ramper-wallet.ts index be58d9026..0b9751701 100644 --- a/packages/ramper-wallet/src/lib/ramper-wallet.ts +++ b/packages/ramper-wallet/src/lib/ramper-wallet.ts @@ -3,7 +3,6 @@ import type { WalletBehaviourFactory, WalletModuleFactory, Transaction, - NetworkId, Account, Optional, } from "@near-wallet-selector/core"; @@ -11,7 +10,7 @@ import type { import { createAction } from "@near-wallet-selector/wallet-utils"; import { isMobile } from "is-mobile"; -import type { InjectedRamper } from "./injected-ramper-wallet"; +import type { InjectedRamperWallet } from "./injected-ramper-wallet"; import icon from "./icon"; import { init, @@ -23,27 +22,38 @@ import { } from "@ramper/near"; import type { Action } from "near-api-js/lib/transaction"; -interface RamperState { - wallet: InjectedRamper; +interface RamperWalletState { + wallet: InjectedRamperWallet; } -const setupRamperState = (): RamperState => { - const wallet = window.ramper as InjectedRamper; +const setupRamperWalletState = (): RamperWalletState => { + const wallet = window.ramper as InjectedRamperWallet; return { wallet, }; }; -const isInstalled = () => { - return !!window.ramper.isLoaded; -}; - const RamperWallet: WalletBehaviourFactory = async ({ metadata, store, + options, logger, }) => { - const _state = setupRamperState(); + await init({ + appName: "Ramper Wallet", + authProviders: [ + AUTH_PROVIDER.GOOGLE, + AUTH_PROVIDER.FACEBOOK, + AUTH_PROVIDER.TWITTER, + AUTH_PROVIDER.APPLE, + AUTH_PROVIDER.EMAIL, + ], + walletProviders: [WALLET_PROVIDER.NEAR_WALLET], + network: options.network.networkId, + theme: THEME.DARK, + }); + + const _state = setupRamperWalletState(); const getAccounts = async (): Promise> => { const { wallets } = _state.wallet.getUser(); @@ -102,7 +112,7 @@ const RamperWallet: WalletBehaviourFactory = async ({ }, async verifyOwner({ message }) { - logger.log("Ramper:verifyOwner", { message }); + logger.log("Ramper Wallet:verifyOwner", { message }); throw new Error(`Method not supported by ${metadata.name}`); }, @@ -152,13 +162,11 @@ const RamperWallet: WalletBehaviourFactory = async ({ export interface RamperWalletParams { iconUrl?: string; deprecated?: boolean; - networkId?: NetworkId; } -export function setupRamper({ +export function setupRamperWallet({ iconUrl = icon, deprecated = false, - networkId = "testnet", }: RamperWalletParams = {}): WalletModuleFactory { return async () => { const mobile = isMobile(); @@ -166,33 +174,16 @@ export function setupRamper({ return null; } - await init({ - appName: "Ramper Wallet", - authProviders: [ - AUTH_PROVIDER.GOOGLE, - AUTH_PROVIDER.FACEBOOK, - AUTH_PROVIDER.TWITTER, - AUTH_PROVIDER.APPLE, - AUTH_PROVIDER.EMAIL, - ], - walletProviders: [WALLET_PROVIDER.NEAR_WALLET], - network: networkId, - theme: THEME.DARK, - }); - - const installed = await isInstalled(); - return { id: "ramper-wallet", type: "injected", metadata: { - name: "Ramper", + name: "Ramper Wallet", description: null, iconUrl, - // Will replace we open beta with stable version downloadUrl: "https://docs.ramper.xyz/", deprecated, - available: installed, + available: true, }, init: RamperWallet, }; From 8ba005302d15a62c0241475d76911d87df1c0b74 Mon Sep 17 00:00:00 2001 From: kujtimprenkuSQA Date: Fri, 4 Aug 2023 12:56:54 +0200 Subject: [PATCH 21/71] Add permissions to Dev PR workflow. --- .github/workflows/dev-pr.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/dev-pr.yml b/.github/workflows/dev-pr.yml index 485544b9b..add395c74 100644 --- a/.github/workflows/dev-pr.yml +++ b/.github/workflows/dev-pr.yml @@ -17,6 +17,11 @@ on: - dev - main +permissions: + actions: write + issues: write + pull-requests: write + jobs: # printer: # runs-on: ubuntu-latest From 0f86de862f88b7565256e51b1b62f88c396b73ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?khi=C3=AAm?= Date: Mon, 7 Aug 2023 19:00:18 +0700 Subject: [PATCH 22/71] Submit some fixed --- .../ramper-wallet/assets/ramper-wallet.png | Bin 1931 -> 7988 bytes packages/ramper-wallet/src/lib/icon.ts | 2 +- .../ramper-wallet/src/lib/ramper-wallet.ts | 54 +++++++++++++----- ...amper-wallet.ts => ramper-wallet.types.ts} | 0 4 files changed, 40 insertions(+), 16 deletions(-) rename packages/ramper-wallet/src/lib/{injected-ramper-wallet.ts => ramper-wallet.types.ts} (100%) diff --git a/packages/ramper-wallet/assets/ramper-wallet.png b/packages/ramper-wallet/assets/ramper-wallet.png index e594c2cb827b389c08d92d2223fa6d3d7e7df78d..cc132253d28f702511ca70645a905b567868eafc 100644 GIT binary patch literal 7988 zcmW+*Wk8c(7as#9WFn!2$fP8cknTyRv@`;Ogf!AMa)5x8f`Bj@k?s!Z9^D871tkX( zgN^Oo|NZbh&xd=@Irsd|IrseTed2VrRY4R?6aWAKq^_oyNC5yA zjJlG%q5sNZj!>w}*(Wo+(rGGzr2#*b2*s<-z`PfZh(` ztKM(zx@gSUoir;<5n+E$o4__eat}b1YOQc|B(;l1&dEm>0TqW7ZWe%jL{pZpI`Qqk zhxG`#Hwn*+ibU?%9%RJc01L9kxxx6x4fcGq-!A!}xS z>=_sraXO6{p}eb)o`BXs%(=E>3;{fegADsqvhqq(#X|ABh&t4zz&8uIBrDVYr1X)F z>$aPK${+vsd?m^N`b-higHm49N_k$;kEC4M&;8EGrhkb7VRgdkU$Hv>|E zP_g480Rm zWpuNG_MF?Mt#t`To0&YOeJ6B9nM>r&XnS_qowsYF@zn0JGw#=^&%{kN=lvI>2FQ|^ zmMWzk1z$S+;kC5FYpr7O)f#rhFHMFw{|c$7QUzUs1CfFp^_b{Aya7>B1BFVY|Euh; z-C)o2apFPk4I4N6kGi9F!gArYRMq7+lWARDAIPNIM~>odO#%KNGf0n_yMU+A&W>U9 z9WMHoP@9i4SRvDHg(t_`55a}=1`oS}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(B=FLZs%F+JU>% = async ({ AUTH_PROVIDER.APPLE, AUTH_PROVIDER.EMAIL, ], - walletProviders: [WALLET_PROVIDER.NEAR_WALLET], + walletProviders: [], network: options.network.networkId, theme: THEME.DARK, }); @@ -57,7 +56,7 @@ const RamperWallet: WalletBehaviourFactory = async ({ const getAccounts = async (): Promise> => { const { wallets } = _state.wallet.getUser(); - const { publicKey: accountId } = wallets.near; + const { publicKey: accountId } = wallets["near"]; if (!accountId) { return []; @@ -94,7 +93,12 @@ const RamperWallet: WalletBehaviourFactory = async ({ return { async signIn() { - await signIn(); // signIn first because if getUser break function + const signInResult = await signIn(); + if (signInResult.method === "cancel" || signInResult.method === "none") { + throw new Error("Something went wrong"); + } + + // signIn first because if getUser break function const existingAccounts = await getAccounts(); if (existingAccounts.length) { @@ -135,11 +139,21 @@ const RamperWallet: WalletBehaviourFactory = async ({ actions: Array; }> = await transformTransactions([{ receiverId, actions }]); - const { result } = await sendTransaction({ - transactionActions: transactions, - }); - - return result[0]; + try { + const { result } = await sendTransaction({ + transactionActions: transactions, + }); + if ( + Object.keys(result[0]).length === 0 && + result[0].constructor === Object + ) { + throw new Error(); + } else { + return result[0]; + } + } catch (e) { + throw new Error("Failed to send transaction"); + } }, async signAndSendTransactions({ transactions }) { @@ -150,11 +164,21 @@ const RamperWallet: WalletBehaviourFactory = async ({ actions: Array; }> = await transformTransactions(transactions); - const { result: results } = await sendTransaction({ - transactionActions: transactionsParsed, - }); - - return results; + try { + const { result: results } = await sendTransaction({ + transactionActions: transactionsParsed, + }); + if ( + Object.keys(results[0]).length === 0 && + results[0].constructor === Object + ) { + throw new Error(); + } else { + return results; + } + } catch (e) { + throw new Error("Failed to send transactions"); + } }, }; }; diff --git a/packages/ramper-wallet/src/lib/injected-ramper-wallet.ts b/packages/ramper-wallet/src/lib/ramper-wallet.types.ts similarity index 100% rename from packages/ramper-wallet/src/lib/injected-ramper-wallet.ts rename to packages/ramper-wallet/src/lib/ramper-wallet.types.ts From 6393e74cb7e19920b7d251461070df82af4e1136 Mon Sep 17 00:00:00 2001 From: DamirSQA <111346686+DamirSQA@users.noreply.github.com> Date: Tue, 8 Aug 2023 12:27:09 +0200 Subject: [PATCH 23/71] Revert "Bump @ledgerhq/hw-transport from 6.28.5 to 6.28.6" --- package.json | 2 +- yarn.lock | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 87826509e..ab1bbb294 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "@angular/router": "15.2.9", "@here-wallet/core": "^1.4.3", "@jscutlery/semver": "^2.30.1", - "@ledgerhq/hw-transport": "6.28.6", + "@ledgerhq/hw-transport": "6.28.5", "@ledgerhq/hw-transport-webhid": "6.27.16", "@metamask/detect-provider": "^2.0.0", "@meteorwallet/sdk": "^0.8.0", diff --git a/yarn.lock b/yarn.lock index 59e7bda43..a50ea0588 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2923,20 +2923,20 @@ dependencies: lodash "^4.17.21" -"@ledgerhq/devices@^8.0.4", "@ledgerhq/devices@^8.0.5": - version "8.0.5" - resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-8.0.5.tgz#2c9b7bb3f8497795851b24c7ffd08c1261cd0783" - integrity sha512-Cy4LOfcYhYGWLd2nRA/CY/AneJT+Q3RyNwzoRx28gqAN21vF3+IZtL0jqs1n78rZ2bTEHyBS1GMOX13s5Y+O4g== +"@ledgerhq/devices@^8.0.4": + version "8.0.4" + resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-8.0.4.tgz#ebc7779adbbec2d046424603a481623eb3fbe306" + integrity sha512-dxOiWZmtEv1tgw70+rW8gviCRZUeGDUnxY6HUPiRqTAc0Ts2AXxiJChgAsPvIywWTGW+S67Nxq1oTZdpRbdt+A== dependencies: - "@ledgerhq/errors" "^6.13.0" + "@ledgerhq/errors" "^6.12.7" "@ledgerhq/logs" "^6.10.1" rxjs "6" semver "^7.3.5" -"@ledgerhq/errors@^6.12.7", "@ledgerhq/errors@^6.13.0": - version "6.13.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.13.0.tgz#f6d335d6f5c4267a1a8b20668df956a99dfb23ad" - integrity sha512-cMFNX2AN6Gdj4RVIizI/7vWb+JYRu5na0rQSjybf7xGW5MSVdFVRcOg90VvqnDRsNfgFBbJzhpf7o4D7S3yFgg== +"@ledgerhq/errors@^6.12.7": + version "6.12.7" + resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.12.7.tgz#c7b630488d5713bc7b1e1682d6ab5d08918c69f1" + integrity sha512-1BpjzFErPK7qPFx0oItcX0mNLJMplVAm2Dpl5urZlubewnTyyw5sahIBjU+8LLCWJ2eGEh/0wyvh0jMtR0n2Mg== "@ledgerhq/hw-transport-webhid@6.27.16": version "6.27.16" @@ -2948,13 +2948,13 @@ "@ledgerhq/hw-transport" "^6.28.5" "@ledgerhq/logs" "^6.10.1" -"@ledgerhq/hw-transport@6.28.6", "@ledgerhq/hw-transport@^6.28.5": - version "6.28.6" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-6.28.6.tgz#bbbddbfc95b1bae874c4a5ef6498a7dfe68a9359" - integrity sha512-0VVB4jIG6ZTRtHusI5kO2jPcc1yFQ+iIcNKiTaaBHytsdGjTfhipje+W4vxo+nCdOKdrkOqB80GwykmKuNNXyA== +"@ledgerhq/hw-transport@6.28.5", "@ledgerhq/hw-transport@^6.28.5": + version "6.28.5" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-6.28.5.tgz#675193be2f695a596068145351da598316c25831" + integrity sha512-xmw5RhYbqExBBqTvOnOjN/RYNIGMBxFJ+zcYNfkfw/E+uEY3L7xq8Z7sC/n7URTT6xtEctElqduBJnBQE4OQtw== dependencies: - "@ledgerhq/devices" "^8.0.5" - "@ledgerhq/errors" "^6.13.0" + "@ledgerhq/devices" "^8.0.4" + "@ledgerhq/errors" "^6.12.7" events "^3.3.0" "@ledgerhq/logs@^6.10.1": From 6974641fa11c7445bfa025e92f6cefdfbdeb6117 Mon Sep 17 00:00:00 2001 From: DamirSQA Date: Tue, 8 Aug 2023 12:46:46 +0200 Subject: [PATCH 24/71] set depricated flag for finer wallet --- packages/finer-wallet/src/lib/finer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/finer-wallet/src/lib/finer.ts b/packages/finer-wallet/src/lib/finer.ts index c38624976..85bebe864 100644 --- a/packages/finer-wallet/src/lib/finer.ts +++ b/packages/finer-wallet/src/lib/finer.ts @@ -14,7 +14,7 @@ export type FinerWalletParams = MyNearWalletParams; export function setupFinerWallet({ walletUrl, iconUrl = icon, - deprecated = false, + deprecated = true, }: FinerWalletParams = {}): WalletModuleFactory< BrowserWallet | InjectedWallet > { From 021ce69ab27b1b66c3a6f099efb456a38ea05d49 Mon Sep 17 00:00:00 2001 From: DamirSQA <111346686+DamirSQA@users.noreply.github.com> Date: Tue, 8 Aug 2023 12:51:01 +0200 Subject: [PATCH 25/71] Revert "Bump @ledgerhq/hw-transport from 6.27.1 to 6.28.5" --- package.json | 4 ++-- yarn.lock | 56 ++++++++++++++++++++++++++-------------------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index 3b07f6e23..42309950d 100644 --- a/package.json +++ b/package.json @@ -87,8 +87,8 @@ "@angular/router": "15.2.9", "@here-wallet/core": "^1.4.3", "@jscutlery/semver": "^2.30.1", - "@ledgerhq/hw-transport": "6.28.5", - "@ledgerhq/hw-transport-webhid": "6.27.16", + "@ledgerhq/hw-transport": "6.27.1", + "@ledgerhq/hw-transport-webhid": "6.27.1", "@metamask/detect-provider": "^2.0.0", "@meteorwallet/sdk": "^0.8.0", "@nightlylabs/connect-near": "0.0.15", diff --git a/yarn.lock b/yarn.lock index 6cebd3ded..6f4ea159d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2923,44 +2923,44 @@ dependencies: lodash "^4.17.21" -"@ledgerhq/devices@^8.0.4": - version "8.0.4" - resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-8.0.4.tgz#ebc7779adbbec2d046424603a481623eb3fbe306" - integrity sha512-dxOiWZmtEv1tgw70+rW8gviCRZUeGDUnxY6HUPiRqTAc0Ts2AXxiJChgAsPvIywWTGW+S67Nxq1oTZdpRbdt+A== +"@ledgerhq/devices@^6.27.1": + version "6.27.1" + resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-6.27.1.tgz#3b13ab1d1ba8201e9e74a08f390560483978c962" + integrity sha512-jX++oy89jtv7Dp2X6gwt3MMkoajel80JFWcdc0HCouwDsV1mVJ3SQdwl/bQU0zd8HI6KebvUP95QTwbQLLK/RQ== dependencies: - "@ledgerhq/errors" "^6.12.7" - "@ledgerhq/logs" "^6.10.1" + "@ledgerhq/errors" "^6.10.0" + "@ledgerhq/logs" "^6.10.0" rxjs "6" semver "^7.3.5" -"@ledgerhq/errors@^6.12.7": - version "6.12.7" - resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.12.7.tgz#c7b630488d5713bc7b1e1682d6ab5d08918c69f1" - integrity sha512-1BpjzFErPK7qPFx0oItcX0mNLJMplVAm2Dpl5urZlubewnTyyw5sahIBjU+8LLCWJ2eGEh/0wyvh0jMtR0n2Mg== +"@ledgerhq/errors@^6.10.0": + version "6.10.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.10.0.tgz#dda9127b65f653fbb2f74a55e8f0e550d69de6e4" + integrity sha512-fQFnl2VIXh9Yd41lGjReCeK+Q2hwxQJvLZfqHnKqWapTz68NHOv5QcI0OHuZVNEbv0xhgdLhi5b65kgYeQSUVg== -"@ledgerhq/hw-transport-webhid@6.27.16": - version "6.27.16" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-webhid/-/hw-transport-webhid-6.27.16.tgz#c8bb9f9a55d637134f24d51c2cef6e4aea3830ce" - integrity sha512-inNn710l01c0OI5sXo+8jNaxxGZermOdEsbF/a20pfvqFYvdz7WQAtmjO2NjUbScyFadxNmNnocQxQ5DRvMKOQ== +"@ledgerhq/hw-transport-webhid@6.27.1": + version "6.27.1" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-webhid/-/hw-transport-webhid-6.27.1.tgz#8fd1710d23b6bd7cbe2382dd02054dfabe788447" + integrity sha512-u74rBYlibpbyGblSn74fRs2pMM19gEAkYhfVibq0RE1GNFjxDMFC1n7Sb+93Jqmz8flyfB4UFJsxs8/l1tm2Kw== dependencies: - "@ledgerhq/devices" "^8.0.4" - "@ledgerhq/errors" "^6.12.7" - "@ledgerhq/hw-transport" "^6.28.5" - "@ledgerhq/logs" "^6.10.1" + "@ledgerhq/devices" "^6.27.1" + "@ledgerhq/errors" "^6.10.0" + "@ledgerhq/hw-transport" "^6.27.1" + "@ledgerhq/logs" "^6.10.0" -"@ledgerhq/hw-transport@6.28.5", "@ledgerhq/hw-transport@^6.28.5": - version "6.28.5" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-6.28.5.tgz#675193be2f695a596068145351da598316c25831" - integrity sha512-xmw5RhYbqExBBqTvOnOjN/RYNIGMBxFJ+zcYNfkfw/E+uEY3L7xq8Z7sC/n7URTT6xtEctElqduBJnBQE4OQtw== +"@ledgerhq/hw-transport@6.27.1", "@ledgerhq/hw-transport@^6.27.1": + version "6.27.1" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-6.27.1.tgz#88072278f69c279cb6569352acd4ae2fec33ace3" + integrity sha512-hnE4/Fq1YzQI4PA1W0H8tCkI99R3UWDb3pJeZd6/Xs4Qw/q1uiQO+vNLC6KIPPhK0IajUfuI/P2jk0qWcMsuAQ== dependencies: - "@ledgerhq/devices" "^8.0.4" - "@ledgerhq/errors" "^6.12.7" + "@ledgerhq/devices" "^6.27.1" + "@ledgerhq/errors" "^6.10.0" events "^3.3.0" -"@ledgerhq/logs@^6.10.1": - version "6.10.1" - resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-6.10.1.tgz#5bd16082261d7364eabb511c788f00937dac588d" - integrity sha512-z+ILK8Q3y+nfUl43ctCPuR4Y2bIxk/ooCQFwZxhtci1EhAtMDzMAx2W25qx8G1PPL9UUOdnUax19+F0OjXoj4w== +"@ledgerhq/logs@^6.10.0": + version "6.10.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-6.10.0.tgz#c012c1ecc1a0e53d50e6af381618dca5268461c1" + integrity sha512-lLseUPEhSFUXYTKj6q7s2O3s2vW2ebgA11vMAlKodXGf5AFw4zUoEbTz9CoFOC9jS6xY4Qr8BmRnxP/odT4Uuw== "@leichtgewicht/ip-codec@^2.0.1": version "2.0.4" From 74954c349e43c1d21972cbfc47df8a610f285fba Mon Sep 17 00:00:00 2001 From: DamirSQA Date: Tue, 8 Aug 2023 14:02:58 +0200 Subject: [PATCH 26/71] version bump to 8.4.0 --- package.json | 2 +- packages/account-export/package.json | 2 +- packages/coin98-wallet/package.json | 2 +- packages/core/package.json | 2 +- packages/default-wallets/package.json | 2 +- packages/finer-wallet/package.json | 2 +- packages/here-wallet/package.json | 2 +- packages/ledger/package.json | 2 +- packages/math-wallet/package.json | 2 +- packages/meteor-wallet/package.json | 2 +- packages/modal-ui-js/package.json | 2 +- packages/modal-ui/package.json | 2 +- packages/my-near-wallet/package.json | 2 +- packages/narwallets/package.json | 2 +- packages/near-snap/package.json | 2 +- packages/near-wallet/package.json | 2 +- packages/nearfi/package.json | 2 +- packages/neth/package.json | 2 +- packages/nightly-connect/package.json | 2 +- packages/nightly/package.json | 2 +- packages/opto-wallet/package.json | 2 +- packages/ramper-wallet/package.json | 2 +- packages/sender/package.json | 2 +- packages/wallet-connect/package.json | 2 +- packages/wallet-utils/package.json | 2 +- packages/welldone-wallet/package.json | 2 +- packages/xdefi/package.json | 2 +- 27 files changed, 27 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index 42309950d..b37e0a0ca 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "near-wallet-selector", - "version": "8.3.0", + "version": "8.4.0", "description": "NEAR Wallet Selector makes it easy for users to interact with your dApp by providing an abstraction over various wallets within the NEAR ecosystem", "keywords": [ "near", diff --git a/packages/account-export/package.json b/packages/account-export/package.json index 5bd17ce4f..5b6c95dc6 100644 --- a/packages/account-export/package.json +++ b/packages/account-export/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/account-export", - "version": "8.3.0", + "version": "8.4.0", "description": "This is the Export Selector UI package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/coin98-wallet/package.json b/packages/coin98-wallet/package.json index 8ac34eacc..4554069a8 100644 --- a/packages/coin98-wallet/package.json +++ b/packages/coin98-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/coin98-wallet", - "version": "8.3.0", + "version": "8.4.0", "description": "Coin 98 wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/core/package.json b/packages/core/package.json index 6b0125311..32b3acb26 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/core", - "version": "8.3.0", + "version": "8.4.0", "description": "This is the core package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/default-wallets/package.json b/packages/default-wallets/package.json index d06953557..09139d72b 100644 --- a/packages/default-wallets/package.json +++ b/packages/default-wallets/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/default-wallets", - "version": "8.3.0", + "version": "8.4.0", "description": "Default wallets package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/finer-wallet/package.json b/packages/finer-wallet/package.json index 24ca4144b..0bec79ff7 100644 --- a/packages/finer-wallet/package.json +++ b/packages/finer-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/finer-wallet", - "version": "8.3.0", + "version": "8.4.0", "description": "FiNER Wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/here-wallet/package.json b/packages/here-wallet/package.json index 0329b8777..2103ec303 100644 --- a/packages/here-wallet/package.json +++ b/packages/here-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/here-wallet", - "version": "8.3.0", + "version": "8.4.0", "description": "Here wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/ledger/package.json b/packages/ledger/package.json index ac6eb159a..f7cea43c1 100644 --- a/packages/ledger/package.json +++ b/packages/ledger/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/ledger", - "version": "8.3.0", + "version": "8.4.0", "description": "Ledger package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/math-wallet/package.json b/packages/math-wallet/package.json index 8938a23fe..5e2606c7a 100644 --- a/packages/math-wallet/package.json +++ b/packages/math-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/math-wallet", - "version": "8.3.0", + "version": "8.4.0", "description": "Math wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/meteor-wallet/package.json b/packages/meteor-wallet/package.json index c302ba217..633dc7ae3 100644 --- a/packages/meteor-wallet/package.json +++ b/packages/meteor-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/meteor-wallet", - "version": "8.3.0", + "version": "8.4.0", "description": "Meteor wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/modal-ui-js/package.json b/packages/modal-ui-js/package.json index bffbd8386..a2e680d6e 100644 --- a/packages/modal-ui-js/package.json +++ b/packages/modal-ui-js/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/modal-ui-js", - "version": "8.3.0", + "version": "8.4.0", "description": "Modal UI package for NEAR wallet Selector", "keywords": [ "near", diff --git a/packages/modal-ui/package.json b/packages/modal-ui/package.json index 834dc4560..28d223a22 100644 --- a/packages/modal-ui/package.json +++ b/packages/modal-ui/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/modal-ui", - "version": "8.3.0", + "version": "8.4.0", "description": "Modal UI package for NEAR wallet Selector", "keywords": [ "near", diff --git a/packages/my-near-wallet/package.json b/packages/my-near-wallet/package.json index ca7874b4c..1160ef596 100644 --- a/packages/my-near-wallet/package.json +++ b/packages/my-near-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/my-near-wallet", - "version": "8.3.0", + "version": "8.4.0", "description": "My Near Wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/narwallets/package.json b/packages/narwallets/package.json index afbac4c8a..1e27743c5 100644 --- a/packages/narwallets/package.json +++ b/packages/narwallets/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/narwallets", - "version": "8.3.0", + "version": "8.4.0", "description": "This is the Narwallets package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/near-snap/package.json b/packages/near-snap/package.json index 32264c529..80b550bed 100644 --- a/packages/near-snap/package.json +++ b/packages/near-snap/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/near-snap", - "version": "8.3.0", + "version": "8.4.0", "description": "Metamask snap to interact with Near dapps.", "keywords": [ "near", diff --git a/packages/near-wallet/package.json b/packages/near-wallet/package.json index 4d8f91d60..b2e360d38 100644 --- a/packages/near-wallet/package.json +++ b/packages/near-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/near-wallet", - "version": "8.3.0", + "version": "8.4.0", "description": "Near Wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/nearfi/package.json b/packages/nearfi/package.json index db45db890..b33fd2f95 100644 --- a/packages/nearfi/package.json +++ b/packages/nearfi/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/nearfi", - "version": "8.3.0", + "version": "8.4.0", "description": "Nearfi package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/neth/package.json b/packages/neth/package.json index db5abca7d..699ad2a4f 100644 --- a/packages/neth/package.json +++ b/packages/neth/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/neth", - "version": "8.3.0", + "version": "8.4.0", "description": "Control NEAR accounts with ETH accounts", "author": "mattlockyer", "keywords": [ diff --git a/packages/nightly-connect/package.json b/packages/nightly-connect/package.json index 94058eb8a..cd6eeac7b 100644 --- a/packages/nightly-connect/package.json +++ b/packages/nightly-connect/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/nightly-connect", - "version": "8.3.0", + "version": "8.4.0", "description": "Nightly connect package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/nightly/package.json b/packages/nightly/package.json index 1966245f9..e05ae0f6d 100644 --- a/packages/nightly/package.json +++ b/packages/nightly/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/nightly", - "version": "8.3.0", + "version": "8.4.0", "description": "Nightly wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/opto-wallet/package.json b/packages/opto-wallet/package.json index 8ea1efebf..3cfdec887 100644 --- a/packages/opto-wallet/package.json +++ b/packages/opto-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/opto-wallet", - "version": "8.3.0", + "version": "8.4.0", "description": "Opto wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/ramper-wallet/package.json b/packages/ramper-wallet/package.json index 76a24c120..4ddf592ca 100644 --- a/packages/ramper-wallet/package.json +++ b/packages/ramper-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/ramper-wallet", - "version": "8.3.0", + "version": "8.4.0", "description": "Ramper wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/sender/package.json b/packages/sender/package.json index 6eac1c53a..b0c4486c8 100644 --- a/packages/sender/package.json +++ b/packages/sender/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/sender", - "version": "8.3.0", + "version": "8.4.0", "description": "Sender wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/wallet-connect/package.json b/packages/wallet-connect/package.json index fb4f8c853..d05d9e9c0 100644 --- a/packages/wallet-connect/package.json +++ b/packages/wallet-connect/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/wallet-connect", - "version": "8.3.0", + "version": "8.4.0", "description": "Wallet Connect package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/wallet-utils/package.json b/packages/wallet-utils/package.json index 51ba4fc86..1745a67a3 100644 --- a/packages/wallet-utils/package.json +++ b/packages/wallet-utils/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/wallet-utils", - "version": "8.3.0", + "version": "8.4.0", "description": "Wallet utils package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/welldone-wallet/package.json b/packages/welldone-wallet/package.json index 099e6315e..80ec967c1 100644 --- a/packages/welldone-wallet/package.json +++ b/packages/welldone-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/welldone-wallet", - "version": "8.3.0", + "version": "8.4.0", "description": "Welldone wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/xdefi/package.json b/packages/xdefi/package.json index 8bac4eb38..8c5df0711 100644 --- a/packages/xdefi/package.json +++ b/packages/xdefi/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/xdefi", - "version": "8.3.0", + "version": "8.4.0", "description": "This is the XDEFI package for NEAR Wallet Selector.", "keywords": [ "near", From 4c35a014df8d338ddd4a718c4770f33c86352fdc Mon Sep 17 00:00:00 2001 From: Andrey Date: Tue, 18 Jul 2023 03:04:54 +0300 Subject: [PATCH 27/71] add metamask snap --- README.md | 4 + .../react/contexts/WalletSelectorContext.tsx | 12 +- package.json | 3 + packages/metamask-snap/.babelrc | 10 + packages/metamask-snap/.eslintrc.json | 18 ++ packages/metamask-snap/README.md | 65 ++++ packages/metamask-snap/assets/snap-icon.png | Bin 0 -> 43431 bytes packages/metamask-snap/jest.config.js | 14 + packages/metamask-snap/jest.config.ts | 16 + packages/metamask-snap/package.json | 30 ++ packages/metamask-snap/project.json | 55 ++++ packages/metamask-snap/src/index.ts | 1 + packages/metamask-snap/src/lib/icon.ts | 1 + packages/metamask-snap/src/lib/index.ts | 26 ++ packages/metamask-snap/src/lib/selector.ts | 75 +++++ packages/metamask-snap/tsconfig.json | 20 ++ packages/metamask-snap/tsconfig.lib.json | 17 + packages/metamask-snap/tsconfig.spec.json | 9 + packages/metamask-snap/yarn.lock | 35 ++ tsconfig.base.json | 79 +++-- yarn.lock | 302 +++++++++++++++++- 21 files changed, 763 insertions(+), 29 deletions(-) create mode 100644 packages/metamask-snap/.babelrc create mode 100644 packages/metamask-snap/.eslintrc.json create mode 100644 packages/metamask-snap/README.md create mode 100644 packages/metamask-snap/assets/snap-icon.png create mode 100644 packages/metamask-snap/jest.config.js create mode 100644 packages/metamask-snap/jest.config.ts create mode 100644 packages/metamask-snap/package.json create mode 100644 packages/metamask-snap/project.json create mode 100644 packages/metamask-snap/src/index.ts create mode 100644 packages/metamask-snap/src/lib/icon.ts create mode 100644 packages/metamask-snap/src/lib/index.ts create mode 100644 packages/metamask-snap/src/lib/selector.ts create mode 100644 packages/metamask-snap/tsconfig.json create mode 100644 packages/metamask-snap/tsconfig.lib.json create mode 100644 packages/metamask-snap/tsconfig.spec.json create mode 100644 packages/metamask-snap/yarn.lock diff --git a/README.md b/README.md index c5b7a1a43..37d7088ba 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,7 @@ yarn add \ @near-wallet-selector/sender \ @near-wallet-selector/nearfi \ @near-wallet-selector/here-wallet \ + @near-wallet-selector/metamask-snap \ @near-wallet-selector/math-wallet \ @near-wallet-selector/nightly \ @near-wallet-selector/meteor-wallet \ @@ -83,6 +84,7 @@ npm install \ @near-wallet-selector/sender \ @near-wallet-selector/nearfi \ @near-wallet-selector/here-wallet \ + @near-wallet-selector/metamask-snap \ @near-wallet-selector/math-wallet \ @near-wallet-selector/nightly \ @near-wallet-selector/meteor-wallet \ @@ -120,6 +122,7 @@ import { setupNearWallet } from "@near-wallet-selector/near-wallet"; import { setupMyNearWallet } from "@near-wallet-selector/my-near-wallet"; import { setupSender } from "@near-wallet-selector/sender"; import { setupHereWallet } from "@near-wallet-selector/here-wallet"; +import { setupMetamaskSnap } from "@near-wallet-selector/metamask-snap"; import { setupMathWallet } from "@near-wallet-selector/math-wallet"; import { setupNightly } from "@near-wallet-selector/nightly"; import { setupMeteorWallet } from "@near-wallet-selector/meteor-wallet"; @@ -144,6 +147,7 @@ const selector = await setupWalletSelector({ setupMyNearWallet(), setupSender(), setupHereWallet(), + setupMetamaskSnap(), setupMathWallet(), setupNightly(), setupMeteorWallet(), diff --git a/examples/react/contexts/WalletSelectorContext.tsx b/examples/react/contexts/WalletSelectorContext.tsx index db45398dc..02d75cac8 100644 --- a/examples/react/contexts/WalletSelectorContext.tsx +++ b/examples/react/contexts/WalletSelectorContext.tsx @@ -15,6 +15,12 @@ import { setupSender } from "@near-wallet-selector/sender"; import { setupWalletConnect } from "@near-wallet-selector/wallet-connect"; import { setupNearSnap } from "@near-wallet-selector/near-snap"; import { setupWelldoneWallet } from "@near-wallet-selector/welldone-wallet"; +import { setupMetamaskSnap } from '@near-wallet-selector/metamask-snap'; +import { setupNeth } from "@near-wallet-selector/neth"; +import { setupOptoWallet } from "@near-wallet-selector/opto-wallet"; +import { setupFinerWallet } from "@near-wallet-selector/finer-wallet"; +import { setupMyNearWallet } from "@near-wallet-selector/my-near-wallet"; +import { setupLedger } from "@near-wallet-selector/ledger"; import { setupXDEFI } from "@near-wallet-selector/xdefi"; import { setupRamperWallet } from "@near-wallet-selector/ramper-wallet"; import type { ReactNode } from "react"; @@ -27,12 +33,7 @@ import React, { } from "react"; import { distinctUntilChanged, map } from "rxjs"; -import { setupNeth } from "@near-wallet-selector/neth"; -import { setupOptoWallet } from "@near-wallet-selector/opto-wallet"; -import { setupFinerWallet } from "@near-wallet-selector/finer-wallet"; import { Loading } from "../components/Loading"; -import { setupMyNearWallet } from "@near-wallet-selector/my-near-wallet"; -import { setupLedger } from "@near-wallet-selector/ledger"; import { CONTRACT_ID } from "../constants"; declare global { @@ -72,6 +73,7 @@ export const WalletSelectorContextProvider: React.FC<{ setupMathWallet(), setupNightly(), setupMeteorWallet(), + setupMetamaskSnap({}), setupNearSnap(), setupNarwallets(), setupWelldoneWallet(), diff --git a/package.json b/package.json index b37e0a0ca..814962727 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,7 @@ "build:xdefi-wallet": "nx run-many --target=build --projects=xdefi --configuration=production", "build:wallet-utils": "nx run-many --target=build --projects=wallet-utils --configuration=production", "build:default-wallets": "nx run-many --target=build --projects=default-wallets --configuration=production", + "build:metamask-snap": "nx run-many --target=build --projects=metamask-snap --configuration=production", "build:near-snap": "nx run-many --target=build --projects=near-snap --configuration=production", "build:account-export": "nx run-many --target=build --projects=account-export --configuration=production", "build:ramper-wallet": "nx run-many --target=build --projects=ramper-wallet --configuration=production", @@ -91,6 +92,7 @@ "@ledgerhq/hw-transport-webhid": "6.27.1", "@metamask/detect-provider": "^2.0.0", "@meteorwallet/sdk": "^0.8.0", + "@near-snap/sdk": "^0.4.0", "@nightlylabs/connect-near": "0.0.15", "@ramper/near": "^0.0.30", "@walletconnect/modal": "^2.6.0", @@ -99,6 +101,7 @@ "big.js": "^6.1.1", "bn.js": "^5.2.0", "borsh": "^0.7.0", + "browserify-fs": "^1.0.0", "bs58": "^5.0.0", "buffer": "^6.0.3", "copy-to-clipboard": "^3.3.3", diff --git a/packages/metamask-snap/.babelrc b/packages/metamask-snap/.babelrc new file mode 100644 index 000000000..d5e7f8c7d --- /dev/null +++ b/packages/metamask-snap/.babelrc @@ -0,0 +1,10 @@ +{ + "presets": [ + [ + "@nrwl/js/babel", + { + "useBuiltIns": "usage" + } + ] + ] +} \ No newline at end of file diff --git a/packages/metamask-snap/.eslintrc.json b/packages/metamask-snap/.eslintrc.json new file mode 100644 index 000000000..9d9c0db55 --- /dev/null +++ b/packages/metamask-snap/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/packages/metamask-snap/README.md b/packages/metamask-snap/README.md new file mode 100644 index 000000000..fd3b2afb7 --- /dev/null +++ b/packages/metamask-snap/README.md @@ -0,0 +1,65 @@ +# @near-wallet-selector/metamask-snap + +This is the NEAR Metamask Snap package for NEAR Wallet Selector. + +## Installation and Usage + +The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v1.0.0 or above: + +```bash +# Using Yarn +yarn add near-api-js + +# Using NPM. +npm install near-api-js +``` + +```bash +# Using Yarn +yarn add @near-wallet-selector/metamask-snap + +# Using NPM. +npm install @near-wallet-selector/metamask-snap +``` + +Then use it in your dApp: + +```ts +import { setupWalletSelector } from "@near-wallet-selector/core"; +import { setupMetamaskSnap } from "@near-wallet-selector/metamask-snap"; + +const selector = await setupWalletSelector({ + network: "testnet", + modules: [setupMetamaskSnap()], +}); +``` + + +## Here Wallet JS SDK + +The library uses @near-snap/sdk, you can read more about the functionality here: +https://github.com/here-wallet/near-snap + + +## Options + +- `iconUrl`: (`string?`): Icon is optional. Default image point to Here Wallet Logo in base64 format. +- `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`. + +## Assets + +Assets such as icons can be found in the `/assets` directory of the package. Below is an example using Webpack: + +```ts +import { setupMetamaskSnap } from "@near-wallet-selector/metamask-snap"; +import SnapIconUrl from "@near-wallet-selector/metamask-snap/assets/snap-icon.png"; + +const snapWallet = setupMetamaskSnap({ + iconUrl: SnapIconUrl +}); + +``` + +## License + +This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0). diff --git a/packages/metamask-snap/assets/snap-icon.png b/packages/metamask-snap/assets/snap-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..c53147368f42f2db5ace10ed5dd148490575c7da GIT binary patch literal 43431 zcmXtgWmua{({`Y^Q{17rTXAcvwYa;xTM85_?h@Q3z!&cK`F?OD zd+i=0=giJEyEE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&hRE+!*RuTx=aUdsld$_M3K2k$?`hD5Qu*b}Zk^{_4$#*!h>ryg>fcKd_N=8&0P{i8bhOe94 zN7Mp{uz$Xw`EixjmZlp;-X9>54OGhK`aH$p^uZ<=P??v>eS6w6PqrYro>0^+(3QdJ z1kmDgqAf`IbT-4LB?})YEt8Qp@w4w|dSC*#%2k?TP*sT>4R-`AA7rff%JYUiuhjJ3 z2#%LDW(oPrE}iebwm($wXyJACYinx3l7SCo80@yt;MO*(NRXGMf57i02b=Jz$Fv5u zO&FzFlwbk1$BCfqsv=94zMg4wylUFrEil2}dY-?0do-{{8EaAmp+ju1%ecIHQe z*{|^!{Zi+i`JHDI5Cv&HOShBCbKlRRe8Wzpe{Wr(QOr|;aNrHT#fG|pG$MC$rZ&m) z>)hdI)ea/tsconfig.spec.json", + }, + }, + transform: { + "^.+\\.[tj]sx?$": "ts-jest", + }, + moduleFileExtensions: ["ts", "tsx", "js", "jsx"], + coverageDirectory: "../../coverage/packages/metamask-snap", +}; diff --git a/packages/metamask-snap/jest.config.ts b/packages/metamask-snap/jest.config.ts new file mode 100644 index 000000000..e16163f62 --- /dev/null +++ b/packages/metamask-snap/jest.config.ts @@ -0,0 +1,16 @@ +/* eslint-disable */ +export default { + displayName: "metamask-snap", + preset: "../../jest.preset.js", + globals: {}, + transform: { + "^.+\\.[tj]s$": [ + "ts-jest", + { + tsconfig: "/tsconfig.spec.json", + }, + ], + }, + moduleFileExtensions: ["ts", "tsx", "js", "jsx"], + coverageDirectory: "../../coverage/packages/metamask-snap", +}; diff --git a/packages/metamask-snap/package.json b/packages/metamask-snap/package.json new file mode 100644 index 000000000..c3d395ce2 --- /dev/null +++ b/packages/metamask-snap/package.json @@ -0,0 +1,30 @@ +{ + "name": "@near-wallet-selector/metamask-snap", + "version": "8.2.0", + "description": "Metamask Near Snap package for NEAR Wallet Selector.", + "keywords": [ + "near", + "blockchain", + "wallets", + "dapps", + "near-protocol", + "near-blockchain", + "wallet selector", + "injected wallet", + "metamask" + ], + "repository": { + "type": "git", + "url": "https://github.com/near/wallet-selector.git" + }, + "bugs": { + "url": "https://github.com/near/wallet-selector/issues" + }, + "homepage": "https://github.com/near/wallet-selector/tree/main/packages/metamask-snap", + "peerDependencies": { + "near-api-js": "^1.0.0 || ^2.0.0" + }, + "dependencies": { + "@near-snap/sdk": "^0.2.1" + } +} diff --git a/packages/metamask-snap/project.json b/packages/metamask-snap/project.json new file mode 100644 index 000000000..1a3500aae --- /dev/null +++ b/packages/metamask-snap/project.json @@ -0,0 +1,55 @@ +{ + "name": "metamask-snap", + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "packages/metamask-snap/src", + "projectType": "library", + "targets": { + "build": { + "executor": "@nrwl/rollup:rollup", + "outputs": ["{options.outputPath}"], + "options": { + "outputPath": "dist/packages/metamask-snap", + "tsConfig": "packages/metamask-snap/tsconfig.lib.json", + "project": "packages/metamask-snap/package.json", + "entryFile": "packages/metamask-snap/src/index.ts", + "buildableProjectDepsInPackageJsonType": "dependencies", + "compiler": "babel", + "format": ["esm", "cjs"], + "assets": [ + { + "glob": "packages/metamask-snap/README.md", + "input": ".", + "output": "." + }, + { + "glob": "packages/metamask-snap/assets/*", + "input": ".", + "output": "assets" + } + ] + } + }, + "lint": { + "executor": "@nx/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["packages/metamask-snap/**/*.ts"] + } + }, + "test": { + "executor": "@nx/jest:jest", + "outputs": ["{workspaceRoot}/coverage/packages/metamask-snap"], + "options": { + "jestConfig": "packages/metamask-snap/jest.config.ts", + "passWithNoTests": true + } + }, + "deploy": { + "executor": "ngx-deploy-npm:deploy", + "options": { + "access": "public" + } + } + }, + "tags": ["browser-wallet"] +} diff --git a/packages/metamask-snap/src/index.ts b/packages/metamask-snap/src/index.ts new file mode 100644 index 000000000..c1948bd26 --- /dev/null +++ b/packages/metamask-snap/src/index.ts @@ -0,0 +1 @@ +export { setupMetamaskSnap } from "./lib"; diff --git a/packages/metamask-snap/src/lib/icon.ts b/packages/metamask-snap/src/lib/icon.ts new file mode 100644 index 000000000..9097484c4 --- /dev/null +++ b/packages/metamask-snap/src/lib/icon.ts @@ -0,0 +1 @@ +export default "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzFfNCkiPgo8cGF0aCBkPSJNMTcuMDM3IDBINi45NzQ5OUMyLjYwNTA0IDAgLTkuNTM2NzNlLTA3IDIuNjE1NjkgLTkuNTM2NzNlLTA3IDYuOTgzNTFWMTcuMDI4NUMtOS41MzY3M2UtMDcgMjEuMzk2MyAyLjYwNTA0IDI0IDYuOTc0OTkgMjRIMTcuMDI1QzIxLjM5NDkgMjQgMjQgMjEuMzk2MyAyNCAxNy4wMjc1VjYuOTg0NTFDMjQuMDEyIDIuNjE1NjkgMjEuNDA2OSAwIDE3LjAzNyAwWiIgZmlsbD0iIzI0MjcyQSIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMDc1NzcgNi4wMTg0M0M2Ljc2MjgxIDYuMDYwNTkgNi40NzY5MyA2LjIyMDE2IDYuMjY5NzQgNi40NjgzNUM2LjExMjg1IDYuNjU2MjkgNi4wMTExMyA2Ljg5NDEzIDUuOTgwOTUgNy4xNDM1NEM1Ljk3NjggNy4xNzc5MSA1Ljk3NDgzIDguNzU1MzMgNS45NzQ5MiAxMi4wMDlDNS45NzUwMSAxNi4xMTggNS45NzYyNyAxNi44MzI5IDUuOTgzNDkgMTYuODg2N0M2LjA2MTUxIDE3LjQ2OCA2LjUwOTgxIDE3LjkxNjYgNy4wOTA3NyAxNy45OTQ2QzcuMTY0ODkgMTguMDA0NiA3LjMyND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z4K"; diff --git a/packages/metamask-snap/src/lib/index.ts b/packages/metamask-snap/src/lib/index.ts new file mode 100644 index 000000000..2df992fcb --- /dev/null +++ b/packages/metamask-snap/src/lib/index.ts @@ -0,0 +1,26 @@ +import type { WalletModuleFactory } from "@near-wallet-selector/core"; +import { initMetamaskSnap } from "./selector"; +import icon from "./icon"; + +export { icon }; + +export function setupMetamaskSnap({ + deprecated = false, + iconUrl = icon, +}): WalletModuleFactory { + return async () => { + return { + id: "metamask-snap", + type: "injected", + init: initMetamaskSnap, + metadata: { + name: "Metamask Snap", + description: "Metamask plugin for NEAR Protocol", + downloadUrl: "https://near-snap.surge.sh", + iconUrl, + deprecated, + available: true, + }, + }; + }; +} diff --git a/packages/metamask-snap/src/lib/selector.ts b/packages/metamask-snap/src/lib/selector.ts new file mode 100644 index 000000000..23ee45dff --- /dev/null +++ b/packages/metamask-snap/src/lib/selector.ts @@ -0,0 +1,75 @@ +import type { + InjectedWallet, + NetworkId, + WalletBehaviourFactory, +} from "@near-wallet-selector/core"; +import { NearSnap, NearSnapAccount } from "@near-snap/sdk"; + +export const initMetamaskSnap: WalletBehaviourFactory = async ( + config +) => { + const { store, logger, options } = config; + const network = options.network.networkId as NetworkId; + + const snap = new NearSnap(); + let account = await NearSnapAccount.restore({ network, snap }); + + return { + async isSignedIn() { + logger.log("MetamaskSnap:isSignedIn"); + return account != null; + }, + + async signIn({ contractId, methodNames }) { + logger.log("MetamaskSnap:signIn"); + account = await NearSnapAccount.connect({ + contractId: contractId === "" ? undefined : contractId, + methods: methodNames, + network, + snap, + }); + + return [{ accountId: account.accountId }]; + }, + + async signOut() { + logger.log("MetamaskSnap:signOut"); + await account?.disconnect(); + }, + + async getAccounts() { + return account ? [{ accountId: account.accountId }] : []; + }, + + async signAndSendTransaction(data) { + logger.log("MetamaskSnap:signAndSendTransaction", data); + + if (account == null) { + throw new Error("Wallet not signed in"); + } + + const { contract } = store.getState(); + const receiverId = data.receiverId ?? contract?.contractId; + + if (receiverId == null) { + throw new Error("ReceiverId is not defined"); + } + + return await account.executeTransaction({ receiverId, ...data }); + }, + + async verifyOwner() { + throw Error("MetamaskSnap:verifyOwner is not released yet"); + }, + + async signAndSendTransactions({ transactions }) { + logger.log("MetamaskSnap:signAndSendTransactions", { transactions }); + + if (account == null) { + throw new Error("Wallet not signed in"); + } + + return await account.executeTransactions(transactions); + }, + }; +}; diff --git a/packages/metamask-snap/tsconfig.json b/packages/metamask-snap/tsconfig.json new file mode 100644 index 000000000..d28ba19da --- /dev/null +++ b/packages/metamask-snap/tsconfig.json @@ -0,0 +1,20 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "module": "commonjs", + }, + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] +} \ No newline at end of file diff --git a/packages/metamask-snap/tsconfig.lib.json b/packages/metamask-snap/tsconfig.lib.json new file mode 100644 index 000000000..b062bd2f8 --- /dev/null +++ b/packages/metamask-snap/tsconfig.lib.json @@ -0,0 +1,17 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "declaration": true, + "module": "commonjs", + "types": [] + }, + "include": [ + "**/*.ts" + ], + "exclude": [ + "jest.config.ts", + "**/*.spec.ts", + "**/*.test.ts" + ] +} \ No newline at end of file diff --git a/packages/metamask-snap/tsconfig.spec.json b/packages/metamask-snap/tsconfig.spec.json new file mode 100644 index 000000000..b506d384e --- /dev/null +++ b/packages/metamask-snap/tsconfig.spec.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node"] + }, + "include": ["jest.config.ts", "**/*.spec.ts"] +} diff --git a/packages/metamask-snap/yarn.lock b/packages/metamask-snap/yarn.lock new file mode 100644 index 000000000..167281346 --- /dev/null +++ b/packages/metamask-snap/yarn.lock @@ -0,0 +1,35 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@near-snap/sdk@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@near-snap/sdk/-/sdk-0.2.1.tgz#402fb92b2ae9f27b4ef6ea104fb1888218adf9d9" + integrity sha512-/cE7Pptv00oDg+RJ+WgZSOLOAsMQ+lC7aUisghga6gBAlxkT0boYvwHG+GP+XNjzBX2g4oXMcRWdg3TuYwHklQ== + dependencies: + "@near-wallet-selector/core" "^8.2.0" + +"@near-wallet-selector/core@^8.2.0": + version "8.2.0" + resolved "https://registry.yarnpkg.com/@near-wallet-selector/core/-/core-8.2.0.tgz#5be2f5e371d84bba99edfcef2b056c03fc99d0c7" + integrity sha512-IHIGfT2Ce7CI5z9srC4tQkhHw/2acAIrZWIcTWLbfzN9u6eWB143hLxTe3eTD1hUVeJBXVxfZR+Ano9nKKBypw== + dependencies: + events "3.3.0" + rxjs "7.8.1" + +events@3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + +rxjs@7.8.1: + version "7.8.1" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" + integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== + dependencies: + tslib "^2.1.0" + +tslib@^2.1.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.0.tgz#b295854684dbda164e181d259a22cd779dcd7bc3" + integrity sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA== diff --git a/tsconfig.base.json b/tsconfig.base.json index 1773eeea8..db55ad402 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -11,7 +11,10 @@ "allowSyntheticDefaultImports": true, "target": "es2015", "module": "esnext", - "lib": ["es2017", "dom"], + "lib": [ + "es2017", + "dom" + ], "skipLibCheck": true, "skipDefaultLibCheck": true, "baseUrl": ".", @@ -23,7 +26,9 @@ "@near-wallet-selector/coin98-wallet": [ "packages/coin98-wallet/src/index.ts" ], - "@near-wallet-selector/core": ["packages/core/src/index.ts"], + "@near-wallet-selector/core": [ + "packages/core/src/index.ts" + ], "@near-wallet-selector/default-wallets": [ "packages/default-wallets/src/index.ts" ], @@ -33,35 +38,54 @@ "@near-wallet-selector/here-wallet": [ "packages/here-wallet/src/index.ts" ], - "@near-wallet-selector/ledger": ["packages/ledger/src/index.ts"], + "@near-wallet-selector/metamask-snap": [ + "packages/metamask-snap/src/index.ts" + ], + "@near-wallet-selector/ledger": [ + "packages/ledger/src/index.ts" + ], "@near-wallet-selector/math-wallet": [ "packages/math-wallet/src/index.ts" ], "@near-wallet-selector/meteor-wallet": [ "packages/meteor-wallet/src/index.ts" ], - "@near-wallet-selector/modal-ui": ["dist/packages/modal-ui"], + "@near-wallet-selector/modal-ui": [ + "dist/packages/modal-ui" + ], "@near-wallet-selector/modal-ui-js": [ "packages/modal-ui-js/src/index.ts" ], "@near-wallet-selector/my-near-wallet": [ "packages/my-near-wallet/src/index.ts" ], - "@near-wallet-selector/narwallets": ["packages/narwallets/src/index.ts"], - "@near-wallet-selector/near-snap": ["packages/near-snap/src/index.ts"], + "@near-wallet-selector/narwallets": [ + "packages/narwallets/src/index.ts" + ], + "@near-wallet-selector/near-snap": [ + "packages/near-snap/src/index.ts" + ], "@near-wallet-selector/near-wallet": [ "packages/near-wallet/src/index.ts" ], - "@near-wallet-selector/nearfi": ["packages/nearfi/src/index.ts"], - "@near-wallet-selector/neth": ["packages/neth/src/index.ts"], - "@near-wallet-selector/nightly": ["packages/nightly/src/index.ts"], + "@near-wallet-selector/nearfi": [ + "packages/nearfi/src/index.ts" + ], + "@near-wallet-selector/neth": [ + "packages/neth/src/index.ts" + ], + "@near-wallet-selector/nightly": [ + "packages/nightly/src/index.ts" + ], "@near-wallet-selector/nightly-connect": [ "packages/nightly-connect/src/index.ts" ], "@near-wallet-selector/opto-wallet": [ "packages/opto-wallet/src/index.ts" ], - "@near-wallet-selector/sender": ["packages/sender/src/index.ts"], + "@near-wallet-selector/sender": [ + "packages/sender/src/index.ts" + ], "@near-wallet-selector/wallet-connect": [ "packages/wallet-connect/src/index.ts" ], @@ -71,16 +95,31 @@ "@near-wallet-selector/welldone-wallet": [ "packages/welldone-wallet/src/index.ts" ], - "@near-wallet-selector/xdefi": ["packages/xdefi/src/index.ts"], - "@near-wallet-selector/ramper-wallet": [ - "packages/ramper-wallet/src/index.ts" + "@near-wallet-selector/xdefi": [ + "packages/xdefi/src/index.ts" + ], + "crypto": [ + "node_modules/crypto-browserify" + ], + "http": [ + "node_modules/stream-http" + ], + "https": [ + "node_modules/https-browserify" + ], + "stream": [ + "node_modules/stream-browserify" + ], + "url": [ + "node_modules/url" ], - "crypto": ["node_modules/crypto-browserify"], - "http": ["node_modules/stream-http"], - "https": ["node_modules/https-browserify"], - "stream": ["node_modules/stream-browserify"], - "url": ["node_modules/url"] + "fs": [ + "node_modules/browserify-fs" + ] } }, - "exclude": ["node_modules", "tmp"] -} + "exclude": [ + "node_modules", + "tmp" + ] +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 6f4ea159d..2a76e59c0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3181,6 +3181,21 @@ bn.js "5.2.1" borsh "^0.7.0" +"@near-snap/sdk@^0.4.0": + version "0.4.0" + resolved "https://registry.yarnpkg.com/@near-snap/sdk/-/sdk-0.4.0.tgz#5c09f1f93522f17694e84ffab8b66af7ecc3c083" + integrity sha512-c6qOJ6gVx/btws8eTSWTsJpCOIucvQLAFPB0BJcCYofkPknwN13tiM5Ft5BH5LN5o32HB+0IBy2G1v6Qc2QFSA== + dependencies: + "@near-wallet-selector/core" "^8.2.0" + +"@near-wallet-selector/core@^8.2.0": + version "8.2.0" + resolved "https://registry.yarnpkg.com/@near-wallet-selector/core/-/core-8.2.0.tgz#5be2f5e371d84bba99edfcef2b056c03fc99d0c7" + integrity sha512-IHIGfT2Ce7CI5z9srC4tQkhHw/2acAIrZWIcTWLbfzN9u6eWB143hLxTe3eTD1hUVeJBXVxfZR+Ano9nKKBypw== + dependencies: + events "3.3.0" + rxjs "7.8.1" + "@next/env@13.3.0": version "13.3.0" resolved "https://registry.yarnpkg.com/@next/env/-/env-13.3.0.tgz#cc2e49f03060a4684ce7ec7fd617a21bc5b9edba" @@ -5944,6 +5959,13 @@ abbrev@1, abbrev@~1.1.1: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== +abstract-leveldown@~0.12.0, abstract-leveldown@~0.12.1: + version "0.12.4" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-0.12.4.tgz#29e18e632e60e4e221d5810247852a63d7b2e410" + integrity sha512-TOod9d5RDExo6STLMGa+04HGkl+TlMfbDnTyN93/ETJ9DpQ0DaYLqcMZlbXvdc4W3vVo1Qrl+WhSp8zvDsJ+jA== + dependencies: + xtend "~3.0.0" + accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.8: version "1.3.8" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" @@ -6787,6 +6809,13 @@ bl@^4.0.3, bl@^4.1.0: inherits "^2.0.4" readable-stream "^3.4.0" +bl@~0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/bl/-/bl-0.8.2.tgz#c9b6bca08d1bc2ea00fc8afb4f1a5fd1e1c66e4e" + integrity sha512-pfqikmByp+lifZCS0p6j6KreV6kNU6Apzpm2nKOk+94cZb/jvle55+JxWiByUQ0Wo/+XnDXEy5MxxKMb6r0VIw== + dependencies: + readable-stream "~1.0.26" + blob-util@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/blob-util/-/blob-util-2.0.2.tgz#3b4e3c281111bb7f11128518006cdc60b403a1eb" @@ -6947,6 +6976,15 @@ browserify-des@^1.0.0: inherits "^2.0.1" safe-buffer "^5.1.2" +browserify-fs@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/browserify-fs/-/browserify-fs-1.0.0.tgz#f075aa8a729d4d1716d066620e386fcc1311a96f" + integrity sha512-8LqHRPuAEKvyTX34R6tsw4bO2ro6j9DmlYBhiYWHRM26Zv2cBw1fJOU0NeUQ0RkXkPn/PFBjhA0dm4AgaBurTg== + dependencies: + level-filesystem "^1.0.1" + level-js "^2.1.3" + levelup "^0.18.2" + browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: version "4.1.0" resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.1.0.tgz#b2fd06b5b75ae297f7ce2dc651f918f5be158c8d" @@ -7441,6 +7479,11 @@ clone@^1.0.2: resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== +clone@~0.1.9: + version "0.1.19" + resolved "https://registry.yarnpkg.com/clone/-/clone-0.1.19.tgz#613fb68639b26a494ac53253e15b1a6bd88ada85" + integrity sha512-IO78I0y6JcSpEPHzK4obKdsL7E7oLdRVDVOLwr2Hkbjsb+Eoz0dxW6tef0WizoKu0gLC4oZSZuEF4U2K6w1WQw== + cmd-shim@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-5.0.0.tgz#8d0aaa1a6b0708630694c4dbde070ed94c707724" @@ -7595,6 +7638,16 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== +concat-stream@^1.4.4: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + concat-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-2.0.0.tgz#414cf5af790a48c60ab9be4527d56d5e41133cb1" @@ -8451,6 +8504,13 @@ defaults@^1.0.3: dependencies: clone "^1.0.2" +deferred-leveldown@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-0.2.0.tgz#2cef1f111e1c57870d8bbb8af2650e587cd2f5b4" + integrity sha512-+WCbb4+ez/SZ77Sdy1iadagFiVzMB89IKOBhglgnUkVxOxRWmmFsz8UDSNWh4Rhq+3wr/vMFlYj+rdEwWUDdng== + dependencies: + abstract-leveldown "~0.12.1" + define-lazy-prop@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" @@ -8877,7 +8937,7 @@ err-code@^2.0.2: resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== -errno@^0.1.1: +errno@^0.1.1, errno@~0.1.1: version "0.1.8" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== @@ -9598,7 +9658,7 @@ eventemitter3@^4.0.0, eventemitter3@^4.0.4: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== -events@^3.2.0, events@^3.3.0: +events@3.3.0, events@^3.2.0, events@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== @@ -10038,6 +10098,11 @@ for-each@^0.3.3: dependencies: is-callable "^1.1.3" +foreach@~2.0.1: + version "2.0.6" + resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.6.tgz#87bcc8a1a0e74000ff2bf9802110708cfb02eb6e" + integrity sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg== + foreground-child@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.1.1.tgz#1d173e776d75d2772fed08efe4a0de1ea1b12d0d" @@ -10216,6 +10281,13 @@ functions-have-names@^1.2.2, functions-have-names@^1.2.3: resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== +fwd-stream@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/fwd-stream/-/fwd-stream-1.0.4.tgz#ed281cabed46feecf921ee32dc4c50b372ac7cfa" + integrity sha512-q2qaK2B38W07wfPSQDKMiKOD5Nzv2XyuvQlrmh1q0pxyHNanKHq8lwQ6n9zHucAwA5EbzRJKEgds2orn88rYTg== + dependencies: + readable-stream "~1.0.26-4" + gauge@^4.0.3: version "4.0.4" resolved "https://registry.yarnpkg.com/gauge/-/gauge-4.0.4.tgz#52ff0652f2bbf607a989793d53b751bef2328dce" @@ -10936,6 +11008,11 @@ icss-utils@^5.0.0, icss-utils@^5.1.0: resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae" integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== +idb-wrapper@^1.5.0: + version "1.7.2" + resolved "https://registry.yarnpkg.com/idb-wrapper/-/idb-wrapper-1.7.2.tgz#8251afd5e77fe95568b1c16152eb44b396767ea2" + integrity sha512-zfNREywMuf0NzDo9mVsL0yegjsirJxHpKHvWcyRozIqQy89g0a3U+oBPOCN4cc0oCiOuYgZHimzaW/R46G1Mpg== + identity-obj-proxy@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/identity-obj-proxy/-/identity-obj-proxy-3.0.0.tgz#94d2bda96084453ef36fbc5aaec37e0f79f1fc14" @@ -11027,6 +11104,11 @@ indent-string@^4.0.0: resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== +indexof@~0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" + integrity sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg== + infer-owner@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" @@ -11040,7 +11122,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3, inherits@~2.0.4: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3, inherits@~2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -11361,6 +11443,11 @@ is-obj@^2.0.0: resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== +is-object@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/is-object/-/is-object-0.1.2.tgz#00efbc08816c33cfc4ac8251d132e10dc65098d7" + integrity sha512-GkfZZlIZtpkFrqyAXPQSRBMsaHAw+CgoKe2HXAkjd/sfoI9+hS8PT4wg2rJxdQyUKr7N2vHJbg7/jQtE5l5vBQ== + is-path-cwd@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" @@ -11514,6 +11601,16 @@ is-wsl@^2.2.0: dependencies: is-docker "^2.0.0" +is@~0.2.6: + version "0.2.7" + resolved "https://registry.yarnpkg.com/is/-/is-0.2.7.tgz#3b34a2c48f359972f35042849193ae7264b63562" + integrity sha512-ajQCouIvkcSnl2iRdK70Jug9mohIHVX9uKpoWnl115ov0R5mzBvRrXxrnHbsA+8AdwCwc/sfw7HXmd4I5EJBdQ== + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== + isarray@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" @@ -11524,6 +11621,11 @@ isarray@~1.0.0: resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== +isbuffer@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/isbuffer/-/isbuffer-0.0.0.tgz#38c146d9df528b8bf9b0701c3d43cf12df3fc39b" + integrity sha512-xU+NoHp+YtKQkaM2HsQchYn0sltxMxew0HavMfHbjnucBoTSGbw745tL+Z7QBANleWM1eEQMenEpi174mIeS4g== + isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -12462,6 +12564,91 @@ less@4.1.3: needle "^3.1.0" source-map "~0.6.0" +level-blobs@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/level-blobs/-/level-blobs-0.1.7.tgz#9ab9b97bb99f1edbf9f78a3433e21ed56386bdaf" + integrity sha512-n0iYYCGozLd36m/Pzm206+brIgXP8mxPZazZ6ZvgKr+8YwOZ8/PPpYC5zMUu2qFygRN8RO6WC/HH3XWMW7RMVg== + dependencies: + level-peek "1.0.6" + once "^1.3.0" + readable-stream "^1.0.26-4" + +level-filesystem@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/level-filesystem/-/level-filesystem-1.2.0.tgz#a00aca9919c4a4dfafdca6a8108d225aadff63b3" + integrity sha512-PhXDuCNYpngpxp3jwMT9AYBMgOvB6zxj3DeuIywNKmZqFj2djj9XfT2XDVslfqmo0Ip79cAd3SBy3FsfOZPJ1g== + dependencies: + concat-stream "^1.4.4" + errno "^0.1.1" + fwd-stream "^1.0.4" + level-blobs "^0.1.7" + level-peek "^1.0.6" + level-sublevel "^5.2.0" + octal "^1.0.0" + once "^1.3.0" + xtend "^2.2.0" + +level-fix-range@2.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/level-fix-range/-/level-fix-range-2.0.0.tgz#c417d62159442151a19d9a2367868f1724c2d548" + integrity sha512-WrLfGWgwWbYPrHsYzJau+5+te89dUbENBg3/lsxOs4p2tYOhCHjbgXxBAj4DFqp3k/XBwitcRXoCh8RoCogASA== + dependencies: + clone "~0.1.9" + +level-fix-range@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/level-fix-range/-/level-fix-range-1.0.2.tgz#bf15b915ae36d8470c821e883ddf79cd16420828" + integrity sha512-9llaVn6uqBiSlBP+wKiIEoBa01FwEISFgHSZiyec2S0KpyLUkGR4afW/FCZ/X8y+QJvzS0u4PGOlZDdh1/1avQ== + +"level-hooks@>=4.4.0 <5": + version "4.5.0" + resolved "https://registry.yarnpkg.com/level-hooks/-/level-hooks-4.5.0.tgz#1b9ae61922930f3305d1a61fc4d83c8102c0dd93" + integrity sha512-fxLNny/vL/G4PnkLhWsbHnEaRi+A/k8r5EH/M77npZwYL62RHi2fV0S824z3QdpAk6VTgisJwIRywzBHLK4ZVA== + dependencies: + string-range "~1.2" + +level-js@^2.1.3: + version "2.2.4" + resolved "https://registry.yarnpkg.com/level-js/-/level-js-2.2.4.tgz#bc055f4180635d4489b561c9486fa370e8c11697" + integrity sha512-lZtjt4ZwHE00UMC1vAb271p9qzg8vKlnDeXfIesH3zL0KxhHRDjClQLGLWhyR0nK4XARnd4wc/9eD1ffd4PshQ== + dependencies: + abstract-leveldown "~0.12.0" + idb-wrapper "^1.5.0" + isbuffer "~0.0.0" + ltgt "^2.1.2" + typedarray-to-buffer "~1.0.0" + xtend "~2.1.2" + +level-peek@1.0.6, level-peek@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/level-peek/-/level-peek-1.0.6.tgz#bec51c72a82ee464d336434c7c876c3fcbcce77f" + integrity sha512-TKEzH5TxROTjQxWMczt9sizVgnmJ4F3hotBI48xCTYvOKd/4gA/uY0XjKkhJFo6BMic8Tqjf6jFMLWeg3MAbqQ== + dependencies: + level-fix-range "~1.0.2" + +level-sublevel@^5.2.0: + version "5.2.3" + resolved "https://registry.yarnpkg.com/level-sublevel/-/level-sublevel-5.2.3.tgz#744c12c72d2e72be78dde3b9b5cd84d62191413a" + integrity sha512-tO8jrFp+QZYrxx/Gnmjawuh1UBiifpvKNAcm4KCogesWr1Nm2+ckARitf+Oo7xg4OHqMW76eAqQ204BoIlscjA== + dependencies: + level-fix-range "2.0" + level-hooks ">=4.4.0 <5" + string-range "~1.2.1" + xtend "~2.0.4" + +levelup@^0.18.2: + version "0.18.6" + resolved "https://registry.yarnpkg.com/levelup/-/levelup-0.18.6.tgz#e6a01cb089616c8ecc0291c2a9bd3f0c44e3e5eb" + integrity sha512-uB0auyRqIVXx+hrpIUtol4VAPhLRcnxcOsd2i2m6rbFIDarO5dnrupLOStYYpEcu8ZT087Z9HEuYw1wjr6RL6Q== + dependencies: + bl "~0.8.1" + deferred-leveldown "~0.2.0" + errno "~0.1.1" + prr "~0.0.0" + readable-stream "~1.0.26" + semver "~2.3.1" + xtend "~3.0.0" + leven@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" @@ -12837,6 +13024,11 @@ lru-cache@^9.1.1: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-9.1.2.tgz#255fdbc14b75589d6d0e73644ca167a8db506835" integrity sha512-ERJq3FOzJTxBbFjZ7iDs+NiK4VI9Wz+RdrrAB8dio1oV+YvdPzUEE4QNiT2VD51DkIbCYRUUzCRkssXCHqSnKQ== +ltgt@^2.1.2: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.2.1.tgz#f35ca91c493f7b73da0e07495304f17b31f87ee5" + integrity sha512-AI2r85+4MquTw9ZYqabu4nMwy9Oftlfa/e/52t9IjtfG+mGBbTNdAoZ3RQKLHR6r0wQnwZnPIEh/Ya6XTWAKNA== + lz-string@^1.4.4: version "1.4.4" resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.4.4.tgz#c0d8eaf36059f705796e1e344811cf4c498d3a26" @@ -14053,6 +14245,20 @@ object-keys@^1.1.1: resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== +object-keys@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-0.2.0.tgz#cddec02998b091be42bf1035ae32e49f1cb6ea67" + integrity sha512-XODjdR2pBh/1qrjPcbSeSgEtKbYo7LqYNq64/TPuCf7j9SfDD3i21yatKoIy39yIWNvVM59iutfQQpCv1RfFzA== + dependencies: + foreach "~2.0.1" + indexof "~0.0.1" + is "~0.2.6" + +object-keys@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-0.4.0.tgz#28a6aae7428dd2c3a92f3d95f21335dd204e0336" + integrity sha512-ncrLw+X55z7bkl5PnUvHwFK9FcGuFYo9gtjws2XtSzL+aZ8tm830P60WJ0dSmFVaSalWieW5MD7kEdnXda9yJw== + object.assign@^4.1.0, object.assign@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" @@ -14122,6 +14328,11 @@ obuf@^1.0.0, obuf@^1.1.2: resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== +octal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/octal/-/octal-1.0.0.tgz#63e7162a68efbeb9e213588d58e989d1e5c4530b" + integrity sha512-nnda7W8d+A3vEIY+UrDQzzboPf1vhs4JYVhff5CDkq9QNoZY7Xrxeo/htox37j9dZf7yNHevZzqtejWgy1vCqQ== + on-exit-leak-free@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/on-exit-leak-free/-/on-exit-leak-free-0.2.0.tgz#b39c9e3bf7690d890f4861558b0d7b90a442d209" @@ -15262,6 +15473,11 @@ proxy-from-env@^1.1.0: resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== +prr@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" + integrity sha512-LmUECmrW7RVj6mDWKjTXfKug7TFGdiz9P18HMcO4RHL+RW7MCOGNvpj5j47Rnp6ne6r4fZ2VzyUWEpKbg+tsjQ== + prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" @@ -15598,6 +15814,16 @@ readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stre string_decoder "^1.1.1" util-deprecate "^1.0.1" +readable-stream@^1.0.26-4: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + integrity sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" @@ -15611,6 +15837,29 @@ readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable string_decoder "~1.1.1" util-deprecate "~1.0.1" +readable-stream@^2.2.2: + version "2.3.8" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" + integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readable-stream@~1.0.26, readable-stream@~1.0.26-4: + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + integrity sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + readdir-scoped-modules@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz#8d45407b4f870a0dcaebc0e28670d18e74514309" @@ -16002,7 +16251,7 @@ rxjs@7.8.0: dependencies: tslib "^2.1.0" -rxjs@^7.5.1, rxjs@^7.5.5, rxjs@^7.8.1: +rxjs@7.8.1, rxjs@^7.5.1, rxjs@^7.5.5, rxjs@^7.8.1: version "7.8.1" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== @@ -16249,6 +16498,11 @@ semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== +semver@~2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-2.3.2.tgz#b9848f25d6cf36333073ec9ef8856d42f1233e52" + integrity sha512-abLdIKCosKfpnmhS52NCTjO4RiLspDfsn37prjzGrp9im5DPJOgh82Os92vtwGh6XdQryKI/7SREZnV+aqiXrA== + send@0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" @@ -16770,6 +17024,11 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" +string-range@~1.2, string-range@~1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/string-range/-/string-range-1.2.2.tgz#a893ed347e72299bc83befbbf2a692a8d239d5dd" + integrity sha512-tYft6IFi8SjplJpxCUxyqisD3b+R2CSkomrtJYCkvuf1KuCAWgz7YXt4O0jip7efpfCemwHEzTEAO8EuOYgh3w== + "string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" @@ -16854,6 +17113,11 @@ string_decoder@^1.1.1: dependencies: safe-buffer "~5.2.0" +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + integrity sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ== + string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" @@ -17557,6 +17821,11 @@ typed-assert@^1.0.8: resolved "https://registry.yarnpkg.com/typed-assert/-/typed-assert-1.0.9.tgz#8af9d4f93432c4970ec717e3006f33f135b06213" integrity sha512-KNNZtayBCtmnNmbo5mG47p1XsCyrx6iVqomjcZnec/1Y5GGARaxPs6r49RnSPeUP3YjNYiU9sQHAtY4BBvnZwg== +typedarray-to-buffer@~1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-1.0.4.tgz#9bb8ba0e841fb3f4cf1fe7c245e9f3fa8a5fe99c" + integrity sha512-vjMKrfSoUDN8/Vnqitw2FmstOfuJ73G6CrSEKnf11A6RmasVxHqfeBcnTb6RsL4pTMuV5Zsv9IiHRphMZyckUw== + typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" @@ -18329,11 +18598,36 @@ xmlcreate@^2.0.4: resolved "https://registry.yarnpkg.com/xmlcreate/-/xmlcreate-2.0.4.tgz#0c5ab0f99cdd02a81065fa9cd8f8ae87624889be" integrity sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg== +xtend@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.2.0.tgz#eef6b1f198c1c8deafad8b1765a04dad4a01c5a9" + integrity sha512-SLt5uylT+4aoXxXuwtQp5ZnMMzhDb1Xkg4pEqc00WUJCQifPfV9Ub1VrNhp9kXkrjZD2I2Hl8WnjP37jzZLPZw== + xtend@^4.0.2, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== +xtend@~2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.0.6.tgz#5ea657a6dba447069c2e59c58a1138cb0c5e6cee" + integrity sha512-fOZg4ECOlrMl+A6Msr7EIFcON1L26mb4NY5rurSkOex/TWhazOrg6eXD/B0XkuiYcYhQDWLXzQxLMVJ7LXwokg== + dependencies: + is-object "~0.1.2" + object-keys "~0.2.0" + +xtend@~2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b" + integrity sha512-vMNKzr2rHP9Dp/e1NQFnLQlwlhp9L/LfvnsVdHxN1f+uggyVI3i08uD14GPvCToPkdsRfyPqIyYGmIk58V98ZQ== + dependencies: + object-keys "~0.4.0" + +xtend@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-3.0.0.tgz#5cce7407baf642cba7becda568111c493f59665a" + integrity sha512-sp/sT9OALMjRW1fKDlPeuSZlDQpkqReA0pyJukniWbTGoEKefHxhGJynE3PNhUMlcM8qWIjPwecwCw4LArS5Eg== + y18n@^4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" From 25461ebe7c5ae1fbf54db272319f399209aa1a17 Mon Sep 17 00:00:00 2001 From: Andrey Date: Sat, 22 Jul 2023 12:25:35 +0300 Subject: [PATCH 28/71] rewrite near-snap --- README.md | 7 +- .../react/contexts/WalletSelectorContext.tsx | 5 +- package.json | 2 +- packages/metamask-snap/.babelrc | 10 -- packages/metamask-snap/.eslintrc.json | 18 --- packages/metamask-snap/README.md | 65 ---------- packages/metamask-snap/assets/snap-icon.png | Bin 43431 -> 0 bytes packages/metamask-snap/jest.config.ts | 16 --- packages/metamask-snap/package.json | 30 ----- packages/metamask-snap/project.json | 55 --------- packages/metamask-snap/src/index.ts | 1 - packages/metamask-snap/src/lib/icon.ts | 1 - packages/metamask-snap/tsconfig.json | 20 ---- packages/metamask-snap/tsconfig.lib.json | 17 --- packages/metamask-snap/tsconfig.spec.json | 9 -- packages/metamask-snap/yarn.lock | 35 ------ packages/near-snap/.babelrc | 2 +- packages/near-snap/README.md | 36 +++--- .../{near-snap-icon.png => near-icon.png} | Bin .../jest.config.js | 4 +- packages/near-snap/jest.config.ts | 2 +- packages/near-snap/package.json | 2 - packages/near-snap/project.json | 2 +- packages/near-snap/src/index.ts | 3 +- .../src/lib/index.ts | 14 +-- packages/near-snap/src/lib/methods.ts | 56 --------- packages/near-snap/src/lib/near-snap.ts | 113 ------------------ .../src/lib/selector.ts | 14 +-- packages/near-snap/src/lib/types.ts | 48 -------- packages/near-snap/src/lib/utils.ts | 41 ------- packages/near-snap/tsconfig.json | 6 +- packages/near-snap/tsconfig.lib.json | 13 +- packages/near-snap/tsconfig.spec.json | 2 +- tsconfig.base.json | 4 +- 34 files changed, 58 insertions(+), 595 deletions(-) delete mode 100644 packages/metamask-snap/.babelrc delete mode 100644 packages/metamask-snap/.eslintrc.json delete mode 100644 packages/metamask-snap/README.md delete mode 100644 packages/metamask-snap/assets/snap-icon.png delete mode 100644 packages/metamask-snap/jest.config.ts delete mode 100644 packages/metamask-snap/package.json delete mode 100644 packages/metamask-snap/project.json delete mode 100644 packages/metamask-snap/src/index.ts delete mode 100644 packages/metamask-snap/src/lib/icon.ts delete mode 100644 packages/metamask-snap/tsconfig.json delete mode 100644 packages/metamask-snap/tsconfig.lib.json delete mode 100644 packages/metamask-snap/tsconfig.spec.json delete mode 100644 packages/metamask-snap/yarn.lock rename packages/near-snap/assets/{near-snap-icon.png => near-icon.png} (100%) rename packages/{metamask-snap => near-snap}/jest.config.js (72%) rename packages/{metamask-snap => near-snap}/src/lib/index.ts (59%) delete mode 100644 packages/near-snap/src/lib/methods.ts delete mode 100644 packages/near-snap/src/lib/near-snap.ts rename packages/{metamask-snap => near-snap}/src/lib/selector.ts (79%) delete mode 100644 packages/near-snap/src/lib/types.ts delete mode 100644 packages/near-snap/src/lib/utils.ts diff --git a/README.md b/README.md index 37d7088ba..e56b60d18 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ yarn add \ @near-wallet-selector/sender \ @near-wallet-selector/nearfi \ @near-wallet-selector/here-wallet \ - @near-wallet-selector/metamask-snap \ + @near-wallet-selector/near-snap \ @near-wallet-selector/math-wallet \ @near-wallet-selector/nightly \ @near-wallet-selector/meteor-wallet \ @@ -84,7 +84,7 @@ npm install \ @near-wallet-selector/sender \ @near-wallet-selector/nearfi \ @near-wallet-selector/here-wallet \ - @near-wallet-selector/metamask-snap \ + @near-wallet-selector/near-snap \ @near-wallet-selector/math-wallet \ @near-wallet-selector/nightly \ @near-wallet-selector/meteor-wallet \ @@ -122,7 +122,7 @@ import { setupNearWallet } from "@near-wallet-selector/near-wallet"; import { setupMyNearWallet } from "@near-wallet-selector/my-near-wallet"; import { setupSender } from "@near-wallet-selector/sender"; import { setupHereWallet } from "@near-wallet-selector/here-wallet"; -import { setupMetamaskSnap } from "@near-wallet-selector/metamask-snap"; +import { setupNearSnap } from "@near-wallet-selector/near-snap"; import { setupMathWallet } from "@near-wallet-selector/math-wallet"; import { setupNightly } from "@near-wallet-selector/nightly"; import { setupMeteorWallet } from "@near-wallet-selector/meteor-wallet"; @@ -147,7 +147,6 @@ const selector = await setupWalletSelector({ setupMyNearWallet(), setupSender(), setupHereWallet(), - setupMetamaskSnap(), setupMathWallet(), setupNightly(), setupMeteorWallet(), diff --git a/examples/react/contexts/WalletSelectorContext.tsx b/examples/react/contexts/WalletSelectorContext.tsx index 02d75cac8..59b36dc4a 100644 --- a/examples/react/contexts/WalletSelectorContext.tsx +++ b/examples/react/contexts/WalletSelectorContext.tsx @@ -13,9 +13,8 @@ import { setupNightly } from "@near-wallet-selector/nightly"; import { setupNightlyConnect } from "@near-wallet-selector/nightly-connect"; import { setupSender } from "@near-wallet-selector/sender"; import { setupWalletConnect } from "@near-wallet-selector/wallet-connect"; -import { setupNearSnap } from "@near-wallet-selector/near-snap"; import { setupWelldoneWallet } from "@near-wallet-selector/welldone-wallet"; -import { setupMetamaskSnap } from '@near-wallet-selector/metamask-snap'; +import { setupNearSnap } from "@near-wallet-selector/near-snap"; import { setupNeth } from "@near-wallet-selector/neth"; import { setupOptoWallet } from "@near-wallet-selector/opto-wallet"; import { setupFinerWallet } from "@near-wallet-selector/finer-wallet"; @@ -73,7 +72,7 @@ export const WalletSelectorContextProvider: React.FC<{ setupMathWallet(), setupNightly(), setupMeteorWallet(), - setupMetamaskSnap({}), + setupNearSnap(), setupNearSnap(), setupNarwallets(), setupWelldoneWallet(), diff --git a/package.json b/package.json index 814962727..8fddfcd1b 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "build:xdefi-wallet": "nx run-many --target=build --projects=xdefi --configuration=production", "build:wallet-utils": "nx run-many --target=build --projects=wallet-utils --configuration=production", "build:default-wallets": "nx run-many --target=build --projects=default-wallets --configuration=production", - "build:metamask-snap": "nx run-many --target=build --projects=metamask-snap --configuration=production", + "build:near-snap": "nx run-many --target=build --projects=near-snap --configuration=production", "build:near-snap": "nx run-many --target=build --projects=near-snap --configuration=production", "build:account-export": "nx run-many --target=build --projects=account-export --configuration=production", "build:ramper-wallet": "nx run-many --target=build --projects=ramper-wallet --configuration=production", diff --git a/packages/metamask-snap/.babelrc b/packages/metamask-snap/.babelrc deleted file mode 100644 index d5e7f8c7d..000000000 --- a/packages/metamask-snap/.babelrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "presets": [ - [ - "@nrwl/js/babel", - { - "useBuiltIns": "usage" - } - ] - ] -} \ No newline at end of file diff --git a/packages/metamask-snap/.eslintrc.json b/packages/metamask-snap/.eslintrc.json deleted file mode 100644 index 9d9c0db55..000000000 --- a/packages/metamask-snap/.eslintrc.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": ["../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], - "rules": {} - }, - { - "files": ["*.ts", "*.tsx"], - "rules": {} - }, - { - "files": ["*.js", "*.jsx"], - "rules": {} - } - ] -} diff --git a/packages/metamask-snap/README.md b/packages/metamask-snap/README.md deleted file mode 100644 index fd3b2afb7..000000000 --- a/packages/metamask-snap/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# @near-wallet-selector/metamask-snap - -This is the NEAR Metamask Snap package for NEAR Wallet Selector. - -## Installation and Usage - -The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v1.0.0 or above: - -```bash -# Using Yarn -yarn add near-api-js - -# Using NPM. -npm install near-api-js -``` - -```bash -# Using Yarn -yarn add @near-wallet-selector/metamask-snap - -# Using NPM. -npm install @near-wallet-selector/metamask-snap -``` - -Then use it in your dApp: - -```ts -import { setupWalletSelector } from "@near-wallet-selector/core"; -import { setupMetamaskSnap } from "@near-wallet-selector/metamask-snap"; - -const selector = await setupWalletSelector({ - network: "testnet", - modules: [setupMetamaskSnap()], -}); -``` - - -## Here Wallet JS SDK - -The library uses @near-snap/sdk, you can read more about the functionality here: -https://github.com/here-wallet/near-snap - - -## Options - -- `iconUrl`: (`string?`): Icon is optional. Default image point to Here Wallet Logo in base64 format. -- `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`. - -## Assets - -Assets such as icons can be found in the `/assets` directory of the package. Below is an example using Webpack: - -```ts -import { setupMetamaskSnap } from "@near-wallet-selector/metamask-snap"; -import SnapIconUrl from "@near-wallet-selector/metamask-snap/assets/snap-icon.png"; - -const snapWallet = setupMetamaskSnap({ - iconUrl: SnapIconUrl -}); - -``` - -## License - -This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0). diff --git a/packages/metamask-snap/assets/snap-icon.png b/packages/metamask-snap/assets/snap-icon.png deleted file mode 100644 index c53147368f42f2db5ace10ed5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I0%@nPxDS{oe;ek`BR`*bt zhaVS!LEVW(1vM}Ja9snQ7NbTSM3jvOlrnB$1#I%?w41b??~~Gi6b^(x79umKyp zN}!v&-#-Z>#9n!hjIRZM81~0PmwSnG&hRE+!*RuTx=aUdsld$_M3K2k$?`hD5Qu*b}Zk^{_4$#*!h>ryg>fcKd_N=8&0P{i8bhOe94 zN7Mp{uz$Xw`EixjmZlp;-X9>54OGhK`aH$p^uZ<=P??v>eS6w6PqrYro>0^+(3QdJ z1kmDgqAf`IbT-4LB?})YEt8Qp@w4w|dSC*#%2k?TP*sT>4R-`AA7rff%JYUiuhjJ3 z2#%LDW(oPrE}iebwm($wXyJACYinx3l7SCo80@yt;MO*(NRXGMf57i02b=Jz$Fv5u zO&FzFlwbk1$BCfqsv=94zMg4wylUFrEil2}dY-?0do-{{8EaAmp+ju1%ecIHQe z*{|^!{Zi+i`JHDI5Cv&HOShBCbKlRRe8Wzpe{Wr(QOr|;aNrHT#fG|pG$MC$rZ&m) z>)hdI)ea/tsconfig.spec.json", - }, - ], - }, - moduleFileExtensions: ["ts", "tsx", "js", "jsx"], - coverageDirectory: "../../coverage/packages/metamask-snap", -}; diff --git a/packages/metamask-snap/package.json b/packages/metamask-snap/package.json deleted file mode 100644 index c3d395ce2..000000000 --- a/packages/metamask-snap/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "@near-wallet-selector/metamask-snap", - "version": "8.2.0", - "description": "Metamask Near Snap package for NEAR Wallet Selector.", - "keywords": [ - "near", - "blockchain", - "wallets", - "dapps", - "near-protocol", - "near-blockchain", - "wallet selector", - "injected wallet", - "metamask" - ], - "repository": { - "type": "git", - "url": "https://github.com/near/wallet-selector.git" - }, - "bugs": { - "url": "https://github.com/near/wallet-selector/issues" - }, - "homepage": "https://github.com/near/wallet-selector/tree/main/packages/metamask-snap", - "peerDependencies": { - "near-api-js": "^1.0.0 || ^2.0.0" - }, - "dependencies": { - "@near-snap/sdk": "^0.2.1" - } -} diff --git a/packages/metamask-snap/project.json b/packages/metamask-snap/project.json deleted file mode 100644 index 1a3500aae..000000000 --- a/packages/metamask-snap/project.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "metamask-snap", - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "packages/metamask-snap/src", - "projectType": "library", - "targets": { - "build": { - "executor": "@nrwl/rollup:rollup", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/packages/metamask-snap", - "tsConfig": "packages/metamask-snap/tsconfig.lib.json", - "project": "packages/metamask-snap/package.json", - "entryFile": "packages/metamask-snap/src/index.ts", - "buildableProjectDepsInPackageJsonType": "dependencies", - "compiler": "babel", - "format": ["esm", "cjs"], - "assets": [ - { - "glob": "packages/metamask-snap/README.md", - "input": ".", - "output": "." - }, - { - "glob": "packages/metamask-snap/assets/*", - "input": ".", - "output": "assets" - } - ] - } - }, - "lint": { - "executor": "@nx/linter:eslint", - "outputs": ["{options.outputFile}"], - "options": { - "lintFilePatterns": ["packages/metamask-snap/**/*.ts"] - } - }, - "test": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/packages/metamask-snap"], - "options": { - "jestConfig": "packages/metamask-snap/jest.config.ts", - "passWithNoTests": true - } - }, - "deploy": { - "executor": "ngx-deploy-npm:deploy", - "options": { - "access": "public" - } - } - }, - "tags": ["browser-wallet"] -} diff --git a/packages/metamask-snap/src/index.ts b/packages/metamask-snap/src/index.ts deleted file mode 100644 index c1948bd26..000000000 --- a/packages/metamask-snap/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { setupMetamaskSnap } from "./lib"; diff --git a/packages/metamask-snap/src/lib/icon.ts b/packages/metamask-snap/src/lib/icon.ts deleted file mode 100644 index 9097484c4..000000000 --- a/packages/metamask-snap/src/lib/icon.ts +++ /dev/null @@ -1 +0,0 @@ -export default "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIg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NDExNUMxNS45NTU4IDE1LjQwNTcgMTUuOTI0OCAxNS4zNzM5IDE1Ljg5NzIgMTUuMzQwOUMxNS44Njk2IDE1LjMwNzkgMTUuNDIxOCAxNC43NzE2IDE0LjkwMjEgMTQuMTQ5M0MxNC4zODIzIDEzLjUyNjkgMTIuNzE5NSAxMS41MzYgMTEuMjA3MSA5LjcyNTAzQzkuNjk0NzYgNy45MTQwNSA4LjQzMjY4IDYuNDA3MTQgOC40MDI1NCA2LjM3NjM1QzguMjA4MzYgNi4xNzc5OSA3Ljk1NzYxIDYuMDU0MjEgNy42NzY5NSA2LjAxODJDNy41ODMzNCA2LjAwNjE4IDcuMTY1NDkgNi4wMDYzNSA3LjA3NTc3IDYuMDE4NDNaIiBmaWxsPSJ1cmwoI3BhaW50MF9saW5lYXJfMV80KSIvPgo8L2c+CjxkZWZzPgo8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MF9saW5lYXJfMV80IiB4MT0iMTEuOTc0OSIgeTE9IjYuMDA5MjgiIHgyPSIxMS45NzQ5IiB5Mj0iMTguMDAzMyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgo8c3RvcCBzdG9wLWNvbG9yPSIjRkI3RkU0Ii8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0JDQUJGQiIvPgo8L2xpbmVhckdyYWRpZW50Pgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzFfNCI+CjxyZWN0IHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K"; diff --git a/packages/metamask-snap/tsconfig.json b/packages/metamask-snap/tsconfig.json deleted file mode 100644 index d28ba19da..000000000 --- a/packages/metamask-snap/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "module": "commonjs", - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.lib.json" - }, - { - "path": "./tsconfig.spec.json" - } - ] -} \ No newline at end of file diff --git a/packages/metamask-snap/tsconfig.lib.json b/packages/metamask-snap/tsconfig.lib.json deleted file mode 100644 index b062bd2f8..000000000 --- a/packages/metamask-snap/tsconfig.lib.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "declaration": true, - "module": "commonjs", - "types": [] - }, - "include": [ - "**/*.ts" - ], - "exclude": [ - "jest.config.ts", - "**/*.spec.ts", - "**/*.test.ts" - ] -} \ No newline at end of file diff --git a/packages/metamask-snap/tsconfig.spec.json b/packages/metamask-snap/tsconfig.spec.json deleted file mode 100644 index b506d384e..000000000 --- a/packages/metamask-snap/tsconfig.spec.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node"] - }, - "include": ["jest.config.ts", "**/*.spec.ts"] -} diff --git a/packages/metamask-snap/yarn.lock b/packages/metamask-snap/yarn.lock deleted file mode 100644 index 167281346..000000000 --- a/packages/metamask-snap/yarn.lock +++ /dev/null @@ -1,35 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@near-snap/sdk@^0.2.1": - version "0.2.1" - resolved "https://registry.yarnpkg.com/@near-snap/sdk/-/sdk-0.2.1.tgz#402fb92b2ae9f27b4ef6ea104fb1888218adf9d9" - integrity sha512-/cE7Pptv00oDg+RJ+WgZSOLOAsMQ+lC7aUisghga6gBAlxkT0boYvwHG+GP+XNjzBX2g4oXMcRWdg3TuYwHklQ== - dependencies: - "@near-wallet-selector/core" "^8.2.0" - -"@near-wallet-selector/core@^8.2.0": - version "8.2.0" - resolved "https://registry.yarnpkg.com/@near-wallet-selector/core/-/core-8.2.0.tgz#5be2f5e371d84bba99edfcef2b056c03fc99d0c7" - integrity sha512-IHIGfT2Ce7CI5z9srC4tQkhHw/2acAIrZWIcTWLbfzN9u6eWB143hLxTe3eTD1hUVeJBXVxfZR+Ano9nKKBypw== - dependencies: - events "3.3.0" - rxjs "7.8.1" - -events@3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" - integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== - -rxjs@7.8.1: - version "7.8.1" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" - integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== - dependencies: - tslib "^2.1.0" - -tslib@^2.1.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.0.tgz#b295854684dbda164e181d259a22cd779dcd7bc3" - integrity sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA== diff --git a/packages/near-snap/.babelrc b/packages/near-snap/.babelrc index b63f0528f..d5e7f8c7d 100644 --- a/packages/near-snap/.babelrc +++ b/packages/near-snap/.babelrc @@ -7,4 +7,4 @@ } ] ] -} +} \ No newline at end of file diff --git a/packages/near-snap/README.md b/packages/near-snap/README.md index b1aaea165..bd108dae8 100644 --- a/packages/near-snap/README.md +++ b/packages/near-snap/README.md @@ -1,7 +1,6 @@ # @near-wallet-selector/near-snap -[Metamask Snap](https://metamask.io/snaps/) system that allows anyone to safely expand the capabilities of MetaMask. Currently is pre-release software running on [Metamask Flask](https://metamask.io/flask/). -This package implement NEAR snap for NEAR Wallet Selector. +This is the NEAR Metamask Snap package for NEAR Wallet Selector. ## Installation and Usage @@ -27,22 +26,24 @@ Then use it in your dApp: ```ts import { setupWalletSelector } from "@near-wallet-selector/core"; -import { setupNearSnap } from "@near-wallet-selector/near-snap"; - -// NearSnap for Wallet Selector can be setup without any params or it can take one optional param. -const nearSnap = setupNearSnap({ - iconUrl: "https://yourdomain.com/yourwallet-icon.png" //optional -}); +import { setupMetamaskSnap } from "@near-wallet-selector/near-snap"; const selector = await setupWalletSelector({ network: "testnet", - modules: [nearSnap], + modules: [setupMetamaskSnap()], }); ``` + +## Here Wallet JS SDK + +The library uses @near-snap/sdk, you can read more about the functionality here: +https://github.com/here-wallet/near-snap + + ## Options -- `iconUrl`: (`string?`): Image URL for the icon shown in the modal. This can also be a relative path or base64 encoded image. Defaults to `./assets/near-snap-icon.png`. +- `iconUrl`: (`string?`): Icon is optional. Default image point to Here Wallet Logo in base64 format. - `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`. ## Assets @@ -50,19 +51,14 @@ const selector = await setupWalletSelector({ Assets such as icons can be found in the `/assets` directory of the package. Below is an example using Webpack: ```ts -import { setupNearSnap } from "@near-wallet-selector/near-snap"; -import nearSnapIconUrl from "@near-wallet-selector/near-snap/assets/near-snap-icon.png"; +import { setupMetamaskSnap } from "@near-wallet-selector/near-snap"; +import SnapIconUrl from "@near-wallet-selector/near-snap/assets/snap-icon.png"; -const nearSnap = setupNearSnap({ - iconUrl: nearSnapIconUrl +const snapWallet = setupMetamaskSnap({ + iconUrl: SnapIconUrl }); -``` -## Known Issues -Currently, the Near Snap and Coin98 Wallet conflict each other since the Coin98 overrides the `window.ethereum` to avoid this try the following: - -- Through the "Override Wallet" feature on Coin98 Extension (Home > Settings > Override Wallet). Turning off the button means allowing the other wallet to override Coin98 and vice versa. -- Through Chrome's "Manage Extensions" section > Deactivate Coin98 when wishing to use other wallets. +``` ## License diff --git a/packages/near-snap/assets/near-snap-icon.png b/packages/near-snap/assets/near-icon.png similarity index 100% rename from packages/near-snap/assets/near-snap-icon.png rename to packages/near-snap/assets/near-icon.png diff --git a/packages/metamask-snap/jest.config.js b/packages/near-snap/jest.config.js similarity index 72% rename from packages/metamask-snap/jest.config.js rename to packages/near-snap/jest.config.js index eafeed2c9..c64bb2933 100644 --- a/packages/metamask-snap/jest.config.js +++ b/packages/near-snap/jest.config.js @@ -1,5 +1,5 @@ module.exports = { - displayName: "metamask-snap", + displayName: "near-snap", preset: "../../jest.preset.js", globals: { "ts-jest": { @@ -10,5 +10,5 @@ module.exports = { "^.+\\.[tj]sx?$": "ts-jest", }, moduleFileExtensions: ["ts", "tsx", "js", "jsx"], - coverageDirectory: "../../coverage/packages/metamask-snap", + coverageDirectory: "../../coverage/packages/near-snap", }; diff --git a/packages/near-snap/jest.config.ts b/packages/near-snap/jest.config.ts index 68ee2caf4..1c0876934 100644 --- a/packages/near-snap/jest.config.ts +++ b/packages/near-snap/jest.config.ts @@ -11,6 +11,6 @@ export default { }, ], }, - moduleFileExtensions: ["ts", "js", "html"], + moduleFileExtensions: ["ts", "tsx", "js", "jsx"], coverageDirectory: "../../coverage/packages/near-snap", }; diff --git a/packages/near-snap/package.json b/packages/near-snap/package.json index 80b550bed..af152fa8c 100644 --- a/packages/near-snap/package.json +++ b/packages/near-snap/package.json @@ -11,8 +11,6 @@ "near-blockchain", "wallet selector", "injected wallet", - "metamask snap", - "metamask flask", "metamask" ], "repository": { diff --git a/packages/near-snap/project.json b/packages/near-snap/project.json index 75789f622..65cb3bf45 100644 --- a/packages/near-snap/project.json +++ b/packages/near-snap/project.json @@ -51,5 +51,5 @@ } } }, - "tags": ["injected-wallet"] + "tags": ["browser-wallet"] } diff --git a/packages/near-snap/src/index.ts b/packages/near-snap/src/index.ts index 8a09b08c4..6fd2f020a 100644 --- a/packages/near-snap/src/index.ts +++ b/packages/near-snap/src/index.ts @@ -1,2 +1 @@ -export { setupNearSnap } from "./lib/near-snap"; -export type { NearSnapParams } from "./lib/near-snap"; +export { setupNearSnap } from "./lib"; diff --git a/packages/metamask-snap/src/lib/index.ts b/packages/near-snap/src/lib/index.ts similarity index 59% rename from packages/metamask-snap/src/lib/index.ts rename to packages/near-snap/src/lib/index.ts index 2df992fcb..0d0947239 100644 --- a/packages/metamask-snap/src/lib/index.ts +++ b/packages/near-snap/src/lib/index.ts @@ -1,21 +1,21 @@ import type { WalletModuleFactory } from "@near-wallet-selector/core"; -import { initMetamaskSnap } from "./selector"; +import { initNearSnap } from "./selector"; import icon from "./icon"; export { icon }; -export function setupMetamaskSnap({ +export function setupNearSnap({ deprecated = false, iconUrl = icon, -}): WalletModuleFactory { +} = {}): WalletModuleFactory { return async () => { return { - id: "metamask-snap", + id: "near-snap", type: "injected", - init: initMetamaskSnap, + init: initNearSnap, metadata: { - name: "Metamask Snap", - description: "Metamask plugin for NEAR Protocol", + name: "Near Snap", + description: "Metamask Snap for NEAR Protocol", downloadUrl: "https://near-snap.surge.sh", iconUrl, deprecated, diff --git a/packages/near-snap/src/lib/methods.ts b/packages/near-snap/src/lib/methods.ts deleted file mode 100644 index 73e3f2c46..000000000 --- a/packages/near-snap/src/lib/methods.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { getSnapOrigin } from "./utils"; -import type { GetAccountPayload, Transaction } from "./types"; -import { SignedTransaction } from "near-api-js/lib/transaction"; - -export async function enable(isDev: boolean): Promise { - await window.ethereum.request({ - method: "wallet_requestSnaps", - params: { - [getSnapOrigin(isDev)]: {}, - }, - }); -} - -export async function getSnapAccounts( - isDev: boolean, - network: string -): Promise> { - const account: GetAccountPayload = await window.ethereum.request({ - method: "wallet_invokeSnap", - params: { - snapId: getSnapOrigin(isDev), - request: { - method: "near_getAccount", - params: { network }, - }, - }, - }); - return [account]; -} - -export async function signTransactions( - isDev: boolean, - network: string, - transactions: Array -): Promise> { - const signedTransactions: Array<[string, string]> = - await window.ethereum.request({ - method: "wallet_invokeSnap", - params: { - snapId: getSnapOrigin(isDev), - request: { - method: "near_signTransactions", - params: { - network, - transactions, - }, - }, - }, - }); - - return signedTransactions.map(([, signature]) => - SignedTransaction.decode( - Buffer.from(Object.values(Uint8Array.from(Buffer.from(signature, "hex")))) - ) - ); -} diff --git a/packages/near-snap/src/lib/near-snap.ts b/packages/near-snap/src/lib/near-snap.ts deleted file mode 100644 index 23b595ea3..000000000 --- a/packages/near-snap/src/lib/near-snap.ts +++ /dev/null @@ -1,113 +0,0 @@ -import type { - WalletModuleFactory, - WalletBehaviourFactory, - InjectedWallet, -} from "@near-wallet-selector/core"; -import { isMobile } from "is-mobile"; -import { enable, getSnapAccounts, signTransactions } from "./methods"; -import { isMetaMaskAvailable } from "./utils"; -import icon from "../lib/icon"; - -const isDev = false; - -const NearSnapWallet: WalletBehaviourFactory = async ({ - options, - provider, - store, - metadata, -}) => { - const network = options.network.networkId as "testnet" | "mainnet"; - - return { - async signIn() { - await enable(isDev); - return await getSnapAccounts(isDev, network); - }, - - async signOut() { - // Nothing to do here!! - }, - - async getAccounts() { - return await getSnapAccounts(isDev, network); - }, - - async verifyOwner() { - throw new Error(`Method not supported by ${metadata.name}`); - }, - - async signAndSendTransaction({ receiverId, actions }) { - const accountPayload = await getSnapAccounts(isDev, network); - const { accountId, publicKey } = accountPayload[0]; - - const accessKey = await provider.viewAccessKey({ accountId, publicKey }); - - const { contract } = store.getState(); - let nonce = parseInt(accessKey.nonce.toString()); - if (!contract) { - throw new Error("Wallet not signed in"); - } - - const signedTxs = await signTransactions(isDev, network, [ - { - receiverId: receiverId || contract.contractId, - actions, - nonce: ++nonce, - recentBlockHash: accessKey.block_hash, - }, - ]); - - return await provider.sendTransaction(signedTxs[0]); - }, - - async signAndSendTransactions({ transactions }) { - const accountPayload = await getSnapAccounts(isDev, network); - const { accountId, publicKey } = accountPayload[0]; - const accessKey = await provider.viewAccessKey({ accountId, publicKey }); - let nonce = parseInt(accessKey.nonce.toString()); - - const signedTxs = await signTransactions( - isDev, - network, - transactions.map(({ receiverId, actions }) => ({ - receiverId, - actions, - nonce: ++nonce, - recentBlockHash: accessKey.block_hash, - })) - ); - - return Promise.all(signedTxs.map((tx) => provider.sendTransaction(tx))); - }, - }; -}; - -export interface NearSnapParams { - iconUrl?: string; - deprecated?: boolean; -} - -export const setupNearSnap = ({ - iconUrl = icon, - deprecated = false, -}: NearSnapParams = {}): WalletModuleFactory => { - return async () => { - if (isMobile()) { - return null; - } - - return { - id: "near-snap", - type: "injected", - metadata: { - name: "NearSnap", - description: null, - iconUrl, - deprecated, - downloadUrl: "https://metamask.io/flask/", - available: await isMetaMaskAvailable(), - }, - init: NearSnapWallet, - }; - }; -}; diff --git a/packages/metamask-snap/src/lib/selector.ts b/packages/near-snap/src/lib/selector.ts similarity index 79% rename from packages/metamask-snap/src/lib/selector.ts rename to packages/near-snap/src/lib/selector.ts index 23ee45dff..b84cb46fd 100644 --- a/packages/metamask-snap/src/lib/selector.ts +++ b/packages/near-snap/src/lib/selector.ts @@ -5,7 +5,7 @@ import type { } from "@near-wallet-selector/core"; import { NearSnap, NearSnapAccount } from "@near-snap/sdk"; -export const initMetamaskSnap: WalletBehaviourFactory = async ( +export const initNearSnap: WalletBehaviourFactory = async ( config ) => { const { store, logger, options } = config; @@ -16,12 +16,12 @@ export const initMetamaskSnap: WalletBehaviourFactory = async ( return { async isSignedIn() { - logger.log("MetamaskSnap:isSignedIn"); + logger.log("NearSnap:isSignedIn"); return account != null; }, async signIn({ contractId, methodNames }) { - logger.log("MetamaskSnap:signIn"); + logger.log("NearSnap:signIn"); account = await NearSnapAccount.connect({ contractId: contractId === "" ? undefined : contractId, methods: methodNames, @@ -33,7 +33,7 @@ export const initMetamaskSnap: WalletBehaviourFactory = async ( }, async signOut() { - logger.log("MetamaskSnap:signOut"); + logger.log("NearSnap:signOut"); await account?.disconnect(); }, @@ -42,7 +42,7 @@ export const initMetamaskSnap: WalletBehaviourFactory = async ( }, async signAndSendTransaction(data) { - logger.log("MetamaskSnap:signAndSendTransaction", data); + logger.log("NearSnap:signAndSendTransaction", data); if (account == null) { throw new Error("Wallet not signed in"); @@ -59,11 +59,11 @@ export const initMetamaskSnap: WalletBehaviourFactory = async ( }, async verifyOwner() { - throw Error("MetamaskSnap:verifyOwner is not released yet"); + throw Error("NearSnap:verifyOwner is not released yet"); }, async signAndSendTransactions({ transactions }) { - logger.log("MetamaskSnap:signAndSendTransactions", { transactions }); + logger.log("NearSnap:signAndSendTransactions", { transactions }); if (account == null) { throw new Error("Wallet not signed in"); diff --git a/packages/near-snap/src/lib/types.ts b/packages/near-snap/src/lib/types.ts deleted file mode 100644 index 83eca0ac4..000000000 --- a/packages/near-snap/src/lib/types.ts +++ /dev/null @@ -1,48 +0,0 @@ -import type { Action } from "@near-wallet-selector/core"; - -declare global { - interface Window { - ethereum: { - isMetaMask: boolean; - request: ( - request: - | SnapRpcMethodRequest - | { - method: string; - params?: SignTransactionRequestParams | unknown; - } - ) => Promise; - }; - } -} - -export interface SnapRpcMethodRequest { - method: string; - params: [MetamaskNearRpcRequest]; -} - -export type MetamaskNearRpcRequest = GetAccountRequest | SignTransactionRequest; - -export interface GetAccountRequest { - method: "near_getAccount"; -} - -export interface Transaction { - receiverId: string; - actions: Array; - nonce: number; - recentBlockHash: string; -} -export interface SignTransactionRequest { - method: "near_signTransactions"; - params: SignTransactionRequestParams; -} -export interface SignTransactionRequestParams { - network: "testnet" | "mainnet"; - transactions: Array; -} - -export type GetAccountPayload = { - accountId: string; - publicKey: string; -}; diff --git a/packages/near-snap/src/lib/utils.ts b/packages/near-snap/src/lib/utils.ts deleted file mode 100644 index 1e04b15fc..000000000 --- a/packages/near-snap/src/lib/utils.ts +++ /dev/null @@ -1,41 +0,0 @@ -import type { Account } from "@near-wallet-selector/core"; -import type { GetAccountPayload } from "./types"; - -export function getSnapOrigin(isDev: boolean): string { - if (isDev) { - return "local:http://localhost:8081"; - } - return "npm:@chainsafe/near-snap"; -} - -export function mapAccounts( - accounts: Array -): Array { - return accounts.map(({ accountId }) => ({ accountId })); -} - -async function isMetaMaskFlask(): Promise { - try { - const walletName = await window.ethereum.request({ - method: "web3_clientVersion", - }); - return walletName.includes("flask"); - } catch { - return false; - } -} - -export async function isMetaMaskAvailable(): Promise { - if (!window.ethereum) { - return false; - } - return await Promise.race([ - isMetaMaskFlask(), - // in case if a wallet dose not has rpc method web3_clientVersion, we cant to timeout - new Promise((resolve) => - setTimeout(() => { - resolve(false); - }, 1000) - ), - ]); -} diff --git a/packages/near-snap/tsconfig.json b/packages/near-snap/tsconfig.json index 5fcb2501e..d28ba19da 100644 --- a/packages/near-snap/tsconfig.json +++ b/packages/near-snap/tsconfig.json @@ -3,9 +3,9 @@ "compilerOptions": { "forceConsistentCasingInFileNames": true, "strict": true, - "noImplicitOverride": true, "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true + "noFallthroughCasesInSwitch": true, + "module": "commonjs", }, "files": [], "include": [], @@ -17,4 +17,4 @@ "path": "./tsconfig.spec.json" } ] -} +} \ No newline at end of file diff --git a/packages/near-snap/tsconfig.lib.json b/packages/near-snap/tsconfig.lib.json index e85ef50f6..b062bd2f8 100644 --- a/packages/near-snap/tsconfig.lib.json +++ b/packages/near-snap/tsconfig.lib.json @@ -3,8 +3,15 @@ "compilerOptions": { "outDir": "../../dist/out-tsc", "declaration": true, + "module": "commonjs", "types": [] }, - "include": ["**/*.ts"], - "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"] -} + "include": [ + "**/*.ts" + ], + "exclude": [ + "jest.config.ts", + "**/*.spec.ts", + "**/*.test.ts" + ] +} \ No newline at end of file diff --git a/packages/near-snap/tsconfig.spec.json b/packages/near-snap/tsconfig.spec.json index 546f12877..b506d384e 100644 --- a/packages/near-snap/tsconfig.spec.json +++ b/packages/near-snap/tsconfig.spec.json @@ -5,5 +5,5 @@ "module": "commonjs", "types": ["jest", "node"] }, - "include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] + "include": ["jest.config.ts", "**/*.spec.ts"] } diff --git a/tsconfig.base.json b/tsconfig.base.json index db55ad402..691985aba 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -38,8 +38,8 @@ "@near-wallet-selector/here-wallet": [ "packages/here-wallet/src/index.ts" ], - "@near-wallet-selector/metamask-snap": [ - "packages/metamask-snap/src/index.ts" + "@near-wallet-selector/near-snap": [ + "packages/near-snap/src/index.ts" ], "@near-wallet-selector/ledger": [ "packages/ledger/src/index.ts" From e1827332272aa3c52717c1507d7ca659ff2f0d56 Mon Sep 17 00:00:00 2001 From: Andrey Date: Wed, 9 Aug 2023 00:03:06 +0300 Subject: [PATCH 29/71] fix discussions --- README.md | 2 -- examples/react/contexts/WalletSelectorContext.tsx | 1 - package.json | 3 +-- packages/near-snap/README.md | 8 ++++---- packages/near-snap/project.json | 2 +- packages/near-snap/tsconfig.json | 3 +-- tsconfig.base.json | 3 --- yarn.lock | 8 ++++---- 8 files changed, 11 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index e56b60d18..0598271b0 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,6 @@ yarn add \ @near-wallet-selector/sender \ @near-wallet-selector/nearfi \ @near-wallet-selector/here-wallet \ - @near-wallet-selector/near-snap \ @near-wallet-selector/math-wallet \ @near-wallet-selector/nightly \ @near-wallet-selector/meteor-wallet \ @@ -84,7 +83,6 @@ npm install \ @near-wallet-selector/sender \ @near-wallet-selector/nearfi \ @near-wallet-selector/here-wallet \ - @near-wallet-selector/near-snap \ @near-wallet-selector/math-wallet \ @near-wallet-selector/nightly \ @near-wallet-selector/meteor-wallet \ diff --git a/examples/react/contexts/WalletSelectorContext.tsx b/examples/react/contexts/WalletSelectorContext.tsx index 59b36dc4a..e4bc39dc0 100644 --- a/examples/react/contexts/WalletSelectorContext.tsx +++ b/examples/react/contexts/WalletSelectorContext.tsx @@ -73,7 +73,6 @@ export const WalletSelectorContextProvider: React.FC<{ setupNightly(), setupMeteorWallet(), setupNearSnap(), - setupNearSnap(), setupNarwallets(), setupWelldoneWallet(), setupHereWallet(), diff --git a/package.json b/package.json index 8fddfcd1b..15f3155ac 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,6 @@ "build:wallet-utils": "nx run-many --target=build --projects=wallet-utils --configuration=production", "build:default-wallets": "nx run-many --target=build --projects=default-wallets --configuration=production", "build:near-snap": "nx run-many --target=build --projects=near-snap --configuration=production", - "build:near-snap": "nx run-many --target=build --projects=near-snap --configuration=production", "build:account-export": "nx run-many --target=build --projects=account-export --configuration=production", "build:ramper-wallet": "nx run-many --target=build --projects=ramper-wallet --configuration=production", "lint": "nx workspace-lint && nx run-many --target=lint --all --parallel", @@ -92,7 +91,7 @@ "@ledgerhq/hw-transport-webhid": "6.27.1", "@metamask/detect-provider": "^2.0.0", "@meteorwallet/sdk": "^0.8.0", - "@near-snap/sdk": "^0.4.0", + "@near-snap/sdk": "^0.5.0", "@nightlylabs/connect-near": "0.0.15", "@ramper/near": "^0.0.30", "@walletconnect/modal": "^2.6.0", diff --git a/packages/near-snap/README.md b/packages/near-snap/README.md index bd108dae8..a60a40f02 100644 --- a/packages/near-snap/README.md +++ b/packages/near-snap/README.md @@ -26,11 +26,11 @@ Then use it in your dApp: ```ts import { setupWalletSelector } from "@near-wallet-selector/core"; -import { setupMetamaskSnap } from "@near-wallet-selector/near-snap"; +import { setupNearSnap } from "@near-wallet-selector/near-snap"; const selector = await setupWalletSelector({ network: "testnet", - modules: [setupMetamaskSnap()], + modules: [setupNearSnap()], }); ``` @@ -51,10 +51,10 @@ https://github.com/here-wallet/near-snap Assets such as icons can be found in the `/assets` directory of the package. Below is an example using Webpack: ```ts -import { setupMetamaskSnap } from "@near-wallet-selector/near-snap"; +import { setupNearSnap } from "@near-wallet-selector/near-snap"; import SnapIconUrl from "@near-wallet-selector/near-snap/assets/snap-icon.png"; -const snapWallet = setupMetamaskSnap({ +const snapWallet = setupNearSnap({ iconUrl: SnapIconUrl }); diff --git a/packages/near-snap/project.json b/packages/near-snap/project.json index 65cb3bf45..75789f622 100644 --- a/packages/near-snap/project.json +++ b/packages/near-snap/project.json @@ -51,5 +51,5 @@ } } }, - "tags": ["browser-wallet"] + "tags": ["injected-wallet"] } diff --git a/packages/near-snap/tsconfig.json b/packages/near-snap/tsconfig.json index d28ba19da..b91a5ef39 100644 --- a/packages/near-snap/tsconfig.json +++ b/packages/near-snap/tsconfig.json @@ -4,8 +4,7 @@ "forceConsistentCasingInFileNames": true, "strict": true, "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "module": "commonjs", + "noFallthroughCasesInSwitch": true }, "files": [], "include": [], diff --git a/tsconfig.base.json b/tsconfig.base.json index 691985aba..017abd816 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -38,9 +38,6 @@ "@near-wallet-selector/here-wallet": [ "packages/here-wallet/src/index.ts" ], - "@near-wallet-selector/near-snap": [ - "packages/near-snap/src/index.ts" - ], "@near-wallet-selector/ledger": [ "packages/ledger/src/index.ts" ], diff --git a/yarn.lock b/yarn.lock index 2a76e59c0..203e2a7d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3181,10 +3181,10 @@ bn.js "5.2.1" borsh "^0.7.0" -"@near-snap/sdk@^0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@near-snap/sdk/-/sdk-0.4.0.tgz#5c09f1f93522f17694e84ffab8b66af7ecc3c083" - integrity sha512-c6qOJ6gVx/btws8eTSWTsJpCOIucvQLAFPB0BJcCYofkPknwN13tiM5Ft5BH5LN5o32HB+0IBy2G1v6Qc2QFSA== +"@near-snap/sdk@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@near-snap/sdk/-/sdk-0.5.0.tgz#edbd0e4aae2f4545f18e2354ac5e71283fff3fd4" + integrity sha512-je4qilvdYjzFdoiaVF2SgupKwEgDxdq1fqElOh9xbD28srBaFxDlg53YQjhma6yB12e6wq1+MHOkiMNRNstMuA== dependencies: "@near-wallet-selector/core" "^8.2.0" From c4b910fa94378cc06f2af7b1fbcf307478a2e126 Mon Sep 17 00:00:00 2001 From: Andrey Date: Wed, 9 Aug 2023 01:03:35 +0300 Subject: [PATCH 30/71] near-snap: signMessage impl --- .../src/lib/helpers/verify-signature/verify-signature.ts | 2 +- packages/near-snap/src/lib/selector.ts | 8 ++++++++ tsconfig.base.json | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/core/src/lib/helpers/verify-signature/verify-signature.ts b/packages/core/src/lib/helpers/verify-signature/verify-signature.ts index 745b83080..4c98fd72e 100644 --- a/packages/core/src/lib/helpers/verify-signature/verify-signature.ts +++ b/packages/core/src/lib/helpers/verify-signature/verify-signature.ts @@ -22,7 +22,7 @@ export const verifySignature = ({ const sha = sha256(borshPayload); const pk = utils.PublicKey.from(publicKey); return pk.verify( - new Uint8Array(Buffer.from(sha)), + new Uint8Array(Buffer.from(sha, "hex")), Buffer.from(signature, "base64") ); }; diff --git a/packages/near-snap/src/lib/selector.ts b/packages/near-snap/src/lib/selector.ts index b84cb46fd..f9399ffb0 100644 --- a/packages/near-snap/src/lib/selector.ts +++ b/packages/near-snap/src/lib/selector.ts @@ -58,6 +58,14 @@ export const initNearSnap: WalletBehaviourFactory = async ( return await account.executeTransaction({ receiverId, ...data }); }, + async signMessage({ message, nonce, recipient }) { + if (account == null) { + throw new Error("Wallet not signed in"); + } + + return await account.signMessage({ message, nonce, recipient }); + }, + async verifyOwner() { throw Error("NearSnap:verifyOwner is not released yet"); }, diff --git a/tsconfig.base.json b/tsconfig.base.json index 017abd816..2eac0f0dc 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -92,6 +92,9 @@ "@near-wallet-selector/welldone-wallet": [ "packages/welldone-wallet/src/index.ts" ], + "@near-wallet-selector/ramper-wallet": [ + "packages/ramper-wallet/src/index.ts" + ], "@near-wallet-selector/xdefi": [ "packages/xdefi/src/index.ts" ], From 0d64d04f1148204fbee6ac8ad13d2f825699e835 Mon Sep 17 00:00:00 2001 From: DamirSQA Date: Thu, 10 Aug 2023 16:04:42 +0200 Subject: [PATCH 31/71] angular example fix --- examples/angular/src/polyfills.ts | 2 +- package.json | 2 ++ tsconfig.base.json | 5 ++-- yarn.lock | 38 ++++++++++++++++++++++++++++++- 4 files changed, 43 insertions(+), 4 deletions(-) diff --git a/examples/angular/src/polyfills.ts b/examples/angular/src/polyfills.ts index 48aa9e5c9..e2818421d 100644 --- a/examples/angular/src/polyfills.ts +++ b/examples/angular/src/polyfills.ts @@ -52,7 +52,7 @@ import "zone.js"; // Included with Angular CLI. // eslint-disable-next-line @typescript-eslint/no-var-requires global.Buffer = global.Buffer || require("buffer").Buffer; -(window as any).process = { env: {} }; +(window as any).process = { env: {}, version: "" }; /*************************************************************************************************** * APPLICATION IMPORTS diff --git a/package.json b/package.json index 15f3155ac..7e0cced8a 100644 --- a/package.json +++ b/package.json @@ -195,6 +195,7 @@ "jsdoc": "^4.0.2", "nx": "16.0.0", "nx-cloud": "16.0.5", + "path-browserify": "^1.0.1", "prettier": "^2.7.1", "react-refresh": "^0.10.0", "react-test-renderer": "18.2.0", @@ -208,6 +209,7 @@ "ts-prune": "^0.10.3", "typescript": "4.9.5", "url-loader": "^4.1.1", + "util": "^0.12.5", "uuid": "^9.0.0", "webpack": "^5.75.0", "webpack-merge": "^5.8.0" diff --git a/tsconfig.base.json b/tsconfig.base.json index 2eac0f0dc..b6c2f6fa3 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -115,11 +115,12 @@ ], "fs": [ "node_modules/browserify-fs" - ] + ], + "path": ["node_modules/path-browserify"] } }, "exclude": [ "node_modules", "tmp" ] -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index 203e2a7d3..9d200e30b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11253,7 +11253,7 @@ ipaddr.js@^2.0.1: resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-2.0.1.tgz#eca256a7a877e917aeb368b0a7497ddf42ef81c0" integrity sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng== -is-arguments@^1.1.1: +is-arguments@^1.0.4, is-arguments@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== @@ -11374,6 +11374,13 @@ is-generator-fn@^2.0.0: resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== +is-generator-function@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" + integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== + dependencies: + has-tostringtag "^1.0.0" + is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" @@ -11559,6 +11566,13 @@ is-typed-array@^1.1.10, is-typed-array@^1.1.9: gopd "^1.0.1" has-tostringtag "^1.0.0" +is-typed-array@^1.1.3: + version "1.1.12" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.12.tgz#d0bab5686ef4a76f7a73097b95470ab199c57d4a" + integrity sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg== + dependencies: + which-typed-array "^1.1.11" + is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" @@ -18048,6 +18062,17 @@ util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== +util@^0.12.5: + version "0.12.5" + resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" + integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== + dependencies: + inherits "^2.0.3" + is-arguments "^1.0.4" + is-generator-function "^1.0.7" + is-typed-array "^1.1.3" + which-typed-array "^1.1.2" + utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" @@ -18458,6 +18483,17 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q== +which-typed-array@^1.1.11, which-typed-array@^1.1.2: + version "1.1.11" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.11.tgz#99d691f23c72aab6768680805a271b69761ed61a" + integrity sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.0" + which-typed-array@^1.1.9: version "1.1.9" resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6" From a1084ab3f0e71f8ce95edebe676be19dcdcdced9 Mon Sep 17 00:00:00 2001 From: DamirSQA Date: Thu, 10 Aug 2023 16:08:05 +0200 Subject: [PATCH 32/71] near snap readme change --- packages/near-snap/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/near-snap/README.md b/packages/near-snap/README.md index a60a40f02..b4ac1d2b3 100644 --- a/packages/near-snap/README.md +++ b/packages/near-snap/README.md @@ -35,7 +35,7 @@ const selector = await setupWalletSelector({ ``` -## Here Wallet JS SDK +## Near Snap JS SDK The library uses @near-snap/sdk, you can read more about the functionality here: https://github.com/here-wallet/near-snap @@ -43,7 +43,7 @@ https://github.com/here-wallet/near-snap ## Options -- `iconUrl`: (`string?`): Icon is optional. Default image point to Here Wallet Logo in base64 format. +- `iconUrl`: (`string?`): Icon is optional. Default image point to Metamask Flask Logo in base64 format. - `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`. ## Assets From 0af2252ee76ad3c047359a26c04138b8d1dc96f9 Mon Sep 17 00:00:00 2001 From: DamirSQA Date: Fri, 11 Aug 2023 11:19:19 +0200 Subject: [PATCH 33/71] bump version to 8.5.0 --- package.json | 2 +- packages/account-export/package.json | 2 +- packages/coin98-wallet/package.json | 2 +- packages/core/package.json | 2 +- packages/default-wallets/package.json | 2 +- packages/finer-wallet/package.json | 2 +- packages/here-wallet/package.json | 2 +- packages/ledger/package.json | 2 +- packages/math-wallet/package.json | 2 +- packages/meteor-wallet/package.json | 2 +- packages/modal-ui-js/package.json | 2 +- packages/modal-ui/package.json | 2 +- packages/my-near-wallet/package.json | 2 +- packages/narwallets/package.json | 2 +- packages/near-snap/package.json | 2 +- packages/near-wallet/package.json | 2 +- packages/nearfi/package.json | 2 +- packages/neth/package.json | 2 +- packages/nightly-connect/package.json | 2 +- packages/nightly/package.json | 2 +- packages/opto-wallet/package.json | 2 +- packages/ramper-wallet/package.json | 2 +- packages/sender/package.json | 2 +- packages/wallet-connect/package.json | 2 +- packages/wallet-utils/package.json | 2 +- packages/welldone-wallet/package.json | 2 +- packages/xdefi/package.json | 2 +- 27 files changed, 27 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index 7e0cced8a..50833245a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "near-wallet-selector", - "version": "8.4.0", + "version": "8.5.0", "description": "NEAR Wallet Selector makes it easy for users to interact with your dApp by providing an abstraction over various wallets within the NEAR ecosystem", "keywords": [ "near", diff --git a/packages/account-export/package.json b/packages/account-export/package.json index 5b6c95dc6..a5e13b8b9 100644 --- a/packages/account-export/package.json +++ b/packages/account-export/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/account-export", - "version": "8.4.0", + "version": "8.5.0", "description": "This is the Export Selector UI package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/coin98-wallet/package.json b/packages/coin98-wallet/package.json index 4554069a8..7af7452b2 100644 --- a/packages/coin98-wallet/package.json +++ b/packages/coin98-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/coin98-wallet", - "version": "8.4.0", + "version": "8.5.0", "description": "Coin 98 wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/core/package.json b/packages/core/package.json index 32b3acb26..1a3a83fd1 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/core", - "version": "8.4.0", + "version": "8.5.0", "description": "This is the core package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/default-wallets/package.json b/packages/default-wallets/package.json index 09139d72b..f6398d953 100644 --- a/packages/default-wallets/package.json +++ b/packages/default-wallets/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/default-wallets", - "version": "8.4.0", + "version": "8.5.0", "description": "Default wallets package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/finer-wallet/package.json b/packages/finer-wallet/package.json index 0bec79ff7..1d02bf762 100644 --- a/packages/finer-wallet/package.json +++ b/packages/finer-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/finer-wallet", - "version": "8.4.0", + "version": "8.5.0", "description": "FiNER Wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/here-wallet/package.json b/packages/here-wallet/package.json index 2103ec303..ef180edbd 100644 --- a/packages/here-wallet/package.json +++ b/packages/here-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/here-wallet", - "version": "8.4.0", + "version": "8.5.0", "description": "Here wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/ledger/package.json b/packages/ledger/package.json index f7cea43c1..335dc1fea 100644 --- a/packages/ledger/package.json +++ b/packages/ledger/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/ledger", - "version": "8.4.0", + "version": "8.5.0", "description": "Ledger package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/math-wallet/package.json b/packages/math-wallet/package.json index 5e2606c7a..f56fedceb 100644 --- a/packages/math-wallet/package.json +++ b/packages/math-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/math-wallet", - "version": "8.4.0", + "version": "8.5.0", "description": "Math wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/meteor-wallet/package.json b/packages/meteor-wallet/package.json index 633dc7ae3..2586d11cf 100644 --- a/packages/meteor-wallet/package.json +++ b/packages/meteor-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/meteor-wallet", - "version": "8.4.0", + "version": "8.5.0", "description": "Meteor wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/modal-ui-js/package.json b/packages/modal-ui-js/package.json index a2e680d6e..abffcb641 100644 --- a/packages/modal-ui-js/package.json +++ b/packages/modal-ui-js/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/modal-ui-js", - "version": "8.4.0", + "version": "8.5.0", "description": "Modal UI package for NEAR wallet Selector", "keywords": [ "near", diff --git a/packages/modal-ui/package.json b/packages/modal-ui/package.json index 28d223a22..5f93d5018 100644 --- a/packages/modal-ui/package.json +++ b/packages/modal-ui/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/modal-ui", - "version": "8.4.0", + "version": "8.5.0", "description": "Modal UI package for NEAR wallet Selector", "keywords": [ "near", diff --git a/packages/my-near-wallet/package.json b/packages/my-near-wallet/package.json index 1160ef596..7ffbba027 100644 --- a/packages/my-near-wallet/package.json +++ b/packages/my-near-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/my-near-wallet", - "version": "8.4.0", + "version": "8.5.0", "description": "My Near Wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/narwallets/package.json b/packages/narwallets/package.json index 1e27743c5..550532ee3 100644 --- a/packages/narwallets/package.json +++ b/packages/narwallets/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/narwallets", - "version": "8.4.0", + "version": "8.5.0", "description": "This is the Narwallets package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/near-snap/package.json b/packages/near-snap/package.json index af152fa8c..a29eeee2d 100644 --- a/packages/near-snap/package.json +++ b/packages/near-snap/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/near-snap", - "version": "8.4.0", + "version": "8.5.0", "description": "Metamask snap to interact with Near dapps.", "keywords": [ "near", diff --git a/packages/near-wallet/package.json b/packages/near-wallet/package.json index b2e360d38..32e945aa1 100644 --- a/packages/near-wallet/package.json +++ b/packages/near-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/near-wallet", - "version": "8.4.0", + "version": "8.5.0", "description": "Near Wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/nearfi/package.json b/packages/nearfi/package.json index b33fd2f95..1c602a8ed 100644 --- a/packages/nearfi/package.json +++ b/packages/nearfi/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/nearfi", - "version": "8.4.0", + "version": "8.5.0", "description": "Nearfi package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/neth/package.json b/packages/neth/package.json index 699ad2a4f..d4dcc4060 100644 --- a/packages/neth/package.json +++ b/packages/neth/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/neth", - "version": "8.4.0", + "version": "8.5.0", "description": "Control NEAR accounts with ETH accounts", "author": "mattlockyer", "keywords": [ diff --git a/packages/nightly-connect/package.json b/packages/nightly-connect/package.json index cd6eeac7b..ecc979594 100644 --- a/packages/nightly-connect/package.json +++ b/packages/nightly-connect/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/nightly-connect", - "version": "8.4.0", + "version": "8.5.0", "description": "Nightly connect package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/nightly/package.json b/packages/nightly/package.json index e05ae0f6d..91cea41b4 100644 --- a/packages/nightly/package.json +++ b/packages/nightly/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/nightly", - "version": "8.4.0", + "version": "8.5.0", "description": "Nightly wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/opto-wallet/package.json b/packages/opto-wallet/package.json index 3cfdec887..d954ef0a3 100644 --- a/packages/opto-wallet/package.json +++ b/packages/opto-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/opto-wallet", - "version": "8.4.0", + "version": "8.5.0", "description": "Opto wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/ramper-wallet/package.json b/packages/ramper-wallet/package.json index 4ddf592ca..a6f910230 100644 --- a/packages/ramper-wallet/package.json +++ b/packages/ramper-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/ramper-wallet", - "version": "8.4.0", + "version": "8.5.0", "description": "Ramper wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/sender/package.json b/packages/sender/package.json index b0c4486c8..6a22fe2fb 100644 --- a/packages/sender/package.json +++ b/packages/sender/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/sender", - "version": "8.4.0", + "version": "8.5.0", "description": "Sender wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/wallet-connect/package.json b/packages/wallet-connect/package.json index d05d9e9c0..c5f972268 100644 --- a/packages/wallet-connect/package.json +++ b/packages/wallet-connect/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/wallet-connect", - "version": "8.4.0", + "version": "8.5.0", "description": "Wallet Connect package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/wallet-utils/package.json b/packages/wallet-utils/package.json index 1745a67a3..88c953a65 100644 --- a/packages/wallet-utils/package.json +++ b/packages/wallet-utils/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/wallet-utils", - "version": "8.4.0", + "version": "8.5.0", "description": "Wallet utils package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/welldone-wallet/package.json b/packages/welldone-wallet/package.json index 80ec967c1..f5f7d391f 100644 --- a/packages/welldone-wallet/package.json +++ b/packages/welldone-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/welldone-wallet", - "version": "8.4.0", + "version": "8.5.0", "description": "Welldone wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/xdefi/package.json b/packages/xdefi/package.json index 8c5df0711..7d652f648 100644 --- a/packages/xdefi/package.json +++ b/packages/xdefi/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/xdefi", - "version": "8.4.0", + "version": "8.5.0", "description": "This is the XDEFI package for NEAR Wallet Selector.", "keywords": [ "near", From eac0e90b58a808b4f5b4409e8a5ceaba49b9421a Mon Sep 17 00:00:00 2001 From: Erdit Kurteshi Date: Thu, 17 Aug 2023 10:27:44 +0200 Subject: [PATCH 34/71] added permissions to bump-version workflow --- .github/workflows/bump-version.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index d7fc5ef47..47cda6d71 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -4,6 +4,11 @@ on: - main workflow_dispatch: +permissions: + actions: write + issues: write + pull-requests: write + jobs: release: env: From faa595118aa0738a30b8b2bece97f63ac24f5c6d Mon Sep 17 00:00:00 2001 From: Erdit Kurteshi Date: Thu, 17 Aug 2023 13:43:41 +0200 Subject: [PATCH 35/71] added script to update the type field path --- scripts/update-package-json.js | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 scripts/update-package-json.js diff --git a/scripts/update-package-json.js b/scripts/update-package-json.js new file mode 100644 index 000000000..d1c6a3f6f --- /dev/null +++ b/scripts/update-package-json.js @@ -0,0 +1,43 @@ +const fs = require('fs').promises; +const path = require('path'); + +const packagesDirectory = path.join(__dirname, '../dist/packages'); + +// Replace double backslashes with forward slashes in a path +const fixPath = path => path.replace(/\\/g, '/').replace(/\/\//g, '/'); + +// Update types field in package.json +async function updatePackageJSONTypeField(packageName) { + const packagePath = path.join(packagesDirectory, packageName); + const packageJsonPath = path.join(packagePath, 'package.json'); + + try { + const packageJsonContent = await fs.readFile(packageJsonPath, 'utf8'); + const packageJson = JSON.parse(packageJsonContent); + + if (packageJson.types) { + packageJson.types = fixPath(packageJson.types); + await fs.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2)); + console.log(`Updated package.json for ${packageName}`); + } else { + console.log(`No 'types' field found in package.json for ${packageName}`); + } + } catch (error) { + console.error(`Error updating package.json for ${packageName}:`, error); + } +} + +// Update all packages +async function updateAllPackagesTypeField() { + try { + const packageNames = await fs.readdir(packagesDirectory); + + for (const packageName of packageNames) { + await updatePackageJSONTypeField(packageName); + } + } catch (error) { + console.error('Error reading packages directory:', error); + } +} + +updateAllPackagesTypeField(); From cc9869c8cb166aaef9372acf7306231f004d74b7 Mon Sep 17 00:00:00 2001 From: Erdit Kurteshi Date: Tue, 22 Aug 2023 13:24:33 +0200 Subject: [PATCH 36/71] added angular deploy file --- .github/workflows/deploy-angular-example.yml | 32 +++++++++++++++++++ .../wallet-selector.component.ts | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/deploy-angular-example.yml diff --git a/.github/workflows/deploy-angular-example.yml b/.github/workflows/deploy-angular-example.yml new file mode 100644 index 000000000..46e59d557 --- /dev/null +++ b/.github/workflows/deploy-angular-example.yml @@ -0,0 +1,32 @@ +name: Deploy Angular Example + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: "16.x" + + - name: Install dependencies + run: yarn install + + - name: Build + run: yarn nx build angular + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./dist/examples/angular diff --git a/examples/angular/src/app/pages/wallet-selector/wallet-selector.component.ts b/examples/angular/src/app/pages/wallet-selector/wallet-selector.component.ts index 53e23c95a..0bc690cb6 100644 --- a/examples/angular/src/app/pages/wallet-selector/wallet-selector.component.ts +++ b/examples/angular/src/app/pages/wallet-selector/wallet-selector.component.ts @@ -76,7 +76,7 @@ export class WalletSelectorComponent implements OnInit { setupOptoWallet(), setupFinerWallet(), setupWalletConnect({ - projectId: "c4f79cc...", + projectId: "c8cb6204543639c31aef44ea4837a554", // Replace this with your own projectId form WalletConnect. metadata: { name: "NEAR Wallet Selector", description: "Example dApp used by NEAR Wallet Selector", From a0274d373dfa883d383940fe9b58345ea7e0ccb6 Mon Sep 17 00:00:00 2001 From: kujtimprenkuSQA Date: Wed, 23 Aug 2023 10:20:29 +0200 Subject: [PATCH 37/71] Bump version for ngx-deploy-npm from 4.3.10 to 7.0.1 --- package.json | 2 +- yarn.lock | 30 +++++------------------------- 2 files changed, 6 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index 50833245a..f8745d2dc 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "near-api-js": "^2.1.3", "near-seed-phrase": "^0.2.0", "next": "13.3.0", - "ngx-deploy-npm": "^4.3.10", + "ngx-deploy-npm": "^7.0.1", "qrcode": "^1.5.3", "react": "18.2.0", "react-dom": "18.2.0", diff --git a/yarn.lock b/yarn.lock index 9d200e30b..4516982b4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3525,17 +3525,6 @@ dependencies: "@nx/cypress" "16.0.0" -"@nrwl/devkit@15.2.3": - version "15.2.3" - resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-15.2.3.tgz#70b4e914c4cd19cd1ba99389499ba854985a821e" - integrity sha512-3IZVahO6vvEFxp0N7mEO34ZnYT+8FaObyYI/2XVYZ0eDCAMihn2IIUMj+M42vAXPOJpctdghSKXovQDuHO031w== - dependencies: - "@phenomnomnominal/tsquery" "4.1.1" - ejs "^3.1.7" - ignore "^5.0.4" - semver "7.3.4" - tslib "^2.3.0" - "@nrwl/devkit@16.0.0": version "16.0.0" resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-16.0.0.tgz#b816891053e5efa3e2b51f3dfa285e8c9b78bb93" @@ -4065,13 +4054,6 @@ node-addon-api "^3.2.1" node-gyp-build "^4.3.0" -"@phenomnomnominal/tsquery@4.1.1": - version "4.1.1" - resolved "https://registry.yarnpkg.com/@phenomnomnominal/tsquery/-/tsquery-4.1.1.tgz#42971b83590e9d853d024ddb04a18085a36518df" - integrity sha512-jjMmK1tnZbm1Jq5a7fBliM4gQwjxMU7TFoRNwIyzwlO+eHPRCFv/Nv+H/Gi1jc3WR7QURG8D5d0Tn12YGrUqBQ== - dependencies: - esquery "^1.0.1" - "@phenomnomnominal/tsquery@~5.0.1": version "5.0.1" resolved "https://registry.yarnpkg.com/@phenomnomnominal/tsquery/-/tsquery-5.0.1.tgz#a2a5abc89f92c01562a32806655817516653a388" @@ -9558,7 +9540,7 @@ esprima@^4.0.0, esprima@^4.0.1, esprima@~4.0.0: resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.0.1, esquery@^1.4.0: +esquery@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== @@ -13725,12 +13707,10 @@ next@13.3.0: "@next/swc-win32-ia32-msvc" "13.3.0" "@next/swc-win32-x64-msvc" "13.3.0" -ngx-deploy-npm@^4.3.10: - version "4.3.10" - resolved "https://registry.yarnpkg.com/ngx-deploy-npm/-/ngx-deploy-npm-4.3.10.tgz#e1d150512c9196e5a70f0f2d1e9f0d8666bc622b" - integrity sha512-6cLM1z0h6VD5SYH9fJSeslvTSKTkaySsH63k2AouXnAXsHQe4eFrdkmfMAZoVwUZHyaNIBOKMUcTvotgMwQnug== - dependencies: - "@nrwl/devkit" "15.2.3" +ngx-deploy-npm@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/ngx-deploy-npm/-/ngx-deploy-npm-7.0.1.tgz#de6d3864d4ddf9db6c2641b4f948f8cd7acb4c43" + integrity sha512-YQmYx8ZxnhsGdpLMocIsmvVdV/bnsPNNOZALjJxNyfYomLpJ+OIlMPCVUM3QWA7Lxw8P9GZ+yITeavoBInEkBA== nice-napi@^1.0.2: version "1.0.2" From 98f65aeb4b96c580b252d714b5c0b135dd4d06c1 Mon Sep 17 00:00:00 2001 From: kujtimprenkuSQA Date: Wed, 23 Aug 2023 10:37:16 +0200 Subject: [PATCH 38/71] Add deploy script for account-export. --- packages/account-export/project.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/account-export/project.json b/packages/account-export/project.json index 610631f57..90357c74a 100644 --- a/packages/account-export/project.json +++ b/packages/account-export/project.json @@ -42,6 +42,12 @@ "lintFilePatterns": ["packages/account-export/**/*.{ts,tsx,js,jsx}"] } }, + "deploy": { + "executor": "ngx-deploy-npm:deploy", + "options": { + "access": "public" + } + }, "test": { "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/packages/account-export"], From 90cee5292320643636728f30596b571042ef0936 Mon Sep 17 00:00:00 2001 From: Erdit Kurteshi Date: Wed, 23 Aug 2023 10:38:09 +0200 Subject: [PATCH 39/71] changed node version from 16.x to 18.x in workflows --- .github/workflows/bump-version.yml | 2 +- .github/workflows/deploy-angular-example.yml | 2 +- .github/workflows/pr-actions.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 47cda6d71..fa4f8e8aa 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -27,7 +27,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: "16.x" + node-version: "18.x" cache: 'yarn' - name: Check example apps run: echo "EXAMPLE_APPS=$(ls ./examples | tr '\n' ',' | sed 's/,$//')" >> $GITHUB_ENV diff --git a/.github/workflows/deploy-angular-example.yml b/.github/workflows/deploy-angular-example.yml index 46e59d557..f664bac0a 100644 --- a/.github/workflows/deploy-angular-example.yml +++ b/.github/workflows/deploy-angular-example.yml @@ -17,7 +17,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v3 with: - node-version: "16.x" + node-version: "18.x" - name: Install dependencies run: yarn install diff --git a/.github/workflows/pr-actions.yaml b/.github/workflows/pr-actions.yaml index b3f022aa0..a076c3254 100644 --- a/.github/workflows/pr-actions.yaml +++ b/.github/workflows/pr-actions.yaml @@ -20,7 +20,7 @@ jobs: - name: Use Node.js uses: actions/setup-node@v3 with: - node-version: "16.x" + node-version: "18.x" cache: 'yarn' - name: Install NPM Dependencies run: yarn install From 2b49e987f77724a0bb7083eaf64e88202f57e292 Mon Sep 17 00:00:00 2001 From: kujtimprenkuSQA Date: Wed, 23 Aug 2023 11:14:32 +0200 Subject: [PATCH 40/71] Bumped version to 8.5.1 --- package.json | 2 +- packages/account-export/package.json | 2 +- packages/coin98-wallet/package.json | 2 +- packages/core/package.json | 2 +- packages/default-wallets/package.json | 2 +- packages/finer-wallet/package.json | 2 +- packages/here-wallet/package.json | 2 +- packages/ledger/package.json | 2 +- packages/math-wallet/package.json | 2 +- packages/meteor-wallet/package.json | 2 +- packages/modal-ui-js/package.json | 2 +- packages/modal-ui/package.json | 2 +- packages/my-near-wallet/package.json | 2 +- packages/narwallets/package.json | 2 +- packages/near-snap/package.json | 2 +- packages/near-wallet/package.json | 2 +- packages/nearfi/package.json | 2 +- packages/neth/package.json | 2 +- packages/nightly-connect/package.json | 2 +- packages/nightly/package.json | 2 +- packages/opto-wallet/package.json | 2 +- packages/ramper-wallet/package.json | 2 +- packages/sender/package.json | 2 +- packages/wallet-connect/package.json | 2 +- packages/wallet-utils/package.json | 2 +- packages/welldone-wallet/package.json | 2 +- packages/xdefi/package.json | 2 +- 27 files changed, 27 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index f8745d2dc..18c03dc07 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "near-wallet-selector", - "version": "8.5.0", + "version": "8.5.1", "description": "NEAR Wallet Selector makes it easy for users to interact with your dApp by providing an abstraction over various wallets within the NEAR ecosystem", "keywords": [ "near", diff --git a/packages/account-export/package.json b/packages/account-export/package.json index a5e13b8b9..88dd37a1b 100644 --- a/packages/account-export/package.json +++ b/packages/account-export/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/account-export", - "version": "8.5.0", + "version": "8.5.1", "description": "This is the Export Selector UI package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/coin98-wallet/package.json b/packages/coin98-wallet/package.json index 7af7452b2..db03d74cb 100644 --- a/packages/coin98-wallet/package.json +++ b/packages/coin98-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/coin98-wallet", - "version": "8.5.0", + "version": "8.5.1", "description": "Coin 98 wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/core/package.json b/packages/core/package.json index 1a3a83fd1..f28338f57 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/core", - "version": "8.5.0", + "version": "8.5.1", "description": "This is the core package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/default-wallets/package.json b/packages/default-wallets/package.json index f6398d953..3db147f0c 100644 --- a/packages/default-wallets/package.json +++ b/packages/default-wallets/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/default-wallets", - "version": "8.5.0", + "version": "8.5.1", "description": "Default wallets package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/finer-wallet/package.json b/packages/finer-wallet/package.json index 1d02bf762..2e3e4582c 100644 --- a/packages/finer-wallet/package.json +++ b/packages/finer-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/finer-wallet", - "version": "8.5.0", + "version": "8.5.1", "description": "FiNER Wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/here-wallet/package.json b/packages/here-wallet/package.json index ef180edbd..0791eddf4 100644 --- a/packages/here-wallet/package.json +++ b/packages/here-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/here-wallet", - "version": "8.5.0", + "version": "8.5.1", "description": "Here wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/ledger/package.json b/packages/ledger/package.json index 335dc1fea..c10dde38c 100644 --- a/packages/ledger/package.json +++ b/packages/ledger/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/ledger", - "version": "8.5.0", + "version": "8.5.1", "description": "Ledger package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/math-wallet/package.json b/packages/math-wallet/package.json index f56fedceb..71576e0c7 100644 --- a/packages/math-wallet/package.json +++ b/packages/math-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/math-wallet", - "version": "8.5.0", + "version": "8.5.1", "description": "Math wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/meteor-wallet/package.json b/packages/meteor-wallet/package.json index 2586d11cf..181d508ce 100644 --- a/packages/meteor-wallet/package.json +++ b/packages/meteor-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/meteor-wallet", - "version": "8.5.0", + "version": "8.5.1", "description": "Meteor wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/modal-ui-js/package.json b/packages/modal-ui-js/package.json index abffcb641..7c5cce023 100644 --- a/packages/modal-ui-js/package.json +++ b/packages/modal-ui-js/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/modal-ui-js", - "version": "8.5.0", + "version": "8.5.1", "description": "Modal UI package for NEAR wallet Selector", "keywords": [ "near", diff --git a/packages/modal-ui/package.json b/packages/modal-ui/package.json index 5f93d5018..c2e03d20a 100644 --- a/packages/modal-ui/package.json +++ b/packages/modal-ui/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/modal-ui", - "version": "8.5.0", + "version": "8.5.1", "description": "Modal UI package for NEAR wallet Selector", "keywords": [ "near", diff --git a/packages/my-near-wallet/package.json b/packages/my-near-wallet/package.json index 7ffbba027..254abe958 100644 --- a/packages/my-near-wallet/package.json +++ b/packages/my-near-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/my-near-wallet", - "version": "8.5.0", + "version": "8.5.1", "description": "My Near Wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/narwallets/package.json b/packages/narwallets/package.json index 550532ee3..1343535b1 100644 --- a/packages/narwallets/package.json +++ b/packages/narwallets/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/narwallets", - "version": "8.5.0", + "version": "8.5.1", "description": "This is the Narwallets package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/near-snap/package.json b/packages/near-snap/package.json index a29eeee2d..cc9276605 100644 --- a/packages/near-snap/package.json +++ b/packages/near-snap/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/near-snap", - "version": "8.5.0", + "version": "8.5.1", "description": "Metamask snap to interact with Near dapps.", "keywords": [ "near", diff --git a/packages/near-wallet/package.json b/packages/near-wallet/package.json index 32e945aa1..95e0dd286 100644 --- a/packages/near-wallet/package.json +++ b/packages/near-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/near-wallet", - "version": "8.5.0", + "version": "8.5.1", "description": "Near Wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/nearfi/package.json b/packages/nearfi/package.json index 1c602a8ed..150624709 100644 --- a/packages/nearfi/package.json +++ b/packages/nearfi/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/nearfi", - "version": "8.5.0", + "version": "8.5.1", "description": "Nearfi package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/neth/package.json b/packages/neth/package.json index d4dcc4060..f7260b4fc 100644 --- a/packages/neth/package.json +++ b/packages/neth/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/neth", - "version": "8.5.0", + "version": "8.5.1", "description": "Control NEAR accounts with ETH accounts", "author": "mattlockyer", "keywords": [ diff --git a/packages/nightly-connect/package.json b/packages/nightly-connect/package.json index ecc979594..4ea2acd32 100644 --- a/packages/nightly-connect/package.json +++ b/packages/nightly-connect/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/nightly-connect", - "version": "8.5.0", + "version": "8.5.1", "description": "Nightly connect package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/nightly/package.json b/packages/nightly/package.json index 91cea41b4..f1869c607 100644 --- a/packages/nightly/package.json +++ b/packages/nightly/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/nightly", - "version": "8.5.0", + "version": "8.5.1", "description": "Nightly wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/opto-wallet/package.json b/packages/opto-wallet/package.json index d954ef0a3..4c476432f 100644 --- a/packages/opto-wallet/package.json +++ b/packages/opto-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/opto-wallet", - "version": "8.5.0", + "version": "8.5.1", "description": "Opto wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/ramper-wallet/package.json b/packages/ramper-wallet/package.json index a6f910230..25cede17b 100644 --- a/packages/ramper-wallet/package.json +++ b/packages/ramper-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/ramper-wallet", - "version": "8.5.0", + "version": "8.5.1", "description": "Ramper wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/sender/package.json b/packages/sender/package.json index 6a22fe2fb..70b4c1c38 100644 --- a/packages/sender/package.json +++ b/packages/sender/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/sender", - "version": "8.5.0", + "version": "8.5.1", "description": "Sender wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/wallet-connect/package.json b/packages/wallet-connect/package.json index c5f972268..94529c16b 100644 --- a/packages/wallet-connect/package.json +++ b/packages/wallet-connect/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/wallet-connect", - "version": "8.5.0", + "version": "8.5.1", "description": "Wallet Connect package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/wallet-utils/package.json b/packages/wallet-utils/package.json index 88c953a65..f05639e46 100644 --- a/packages/wallet-utils/package.json +++ b/packages/wallet-utils/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/wallet-utils", - "version": "8.5.0", + "version": "8.5.1", "description": "Wallet utils package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/welldone-wallet/package.json b/packages/welldone-wallet/package.json index f5f7d391f..e88547015 100644 --- a/packages/welldone-wallet/package.json +++ b/packages/welldone-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/welldone-wallet", - "version": "8.5.0", + "version": "8.5.1", "description": "Welldone wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/xdefi/package.json b/packages/xdefi/package.json index 7d652f648..37411bc33 100644 --- a/packages/xdefi/package.json +++ b/packages/xdefi/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/xdefi", - "version": "8.5.0", + "version": "8.5.1", "description": "This is the XDEFI package for NEAR Wallet Selector.", "keywords": [ "near", From 7d84697a1cd0e9eb1ad3387a2474c9cda42bac18 Mon Sep 17 00:00:00 2001 From: Erdit Kurteshi Date: Wed, 23 Aug 2023 13:34:09 +0200 Subject: [PATCH 41/71] changed modal-ui path into modal-ui-js in angular example --- .../angular/src/app/components/content/content.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/angular/src/app/components/content/content.component.ts b/examples/angular/src/app/components/content/content.component.ts index 66b5dac5c..c4ab8f5c6 100644 --- a/examples/angular/src/app/components/content/content.component.ts +++ b/examples/angular/src/app/components/content/content.component.ts @@ -16,7 +16,7 @@ import type { Submitted } from "../form/form.component"; import type { Account } from "../../interfaces/account"; import type { Subscription } from "rxjs"; import { distinctUntilChanged, map } from "rxjs"; -import { WalletSelectorModal } from "@near-wallet-selector/modal-ui"; +import { WalletSelectorModal } from "@near-wallet-selector/modal-ui-js"; import { CONTRACT_ID } from "../../../constants"; import { WalletSelector } from "@near-wallet-selector/core"; import type { GetAccountBalanceProps } from "../../interfaces/account-balance"; From 2d99feb7a2ca73785051f14e24a5fc0ca20ef7f6 Mon Sep 17 00:00:00 2001 From: Erdit Kurteshi Date: Wed, 23 Aug 2023 16:34:11 +0200 Subject: [PATCH 42/71] added permission to angular deploy workflow --- .github/workflows/deploy-angular-example.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-angular-example.yml b/.github/workflows/deploy-angular-example.yml index f664bac0a..86537abca 100644 --- a/.github/workflows/deploy-angular-example.yml +++ b/.github/workflows/deploy-angular-example.yml @@ -4,12 +4,16 @@ on: push: branches: - main - workflow_dispatch: + workflow_dispatch: jobs: deploy: runs-on: ubuntu-latest - + permissions: + actions: write + issues: write + pull-requests: write + contents: write steps: - name: Checkout repository uses: actions/checkout@v3 From f78c5c97f63340aa19519b770646f0b018f394c1 Mon Sep 17 00:00:00 2001 From: kujtimprenkuSQA Date: Mon, 28 Aug 2023 18:16:38 +0200 Subject: [PATCH 43/71] Add deploy to default targets, dependencies get deployed first. --- nx.json | 3 +++ packages/my-near-wallet/tsconfig.json | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/nx.json b/nx.json index 5b342c001..a6264874b 100644 --- a/nx.json +++ b/nx.json @@ -27,6 +27,9 @@ }, "test": { "inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"] + }, + "deploy": { + "dependsOn": ["^deploy"] } }, "generators": { diff --git a/packages/my-near-wallet/tsconfig.json b/packages/my-near-wallet/tsconfig.json index 8b6d6acaf..8bc3f3928 100644 --- a/packages/my-near-wallet/tsconfig.json +++ b/packages/my-near-wallet/tsconfig.json @@ -4,7 +4,8 @@ "forceConsistentCasingInFileNames": true, "strict": true, "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true + "noFallthroughCasesInSwitch": true, + "esModuleInterop": true }, "files": [], "include": [], From d609238a9fd5f97f820706e627a1cbbc5a214b20 Mon Sep 17 00:00:00 2001 From: kujtimprenkuSQA Date: Mon, 28 Aug 2023 18:17:59 +0200 Subject: [PATCH 44/71] Add current branch to workflows. --- .github/workflows/bump-version.yml | 1 + .github/workflows/dev-pr.yml | 1 + .github/workflows/pr-actions.yaml | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index fa4f8e8aa..db12fbcf3 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -2,6 +2,7 @@ on: push: branches: - main + - nx-deploy-packages workflow_dispatch: permissions: diff --git a/.github/workflows/dev-pr.yml b/.github/workflows/dev-pr.yml index add395c74..48034c0c3 100644 --- a/.github/workflows/dev-pr.yml +++ b/.github/workflows/dev-pr.yml @@ -16,6 +16,7 @@ on: branches: - dev - main + - nx-deploy-packages permissions: actions: write diff --git a/.github/workflows/pr-actions.yaml b/.github/workflows/pr-actions.yaml index a076c3254..06fe844af 100644 --- a/.github/workflows/pr-actions.yaml +++ b/.github/workflows/pr-actions.yaml @@ -5,6 +5,7 @@ on: branches: - main - dev + - nx-deploy-packages env: CI: true From 8ebef5783e8022666fafe07e9aa71eba4dd49c04 Mon Sep 17 00:00:00 2001 From: kujtimprenkuSQA Date: Mon, 28 Aug 2023 18:39:21 +0200 Subject: [PATCH 45/71] Remove build step. --- .github/workflows/bump-version.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index db12fbcf3..7d866bb25 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -48,9 +48,6 @@ jobs: if: github.ref == 'refs/heads/main' run: echo "GIT_TAG=$(git describe --exact-match --tags $(git log -n1 --pretty='%h') 2> /dev/null)" >> $GITHUB_ENV - - name: Run Build All - run: yarn build:all - - name: Deploy run: yarn nx run-many --target=deploy --all --exclude=$EXAMPLE_APPS --dry-run env: From d8ba08fd21da2dad84d48777733643b06a9a317c Mon Sep 17 00:00:00 2001 From: kujtimprenkuSQA Date: Mon, 28 Aug 2023 20:41:15 +0200 Subject: [PATCH 46/71] Remove unnecessary config from mnw. --- packages/my-near-wallet/tsconfig.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/my-near-wallet/tsconfig.json b/packages/my-near-wallet/tsconfig.json index 8bc3f3928..8b6d6acaf 100644 --- a/packages/my-near-wallet/tsconfig.json +++ b/packages/my-near-wallet/tsconfig.json @@ -4,8 +4,7 @@ "forceConsistentCasingInFileNames": true, "strict": true, "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "esModuleInterop": true + "noFallthroughCasesInSwitch": true }, "files": [], "include": [], From 7ad5455c1164e7d929fcf8f5c9319699a25ed15f Mon Sep 17 00:00:00 2001 From: kujtimprenkuSQA Date: Tue, 29 Aug 2023 10:49:33 +0200 Subject: [PATCH 47/71] Add build step and avoid building with the deploy script. --- .github/workflows/bump-version.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 7d866bb25..cddbdc870 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -48,8 +48,11 @@ jobs: if: github.ref == 'refs/heads/main' run: echo "GIT_TAG=$(git describe --exact-match --tags $(git log -n1 --pretty='%h') 2> /dev/null)" >> $GITHUB_ENV + - name: Run Build All + run: yarn build:all + - name: Deploy - run: yarn nx run-many --target=deploy --all --exclude=$EXAMPLE_APPS --dry-run + run: yarn nx run-many --target=deploy --all --noBuild --exclude=$EXAMPLE_APPS --dry-run env: EXAMPLE_APPS: ${{ env.EXAMPLE_APPS }} From 40cde19459a358d370e0b9c67eb4e8d480b13f30 Mon Sep 17 00:00:00 2001 From: kujtimprenkuSQA Date: Tue, 29 Aug 2023 10:59:52 +0200 Subject: [PATCH 48/71] Remove current branch from workflows. --- .github/workflows/bump-version.yml | 1 - .github/workflows/dev-pr.yml | 1 - .github/workflows/pr-actions.yaml | 1 - 3 files changed, 3 deletions(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index cddbdc870..2b0bb6782 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -2,7 +2,6 @@ on: push: branches: - main - - nx-deploy-packages workflow_dispatch: permissions: diff --git a/.github/workflows/dev-pr.yml b/.github/workflows/dev-pr.yml index 48034c0c3..add395c74 100644 --- a/.github/workflows/dev-pr.yml +++ b/.github/workflows/dev-pr.yml @@ -16,7 +16,6 @@ on: branches: - dev - main - - nx-deploy-packages permissions: actions: write diff --git a/.github/workflows/pr-actions.yaml b/.github/workflows/pr-actions.yaml index 06fe844af..a076c3254 100644 --- a/.github/workflows/pr-actions.yaml +++ b/.github/workflows/pr-actions.yaml @@ -5,7 +5,6 @@ on: branches: - main - dev - - nx-deploy-packages env: CI: true From c669394a5189333dc815363cf29a9ac312046527 Mon Sep 17 00:00:00 2001 From: Erdit Kurteshi Date: Thu, 31 Aug 2023 13:36:33 +0200 Subject: [PATCH 49/71] updated verifySignature function --- .../verify-signature/verify-signature.ts | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/packages/core/src/lib/helpers/verify-signature/verify-signature.ts b/packages/core/src/lib/helpers/verify-signature/verify-signature.ts index 4c98fd72e..9487cc09e 100644 --- a/packages/core/src/lib/helpers/verify-signature/verify-signature.ts +++ b/packages/core/src/lib/helpers/verify-signature/verify-signature.ts @@ -17,14 +17,23 @@ export const verifySignature = ({ recipient, callbackUrl, }: VerifySignatureParams) => { + // Reconstruct the payload that was **actually signed** const payload = new Payload({ message, nonce, recipient, callbackUrl }); + + // Serialize payload based on payloadSchema const borshPayload = serialize(payloadSchema, payload); - const sha = sha256(borshPayload); + + // Hash the payload as in the NEP0413 referenced example + // https://github.com/near/NEPs/blob/master/neps/nep-0413.md#references + // https://github.com/gagdiez/near-login/blob/main/authenticate/wallet-authenticate.js#L21 + const hashedPayload = Uint8Array.from(sha256.array(borshPayload)); + + // Convert real signature to buffer base64 + const realSignature = Buffer.from(signature, "base64"); const pk = utils.PublicKey.from(publicKey); - return pk.verify( - new Uint8Array(Buffer.from(sha, "hex")), - Buffer.from(signature, "base64") - ); + + // Verify the signature + return pk.verify(hashedPayload, realSignature); }; const fetchAllUserKeys = async ({ From e2246e4e843ee8c92b370d39e4d8d45159358bca Mon Sep 17 00:00:00 2001 From: Haris Date: Thu, 31 Aug 2023 15:22:58 +0200 Subject: [PATCH 50/71] Remove "Finer-wallet" from list --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index 0598271b0..0f8495044 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,6 @@ NEAR Wallet Selector makes it easy for users to interact with your dApp by provi - [Here Wallet](https://www.npmjs.com/package/@near-wallet-selector/here-wallet) - Mobile wallet. - [NearFi Wallet](https://www.npmjs.com/package/@near-wallet-selector/nearfi) - Mobile wallet. - [Opto Wallet](https://www.npmjs.com/package/@near-wallet-selector/opto-wallet) - Mobile wallet & Browser wallet. -- [Finer Wallet](https://www.npmjs.com/package/@near-wallet-selector/finer-wallet) - Mobile wallet & Browser wallet. - [Ramper Wallet](https://www.npmjs.com/package/@near-wallet-selector/ramper-wallet) - Browser wallet. ## Preview @@ -71,7 +70,6 @@ yarn add \ @near-wallet-selector/default-wallets \ @near-wallet-selector/coin98-wallet \ @near-wallet-selector/opto-wallet \ - @near-wallet-selector/finer-wallet \ @near-wallet-selector/neth \ @near-wallet-selector/xdefi \ @near-wallet-selector/ramper-wallet @@ -95,7 +93,6 @@ npm install \ @near-wallet-selector/default-wallets \ @near-wallet-selector/coin98-wallet \ @near-wallet-selector/opto-wallet \ - @near-wallet-selector/finer-wallet \ @near-wallet-selector/neth \ @near-wallet-selector/xdefi \ @near-wallet-selector/ramper-wallet @@ -133,7 +130,6 @@ import { setupNightlyConnect } from "@near-wallet-selector/nightly-connect"; import { setupNearFi } from "@near-wallet-selector/nearfi"; import { setupCoin98Wallet } from "@near-wallet-selector/coin98-wallet"; import { setupOptoWallet } from "@near-wallet-selector/opto-wallet"; -import { setupFinerWallet } from "@near-wallet-selector/finer-wallet"; import { setupNeth } from "@near-wallet-selector/neth"; import { setupXDEFI } from "@near-wallet-selector/xdefi"; import { setupRamperWallet } from "@near-wallet-selector/ramper-wallet"; @@ -155,7 +151,6 @@ const selector = await setupWalletSelector({ setupNearFi(), setupCoin98Wallet(), setupOptoWallet(), - setupFinerWallet(), setupNeth(), setupXDEFI(), setupWalletConnect({ From 6841478902ead33f28fd726ddc0a2fff8adb757a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 08:12:15 +0000 Subject: [PATCH 51/71] Bump better-sqlite3 from 8.4.0 to 8.5.2 Bumps [better-sqlite3](https://github.com/WiseLibs/better-sqlite3) from 8.4.0 to 8.5.2. - [Release notes](https://github.com/WiseLibs/better-sqlite3/releases) - [Commits](https://github.com/WiseLibs/better-sqlite3/compare/v8.4.0...v8.5.2) --- updated-dependencies: - dependency-name: better-sqlite3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 18c03dc07..943192b05 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,7 @@ "@ramper/near": "^0.0.30", "@walletconnect/modal": "^2.6.0", "@walletconnect/sign-client": "2.9.1", - "better-sqlite3": "^8.4.0", + "better-sqlite3": "^8.5.2", "big.js": "^6.1.1", "bn.js": "^5.2.0", "borsh": "^0.7.0", diff --git a/yarn.lock b/yarn.lock index 4516982b4..20ed0014f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6717,10 +6717,10 @@ before-after-hook@^2.2.0: resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.2.tgz#a6e8ca41028d90ee2c24222f201c90956091613e" integrity sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ== -better-sqlite3@^8.4.0: - version "8.4.0" - resolved "https://registry.yarnpkg.com/better-sqlite3/-/better-sqlite3-8.4.0.tgz#aa27bbc6bb42bb438fc55c88b146fcfe5978fa76" - integrity sha512-NmsNW1CQvqMszu/CFAJ3pLct6NEFlNfuGM6vw72KHkjOD1UDnL96XNN1BMQc1hiHo8vE2GbOWQYIpZ+YM5wrZw== +better-sqlite3@^8.5.2: + version "8.5.2" + resolved "https://registry.yarnpkg.com/better-sqlite3/-/better-sqlite3-8.5.2.tgz#a1c13e4361125255e39302e8b569a6568c3291e3" + integrity sha512-w/EZ/jwuZF+/47mAVC2+rhR2X/gwkZ+fd1pbX7Y90D5NRaRzDQcxrHY10t6ijGiYIonCVsBSF5v1cay07bP5sg== dependencies: bindings "^1.5.0" prebuild-install "^7.1.0" From 0b0ee112b2c5599af105745a1b378b6f1c3b8b20 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 08:14:10 +0000 Subject: [PATCH 52/71] Bump react-qr-code from 2.0.11 to 2.0.12 Bumps [react-qr-code](https://github.com/rosskhanas/react-qr-code) from 2.0.11 to 2.0.12. - [Commits](https://github.com/rosskhanas/react-qr-code/commits) --- updated-dependencies: - dependency-name: react-qr-code dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 18c03dc07..c5a10300b 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,7 @@ "qrcode": "^1.5.3", "react": "18.2.0", "react-dom": "18.2.0", - "react-qr-code": "^2.0.11", + "react-qr-code": "^2.0.12", "regenerator-runtime": "0.13.11", "rxjs": "^7.8.1", "stream-browserify": "^3.0.0", diff --git a/yarn.lock b/yarn.lock index 4516982b4..b6cdedd56 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15671,10 +15671,10 @@ react-is@^17.0.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== -react-qr-code@^2.0.11: - version "2.0.11" - resolved "https://registry.yarnpkg.com/react-qr-code/-/react-qr-code-2.0.11.tgz#444c759a2100424972e17135fbe0e32eaffa19e8" - integrity sha512-P7mvVM5vk9NjGdHMt4Z0KWeeJYwRAtonHTghZT2r+AASinLUUKQ9wfsGH2lPKsT++gps7hXmaiMGRvwTDEL9OA== +react-qr-code@^2.0.12: + version "2.0.12" + resolved "https://registry.yarnpkg.com/react-qr-code/-/react-qr-code-2.0.12.tgz#98f99e9ad5ede46d73ab819e2dd9925c5f5d7a2d" + integrity sha512-k+pzP5CKLEGBRwZsDPp98/CAJeXlsYRHM2iZn1Sd5Th/HnKhIZCSg27PXO58zk8z02RaEryg+60xa4vyywMJwg== dependencies: prop-types "^15.8.1" qr.js "0.0.0" From 8e8ee5be53c1f48ea459e686e2915c4dbf369b8f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 08:16:37 +0000 Subject: [PATCH 53/71] Bump @types/big.js from 6.1.6 to 6.2.0 Bumps [@types/big.js](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/big.js) from 6.1.6 to 6.2.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/big.js) --- updated-dependencies: - dependency-name: "@types/big.js" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 18c03dc07..a07934332 100644 --- a/package.json +++ b/package.json @@ -161,7 +161,7 @@ "@testing-library/jest-dom": "^5.16.1", "@testing-library/react": "13.4.0", "@testing-library/react-hooks": "^7.0.2", - "@types/big.js": "^6.1.6", + "@types/big.js": "^6.2.0", "@types/bn.js": "^5.1.1", "@types/gh-pages": "^3.2.1", "@types/jest": "29.4.4", diff --git a/yarn.lock b/yarn.lock index 4516982b4..ac50b21a7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4759,10 +4759,10 @@ dependencies: "@babel/types" "^7.3.0" -"@types/big.js@^6.1.6": - version "6.1.6" - resolved "https://registry.yarnpkg.com/@types/big.js/-/big.js-6.1.6.tgz#3d417e758483d55345a03a087f7e0c87137ca444" - integrity sha512-0r9J+Zz9rYm2hOTwiMAVkm3XFQ4u5uTK37xrQMhc9bysn/sf/okzovWMYYIBMFTn/yrEZ11pusgLEaoarTlQbA== +"@types/big.js@^6.2.0": + version "6.2.0" + resolved "https://registry.yarnpkg.com/@types/big.js/-/big.js-6.2.0.tgz#e1f6a9a6ce64bc7c131137e71fbad34a5574f987" + integrity sha512-ubLURWoc4tCw/8Yds0P3CE9cBG5q+aoycwWBiXXx4gp7XPYZy9ch0L9+Pv6osSoSRgvuQNqJdlwEhP5QhKKl6w== "@types/bn.js@^5.1.1": version "5.1.1" From 7553eddd9a326ca4ad6f3235162bfdc1481017e3 Mon Sep 17 00:00:00 2001 From: Haris Date: Fri, 1 Sep 2023 13:28:33 +0200 Subject: [PATCH 54/71] Added into Finer Wallet Readme file --- packages/finer-wallet/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/finer-wallet/README.md b/packages/finer-wallet/README.md index ccca7533a..73c1645b5 100644 --- a/packages/finer-wallet/README.md +++ b/packages/finer-wallet/README.md @@ -1,7 +1,7 @@ # @near-wallet-selector/finer-wallet This is the [FiNER Wallet](https://finerwallet.io/) package for NEAR Wallet Selector. - +## ⚠️ FiNER Wallet has been marked as deprecated. ⚠️ ## Installation and Usage The easiest way to use this package is to install it from the NPM registry: From eb5ae27e0e2d9ce36f0ab3c6db1b74ce301d52cb Mon Sep 17 00:00:00 2001 From: Haris Date: Fri, 1 Sep 2023 13:39:03 +0200 Subject: [PATCH 55/71] Change font size --- packages/finer-wallet/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/finer-wallet/README.md b/packages/finer-wallet/README.md index 73c1645b5..4b5613c04 100644 --- a/packages/finer-wallet/README.md +++ b/packages/finer-wallet/README.md @@ -1,7 +1,7 @@ # @near-wallet-selector/finer-wallet This is the [FiNER Wallet](https://finerwallet.io/) package for NEAR Wallet Selector. -## ⚠️ FiNER Wallet has been marked as deprecated. ⚠️ +#### ⚠️ FiNER Wallet has been marked as deprecated. ⚠️ ## Installation and Usage The easiest way to use this package is to install it from the NPM registry: From d9b3435cd1bcff43208f6b4d3d87bc8e46781a99 Mon Sep 17 00:00:00 2001 From: Erdit Kurteshi Date: Tue, 5 Sep 2023 14:12:24 +0200 Subject: [PATCH 56/71] bumped version for semver and cypress --- package.json | 4 +- yarn.lock | 358 ++++++++++++++++++++++++++------------------------- 2 files changed, 186 insertions(+), 176 deletions(-) diff --git a/package.json b/package.json index 18c03dc07..a4d71957d 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "@angular/platform-browser-dynamic": "15.2.9", "@angular/router": "15.2.9", "@here-wallet/core": "^1.4.3", - "@jscutlery/semver": "^2.30.1", + "@jscutlery/semver": "3.1.0", "@ledgerhq/hw-transport": "6.27.1", "@ledgerhq/hw-transport-webhid": "6.27.1", "@metamask/detect-provider": "^2.0.0", @@ -177,7 +177,7 @@ "@typescript-eslint/parser": "5.58.0", "babel-jest": "29.4.3", "css-loader": "^6.4.0", - "cypress": "^9.1.0", + "cypress": "^12.2.0", "eslint": "~8.15.0", "eslint-config-next": "13.1.1", "eslint-config-prettier": "8.1.0", diff --git a/yarn.lock b/yarn.lock index 4516982b4..45886573a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2013,10 +2013,10 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" -"@cypress/request@^2.88.10": - version "2.88.10" - resolved "https://registry.yarnpkg.com/@cypress/request/-/request-2.88.10.tgz#b66d76b07f860d3a4b8d7a0604d020c662752cce" - integrity sha512-Zp7F+R93N0yZyG34GutyTNr+okam7s/Fzc1+i3kcqOP8vk6OuajuE9qZJ6Rs+10/1JFtXFYMdyarnU1rZuJesg== +"@cypress/request@2.88.12": + version "2.88.12" + resolved "https://registry.yarnpkg.com/@cypress/request/-/request-2.88.12.tgz#ba4911431738494a85e93fb04498cb38bc55d590" + integrity sha512-tOn+0mDZxASFM+cuAP9szGUGPI1HwWVSvdzm7V4cCsPdFTx6qMj29CwaQmRAMIEhORIUBFBsYROYJcveK4uOjA== dependencies: aws-sign2 "~0.7.0" aws4 "^1.8.0" @@ -2031,9 +2031,9 @@ json-stringify-safe "~5.0.1" mime-types "~2.1.19" performance-now "^2.1.0" - qs "~6.5.2" + qs "~6.10.3" safe-buffer "^5.1.2" - tough-cookie "~2.5.0" + tough-cookie "^4.1.3" tunnel-agent "^0.6.0" uuid "^8.3.2" @@ -2904,17 +2904,17 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@jscutlery/semver@^2.30.1": - version "2.30.1" - resolved "https://registry.yarnpkg.com/@jscutlery/semver/-/semver-2.30.1.tgz#daaaf223a6536a339ad98bee92c872205a5c0191" - integrity sha512-Adnlu/kEOaikxNJLi3Ll4UfgEW4VG0dvf5zm7Ere7vT/udHhPs6CTO6B7PCFLzKsLgM0vqSrVk/nKYFWri83Ww== +"@jscutlery/semver@3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@jscutlery/semver/-/semver-3.1.0.tgz#8b30061d9f6687a6c6be28c06ba878b8acaadb5a" + integrity sha512-x/v+6HN0/UpQW8L3sIlvRodBY/pGJ3AjtNpKmMkR4RmnTuuRo+OMAiIS4/EJ2pzXhmn9YqNm8rYzIIqiWt62IA== dependencies: chalk "4.1.2" - conventional-changelog "^3.1.25" - conventional-recommended-bump "^6.1.0" + conventional-changelog "^4.0.0" + conventional-recommended-bump "^7.0.0" detect-indent "6.1.0" inquirer "8.2.5" - rxjs "7.8.0" + rxjs "7.8.1" "@jsdoc/salty@^0.2.1": version "0.2.5" @@ -4996,10 +4996,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-11.11.6.tgz#df929d1bb2eee5afdda598a41930fe50b43eaa6a" integrity sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ== -"@types/node@^14.14.31": - version "14.18.21" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.21.tgz#0155ee46f6be28b2ff0342ca1a9b9fd4468bef41" - integrity sha512-x5W9s+8P4XteaxT/jKF0PSb7XEvo5VmqEWgsMlyeY4ZlLK8I6aH6g5TPPyDlLAep+GYf4kefb7HFyc7PAO3m+Q== +"@types/node@^16.18.39": + version "16.18.48" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.48.tgz#3bc872236cdb31cb51024d8875d655e25db489a4" + integrity sha512-mlaecDKQ7rIZrYD7iiKNdzFb6e/qD5I9U1rAhq+Fd+DWvYVs+G2kv74UFHmSOlg5+i/vF3XxuR522V4u8BqO+Q== "@types/normalize-package-data@^2.4.0": version "2.4.1" @@ -5923,7 +5923,7 @@ dependencies: argparse "^2.0.1" -JSONStream@^1.0.4: +JSONStream@^1.0.4, JSONStream@^1.3.5: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== @@ -7552,11 +7552,6 @@ commander@^2.18.0, commander@^2.20.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" - integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== - commander@^6.2.1: version "6.2.1" resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" @@ -7674,7 +7669,7 @@ content-type@~1.0.4: resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== -conventional-changelog-angular@^5.0.0, conventional-changelog-angular@^5.0.12: +conventional-changelog-angular@^5.0.0: version "5.0.13" resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz#896885d63b914a70d4934b59d2fe7bde1832b28c" integrity sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA== @@ -7682,89 +7677,78 @@ conventional-changelog-angular@^5.0.0, conventional-changelog-angular@^5.0.12: compare-func "^2.0.0" q "^1.5.1" -conventional-changelog-atom@^2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-2.0.8.tgz#a759ec61c22d1c1196925fca88fe3ae89fd7d8de" - integrity sha512-xo6v46icsFTK3bb7dY/8m2qvc8sZemRgdqLb/bjpBsH2UyOS8rKNTgcb5025Hri6IpANPApbXMg15QLb1LJpBw== +conventional-changelog-angular@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-6.0.0.tgz#a9a9494c28b7165889144fd5b91573c4aa9ca541" + integrity sha512-6qLgrBF4gueoC7AFVHu51nHL9pF9FRjXrH+ceVf7WmAfH3gs+gEYOkvxhjMPjZu57I4AGUGoNTY8V7Hrgf1uqg== dependencies: - q "^1.5.1" + compare-func "^2.0.0" -conventional-changelog-codemirror@^2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-2.0.8.tgz#398e9530f08ce34ec4640af98eeaf3022eb1f7dc" - integrity sha512-z5DAsn3uj1Vfp7po3gpt2Boc+Bdwmw2++ZHa5Ak9k0UKsYAO5mH1UBTN0qSCuJZREIhX6WU4E1p3IW2oRCNzQw== - dependencies: - q "^1.5.1" +conventional-changelog-atom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-3.0.0.tgz#32de463a29db773de15382c96acda47930d3d24d" + integrity sha512-pnN5bWpH+iTUWU3FaYdw5lJmfWeqSyrUkG+wyHBI9tC1dLNnHkbAOg1SzTQ7zBqiFrfo55h40VsGXWMdopwc5g== + +conventional-changelog-codemirror@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-3.0.0.tgz#6d5a4c67713346a9ebbcfb6336b3269ce8ddceeb" + integrity sha512-wzchZt9HEaAZrenZAUUHMCFcuYzGoZ1wG/kTRMICxsnW5AXohYMRxnyecP9ob42Gvn5TilhC0q66AtTPRSNMfw== -conventional-changelog-conventionalcommits@^4.5.0: - version "4.6.3" - resolved "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.6.3.tgz#0765490f56424b46f6cb4db9135902d6e5a36dc2" - integrity sha512-LTTQV4fwOM4oLPad317V/QNQ1FY4Hju5qeBIM1uTHbrnCE+Eg4CdRZ3gO2pUeR+tzWdp80M2j3qFFEDWVqOV4g== +conventional-changelog-conventionalcommits@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-6.1.0.tgz#3bad05f4eea64e423d3d90fc50c17d2c8cf17652" + integrity sha512-3cS3GEtR78zTfMzk0AizXKKIdN4OvSh7ibNz6/DPbhWWQu7LqE/8+/GqSodV+sywUR2gpJAdP/1JFf4XtN7Zpw== dependencies: compare-func "^2.0.0" - lodash "^4.17.15" - q "^1.5.1" -conventional-changelog-core@^4.2.1: - version "4.2.4" - resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-4.2.4.tgz#e50d047e8ebacf63fac3dc67bf918177001e1e9f" - integrity sha512-gDVS+zVJHE2v4SLc6B0sLsPiloR0ygU7HaDW14aNJE1v4SlqJPILPl/aJC7YdtRE4CybBf8gDwObBvKha8Xlyg== +conventional-changelog-core@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-5.0.2.tgz#78dbe6c346162be4132b7890668d3e860cad2d08" + integrity sha512-RhQOcDweXNWvlRwUDCpaqXzbZemKPKncCWZG50Alth72WITVd6nhVk9MJ6w1k9PFNBcZ3YwkdkChE+8+ZwtUug== dependencies: add-stream "^1.0.0" - conventional-changelog-writer "^5.0.0" - conventional-commits-parser "^3.2.0" - dateformat "^3.0.0" - get-pkg-repo "^4.0.0" - git-raw-commits "^2.0.8" + conventional-changelog-writer "^6.0.0" + conventional-commits-parser "^4.0.0" + dateformat "^3.0.3" + get-pkg-repo "^4.2.1" + git-raw-commits "^3.0.0" git-remote-origin-url "^2.0.0" - git-semver-tags "^4.1.1" - lodash "^4.17.15" - normalize-package-data "^3.0.0" - q "^1.5.1" + git-semver-tags "^5.0.0" + normalize-package-data "^3.0.3" read-pkg "^3.0.0" read-pkg-up "^3.0.0" - through2 "^4.0.0" -conventional-changelog-ember@^2.0.9: - version "2.0.9" - resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-2.0.9.tgz#619b37ec708be9e74a220f4dcf79212ae1c92962" - integrity sha512-ulzIReoZEvZCBDhcNYfDIsLTHzYHc7awh+eI44ZtV5cx6LVxLlVtEmcO+2/kGIHGtw+qVabJYjdI5cJOQgXh1A== - dependencies: - q "^1.5.1" +conventional-changelog-ember@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-3.0.0.tgz#8a02adc12f87285195dda43b573b7c0d1a1b266c" + integrity sha512-7PYthCoSxIS98vWhVcSphMYM322OxptpKAuHYdVspryI0ooLDehRXWeRWgN+zWSBXKl/pwdgAg8IpLNSM1/61A== -conventional-changelog-eslint@^3.0.9: - version "3.0.9" - resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-3.0.9.tgz#689bd0a470e02f7baafe21a495880deea18b7cdb" - integrity sha512-6NpUCMgU8qmWmyAMSZO5NrRd7rTgErjrm4VASam2u5jrZS0n38V7Y9CzTtLT2qwz5xEChDR4BduoWIr8TfwvXA== - dependencies: - q "^1.5.1" +conventional-changelog-eslint@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-4.0.0.tgz#cdcaee9bc14ffc97540ecef6771c472e54f3d75e" + integrity sha512-nEZ9byP89hIU0dMx37JXQkE1IpMmqKtsaR24X7aM3L6Yy/uAtbb+ogqthuNYJkeO1HyvK7JsX84z8649hvp43Q== -conventional-changelog-express@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-2.0.6.tgz#420c9d92a347b72a91544750bffa9387665a6ee8" - integrity sha512-SDez2f3iVJw6V563O3pRtNwXtQaSmEfTCaTBPCqn0oG0mfkq0rX4hHBq5P7De2MncoRixrALj3u3oQsNK+Q0pQ== - dependencies: - q "^1.5.1" +conventional-changelog-express@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-3.0.0.tgz#25bee76f7d11df45b42bd5580228b1f94c77a64f" + integrity sha512-HqxihpUMfIuxvlPvC6HltA4ZktQEUan/v3XQ77+/zbu8No/fqK3rxSZaYeHYant7zRxQNIIli7S+qLS9tX9zQA== -conventional-changelog-jquery@^3.0.11: - version "3.0.11" - resolved "https://registry.yarnpkg.com/conventional-changelog-jquery/-/conventional-changelog-jquery-3.0.11.tgz#d142207400f51c9e5bb588596598e24bba8994bf" - integrity sha512-x8AWz5/Td55F7+o/9LQ6cQIPwrCjfJQ5Zmfqi8thwUEKHstEn4kTIofXub7plf1xvFA2TqhZlq7fy5OmV6BOMw== - dependencies: - q "^1.5.1" +conventional-changelog-jquery@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-jquery/-/conventional-changelog-jquery-4.0.0.tgz#bbfea102b8ea66a781e245d43ead0608842ae326" + integrity sha512-TTIN5CyzRMf8PUwyy4IOLmLV2DFmPtasKN+x7EQKzwSX8086XYwo+NeaeA3VUT8bvKaIy5z/JoWUvi7huUOgaw== -conventional-changelog-jshint@^2.0.9: - version "2.0.9" - resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-2.0.9.tgz#f2d7f23e6acd4927a238555d92c09b50fe3852ff" - integrity sha512-wMLdaIzq6TNnMHMy31hql02OEQ8nCQfExw1SE0hYL5KvU+JCTuPaDO+7JiogGT2gJAxiUGATdtYYfh+nT+6riA== +conventional-changelog-jshint@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-3.0.0.tgz#a1743e77ffdee03b704af6faa199520d3a90a868" + integrity sha512-bQof4byF4q+n+dwFRkJ/jGf9dCNUv4/kCDcjeCizBvfF81TeimPZBB6fT4HYbXgxxfxWXNl/i+J6T0nI4by6DA== dependencies: compare-func "^2.0.0" - q "^1.5.1" -conventional-changelog-preset-loader@^2.3.4: - version "2.3.4" - resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz#14a855abbffd59027fd602581f1f34d9862ea44c" - integrity sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g== +conventional-changelog-preset-loader@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-3.0.0.tgz#14975ef759d22515d6eabae6396c2ae721d4c105" + integrity sha512-qy9XbdSLmVnwnvzEisjxdDiLA4OmV3o8db+Zdg4WiFw14fP3B6XNz98X0swPPpkTd/pc1K7+adKgEDM1JCUMiA== conventional-changelog-writer@^5.0.0: version "5.0.1" @@ -7781,22 +7765,35 @@ conventional-changelog-writer@^5.0.0: split "^1.0.0" through2 "^4.0.0" -conventional-changelog@^3.1.25: - version "3.1.25" - resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-3.1.25.tgz#3e227a37d15684f5aa1fb52222a6e9e2536ccaff" - integrity sha512-ryhi3fd1mKf3fSjbLXOfK2D06YwKNic1nC9mWqybBHdObPd8KJ2vjaXZfYj1U23t+V8T8n0d7gwnc9XbIdFbyQ== - dependencies: - conventional-changelog-angular "^5.0.12" - conventional-changelog-atom "^2.0.8" - conventional-changelog-codemirror "^2.0.8" - conventional-changelog-conventionalcommits "^4.5.0" - conventional-changelog-core "^4.2.1" - conventional-changelog-ember "^2.0.9" - conventional-changelog-eslint "^3.0.9" - conventional-changelog-express "^2.0.6" - conventional-changelog-jquery "^3.0.11" - conventional-changelog-jshint "^2.0.9" - conventional-changelog-preset-loader "^2.3.4" +conventional-changelog-writer@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-6.0.1.tgz#d8d3bb5e1f6230caed969dcc762b1c368a8f7b01" + integrity sha512-359t9aHorPw+U+nHzUXHS5ZnPBOizRxfQsWT5ZDHBfvfxQOAik+yfuhKXG66CN5LEWPpMNnIMHUTCKeYNprvHQ== + dependencies: + conventional-commits-filter "^3.0.0" + dateformat "^3.0.3" + handlebars "^4.7.7" + json-stringify-safe "^5.0.1" + meow "^8.1.2" + semver "^7.0.0" + split "^1.0.1" + +conventional-changelog@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-4.0.0.tgz#51a8d7765e5837bb29b3ef1cf395d6ef594827a9" + integrity sha512-JbZjwE1PzxQCvm+HUTIr+pbSekS8qdOZzMakdFyPtdkEWwFvwEJYONzjgMm0txCb2yBcIcfKDmg8xtCKTdecNQ== + dependencies: + conventional-changelog-angular "^6.0.0" + conventional-changelog-atom "^3.0.0" + conventional-changelog-codemirror "^3.0.0" + conventional-changelog-conventionalcommits "^6.0.0" + conventional-changelog-core "^5.0.0" + conventional-changelog-ember "^3.0.0" + conventional-changelog-eslint "^4.0.0" + conventional-changelog-express "^3.0.0" + conventional-changelog-jquery "^4.0.0" + conventional-changelog-jshint "^3.0.0" + conventional-changelog-preset-loader "^3.0.0" conventional-commits-filter@^2.0.0, conventional-commits-filter@^2.0.7: version "2.0.7" @@ -7806,7 +7803,15 @@ conventional-commits-filter@^2.0.0, conventional-commits-filter@^2.0.7: lodash.ismatch "^4.4.0" modify-values "^1.0.0" -conventional-commits-parser@^3.2.0, conventional-commits-parser@^3.2.3: +conventional-commits-filter@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-3.0.0.tgz#bf1113266151dd64c49cd269e3eb7d71d7015ee2" + integrity sha512-1ymej8b5LouPx9Ox0Dw/qAO2dVdfpRFq28e5Y0jJEU8ZrLdy0vOSkkIInwmxErFGhg6SALro60ZrwYFVTUDo4Q== + dependencies: + lodash.ismatch "^4.4.0" + modify-values "^1.0.1" + +conventional-commits-parser@^3.2.3: version "3.2.4" resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.2.4.tgz#a7d3b77758a202a9b2293d2112a8d8052c740972" integrity sha512-nK7sAtfi+QXbxHCYfhpZsfRtaitZLIA6889kFIouLvz6repszQDgxBu7wf2WbU+Dco7sAnNCJYERCwt54WPC2Q== @@ -7818,19 +7823,28 @@ conventional-commits-parser@^3.2.0, conventional-commits-parser@^3.2.3: split2 "^3.0.0" through2 "^4.0.0" -conventional-recommended-bump@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-6.1.0.tgz#cfa623285d1de554012f2ffde70d9c8a22231f55" - integrity sha512-uiApbSiNGM/kkdL9GTOLAqC4hbptObFo4wW2QRyHsKciGAfQuLU1ShZ1BIVI/+K2BE/W1AWYQMCXAsv4dyKPaw== +conventional-commits-parser@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-4.0.0.tgz#02ae1178a381304839bce7cea9da5f1b549ae505" + integrity sha512-WRv5j1FsVM5FISJkoYMR6tPk07fkKT0UodruX4je86V4owk451yjXAKzKAPOs9l7y59E2viHUS9eQ+dfUA9NSg== + dependencies: + JSONStream "^1.3.5" + is-text-path "^1.0.1" + meow "^8.1.2" + split2 "^3.2.2" + +conventional-recommended-bump@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-7.0.1.tgz#ec01f6c7f5d0e2491c2d89488b0d757393392424" + integrity sha512-Ft79FF4SlOFvX4PkwFDRnaNiIVX7YbmqGU0RwccUaiGvgp3S0a8ipR2/Qxk31vclDNM+GSdJOVs2KrsUCjblVA== dependencies: concat-stream "^2.0.0" - conventional-changelog-preset-loader "^2.3.4" - conventional-commits-filter "^2.0.7" - conventional-commits-parser "^3.2.0" - git-raw-commits "^2.0.8" - git-semver-tags "^4.1.1" - meow "^8.0.0" - q "^1.5.1" + conventional-changelog-preset-loader "^3.0.0" + conventional-commits-filter "^3.0.0" + conventional-commits-parser "^4.0.0" + git-raw-commits "^3.0.0" + git-semver-tags "^5.0.0" + meow "^8.1.2" convert-source-map@^1.5.1, convert-source-map@^1.6.0, convert-source-map@^1.7.0: version "1.8.0" @@ -8258,14 +8272,14 @@ csstype@^3.0.2: resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.0.tgz#4ddcac3718d787cf9df0d1b7d15033925c8f29f2" integrity sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA== -cypress@^9.1.0: - version "9.7.0" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-9.7.0.tgz#bf55b2afd481f7a113ef5604aa8b693564b5e744" - integrity sha512-+1EE1nuuuwIt/N1KXRR2iWHU+OiIt7H28jJDyyI4tiUftId/DrXYEwoDa5+kH2pki1zxnA0r6HrUGHV5eLbF5Q== +cypress@^12.2.0: + version "12.17.4" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-12.17.4.tgz#b4dadf41673058493fa0d2362faa3da1f6ae2e6c" + integrity sha512-gAN8Pmns9MA5eCDFSDJXWKUpaL3IDd89N9TtIupjYnzLSmlpVr+ZR+vb4U/qaMp+lB6tBvAmt7504c3Z4RU5KQ== dependencies: - "@cypress/request" "^2.88.10" + "@cypress/request" "2.88.12" "@cypress/xvfb" "^1.2.4" - "@types/node" "^14.14.31" + "@types/node" "^16.18.39" "@types/sinonjs__fake-timers" "8.1.1" "@types/sizzle" "^2.3.2" arch "^2.2.0" @@ -8277,12 +8291,12 @@ cypress@^9.1.0: check-more-types "^2.24.0" cli-cursor "^3.1.0" cli-table3 "~0.6.1" - commander "^5.1.0" + commander "^6.2.1" common-tags "^1.8.0" dayjs "^1.10.4" - debug "^4.3.2" + debug "^4.3.4" enquirer "^2.3.6" - eventemitter2 "^6.4.3" + eventemitter2 "6.4.7" execa "4.1.0" executable "^4.1.1" extract-zip "2.0.1" @@ -8295,12 +8309,13 @@ cypress@^9.1.0: listr2 "^3.8.3" lodash "^4.17.21" log-symbols "^4.0.0" - minimist "^1.2.6" + minimist "^1.2.8" ospath "^1.2.2" pretty-bytes "^5.6.0" + process "^0.11.10" proxy-from-env "1.0.0" request-progress "^3.0.0" - semver "^7.3.2" + semver "^7.5.3" supports-color "^8.1.1" tmp "~0.2.1" untildify "^4.0.0" @@ -8332,7 +8347,7 @@ data-urls@^3.0.1, data-urls@^3.0.2: whatwg-mimetype "^3.0.0" whatwg-url "^11.0.0" -dateformat@^3.0.0: +dateformat@^3.0.0, dateformat@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== @@ -9630,10 +9645,10 @@ eventemitter-asyncresource@^1.0.0: resolved "https://registry.yarnpkg.com/eventemitter-asyncresource/-/eventemitter-asyncresource-1.0.0.tgz#734ff2e44bf448e627f7748f905d6bdd57bdb65b" integrity sha512-39F7TBIV0G7gTelxwbEqnwhp90eqCPON1k0NwNfwhgKn4Co4ybUbj2pECcXT0B3ztRKZ7Pw1JujUUgmQJHcVAQ== -eventemitter2@^6.4.3: - version "6.4.6" - resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-6.4.6.tgz#92d56569cc147a4d9b9da9e942e89b20ce236b0a" - integrity sha512-OHqo4wbHX5VbvlbB6o6eDwhYmiTjrpWACjF8Pmof/GTD6rdBNdZFNck3xlhqOiQFGCOoq3uzHvA0cQpFHIGVAQ== +eventemitter2@6.4.7: + version "6.4.7" + resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-6.4.7.tgz#a7f6c4d7abf28a14c1ef3442f21cb306a054271d" + integrity sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg== eventemitter3@^4.0.0, eventemitter3@^4.0.4: version "4.0.7" @@ -10325,7 +10340,7 @@ get-package-type@^0.1.0: resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== -get-pkg-repo@^4.0.0: +get-pkg-repo@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/get-pkg-repo/-/get-pkg-repo-4.2.1.tgz#75973e1c8050c73f48190c52047c4cee3acbf385" integrity sha512-2+QbHjFRfGB74v/pYWjd5OhU3TDIC2Gv/YKUTk/tCvAz0pkn/Mz6P3uByuBimLOcPvN2jYdScl3xGFSrx0jEcA== @@ -10401,16 +10416,14 @@ git-log-parser@^1.2.0: through2 "~2.0.0" traverse "~0.6.6" -git-raw-commits@^2.0.8: - version "2.0.11" - resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.11.tgz#bc3576638071d18655e1cc60d7f524920008d723" - integrity sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A== +git-raw-commits@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-3.0.0.tgz#5432f053a9744f67e8db03dbc48add81252cfdeb" + integrity sha512-b5OHmZ3vAgGrDn/X0kS+9qCfNKWe4K/jFnhwzVWWg0/k5eLa3060tZShrRg8Dja5kPc+YjS0Gc6y7cRr44Lpjw== dependencies: dargs "^7.0.0" - lodash "^4.17.15" - meow "^8.0.0" - split2 "^3.0.0" - through2 "^4.0.0" + meow "^8.1.2" + split2 "^3.2.2" git-remote-origin-url@^2.0.0: version "2.0.0" @@ -10420,13 +10433,13 @@ git-remote-origin-url@^2.0.0: gitconfiglocal "^1.0.0" pify "^2.3.0" -git-semver-tags@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-4.1.1.tgz#63191bcd809b0ec3e151ba4751c16c444e5b5780" - integrity sha512-OWyMt5zBe7xFs8vglMmhM9lRQzCWL3WjHtxNNfJTMngGym7pC1kh8sP6jevfydJ6LP3ZvGxfb6ABYgPUM0mtsA== +git-semver-tags@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-5.0.1.tgz#db748aa0e43d313bf38dcd68624d8443234e1c15" + integrity sha512-hIvOeZwRbQ+7YEUmCkHqo8FOLQZCEn18yevLHADlFPZY02KJGsu5FZt9YW/lybfK2uhWFI7Qg/07LekJiTv7iA== dependencies: - meow "^8.0.0" - semver "^6.0.0" + meow "^8.1.2" + semver "^7.0.0" gitconfiglocal@^1.0.0: version "1.0.0" @@ -13231,7 +13244,7 @@ memfs@^3.4.12: dependencies: fs-monkey "^1.0.4" -meow@^8.0.0: +meow@^8.0.0, meow@^8.1.2: version "8.1.2" resolved "https://registry.yarnpkg.com/meow/-/meow-8.1.2.tgz#bcbe45bda0ee1729d350c03cffc8395a36c4e897" integrity sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q== @@ -13397,6 +13410,11 @@ minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@^1.2.6: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== +minimist@^1.2.8: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== + minipass-collect@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617" @@ -13511,7 +13529,7 @@ mkdirp@^1.0.3, mkdirp@^1.0.4, mkdirp@~1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -modify-values@^1.0.0: +modify-values@^1.0.0, modify-values@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw== @@ -13821,7 +13839,7 @@ normalize-package-data@^2.3.2, normalize-package-data@^2.5.0: semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" -normalize-package-data@^3.0.0: +normalize-package-data@^3.0.0, normalize-package-data@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-3.0.3.tgz#dbcc3e2da59509a0983422884cd172eefdfa525e" integrity sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA== @@ -15392,6 +15410,11 @@ process-warning@^1.0.0: resolved "https://registry.yarnpkg.com/process-warning/-/process-warning-1.0.0.tgz#980a0b25dc38cd6034181be4b7726d89066b4616" integrity sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q== +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== + promise-all-reject-late@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/promise-all-reject-late/-/promise-all-reject-late-1.0.1.tgz#f8ebf13483e5ca91ad809ccc2fcf25f26f8643c2" @@ -15477,7 +15500,7 @@ prr@~1.0.1: resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" integrity sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw== -psl@^1.1.28, psl@^1.1.33: +psl@^1.1.33: version "1.9.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== @@ -15561,10 +15584,12 @@ qs@6.11.0, qs@^6.4.0: dependencies: side-channel "^1.0.4" -qs@~6.5.2: - version "6.5.3" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" - integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== +qs@~6.10.3: + version "6.10.5" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.5.tgz#974715920a80ff6a262264acd2c7e6c2a53282b4" + integrity sha512-O5RlPh0VFtR78y79rgcgKK4wbAI0C5zGVLztOIdpWX6ep368q5Hv6XRxDvXuZ9q3C6v+e3n8UfZZJw7IIG27eQ== + dependencies: + side-channel "^1.0.4" query-string@7.1.3, query-string@^7.1.1: version "7.1.3" @@ -16238,13 +16263,6 @@ rxjs@6, rxjs@6.6.7, rxjs@^6.5.4: dependencies: tslib "^1.9.0" -rxjs@7.8.0: - version "7.8.0" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.0.tgz#90a938862a82888ff4c7359811a595e14e1e09a4" - integrity sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg== - dependencies: - tslib "^2.1.0" - rxjs@7.8.1, rxjs@^7.5.1, rxjs@^7.5.5, rxjs@^7.8.1: version "7.8.1" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" @@ -16480,7 +16498,7 @@ semver@7.3.8: dependencies: lru-cache "^6.0.0" -semver@7.x, semver@^7.0.0, semver@^7.1.1, semver@^7.1.2, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8: +semver@7.x, semver@^7.0.0, semver@^7.1.1, semver@^7.1.2, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.3: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -16870,7 +16888,7 @@ split-on-first@^1.0.0: resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw== -split2@^3.0.0: +split2@^3.0.0, split2@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/split2/-/split2-3.2.2.tgz#bf2cf2a37d838312c249c89206fd7a17dd12365f" integrity sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg== @@ -16889,7 +16907,7 @@ split2@~1.0.0: dependencies: through2 "~2.0.0" -split@^1.0.0: +split@^1.0.0, split@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" integrity sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg== @@ -17528,7 +17546,7 @@ tough-cookie@^4.0.0: punycode "^2.1.1" universalify "^0.1.2" -tough-cookie@^4.1.2: +tough-cookie@^4.1.2, tough-cookie@^4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.3.tgz#97b9adb0728b42280aa3d814b6b999b2ff0318bf" integrity sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw== @@ -17538,14 +17556,6 @@ tough-cookie@^4.1.2: universalify "^0.2.0" url-parse "^1.5.3" -tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - tr46@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/tr46/-/tr46-3.0.0.tgz#555c4e297a950617e8eeddef633c87d4d9d6cbf9" From c76fc9352dc0b1885b66351e48503c2719b25dcd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Sep 2023 12:19:37 +0000 Subject: [PATCH 57/71] Bump gh-pages from 5.0.0 to 6.0.0 Bumps [gh-pages](https://github.com/tschaub/gh-pages) from 5.0.0 to 6.0.0. - [Release notes](https://github.com/tschaub/gh-pages/releases) - [Changelog](https://github.com/tschaub/gh-pages/blob/main/changelog.md) - [Commits](https://github.com/tschaub/gh-pages/compare/v5.0.0...v6.0.0) --- updated-dependencies: - dependency-name: gh-pages dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index f700ebf40..b885aeb33 100644 --- a/package.json +++ b/package.json @@ -187,7 +187,7 @@ "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-react": "7.31.11", "eslint-plugin-react-hooks": "4.6.0", - "gh-pages": "^5.0.0", + "gh-pages": "^6.0.0", "jest": "29.4.3", "jest-environment-jsdom": "28.1.3", "jest-mock-extended": "^2.0.6", diff --git a/yarn.lock b/yarn.lock index bb537b412..b9881d8bf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7547,7 +7547,12 @@ combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@^2.18.0, commander@^2.20.0: +commander@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-11.0.0.tgz#43e19c25dbedc8256203538e8d7e9346877a6f67" + integrity sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ== + +commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -10176,7 +10181,7 @@ fs-extra@^10.0.0: jsonfile "^6.0.1" universalify "^2.0.0" -fs-extra@^11.1.0: +fs-extra@^11.1.0, fs-extra@^11.1.1: version "11.1.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.1.tgz#da69f7c39f3b002378b0954bb6ae7efdc0876e2d" integrity sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ== @@ -10376,17 +10381,17 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" -gh-pages@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/gh-pages/-/gh-pages-5.0.0.tgz#e0893272a0e33f0453e53a3c017c33b91ddd6394" - integrity sha512-Nqp1SjkPIB94Xw/3yYNTUL+G2dxlhjvv1zeN/4kMC1jfViTEqhtVz/Ba1zSXHuvXCN9ADNS1dN4r5/J/nZWEQQ== +gh-pages@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/gh-pages/-/gh-pages-6.0.0.tgz#3bb46ea13dc7cee306662db0d3f02bf05635cdc1" + integrity sha512-FXZWJRsvP/fK2HJGY+Di6FRNHvqFF6gOIELaopDjXXgjeOYSNURcuYwEO/6bwuq6koP5Lnkvnr5GViXzuOB89g== dependencies: async "^3.2.4" - commander "^2.18.0" + commander "^11.0.0" email-addresses "^5.0.0" filenamify "^4.3.0" find-cache-dir "^3.3.1" - fs-extra "^8.1.0" + fs-extra "^11.1.1" globby "^6.1.0" git-log-parser@^1.2.0: From 860c858fc919747c227ec8d0f669fff551fa8a4f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Sep 2023 12:20:20 +0000 Subject: [PATCH 58/71] Bump regenerator-runtime from 0.13.11 to 0.14.0 Bumps [regenerator-runtime](https://github.com/facebook/regenerator) from 0.13.11 to 0.14.0. - [Release notes](https://github.com/facebook/regenerator/releases) - [Commits](https://github.com/facebook/regenerator/compare/regenerator-runtime@0.13.11...regenerator-runtime@0.14.0) --- updated-dependencies: - dependency-name: regenerator-runtime dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f700ebf40..cda28d152 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,7 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-qr-code": "^2.0.12", - "regenerator-runtime": "0.13.11", + "regenerator-runtime": "0.14.0", "rxjs": "^7.8.1", "stream-browserify": "^3.0.0", "stream-http": "^3.2.0", diff --git a/yarn.lock b/yarn.lock index bb537b412..46e5265c5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15915,7 +15915,12 @@ regenerate@^1.4.2: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== -regenerator-runtime@0.13.11, regenerator-runtime@^0.13.11, regenerator-runtime@^0.13.4: +regenerator-runtime@0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45" + integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA== + +regenerator-runtime@^0.13.11, regenerator-runtime@^0.13.4: version "0.13.11" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== From 834f09b47d962bc287b9390a796d60cb7a1e4a76 Mon Sep 17 00:00:00 2001 From: kujtimprenkuSQA Date: Wed, 6 Sep 2023 10:19:09 +0200 Subject: [PATCH 59/71] Switch yarn for npx. --- .github/workflows/bump-version.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 2b0bb6782..8ceff423c 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -50,8 +50,11 @@ jobs: - name: Run Build All run: yarn build:all + # Use npx instead of yarn because yarn automatically sets NPM_* environment variables + # like NPM_CONFIG_REGISTRY so npm publish ends up ignoring the .npmrc file + # which is set up by `setup-node` action. - name: Deploy - run: yarn nx run-many --target=deploy --all --noBuild --exclude=$EXAMPLE_APPS --dry-run + run: npx nx run-many --target=deploy --all --noBuild --exclude=$EXAMPLE_APPS --dry-run env: EXAMPLE_APPS: ${{ env.EXAMPLE_APPS }} From e35196be102516097f78a38738dcf575bd81d3d1 Mon Sep 17 00:00:00 2001 From: Haris Date: Wed, 6 Sep 2023 14:04:54 +0200 Subject: [PATCH 60/71] Added signMessage to HERE wallet --- package.json | 2 +- packages/here-wallet/src/lib/selector.ts | 14 +++----------- packages/here-wallet/src/lib/types.ts | 2 +- yarn.lock | 4 ++++ 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 68566aedd..3a6076b4c 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "@angular/platform-browser": "15.2.9", "@angular/platform-browser-dynamic": "15.2.9", "@angular/router": "15.2.9", - "@here-wallet/core": "^1.4.3", + "@here-wallet/core": "^1.5.1", "@jscutlery/semver": "3.1.0", "@ledgerhq/hw-transport": "6.27.1", "@ledgerhq/hw-transport-webhid": "6.27.1", diff --git a/packages/here-wallet/src/lib/selector.ts b/packages/here-wallet/src/lib/selector.ts index a704da68b..6d810183a 100644 --- a/packages/here-wallet/src/lib/selector.ts +++ b/packages/here-wallet/src/lib/selector.ts @@ -4,17 +4,9 @@ import type BN from "bn.js"; import type { SelectorInit } from "./types"; -// @ts-ignore export const initHereWallet: SelectorInit = async (config) => { - const { - store, - logger, - emitter, - options, - defaultProvider, - defaultStrategy, - metadata, - } = config; + const { store, logger, emitter, options, defaultProvider, defaultStrategy } = + config; const here = new HereWallet({ networkId: options.network.networkId as NetworkId, @@ -127,7 +119,7 @@ export const initHereWallet: SelectorInit = async (config) => { async signMessage(data) { logger.log("HereWallet:signMessage", data); - throw new Error(`Method not supported by ${metadata.name}`); + return await here.signMessage(data); }, async signAndSendTransactions(data) { diff --git a/packages/here-wallet/src/lib/types.ts b/packages/here-wallet/src/lib/types.ts index ef4e2b27e..431d26f3e 100644 --- a/packages/here-wallet/src/lib/types.ts +++ b/packages/here-wallet/src/lib/types.ts @@ -9,7 +9,7 @@ import type { } from "@near-wallet-selector/core"; export type HereWallet = InjectedWallet & - Omit, "signIn">; + Omit, "signIn">, "signMessage">; export type SelectorInit = WalletBehaviourFactory< HereWallet, diff --git a/yarn.lock b/yarn.lock index 82e477110..89acbee1d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2534,6 +2534,10 @@ resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== +gir "@here-wallet/core@^1.5.1": + version "1.5.1" + resolved "https://registry.yarnpkg.com/@here-wallet/core/-/core-1.5.1.tgz#618db9de547bfaed5229100002357663fcee5d77" + integrity sha512-gCzB27k0QfviyJQUhxqX3kAH3g3mRHb6B5RJdUhX9tTsLlPW6AMV/PJiYBudPCt0EeyeyU4i8kEh223ACHXOjw== "@here-wallet/core@^1.4.3": version "1.4.3" resolved "https://registry.yarnpkg.com/@here-wallet/core/-/core-1.4.3.tgz#371fcc2fe4140dd3e93106f367fb6715e487c431" From 442babc157c201992187e929d25fab0c9eb668f2 Mon Sep 17 00:00:00 2001 From: Haris Date: Wed, 6 Sep 2023 15:52:53 +0200 Subject: [PATCH 61/71] Revert package json file --- packages/here-wallet/src/lib/selector.ts | 14 +++----------- packages/here-wallet/src/lib/types.ts | 2 +- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/packages/here-wallet/src/lib/selector.ts b/packages/here-wallet/src/lib/selector.ts index a704da68b..6d810183a 100644 --- a/packages/here-wallet/src/lib/selector.ts +++ b/packages/here-wallet/src/lib/selector.ts @@ -4,17 +4,9 @@ import type BN from "bn.js"; import type { SelectorInit } from "./types"; -// @ts-ignore export const initHereWallet: SelectorInit = async (config) => { - const { - store, - logger, - emitter, - options, - defaultProvider, - defaultStrategy, - metadata, - } = config; + const { store, logger, emitter, options, defaultProvider, defaultStrategy } = + config; const here = new HereWallet({ networkId: options.network.networkId as NetworkId, @@ -127,7 +119,7 @@ export const initHereWallet: SelectorInit = async (config) => { async signMessage(data) { logger.log("HereWallet:signMessage", data); - throw new Error(`Method not supported by ${metadata.name}`); + return await here.signMessage(data); }, async signAndSendTransactions(data) { diff --git a/packages/here-wallet/src/lib/types.ts b/packages/here-wallet/src/lib/types.ts index ef4e2b27e..431d26f3e 100644 --- a/packages/here-wallet/src/lib/types.ts +++ b/packages/here-wallet/src/lib/types.ts @@ -9,7 +9,7 @@ import type { } from "@near-wallet-selector/core"; export type HereWallet = InjectedWallet & - Omit, "signIn">; + Omit, "signIn">, "signMessage">; export type SelectorInit = WalletBehaviourFactory< HereWallet, From ea6a5c368069a70745a2317bdd398befba18badb Mon Sep 17 00:00:00 2001 From: Haris Date: Wed, 6 Sep 2023 16:00:37 +0200 Subject: [PATCH 62/71] Added yarn lock file after upgrade version to 1.5.1 --- yarn.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yarn.lock b/yarn.lock index 82e477110..db8d8add8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2534,10 +2534,10 @@ resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== -"@here-wallet/core@^1.4.3": - version "1.4.3" - resolved "https://registry.yarnpkg.com/@here-wallet/core/-/core-1.4.3.tgz#371fcc2fe4140dd3e93106f367fb6715e487c431" - integrity sha512-HtiAd1gMKxFzbnSualrzAw9CuoGWdY9z8aCY5fkpst+z7Fa5yVvBIg+f/6BWn2PFdxIWEnKk8V051FHEX/iYxA== +"@here-wallet/core@1.5": + version "1.5.1" + resolved "https://registry.yarnpkg.com/@here-wallet/core/-/core-1.5.1.tgz#618db9de547bfaed5229100002357663fcee5d77" + integrity sha512-gCzB27k0QfviyJQUhxqX3kAH3g3mRHb6B5RJdUhX9tTsLlPW6AMV/PJiYBudPCt0EeyeyU4i8kEh223ACHXOjw== dependencies: sha1 "^1.1.1" uuid4 "2.0.3" From fc93cba325f7989193b81b5c499204b84a16d845 Mon Sep 17 00:00:00 2001 From: Haris Date: Wed, 6 Sep 2023 16:00:45 +0200 Subject: [PATCH 63/71] Added yarn lock file after upgrade version to 1.5.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 68566aedd..38ecef270 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "@angular/platform-browser": "15.2.9", "@angular/platform-browser-dynamic": "15.2.9", "@angular/router": "15.2.9", - "@here-wallet/core": "^1.4.3", + "@here-wallet/core": "1.5", "@jscutlery/semver": "3.1.0", "@ledgerhq/hw-transport": "6.27.1", "@ledgerhq/hw-transport-webhid": "6.27.1", From 06301fde356117e130202e0be14dd9a734a2b402 Mon Sep 17 00:00:00 2001 From: kujtimprenkuSQA Date: Wed, 6 Sep 2023 16:29:28 +0200 Subject: [PATCH 64/71] Fix the version for @here-wallet/core. --- package.json | 2 +- yarn.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 38ecef270..3a6076b4c 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "@angular/platform-browser": "15.2.9", "@angular/platform-browser-dynamic": "15.2.9", "@angular/router": "15.2.9", - "@here-wallet/core": "1.5", + "@here-wallet/core": "^1.5.1", "@jscutlery/semver": "3.1.0", "@ledgerhq/hw-transport": "6.27.1", "@ledgerhq/hw-transport-webhid": "6.27.1", diff --git a/yarn.lock b/yarn.lock index db8d8add8..ea280bc84 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2534,7 +2534,7 @@ resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== -"@here-wallet/core@1.5": +"@here-wallet/core@^1.5.1": version "1.5.1" resolved "https://registry.yarnpkg.com/@here-wallet/core/-/core-1.5.1.tgz#618db9de547bfaed5229100002357663fcee5d77" integrity sha512-gCzB27k0QfviyJQUhxqX3kAH3g3mRHb6B5RJdUhX9tTsLlPW6AMV/PJiYBudPCt0EeyeyU4i8kEh223ACHXOjw== From 159cd5fde9382b1d0b6c445ed35a258cc0a212af Mon Sep 17 00:00:00 2001 From: kujtimprenkuSQA Date: Fri, 8 Sep 2023 10:16:26 +0200 Subject: [PATCH 65/71] Add fetch-depth tp the Checkout step. --- .github/workflows/bump-version.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 8ceff423c..8ef6c1927 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -18,6 +18,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Setup Git run: | git config user.name "GitHub Bot" From 2a0f36d077ca5aa0709d2d33f9e767b3423d4e60 Mon Sep 17 00:00:00 2001 From: Erdit Kurteshi Date: Fri, 8 Sep 2023 11:41:14 +0200 Subject: [PATCH 66/71] bumped version to v8.5.2 for all packages --- package.json | 2 +- packages/account-export/package.json | 2 +- packages/coin98-wallet/package.json | 2 +- packages/core/package.json | 2 +- packages/default-wallets/package.json | 2 +- packages/finer-wallet/package.json | 2 +- packages/here-wallet/package.json | 2 +- packages/ledger/package.json | 2 +- packages/math-wallet/package.json | 2 +- packages/meteor-wallet/package.json | 2 +- packages/modal-ui-js/package.json | 2 +- packages/modal-ui/package.json | 2 +- packages/my-near-wallet/package.json | 2 +- packages/narwallets/package.json | 2 +- packages/near-snap/package.json | 2 +- packages/near-wallet/package.json | 2 +- packages/nearfi/package.json | 2 +- packages/neth/package.json | 2 +- packages/nightly-connect/package.json | 2 +- packages/nightly/package.json | 2 +- packages/opto-wallet/package.json | 2 +- packages/ramper-wallet/package.json | 2 +- packages/sender/package.json | 2 +- packages/wallet-connect/package.json | 2 +- packages/wallet-utils/package.json | 2 +- packages/welldone-wallet/package.json | 2 +- packages/xdefi/package.json | 2 +- 27 files changed, 27 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index 3a6076b4c..0877a58e0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "near-wallet-selector", - "version": "8.5.1", + "version": "8.5.2", "description": "NEAR Wallet Selector makes it easy for users to interact with your dApp by providing an abstraction over various wallets within the NEAR ecosystem", "keywords": [ "near", diff --git a/packages/account-export/package.json b/packages/account-export/package.json index 88dd37a1b..4d846ea4e 100644 --- a/packages/account-export/package.json +++ b/packages/account-export/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/account-export", - "version": "8.5.1", + "version": "8.5.2", "description": "This is the Export Selector UI package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/coin98-wallet/package.json b/packages/coin98-wallet/package.json index db03d74cb..3f831f6e9 100644 --- a/packages/coin98-wallet/package.json +++ b/packages/coin98-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/coin98-wallet", - "version": "8.5.1", + "version": "8.5.2", "description": "Coin 98 wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/core/package.json b/packages/core/package.json index f28338f57..a53dfb5f3 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/core", - "version": "8.5.1", + "version": "8.5.2", "description": "This is the core package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/default-wallets/package.json b/packages/default-wallets/package.json index 3db147f0c..f2e0367bb 100644 --- a/packages/default-wallets/package.json +++ b/packages/default-wallets/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/default-wallets", - "version": "8.5.1", + "version": "8.5.2", "description": "Default wallets package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/finer-wallet/package.json b/packages/finer-wallet/package.json index 2e3e4582c..3e7d684d1 100644 --- a/packages/finer-wallet/package.json +++ b/packages/finer-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/finer-wallet", - "version": "8.5.1", + "version": "8.5.2", "description": "FiNER Wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/here-wallet/package.json b/packages/here-wallet/package.json index 0791eddf4..90589e5c9 100644 --- a/packages/here-wallet/package.json +++ b/packages/here-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/here-wallet", - "version": "8.5.1", + "version": "8.5.2", "description": "Here wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/ledger/package.json b/packages/ledger/package.json index c10dde38c..10d2e57ff 100644 --- a/packages/ledger/package.json +++ b/packages/ledger/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/ledger", - "version": "8.5.1", + "version": "8.5.2", "description": "Ledger package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/math-wallet/package.json b/packages/math-wallet/package.json index 71576e0c7..b2c64ce14 100644 --- a/packages/math-wallet/package.json +++ b/packages/math-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/math-wallet", - "version": "8.5.1", + "version": "8.5.2", "description": "Math wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/meteor-wallet/package.json b/packages/meteor-wallet/package.json index 181d508ce..8eba386cf 100644 --- a/packages/meteor-wallet/package.json +++ b/packages/meteor-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/meteor-wallet", - "version": "8.5.1", + "version": "8.5.2", "description": "Meteor wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/modal-ui-js/package.json b/packages/modal-ui-js/package.json index 7c5cce023..2602ed336 100644 --- a/packages/modal-ui-js/package.json +++ b/packages/modal-ui-js/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/modal-ui-js", - "version": "8.5.1", + "version": "8.5.2", "description": "Modal UI package for NEAR wallet Selector", "keywords": [ "near", diff --git a/packages/modal-ui/package.json b/packages/modal-ui/package.json index c2e03d20a..6c093ed39 100644 --- a/packages/modal-ui/package.json +++ b/packages/modal-ui/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/modal-ui", - "version": "8.5.1", + "version": "8.5.2", "description": "Modal UI package for NEAR wallet Selector", "keywords": [ "near", diff --git a/packages/my-near-wallet/package.json b/packages/my-near-wallet/package.json index 254abe958..cae54678d 100644 --- a/packages/my-near-wallet/package.json +++ b/packages/my-near-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/my-near-wallet", - "version": "8.5.1", + "version": "8.5.2", "description": "My Near Wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/narwallets/package.json b/packages/narwallets/package.json index 1343535b1..e1db1fd04 100644 --- a/packages/narwallets/package.json +++ b/packages/narwallets/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/narwallets", - "version": "8.5.1", + "version": "8.5.2", "description": "This is the Narwallets package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/near-snap/package.json b/packages/near-snap/package.json index cc9276605..ab3f7f7c7 100644 --- a/packages/near-snap/package.json +++ b/packages/near-snap/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/near-snap", - "version": "8.5.1", + "version": "8.5.2", "description": "Metamask snap to interact with Near dapps.", "keywords": [ "near", diff --git a/packages/near-wallet/package.json b/packages/near-wallet/package.json index 95e0dd286..14678075a 100644 --- a/packages/near-wallet/package.json +++ b/packages/near-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/near-wallet", - "version": "8.5.1", + "version": "8.5.2", "description": "Near Wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/nearfi/package.json b/packages/nearfi/package.json index 150624709..df0f1ff8a 100644 --- a/packages/nearfi/package.json +++ b/packages/nearfi/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/nearfi", - "version": "8.5.1", + "version": "8.5.2", "description": "Nearfi package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/neth/package.json b/packages/neth/package.json index f7260b4fc..96bca7f72 100644 --- a/packages/neth/package.json +++ b/packages/neth/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/neth", - "version": "8.5.1", + "version": "8.5.2", "description": "Control NEAR accounts with ETH accounts", "author": "mattlockyer", "keywords": [ diff --git a/packages/nightly-connect/package.json b/packages/nightly-connect/package.json index 4ea2acd32..b35a4e27f 100644 --- a/packages/nightly-connect/package.json +++ b/packages/nightly-connect/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/nightly-connect", - "version": "8.5.1", + "version": "8.5.2", "description": "Nightly connect package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/nightly/package.json b/packages/nightly/package.json index f1869c607..28babb570 100644 --- a/packages/nightly/package.json +++ b/packages/nightly/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/nightly", - "version": "8.5.1", + "version": "8.5.2", "description": "Nightly wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/opto-wallet/package.json b/packages/opto-wallet/package.json index 4c476432f..53317d75d 100644 --- a/packages/opto-wallet/package.json +++ b/packages/opto-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/opto-wallet", - "version": "8.5.1", + "version": "8.5.2", "description": "Opto wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/ramper-wallet/package.json b/packages/ramper-wallet/package.json index 25cede17b..3e8b5e76e 100644 --- a/packages/ramper-wallet/package.json +++ b/packages/ramper-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/ramper-wallet", - "version": "8.5.1", + "version": "8.5.2", "description": "Ramper wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/sender/package.json b/packages/sender/package.json index 70b4c1c38..f8c7aec81 100644 --- a/packages/sender/package.json +++ b/packages/sender/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/sender", - "version": "8.5.1", + "version": "8.5.2", "description": "Sender wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/wallet-connect/package.json b/packages/wallet-connect/package.json index 94529c16b..1975ecbb1 100644 --- a/packages/wallet-connect/package.json +++ b/packages/wallet-connect/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/wallet-connect", - "version": "8.5.1", + "version": "8.5.2", "description": "Wallet Connect package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/wallet-utils/package.json b/packages/wallet-utils/package.json index f05639e46..427dcdb19 100644 --- a/packages/wallet-utils/package.json +++ b/packages/wallet-utils/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/wallet-utils", - "version": "8.5.1", + "version": "8.5.2", "description": "Wallet utils package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/welldone-wallet/package.json b/packages/welldone-wallet/package.json index e88547015..e74ddd33c 100644 --- a/packages/welldone-wallet/package.json +++ b/packages/welldone-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/welldone-wallet", - "version": "8.5.1", + "version": "8.5.2", "description": "Welldone wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/xdefi/package.json b/packages/xdefi/package.json index 37411bc33..46afb387d 100644 --- a/packages/xdefi/package.json +++ b/packages/xdefi/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/xdefi", - "version": "8.5.1", + "version": "8.5.2", "description": "This is the XDEFI package for NEAR Wallet Selector.", "keywords": [ "near", From e0d5ae2fde1e7185a5e11f05a081c8432e6d9696 Mon Sep 17 00:00:00 2001 From: Trentin C Bergeron Date: Fri, 8 Sep 2023 14:58:28 -0700 Subject: [PATCH 67/71] Update issue templates Updated some default labels. Added two new templates. --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .github/ISSUE_TEMPLATE/change_request.md | 2 +- .github/ISSUE_TEMPLATE/epic-template.md | 26 ++++++++++++++++++++++++ .github/ISSUE_TEMPLATE/issue-template.md | 16 +++++++++++++++ 4 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/epic-template.md create mode 100644 .github/ISSUE_TEMPLATE/issue-template.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 2cd5ababa..510270ad6 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,7 +2,7 @@ name: Bug report about: Create a report to help us improve title: '' -labels: bug +labels: bug, task assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/change_request.md b/.github/ISSUE_TEMPLATE/change_request.md index 4670f3aab..8fdf40fa3 100644 --- a/.github/ISSUE_TEMPLATE/change_request.md +++ b/.github/ISSUE_TEMPLATE/change_request.md @@ -2,7 +2,7 @@ name: Change request about: Template for change requests title: '' -labels: task +labels: '' assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/epic-template.md b/.github/ISSUE_TEMPLATE/epic-template.md new file mode 100644 index 000000000..cbf504cb6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/epic-template.md @@ -0,0 +1,26 @@ +--- +name: Epic Template +about: Epics are milestones or groups of alike issues +title: "[Epic] " +labels: Emerging Tech, Epic, Near BOS +assignees: '' + +--- + +### Description + +(Overview of milestone or function governed by this epic) + +### Resources + +(Relevant documentation, Figma links, and other reference material) + +Item 1 + +Item 2 + +Item 3 + +```[tasklist] +### Related Issues +``` diff --git a/.github/ISSUE_TEMPLATE/issue-template.md b/.github/ISSUE_TEMPLATE/issue-template.md new file mode 100644 index 000000000..f3a2b6dd3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/issue-template.md @@ -0,0 +1,16 @@ +--- +name: Issue Template +about: Issues are general tasks to be compeleted +title: '' +labels: Emerging Tech, Epic, Near BOS +assignees: '' + +--- + +### Description + +(Summary of task, purpose, impact) + +### Optional: User Story + +(As a [user], I need [function, outcome, enhancement] that [provides value].) From 58eb483d7bc4f14fd5000e3e12ca5c6a6a7f84bd Mon Sep 17 00:00:00 2001 From: Trentin C Bergeron Date: Fri, 8 Sep 2023 15:01:44 -0700 Subject: [PATCH 68/71] Update issue templates Updated change request label. --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .github/ISSUE_TEMPLATE/change_request.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 510270ad6..2cd5ababa 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,7 +2,7 @@ name: Bug report about: Create a report to help us improve title: '' -labels: bug, task +labels: bug assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/change_request.md b/.github/ISSUE_TEMPLATE/change_request.md index 8fdf40fa3..659f4ebc3 100644 --- a/.github/ISSUE_TEMPLATE/change_request.md +++ b/.github/ISSUE_TEMPLATE/change_request.md @@ -2,7 +2,7 @@ name: Change request about: Template for change requests title: '' -labels: '' +labels: change-request assignees: '' --- From e7a22cf8ee1d7ce97245ca6ad365e76bddae3a55 Mon Sep 17 00:00:00 2001 From: Pawel-Szydlo Date: Tue, 12 Sep 2023 11:40:20 +0200 Subject: [PATCH 69/71] add support sigmMessage in nightly wallet --- packages/nightly/src/lib/injected-nightly.ts | 7 ++++++- packages/nightly/src/lib/nightly.ts | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/packages/nightly/src/lib/injected-nightly.ts b/packages/nightly/src/lib/injected-nightly.ts index 5551abe4a..52a20ff9c 100644 --- a/packages/nightly/src/lib/injected-nightly.ts +++ b/packages/nightly/src/lib/injected-nightly.ts @@ -1,4 +1,8 @@ -import type { AccountImportData } from "@near-wallet-selector/core"; +import type { + AccountImportData, + SignedMessage, + SignMessageParams, +} from "@near-wallet-selector/core"; import type { SignedTransaction as NearSignedTransaction, Transaction as NearTransaction, @@ -11,6 +15,7 @@ interface NightlyAccount { export interface NearNightly { account: NightlyAccount; connected: boolean; + signMessage: (params: SignMessageParams) => Promise; signTransaction: ( transaction: NearTransaction ) => Promise; diff --git a/packages/nightly/src/lib/nightly.ts b/packages/nightly/src/lib/nightly.ts index 3efcdd6f9..ecf78a2e6 100644 --- a/packages/nightly/src/lib/nightly.ts +++ b/packages/nightly/src/lib/nightly.ts @@ -185,6 +185,24 @@ const Nightly: WalletBehaviourFactory = async ({ throw new Error(`Method not supported by ${metadata.name}`); }, + async signMessage({ message, nonce, recipient, state }) { + logger.log("Nightly:signMessage", { + message, + nonce, + recipient, + state, + }); + + const signature = await _state.wallet.signMessage({ + message, + nonce, + recipient, + state, + }); + + return signature; + }, + async signAndSendTransaction({ signerId, receiverId, actions }) { logger.log("signAndSendTransaction", { signerId, receiverId, actions }); From ab180d8117f6a811bfe825ff8ccbdec57d174dc0 Mon Sep 17 00:00:00 2001 From: Trentin C Bergeron Date: Wed, 13 Sep 2023 14:54:13 -0700 Subject: [PATCH 70/71] Update issue templates --- .github/ISSUE_TEMPLATE/issue-template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/issue-template.md b/.github/ISSUE_TEMPLATE/issue-template.md index f3a2b6dd3..cd812980d 100644 --- a/.github/ISSUE_TEMPLATE/issue-template.md +++ b/.github/ISSUE_TEMPLATE/issue-template.md @@ -2,7 +2,7 @@ name: Issue Template about: Issues are general tasks to be compeleted title: '' -labels: Emerging Tech, Epic, Near BOS +labels: Emerging Tech, Near BOS assignees: '' --- From 6856a35cbd78d5c8687820b079c275529d7fdf39 Mon Sep 17 00:00:00 2001 From: Pawel-Szydlo Date: Fri, 15 Sep 2023 15:50:37 +0200 Subject: [PATCH 71/71] add call connect in signMessage --- packages/nightly/src/lib/injected-nightly.ts | 2 +- packages/nightly/src/lib/nightly.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/nightly/src/lib/injected-nightly.ts b/packages/nightly/src/lib/injected-nightly.ts index 52a20ff9c..99a386370 100644 --- a/packages/nightly/src/lib/injected-nightly.ts +++ b/packages/nightly/src/lib/injected-nightly.ts @@ -14,7 +14,7 @@ interface NightlyAccount { } export interface NearNightly { account: NightlyAccount; - connected: boolean; + isConnected: boolean; signMessage: (params: SignMessageParams) => Promise; signTransaction: ( transaction: NearTransaction diff --git a/packages/nightly/src/lib/nightly.ts b/packages/nightly/src/lib/nightly.ts index ecf78a2e6..238da134b 100644 --- a/packages/nightly/src/lib/nightly.ts +++ b/packages/nightly/src/lib/nightly.ts @@ -193,6 +193,10 @@ const Nightly: WalletBehaviourFactory = async ({ state, }); + if (_state.wallet.isConnected) { + await _state.wallet.connect(); + } + const signature = await _state.wallet.signMessage({ message, nonce,