diff --git a/lerna.json b/lerna.json index 080f82812..5e45ac969 100644 --- a/lerna.json +++ b/lerna.json @@ -1,4 +1,4 @@ { - "version": "4.3.1", + "version": "4.3.2-beta.0", "$schema": "node_modules/lerna/schemas/lerna-schema.json" } diff --git a/package-lock.json b/package-lock.json index 5ed06cb22..e4cdc3e0c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25085,38 +25085,38 @@ }, "packages/beacon-blockchain-substrate": { "name": "@airgap/beacon-blockchain-substrate", - "version": "4.3.1", + "version": "4.3.2-beta.0", "license": "ISC", "dependencies": { - "@airgap/beacon-types": "4.3.1", - "@airgap/beacon-ui": "4.3.1" + "@airgap/beacon-types": "4.3.2-beta.0", + "@airgap/beacon-ui": "4.3.2-beta.0" } }, "packages/beacon-blockchain-tezos": { "name": "@airgap/beacon-blockchain-tezos", - "version": "4.3.1", + "version": "4.3.2-beta.0", "license": "ISC", "dependencies": { - "@airgap/beacon-types": "4.3.1", - "@airgap/beacon-ui": "4.3.1" + "@airgap/beacon-types": "4.3.2-beta.0", + "@airgap/beacon-ui": "4.3.2-beta.0" } }, "packages/beacon-blockchain-tezos-sapling": { "name": "@airgap/beacon-blockchain-tezos-sapling", - "version": "4.3.1", + "version": "4.3.2-beta.0", "license": "ISC", "dependencies": { - "@airgap/beacon-types": "4.3.1", - "@airgap/beacon-ui": "4.3.1" + "@airgap/beacon-types": "4.3.2-beta.0", + "@airgap/beacon-ui": "4.3.2-beta.0" } }, "packages/beacon-core": { "name": "@airgap/beacon-core", - "version": "4.3.1", + "version": "4.3.2-beta.0", "license": "ISC", "dependencies": { - "@airgap/beacon-types": "4.3.1", - "@airgap/beacon-utils": "4.3.1", + "@airgap/beacon-types": "4.3.2-beta.0", + "@airgap/beacon-utils": "4.3.2-beta.0", "@stablelib/ed25519": "^1.0.3", "@stablelib/nacl": "^1.0.4", "@stablelib/utf8": "^1.0.1", @@ -25127,68 +25127,68 @@ }, "packages/beacon-dapp": { "name": "@airgap/beacon-dapp", - "version": "4.3.1", + "version": "4.3.2-beta.0", "license": "ISC", "dependencies": { - "@airgap/beacon-core": "4.3.1", - "@airgap/beacon-transport-matrix": "4.3.1", - "@airgap/beacon-transport-postmessage": "4.3.1", - "@airgap/beacon-transport-walletconnect": "4.3.1", - "@airgap/beacon-ui": "4.3.1", + "@airgap/beacon-core": "4.3.2-beta.0", + "@airgap/beacon-transport-matrix": "4.3.2-beta.0", + "@airgap/beacon-transport-postmessage": "4.3.2-beta.0", + "@airgap/beacon-transport-walletconnect": "4.3.2-beta.0", + "@airgap/beacon-ui": "4.3.2-beta.0", "broadcast-channel": "^7.0.0" } }, "packages/beacon-sdk": { "name": "@airgap/beacon-sdk", - "version": "4.3.1", + "version": "4.3.2-beta.0", "license": "ISC", "dependencies": { - "@airgap/beacon-blockchain-substrate": "4.3.1", - "@airgap/beacon-blockchain-tezos": "4.3.1", - "@airgap/beacon-core": "4.3.1", - "@airgap/beacon-dapp": "4.3.1", - "@airgap/beacon-transport-matrix": "4.3.1", - "@airgap/beacon-transport-postmessage": "4.3.1", - "@airgap/beacon-types": "4.3.1", - "@airgap/beacon-ui": "4.3.1", - "@airgap/beacon-utils": "4.3.1", - "@airgap/beacon-wallet": "4.3.1" + "@airgap/beacon-blockchain-substrate": "4.3.2-beta.0", + "@airgap/beacon-blockchain-tezos": "4.3.2-beta.0", + "@airgap/beacon-core": "4.3.2-beta.0", + "@airgap/beacon-dapp": "4.3.2-beta.0", + "@airgap/beacon-transport-matrix": "4.3.2-beta.0", + "@airgap/beacon-transport-postmessage": "4.3.2-beta.0", + "@airgap/beacon-types": "4.3.2-beta.0", + "@airgap/beacon-ui": "4.3.2-beta.0", + "@airgap/beacon-utils": "4.3.2-beta.0", + "@airgap/beacon-wallet": "4.3.2-beta.0" } }, "packages/beacon-transport-matrix": { "name": "@airgap/beacon-transport-matrix", - "version": "4.3.1", + "version": "4.3.2-beta.0", "license": "ISC", "dependencies": { - "@airgap/beacon-core": "4.3.1", - "@airgap/beacon-utils": "4.3.1", + "@airgap/beacon-core": "4.3.2-beta.0", + "@airgap/beacon-utils": "4.3.2-beta.0", "axios": "^1.6.2" } }, "packages/beacon-transport-postmessage": { "name": "@airgap/beacon-transport-postmessage", - "version": "4.3.1", + "version": "4.3.2-beta.0", "license": "ISC", "dependencies": { - "@airgap/beacon-core": "4.3.1", - "@airgap/beacon-types": "4.3.1", - "@airgap/beacon-utils": "4.3.1" + "@airgap/beacon-core": "4.3.2-beta.0", + "@airgap/beacon-types": "4.3.2-beta.0", + "@airgap/beacon-utils": "4.3.2-beta.0" } }, "packages/beacon-transport-walletconnect": { "name": "@airgap/beacon-transport-walletconnect", - "version": "4.3.1", + "version": "4.3.2-beta.0", "license": "ISC", "dependencies": { - "@airgap/beacon-core": "4.3.1", - "@airgap/beacon-types": "4.3.1", - "@airgap/beacon-utils": "4.3.1", + "@airgap/beacon-core": "4.3.2-beta.0", + "@airgap/beacon-types": "4.3.2-beta.0", + "@airgap/beacon-utils": "4.3.2-beta.0", "@walletconnect/sign-client": "2.14.0" } }, "packages/beacon-types": { "name": "@airgap/beacon-types", - "version": "4.3.1", + "version": "4.3.2-beta.0", "license": "ISC", "dependencies": { "@types/chrome": "0.0.246" @@ -25196,13 +25196,13 @@ }, "packages/beacon-ui": { "name": "@airgap/beacon-ui", - "version": "4.3.1", + "version": "4.3.2-beta.0", "license": "ISC", "dependencies": { - "@airgap/beacon-core": "4.3.1", - "@airgap/beacon-transport-postmessage": "4.3.1", - "@airgap/beacon-types": "4.3.1", - "@airgap/beacon-utils": "4.3.1", + "@airgap/beacon-core": "4.3.2-beta.0", + "@airgap/beacon-transport-postmessage": "4.3.2-beta.0", + "@airgap/beacon-types": "4.3.2-beta.0", + "@airgap/beacon-utils": "4.3.2-beta.0", "@walletconnect/utils": "2.14.0", "qrcode-svg": "^1.1.0", "solid-js": "^1.7.11" @@ -25225,7 +25225,7 @@ }, "packages/beacon-utils": { "name": "@airgap/beacon-utils", - "version": "4.3.1", + "version": "4.3.2-beta.0", "license": "ISC", "dependencies": { "@stablelib/ed25519": "^1.0.3", @@ -25237,12 +25237,12 @@ }, "packages/beacon-wallet": { "name": "@airgap/beacon-wallet", - "version": "4.3.1", + "version": "4.3.2-beta.0", "license": "ISC", "dependencies": { - "@airgap/beacon-core": "4.3.1", - "@airgap/beacon-transport-matrix": "4.3.1", - "@airgap/beacon-transport-postmessage": "4.3.1" + "@airgap/beacon-core": "4.3.2-beta.0", + "@airgap/beacon-transport-matrix": "4.3.2-beta.0", + "@airgap/beacon-transport-postmessage": "4.3.2-beta.0" } } } diff --git a/packages/beacon-blockchain-substrate/package.json b/packages/beacon-blockchain-substrate/package.json index 325335304..c65560120 100644 --- a/packages/beacon-blockchain-substrate/package.json +++ b/packages/beacon-blockchain-substrate/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-blockchain-substrate", - "version": "4.3.1", + "version": "4.3.2-beta.0", "description": "This package adds support for `substrate` based blockchains. It can be used in combination with the `@airgap/beacon-dapp` or `@airgap/beacon-wallet` packages.", "author": "Andreas Gassmann ", "homepage": "https://walletbeacon.io", @@ -34,7 +34,7 @@ "url": "https://github.com/airgap-it/beacon-sdk/issues" }, "dependencies": { - "@airgap/beacon-types": "4.3.1", - "@airgap/beacon-ui": "4.3.1" + "@airgap/beacon-types": "4.3.2-beta.0", + "@airgap/beacon-ui": "4.3.2-beta.0" } } diff --git a/packages/beacon-blockchain-tezos-sapling/package.json b/packages/beacon-blockchain-tezos-sapling/package.json index aff9e19a0..8d427f7b7 100644 --- a/packages/beacon-blockchain-tezos-sapling/package.json +++ b/packages/beacon-blockchain-tezos-sapling/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-blockchain-tezos-sapling", - "version": "4.3.1", + "version": "4.3.2-beta.0", "description": "This package adds support for `tezos-sapling`, the sapling integration on the Tezos blockchain. It can be used in combination with the `@airgap/beacon-dapp` or `@airgap/beacon-wallet` packages.", "author": "Andreas Gassmann ", "homepage": "https://walletbeacon.io", @@ -34,7 +34,7 @@ "url": "https://github.com/airgap-it/beacon-sdk/issues" }, "dependencies": { - "@airgap/beacon-types": "4.3.1", - "@airgap/beacon-ui": "4.3.1" + "@airgap/beacon-types": "4.3.2-beta.0", + "@airgap/beacon-ui": "4.3.2-beta.0" } } diff --git a/packages/beacon-blockchain-tezos/package.json b/packages/beacon-blockchain-tezos/package.json index 1b947cb96..3c5d8fe91 100644 --- a/packages/beacon-blockchain-tezos/package.json +++ b/packages/beacon-blockchain-tezos/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-blockchain-tezos", - "version": "4.3.1", + "version": "4.3.2-beta.0", "description": "This package adds support for the `tezos` blockchain. It can be used in combination with the `@airgap/beacon-dapp` or `@airgap/beacon-wallet` packages.", "author": "Andreas Gassmann ", "homepage": "https://walletbeacon.io", @@ -34,7 +34,7 @@ "url": "https://github.com/airgap-it/beacon-sdk/issues" }, "dependencies": { - "@airgap/beacon-types": "4.3.1", - "@airgap/beacon-ui": "4.3.1" + "@airgap/beacon-types": "4.3.2-beta.0", + "@airgap/beacon-ui": "4.3.2-beta.0" } } diff --git a/packages/beacon-core/package.json b/packages/beacon-core/package.json index ff40ada0c..b99cee694 100644 --- a/packages/beacon-core/package.json +++ b/packages/beacon-core/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-core", - "version": "4.3.1", + "version": "4.3.2-beta.0", "description": "This package contains internal methods that are used by both the dApp and wallet client.", "author": "Andreas Gassmann ", "homepage": "https://walletbeacon.io", @@ -34,8 +34,8 @@ "url": "https://github.com/airgap-it/beacon-sdk/issues" }, "dependencies": { - "@airgap/beacon-types": "4.3.1", - "@airgap/beacon-utils": "4.3.1", + "@airgap/beacon-types": "4.3.2-beta.0", + "@airgap/beacon-utils": "4.3.2-beta.0", "@stablelib/ed25519": "^1.0.3", "@stablelib/nacl": "^1.0.4", "@stablelib/utf8": "^1.0.1", diff --git a/packages/beacon-core/src/constants.ts b/packages/beacon-core/src/constants.ts index f6958928b..a6abf4c88 100644 --- a/packages/beacon-core/src/constants.ts +++ b/packages/beacon-core/src/constants.ts @@ -1,5 +1,5 @@ -export const SDK_VERSION: string = '4.3.1' -export const BEACON_VERSION: string = '3' +export const SDK_VERSION: string = '4.3.2-beta.0' +export const BEACON_VERSION: string = '4' export const NOTIFICATION_ORACLE_URL: string = 'https://beacon-notification-oracle.dev.gke.papers.tech' diff --git a/packages/beacon-dapp/package.json b/packages/beacon-dapp/package.json index cf0dde528..cff73d373 100644 --- a/packages/beacon-dapp/package.json +++ b/packages/beacon-dapp/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-dapp", - "version": "4.3.1", + "version": "4.3.2-beta.0", "description": "Use this package on your dApp to instanciate a DAppClient object and communicate to wallets.", "author": "Andreas Gassmann ", "homepage": "https://walletbeacon.io", @@ -35,11 +35,11 @@ "url": "https://github.com/airgap-it/beacon-sdk/issues" }, "dependencies": { - "@airgap/beacon-core": "4.3.1", - "@airgap/beacon-transport-matrix": "4.3.1", - "@airgap/beacon-transport-postmessage": "4.3.1", - "@airgap/beacon-transport-walletconnect": "4.3.1", - "@airgap/beacon-ui": "4.3.1", + "@airgap/beacon-core": "4.3.2-beta.0", + "@airgap/beacon-transport-matrix": "4.3.2-beta.0", + "@airgap/beacon-transport-postmessage": "4.3.2-beta.0", + "@airgap/beacon-transport-walletconnect": "4.3.2-beta.0", + "@airgap/beacon-ui": "4.3.2-beta.0", "broadcast-channel": "^7.0.0" } } diff --git a/packages/beacon-dapp/src/dapp-client/DAppClient.ts b/packages/beacon-dapp/src/dapp-client/DAppClient.ts index 9ded176fa..e470502f5 100644 --- a/packages/beacon-dapp/src/dapp-client/DAppClient.ts +++ b/packages/beacon-dapp/src/dapp-client/DAppClient.ts @@ -342,8 +342,8 @@ export class DAppClient extends Client { connectionInfo.origin === Origin.P2P ? this.p2pTransport : connectionInfo.origin === Origin.WALLETCONNECT - ? this.walletConnectTransport - : this.postMessageTransport ?? (await this.transport) + ? this.walletConnectTransport + : this.postMessageTransport ?? (await this.transport) if (relevantTransport) { const peers: ExtendedPeerInfo[] = await relevantTransport.getPeers() @@ -440,8 +440,8 @@ export class DAppClient extends Client { res.status === 426 ? console.error('Metrics are no longer supported for this version, please upgrade.') : console.warn( - 'Network error encountered. Metrics sharing have been automatically disabled.' - ) + 'Network error encountered. Metrics sharing have been automatically disabled.' + ) } this.enableMetrics = res.ok this.storage.set(StorageKey.ENABLE_METRICS, res.ok) @@ -808,7 +808,7 @@ export class DAppClient extends Client { this.postMessageTransport = this.walletConnectTransport = this.p2pTransport = - undefined + undefined this._activeAccount.isResolved() && this.clearActiveAccount() this._initPromise = undefined }, @@ -1035,8 +1035,8 @@ export class DAppClient extends Client { ): Promise { const wallet = await this.storage.get(StorageKey.LAST_SELECTED_WALLET) const transport = this._activeAccount.isResolved() - ? (await this.getActiveAccount())?.origin.type ?? 'UNKOWN' - : 'UNKOWN' + ? (await this.getActiveAccount())?.origin.type ?? 'UNKNOWN' + : 'UNKNOWN' return { method: 'POST', @@ -1374,9 +1374,9 @@ export class DAppClient extends Client { logger.time(true, logId) const res = (await this.checkMakeRequest()) ? this.makeRequestV3< - BlockchainRequestV3, - BeaconMessageWrapper> - >(request) + BlockchainRequestV3, + BeaconMessageWrapper> + >(request) : this.makeRequestBC(request) res.catch(async (requestError: ErrorResponse) => { @@ -1588,13 +1588,13 @@ export class DAppClient extends Client { const res = (await this.checkMakeRequest()) ? this.makeRequest< - SimulatedProofOfEventChallengeRequest, - SimulatedProofOfEventChallengeResponse - >(request) + SimulatedProofOfEventChallengeRequest, + SimulatedProofOfEventChallengeResponse + >(request) : this.makeRequestBC< - SimulatedProofOfEventChallengeRequest, - SimulatedProofOfEventChallengeResponse - >(request) + SimulatedProofOfEventChallengeRequest, + SimulatedProofOfEventChallengeResponse + >(request) res.catch(async (requestError: ErrorResponse) => { requestError.errorType === BeaconErrorType.ABORTED_ERROR @@ -2058,50 +2058,50 @@ export class DAppClient extends Client { request: BeaconRequestInputMessage, response: | { - account: AccountInfo - output: PermissionResponseOutput - blockExplorer: BlockExplorer - connectionContext: ConnectionContext - walletInfo: WalletInfo - } + account: AccountInfo + output: PermissionResponseOutput + blockExplorer: BlockExplorer + connectionContext: ConnectionContext + walletInfo: WalletInfo + } | { - account: AccountInfo - output: ProofOfEventChallengeResponse - blockExplorer: BlockExplorer - connectionContext: ConnectionContext - walletInfo: WalletInfo - } + account: AccountInfo + output: ProofOfEventChallengeResponse + blockExplorer: BlockExplorer + connectionContext: ConnectionContext + walletInfo: WalletInfo + } | { - account: AccountInfo - output: SimulatedProofOfEventChallengeResponse - blockExplorer: BlockExplorer - connectionContext: ConnectionContext - walletInfo: WalletInfo - } + account: AccountInfo + output: SimulatedProofOfEventChallengeResponse + blockExplorer: BlockExplorer + connectionContext: ConnectionContext + walletInfo: WalletInfo + } | { - account: AccountInfo - output: OperationResponseOutput - blockExplorer: BlockExplorer - connectionContext: ConnectionContext - walletInfo: WalletInfo - } + account: AccountInfo + output: OperationResponseOutput + blockExplorer: BlockExplorer + connectionContext: ConnectionContext + walletInfo: WalletInfo + } | { - output: SignPayloadResponseOutput - connectionContext: ConnectionContext - walletInfo: WalletInfo - } + output: SignPayloadResponseOutput + connectionContext: ConnectionContext + walletInfo: WalletInfo + } // | { // output: EncryptPayloadResponseOutput // connectionContext: ConnectionContext // walletInfo: WalletInfo // } | { - network: Network - output: BroadcastResponseOutput - blockExplorer: BlockExplorer - connectionContext: ConnectionContext - walletInfo: WalletInfo - } + network: Network + output: BroadcastResponseOutput + blockExplorer: BlockExplorer + connectionContext: ConnectionContext + walletInfo: WalletInfo + } ): Promise { this.events .emit(messageEvents[request.type].success, response) @@ -2342,7 +2342,7 @@ export class DAppClient extends Client { logger.log('makeRequest', 'sending message', request) try { - ; (await this.transport).send(payload, peer) + ;(await this.transport).send(payload, peer) if ( request.type !== BeaconMessageType.PermissionRequest || (this._activeAccount.isResolved() && (await this._activeAccount.promise)) @@ -2458,7 +2458,7 @@ export class DAppClient extends Client { logger.log('makeRequest', 'sending message', request) try { - ; (await this.transport).send(payload, peer) + ;(await this.transport).send(payload, peer) if ( request.message.type !== BeaconMessageType.PermissionRequest || (this._activeAccount.isResolved() && (await this._activeAccount.promise)) @@ -2505,9 +2505,9 @@ export class DAppClient extends Client { request: Optional ): Promise< | { - message: U - connectionInfo: ConnectionContext - } + message: U + connectionInfo: ConnectionContext + } | undefined > { if (!this._transport.isResolved()) { diff --git a/packages/beacon-dapp/src/utils/tzkt-blockexplorer.ts b/packages/beacon-dapp/src/utils/tzkt-blockexplorer.ts index ffae6fe40..18730bb94 100644 --- a/packages/beacon-dapp/src/utils/tzkt-blockexplorer.ts +++ b/packages/beacon-dapp/src/utils/tzkt-blockexplorer.ts @@ -21,7 +21,8 @@ export class TzktBlockExplorer extends BlockExplorer { [NetworkType.NAIROBINET]: 'https://nairobinet.tzkt.io', [NetworkType.OXFORDNET]: 'https://oxfordnet.tzkt.io', [NetworkType.PARISNET]: 'https://parisnet.tzkt.io', - [NetworkType.CUSTOM]: 'https://parisnet.tzkt.io' + [NetworkType.CUSTOM]: 'https://parisnet.tzkt.io', + [NetworkType.QUEBECNET]: 'https://quebecnet.tzkt.io' } ) { super(rpcUrls) diff --git a/packages/beacon-sdk/package.json b/packages/beacon-sdk/package.json index ed1e4b17c..909b7b530 100644 --- a/packages/beacon-sdk/package.json +++ b/packages/beacon-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-sdk", - "version": "4.3.1", + "version": "4.3.2-beta.0", "description": "The `beacon-sdk` simplifies and abstracts the communication between dApps and wallets over different transport layers.", "author": "Andreas Gassmann ", "homepage": "https://walletbeacon.io", @@ -35,15 +35,15 @@ "url": "https://github.com/airgap-it/beacon-sdk/issues" }, "dependencies": { - "@airgap/beacon-blockchain-substrate": "4.3.1", - "@airgap/beacon-blockchain-tezos": "4.3.1", - "@airgap/beacon-core": "4.3.1", - "@airgap/beacon-dapp": "4.3.1", - "@airgap/beacon-transport-matrix": "4.3.1", - "@airgap/beacon-transport-postmessage": "4.3.1", - "@airgap/beacon-types": "4.3.1", - "@airgap/beacon-ui": "4.3.1", - "@airgap/beacon-utils": "4.3.1", - "@airgap/beacon-wallet": "4.3.1" + "@airgap/beacon-blockchain-substrate": "4.3.2-beta.0", + "@airgap/beacon-blockchain-tezos": "4.3.2-beta.0", + "@airgap/beacon-core": "4.3.2-beta.0", + "@airgap/beacon-dapp": "4.3.2-beta.0", + "@airgap/beacon-transport-matrix": "4.3.2-beta.0", + "@airgap/beacon-transport-postmessage": "4.3.2-beta.0", + "@airgap/beacon-types": "4.3.2-beta.0", + "@airgap/beacon-ui": "4.3.2-beta.0", + "@airgap/beacon-utils": "4.3.2-beta.0", + "@airgap/beacon-wallet": "4.3.2-beta.0" } } diff --git a/packages/beacon-transport-matrix/package.json b/packages/beacon-transport-matrix/package.json index 5922f9fdb..628a9e018 100644 --- a/packages/beacon-transport-matrix/package.json +++ b/packages/beacon-transport-matrix/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-transport-matrix", - "version": "4.3.1", + "version": "4.3.2-beta.0", "description": "This package contains methods to facilitate communication over the Beacon network, a decentralised P2P network that is based on the matrix protocol.", "author": "Andreas Gassmann ", "homepage": "https://walletbeacon.io", @@ -34,8 +34,8 @@ "url": "https://github.com/airgap-it/beacon-sdk/issues" }, "dependencies": { - "@airgap/beacon-core": "4.3.1", - "@airgap/beacon-utils": "4.3.1", + "@airgap/beacon-core": "4.3.2-beta.0", + "@airgap/beacon-utils": "4.3.2-beta.0", "axios": "^1.6.2" } } diff --git a/packages/beacon-transport-postmessage/package.json b/packages/beacon-transport-postmessage/package.json index 54e8f7204..73f02bfad 100644 --- a/packages/beacon-transport-postmessage/package.json +++ b/packages/beacon-transport-postmessage/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-transport-postmessage", - "version": "4.3.1", + "version": "4.3.2-beta.0", "description": "This package contains methods to facilitate communication over the postmessage interface of the browser to talk to browser extensions.", "author": "Andreas Gassmann ", "homepage": "https://walletbeacon.io", @@ -34,8 +34,8 @@ "url": "https://github.com/airgap-it/beacon-sdk/issues" }, "dependencies": { - "@airgap/beacon-core": "4.3.1", - "@airgap/beacon-types": "4.3.1", - "@airgap/beacon-utils": "4.3.1" + "@airgap/beacon-core": "4.3.2-beta.0", + "@airgap/beacon-types": "4.3.2-beta.0", + "@airgap/beacon-utils": "4.3.2-beta.0" } } diff --git a/packages/beacon-transport-walletconnect/package.json b/packages/beacon-transport-walletconnect/package.json index f6b7fa961..5b393c267 100644 --- a/packages/beacon-transport-walletconnect/package.json +++ b/packages/beacon-transport-walletconnect/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-transport-walletconnect", - "version": "4.3.1", + "version": "4.3.2-beta.0", "description": "This package contains methods to facilitate communication over the WalletConnect network.", "author": "Papers AG", "homepage": "https://walletbeacon.io", @@ -34,9 +34,9 @@ "url": "https://github.com/airgap-it/beacon-sdk/issues" }, "dependencies": { - "@airgap/beacon-core": "4.3.1", - "@airgap/beacon-types": "4.3.1", - "@airgap/beacon-utils": "4.3.1", + "@airgap/beacon-core": "4.3.2-beta.0", + "@airgap/beacon-types": "4.3.2-beta.0", + "@airgap/beacon-utils": "4.3.2-beta.0", "@walletconnect/sign-client": "2.14.0" } } diff --git a/packages/beacon-transport-walletconnect/src/communication-client/WalletConnectCommunicationClient.ts b/packages/beacon-transport-walletconnect/src/communication-client/WalletConnectCommunicationClient.ts index 1a8f2177a..a05c08d76 100644 --- a/packages/beacon-transport-walletconnect/src/communication-client/WalletConnectCommunicationClient.ts +++ b/packages/beacon-transport-walletconnect/src/communication-client/WalletConnectCommunicationClient.ts @@ -625,11 +625,16 @@ export class WalletConnectCommunicationClient extends CommunicationClient { } } - const { uri, approval } = await signClient.connect(connectParams).catch((error) => { - logger.error(`Init error: ${error.message}`) - localStorage && localStorage.setItem(StorageKey.WC_INIT_ERROR, error.message) - throw new Error(error.message) - }) + const { uri, approval }: { uri: string, approval: () => Promise } = + await Promise.race([ + signClient.connect(connectParams), + new Promise((_, reject) => setTimeout(() => reject(new Error('The connection timed out.')), 60000)) + ]) + .catch((error) => { + logger.error(`Init error: ${error.message}`) + localStorage && localStorage.setItem(StorageKey.WC_INIT_ERROR, error.message) + throw new Error(error.message) + }) // Extract topic from uri. Format is wc:topic@2... const topic = getStringBetween(uri, ':', '@') @@ -1043,7 +1048,11 @@ export class WalletConnectCommunicationClient extends CommunicationClient { try { logger.debug('connect', [pairingTopic]) - const { approval } = await signClient.connect(connectParams) + const { approval }: { approval: () => Promise } = + await Promise.race([ + signClient.connect(connectParams), + new Promise((_, reject) => setTimeout(() => reject(new Error('The connection timed out.')), 60000)) + ]) logger.debug('before await approal', [pairingTopic]) const session = await approval() logger.debug('after await approal, have session', [pairingTopic]) diff --git a/packages/beacon-types/package.json b/packages/beacon-types/package.json index 9979209af..4140d74cb 100644 --- a/packages/beacon-types/package.json +++ b/packages/beacon-types/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-types", - "version": "4.3.1", + "version": "4.3.2-beta.0", "description": "This package contains types that are used throughout the Beacon SDK.", "author": "Andreas Gassmann ", "homepage": "https://walletbeacon.io", diff --git a/packages/beacon-types/src/index.ts b/packages/beacon-types/src/index.ts index 3052c25a1..01aa6f06b 100644 --- a/packages/beacon-types/src/index.ts +++ b/packages/beacon-types/src/index.ts @@ -155,11 +155,11 @@ import { PermissionEntity } from './types/PermissionEntity' import { WalletInfo } from './types/WalletInfo' import { ChangeAccountRequest } from './types/beacon/messages/ChangeAccountRequest' import { TezosAttestationOperation } from './types/tezos/operations/Attestation' -import { TezosAttestationWithSlotOperation } from './types/tezos/operations/AttestationWithSlot' +import { TezosAttestationWithDalOperation } from './types/tezos/operations/AttestationWithDal' import { TezosDoubleAttestationEvidenceOperation } from './types/tezos/operations/DoubleAttestationEvidence' import { TezosDoublePreEndorsementEvidenceOperation } from './types/tezos/operations/DoublePreEndorsementEvidence' import { TezosDrainDelegateOperation } from './types/tezos/operations/DrainDelegate' -import { TezosEndorsementWithSlotOperation } from './types/tezos/operations/EndorsementWithSlot' +import { TezosEndorsementWithDalOperation } from './types/tezos/operations/EndorsementWithDal' import { TezosFailingNoopOperation } from './types/tezos/operations/FailingNoop' import { TezosIncreasePaidStorageOperation } from './types/tezos/operations/IncreasePaidStorage' import { TezosPreAttestationOperation } from './types/tezos/operations/PreAttestation' @@ -237,8 +237,8 @@ export { TezosSetDepositsLimitOperation, TezosDoublePreAttestationEvidenceOperation, TezosDoublePreEndorsementEvidenceOperation, - TezosAttestationWithSlotOperation, - TezosEndorsementWithSlotOperation, + TezosAttestationWithDalOperation, + TezosEndorsementWithDalOperation, TezosDoubleAttestationEvidenceOperation, TezosFailingNoopOperation, TezosRegisterGlobalConstantOperation, diff --git a/packages/beacon-types/src/types/beacon/NetworkType.ts b/packages/beacon-types/src/types/beacon/NetworkType.ts index bc7dfc3ce..ded66999c 100644 --- a/packages/beacon-types/src/types/beacon/NetworkType.ts +++ b/packages/beacon-types/src/types/beacon/NetworkType.ts @@ -16,5 +16,6 @@ export enum NetworkType { NAIROBINET = 'nairobinet', OXFORDNET = 'oxfordnet', PARISNET = 'parisnet', + QUEBECNET = 'quebecnet', CUSTOM = 'custom' } diff --git a/packages/beacon-types/src/types/tezos/OperationTypes.ts b/packages/beacon-types/src/types/tezos/OperationTypes.ts index e646fd240..3a57395cb 100644 --- a/packages/beacon-types/src/types/tezos/OperationTypes.ts +++ b/packages/beacon-types/src/types/tezos/OperationTypes.ts @@ -3,42 +3,42 @@ * @category Tezos */ export enum TezosOperationType { - ORIGINATION = 'origination', - DELEGATION = 'delegation', - REVEAL = 'reveal', - TRANSACTION = 'transaction', ACTIVATE_ACCOUNT = 'activate_account', - ENDORSEMENT = 'endorsement', - SEED_NONCE_REVELATION = 'seed_nonce_revelation', - DOUBLE_ENDORSEMENT_EVIDENCE = 'double_endorsement_evidence', - DOUBLE_BAKING_EVIDENCE = 'double_baking_evidence', - PROPOSALS = 'proposals', - BALLOT = 'ballot', ATTESTATION = 'attestation', - PREATTESTATION = 'preattestation', - PREENDORSEMENT = 'preendorsement', - SET_DEPOSITS_LIMIT = 'set_deposits_limit', + ATTESTATION_WITH_DAL = 'attestation_with_dal', + BALLOT = 'ballot', + DAL_PUBLISH_COMMITMENT = 'dal_publish_commitment', + DELEGATION = 'delegation', + DRAIN_DELEGATE = 'drain_delegate', + DOUBLE_ATTESTATION_EVIDENCE = 'double_attestation_evidence', + DOUBLE_BAKING_EVIDENCE = 'double_baking_evidence', + DOUBLE_ENDORSEMENT_EVIDENCE = 'double_endorsement_evidence', DOUBLE_PREATTESTATION_EVIDENCE = 'double_preattestation_evidence', DOUBLE_PREENDORSEMENT_EVIDENCE = 'double_preendorsement_evidence', - ATTESTATION_WITH_SLOT = 'attestation_with_slot', - ENDORSEMENT_WITH_SLOT = 'endorsement_with_slot', - DOUBLE_ATTESTATION_EVIDENCE = 'double_attestation_evidence', + ENDORSEMENT = 'endorsement', + ENDORSEMENT_WITH_DAL = 'endorsement_with_dal', + EVENT = 'event', FAILING_NOOP = 'failing_noop', - REGISTER_GLOBAL_CONSTANT = 'register_global_constant', - TRANSFER_TICKET = 'transfer_ticket', INCREASE_PAID_STORAGE = 'increase_paid_storage', - UPDATE_CONSENSUS_KEY = 'update_consensus_key', - DRAIN_DELEGATE = 'drain_delegate', - VDF_REVELATION = 'vdf_revelation', - EVENT = 'event', - TICKET_UPDATES = 'ticket_updates', - SMART_ROLLUP_ORIGINATE = 'smart_rollup_originate', + ORIGINATION = 'origination', + PREATTESTATION = 'preattestation', + PREENDORSEMENT = 'preendorsement', + PROPOSALS = 'proposals', + REGISTER_GLOBAL_CONSTANT = 'register_global_constant', + REVEAL = 'reveal', + SEED_NONCE_REVELATION = 'seed_nonce_revelation', + SET_DEPOSITS_LIMIT = 'set_deposits_limit', SMART_ROLLUP_ADD_MESSAGES = 'smart_rollup_add_messages', + SMART_ROLLUP_CEMENT = 'smart_rollup_cement', SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE = 'smart_rollup_execute_outbox_message', + SMART_ROLLUP_ORIGINATE = 'smart_rollup_originate', SMART_ROLLUP_PUBLISH = 'smart_rollup_publish', - SMART_ROLLUP_CEMENT = 'smart_rollup_cement', SMART_ROLLUP_RECOVER_BOND = 'smart_rollup_recover_bond', SMART_ROLLUP_REFUTE = 'smart_rollup_refute', SMART_ROLLUP_TIMEOUT = 'smart_rollup_timeout', - DAL_PUBLISH_COMMITMENT = 'dal_publish_commitment' + TICKET_UPDATES = 'ticket_updates', + TRANSACTION = 'transaction', + TRANSFER_TICKET = 'transfer_ticket', + UPDATE_CONSENSUS_KEY = 'update_consensus_key', + VDF_REVELATION = 'vdf_revelation' } diff --git a/packages/beacon-types/src/types/tezos/PartialTezosOperation.ts b/packages/beacon-types/src/types/tezos/PartialTezosOperation.ts index 40a9013a1..a101729a3 100644 --- a/packages/beacon-types/src/types/tezos/PartialTezosOperation.ts +++ b/packages/beacon-types/src/types/tezos/PartialTezosOperation.ts @@ -1,12 +1,12 @@ import { Optional, TezosAttestationOperation, - TezosAttestationWithSlotOperation, + TezosAttestationWithDalOperation, TezosDoubleAttestationEvidenceOperation, TezosDoublePreAttestationEvidenceOperation, TezosDoublePreEndorsementEvidenceOperation, TezosDrainDelegateOperation, - TezosEndorsementWithSlotOperation, + TezosEndorsementWithDalOperation, TezosFailingNoopOperation, TezosIncreasePaidStorageOperation, TezosPreAttestationOperation, @@ -199,8 +199,8 @@ export type PartialTezosOperation = | PartialTezosSetDepositsLimitOperation | TezosDoublePreAttestationEvidenceOperation | TezosDoublePreEndorsementEvidenceOperation - | TezosAttestationWithSlotOperation - | TezosEndorsementWithSlotOperation + | TezosAttestationWithDalOperation + | TezosEndorsementWithDalOperation | TezosDoubleAttestationEvidenceOperation | TezosFailingNoopOperation | PartialTezosRegisterGlobalConstantOperation diff --git a/packages/beacon-types/src/types/tezos/operations/AttestationWithDal.ts b/packages/beacon-types/src/types/tezos/operations/AttestationWithDal.ts new file mode 100644 index 000000000..3e5ce0478 --- /dev/null +++ b/packages/beacon-types/src/types/tezos/operations/AttestationWithDal.ts @@ -0,0 +1,11 @@ +import { TezosOperationType } from '../OperationTypes' +import { TezosBaseOperation } from '../TezosBaseOperation' + +export interface TezosAttestationWithDalOperation extends TezosBaseOperation { + kind: TezosOperationType.ATTESTATION_WITH_DAL; + slot: number; + level: number; + round: number; + block_payload_hash: string; + dal_attestation: string; +} \ No newline at end of file diff --git a/packages/beacon-types/src/types/tezos/operations/AttestationWithSlot.ts b/packages/beacon-types/src/types/tezos/operations/AttestationWithSlot.ts deleted file mode 100644 index e65768d6a..000000000 --- a/packages/beacon-types/src/types/tezos/operations/AttestationWithSlot.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { InlinedAttestation } from '../InlinedAttestation' -import { TezosOperationType } from '../OperationTypes' -import { TezosBaseOperation } from '../TezosBaseOperation' - -export interface TezosAttestationWithSlotOperation extends TezosBaseOperation { - kind: TezosOperationType.ATTESTATION_WITH_SLOT - endorsement: InlinedAttestation - slot: number -} \ No newline at end of file diff --git a/packages/beacon-types/src/types/tezos/operations/Ballot.ts b/packages/beacon-types/src/types/tezos/operations/Ballot.ts index ecb9aa5de..7ab7f3570 100644 --- a/packages/beacon-types/src/types/tezos/operations/Ballot.ts +++ b/packages/beacon-types/src/types/tezos/operations/Ballot.ts @@ -7,7 +7,7 @@ import { TezosBaseOperation, TezosOperationType } from '../../..' export interface TezosBallotOperation extends TezosBaseOperation { kind: TezosOperationType.BALLOT source: string - period: string + period: number proposal: string ballot: 'nay' | 'yay' | 'pass' } diff --git a/packages/beacon-types/src/types/tezos/operations/DoubleEndorsementEvidence.ts b/packages/beacon-types/src/types/tezos/operations/DoubleEndorsementEvidence.ts index 3e144b854..09d6ce2d4 100644 --- a/packages/beacon-types/src/types/tezos/operations/DoubleEndorsementEvidence.ts +++ b/packages/beacon-types/src/types/tezos/operations/DoubleEndorsementEvidence.ts @@ -22,4 +22,5 @@ export interface TezosDoubleEndorsementEvidenceOperation extends TezosBaseOperat kind: TezosOperationType.DOUBLE_ENDORSEMENT_EVIDENCE op1: InlinedEndorsement op2: InlinedEndorsement + slot?: number } diff --git a/packages/beacon-types/src/types/tezos/operations/EndorsementWithDal.ts b/packages/beacon-types/src/types/tezos/operations/EndorsementWithDal.ts new file mode 100644 index 000000000..bb5102cae --- /dev/null +++ b/packages/beacon-types/src/types/tezos/operations/EndorsementWithDal.ts @@ -0,0 +1,11 @@ +import { TezosOperationType } from '../OperationTypes' +import { TezosBaseOperation } from '../TezosBaseOperation' + +export interface TezosEndorsementWithDalOperation extends TezosBaseOperation { + kind: TezosOperationType.ENDORSEMENT_WITH_DAL; + slot: number; + level: number; + round: number; + block_payload_hash: string; + dal_attestation: string; +} \ No newline at end of file diff --git a/packages/beacon-types/src/types/tezos/operations/EndorsementWithSlot.ts b/packages/beacon-types/src/types/tezos/operations/EndorsementWithSlot.ts deleted file mode 100644 index 89a01ee4d..000000000 --- a/packages/beacon-types/src/types/tezos/operations/EndorsementWithSlot.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { TezosOperationType } from '../OperationTypes' -import { TezosBaseOperation } from '../TezosBaseOperation' -import { InlinedEndorsement } from './DoubleEndorsementEvidence' - -export interface TezosEndorsementWithSlotOperation extends TezosBaseOperation { - kind: TezosOperationType.ENDORSEMENT_WITH_SLOT - endorsement: InlinedEndorsement - slot: number -} \ No newline at end of file diff --git a/packages/beacon-types/src/types/tezos/operations/Origination.ts b/packages/beacon-types/src/types/tezos/operations/Origination.ts index 8fe87bb77..c95abfd34 100644 --- a/packages/beacon-types/src/types/tezos/operations/Origination.ts +++ b/packages/beacon-types/src/types/tezos/operations/Origination.ts @@ -14,5 +14,5 @@ export interface TezosOriginationOperation extends TezosBaseOperation { storage_limit: string balance: string delegate?: string - script: ScriptedContracts + script?: ScriptedContracts } diff --git a/packages/beacon-types/src/types/ui.ts b/packages/beacon-types/src/types/ui.ts index 5e3b064eb..407241720 100644 --- a/packages/beacon-types/src/types/ui.ts +++ b/packages/beacon-types/src/types/ui.ts @@ -33,6 +33,7 @@ export interface WebApp extends AppBase { [NetworkType.NAIROBINET]?: string [NetworkType.OXFORDNET]?: string [NetworkType.PARISNET]?: string + [NetworkType.QUEBECNET]?: string [NetworkType.CUSTOM]?: string } } diff --git a/packages/beacon-ui/package.json b/packages/beacon-ui/package.json index 4f9135646..dba33c5cf 100644 --- a/packages/beacon-ui/package.json +++ b/packages/beacon-ui/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-ui", - "version": "4.3.1", + "version": "4.3.2-beta.0", "description": "This package contains the UI part (alerts and toasts) of the Beacon SDK.", "author": "Andreas Gassmann ", "homepage": "https://walletbeacon.io", @@ -34,10 +34,10 @@ "url": "https://github.com/airgap-it/beacon-sdk/issues" }, "dependencies": { - "@airgap/beacon-core": "4.3.1", - "@airgap/beacon-transport-postmessage": "4.3.1", - "@airgap/beacon-types": "4.3.1", - "@airgap/beacon-utils": "4.3.1", + "@airgap/beacon-core": "4.3.2-beta.0", + "@airgap/beacon-transport-postmessage": "4.3.2-beta.0", + "@airgap/beacon-types": "4.3.2-beta.0", + "@airgap/beacon-utils": "4.3.2-beta.0", "@walletconnect/utils": "2.14.0", "qrcode-svg": "^1.1.0", "solid-js": "^1.7.11" diff --git a/packages/beacon-ui/src/components/bug-report-form/index.tsx b/packages/beacon-ui/src/components/bug-report-form/index.tsx index fc06ec539..7bdd56e20 100644 --- a/packages/beacon-ui/src/components/bug-report-form/index.tsx +++ b/packages/beacon-ui/src/components/bug-report-form/index.tsx @@ -87,12 +87,12 @@ const BugReportForm = (props: any) => { const getUserId = (): string => { if (!localStorage) { - return 'UNKOWN' + return 'UNKNOWN' } const key = Object.keys(localStorage).find((key) => key.includes('user-id')) - return key && key.length ? localStorage.getItem(key) ?? 'UNKOWN' : 'UNKOWN' + return key && key.length ? localStorage.getItem(key) ?? 'UNKNOWN' : 'UNKNOWN' } createEffect(() => { diff --git a/packages/beacon-ui/src/utils/platform.ts b/packages/beacon-ui/src/utils/platform.ts index aae853dba..a76f423f7 100644 --- a/packages/beacon-ui/src/utils/platform.ts +++ b/packages/beacon-ui/src/utils/platform.ts @@ -73,7 +73,7 @@ export const currentOS = () => { return value } } - return 'UNKOWN' + return 'UNKNOWN' } export const currentBrowser = () => { @@ -93,5 +93,5 @@ export const currentBrowser = () => { return value } } - return 'UNKOWN' + return 'UNKNOWN' } diff --git a/packages/beacon-utils/package.json b/packages/beacon-utils/package.json index b7b26b9c0..75a152f16 100644 --- a/packages/beacon-utils/package.json +++ b/packages/beacon-utils/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-utils", - "version": "4.3.1", + "version": "4.3.2-beta.0", "description": "This package contains utility functions that are used throughout the beacon-sdk", "author": "Andreas Gassmann ", "homepage": "https://walletbeacon.io", diff --git a/packages/beacon-wallet/package.json b/packages/beacon-wallet/package.json index 350cef28b..c7f54c71a 100644 --- a/packages/beacon-wallet/package.json +++ b/packages/beacon-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-wallet", - "version": "4.3.1", + "version": "4.3.2-beta.0", "description": "Use this package in your wallet to instanciate a WalletClient object and communicate to dApps.", "author": "Andreas Gassmann ", "homepage": "https://walletbeacon.io", @@ -35,8 +35,8 @@ "url": "https://github.com/airgap-it/beacon-sdk/issues" }, "dependencies": { - "@airgap/beacon-core": "4.3.1", - "@airgap/beacon-transport-matrix": "4.3.1", - "@airgap/beacon-transport-postmessage": "4.3.1" + "@airgap/beacon-core": "4.3.2-beta.0", + "@airgap/beacon-transport-matrix": "4.3.2-beta.0", + "@airgap/beacon-transport-postmessage": "4.3.2-beta.0" } } diff --git a/scripts/blockchains/tezos-sapling.ts b/scripts/blockchains/tezos-sapling.ts index 70cdba84f..7f67ebb7e 100644 --- a/scripts/blockchains/tezos-sapling.ts +++ b/scripts/blockchains/tezos-sapling.ts @@ -19,6 +19,7 @@ export enum NetworkType { NAIROBINET = 'nairobinet', OXFORDNET = 'oxfordnet', PARISNET = 'parisnet', + QUEBECNET = 'quebecnet', CUSTOM = 'custom' } diff --git a/scripts/blockchains/tezos.ts b/scripts/blockchains/tezos.ts index 2980ef7d9..797d47eb0 100644 --- a/scripts/blockchains/tezos.ts +++ b/scripts/blockchains/tezos.ts @@ -19,6 +19,7 @@ export enum NetworkType { NAIROBINET = 'nairobinet', OXFORDNET = 'oxfordnet', PARISNET = 'parisnet', + QUEBECNET = 'quebecnet', CUSTOM = 'custom' } @@ -76,7 +77,8 @@ export const tezosWebList: WebApp[] = [ [NetworkType.MUMBAINET]: 'https://metamask.tezos.com/', [NetworkType.NAIROBINET]: 'https://metamask.tezos.com/', [NetworkType.OXFORDNET]: 'https://metamask.tezos.com/', - [NetworkType.PARISNET]: 'https://metamask.tezos.com/' + [NetworkType.PARISNET]: 'https://metamask.tezos.com/', + [NetworkType.QUEBECNET]: 'https://metamask.tezos.com/' } }, { @@ -103,7 +105,8 @@ export const tezosWebList: WebApp[] = [ [NetworkType.MUMBAINET]: 'https://mumbainet.kukai.app', [NetworkType.NAIROBINET]: 'https://nairobinet.kukai.app', [NetworkType.OXFORDNET]: 'https://oxfordnet.kukai.app', - [NetworkType.PARISNET]: 'https://parisnet.kukai.app' + [NetworkType.PARISNET]: 'https://parisnet.kukai.app', + [NetworkType.QUEBECNET]: 'https://quebecnet.kukai.app' } }, @@ -130,7 +133,8 @@ export const tezosWebList: WebApp[] = [ [NetworkType.MUMBAINET]: 'https://ghostnet.tzsafe.marigold.dev', [NetworkType.NAIROBINET]: 'https://ghostnet.tzsafe.marigold.dev', [NetworkType.OXFORDNET]: 'https://ghostnet.tzsafe.marigold.dev', - [NetworkType.PARISNET]: 'https://ghostnet.tzsafe.marigold.dev' + [NetworkType.PARISNET]: 'https://ghostnet.tzsafe.marigold.dev', + [NetworkType.QUEBECNET]: 'https://ghostnet.tzsafe.marigold.dev' } } ]