diff --git a/src/css/custom.css b/src/css/custom.css index 5bb21583..5b3e002c 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -15,10 +15,15 @@ --ifm-color-primary-lighter: rgb(85 142 243); --ifm-color-primary-lightest: rgb(92 147 243); --ifm-code-font-size: 95%; - + --docusaurus-highlighted-code-line-bg: rgb(222, 223, 225); --ifm-color-dark: #35415b; } +[data-theme="dark"] { + /* Color which works with dark mode syntax highlighting theme */ + --docusaurus-highlighted-code-line-bg: rgb(72, 77, 91); +} + .docusaurus-highlight-code-line { background-color: rgb(72, 77, 91); display: block; diff --git a/src/docs/blockchains/blockchain-substrate.md b/src/docs/blockchains/blockchain-substrate.md index 4a183e52..4c7819f8 100644 --- a/src/docs/blockchains/blockchain-substrate.md +++ b/src/docs/blockchains/blockchain-substrate.md @@ -7,7 +7,7 @@ slug: /blockchains/substrate The following permission scopes are available in the Substrate package. -```typescript +```ts export enum SubstratePermissionScope { "transfer" = "transfer", "sign_payload_json" = "sign_payload_json", @@ -19,7 +19,7 @@ export enum SubstratePermissionScope { The supported message types. -```typescript +```ts export enum SubstrateMessageType { "transfer_request" = "transfer_request", "sign_payload_request" = "sign_payload_request", @@ -32,7 +32,7 @@ export enum SubstrateMessageType { This message is used to request permissions to use an account. -```typescript +```ts export interface SubstratePermissionRequest extends PermissionRequestV3<"substrate"> { blockchainData: { @@ -50,7 +50,7 @@ export interface SubstratePermissionRequest This message is used to share information about an account with a dApp. -```typescript +```ts export interface SubstratePermissionResponse extends PermissionResponseV3<"substrate"> { blockchainData: { @@ -73,7 +73,7 @@ export interface SubstratePermissionResponse This message is used to initiate a transfer between two accounts. -```typescript +```ts export interface SubstrateTransferRequest extends BlockchainMessage<"substrate"> { blockchainData: { @@ -95,7 +95,7 @@ export interface SubstrateTransferRequest This message is used to share information about a requested operation with the dApp. -```typescript +```ts export type SubstrateTransferResponse = | { transactionHash: string; @@ -115,7 +115,7 @@ export type SubstrateTransferResponse = This message is used to request the signature for a payload. -```typescript +```ts export interface SubstrateSignPayloadRequest extends BlockchainMessage<"substrate"> { blockchainData: { @@ -200,7 +200,7 @@ export interface SubstrateSignPayloadRequest This message is used to share information about a requested signature with the dApp. -```typescript +```ts export type SubstrateSignPayloadResponse = | { transactionHash: string; diff --git a/src/docs/blockchains/blockchain-tezos-sapling.md b/src/docs/blockchains/blockchain-tezos-sapling.md index cec897a3..7f4bba3a 100644 --- a/src/docs/blockchains/blockchain-tezos-sapling.md +++ b/src/docs/blockchains/blockchain-tezos-sapling.md @@ -9,7 +9,7 @@ The `Tezos Sapling` package enables messages related to the Sapling implementati The following permission scopes are available in the Tezos Sapling package. -```typescript +```ts export enum TezosSaplingPermissionScope { /** * The "viewing_key" permission is used to signal to the wallet that a dApp requests access to the viewing key. Sharing the viewing key will give up ALL privacy advantages of sapling, so this permission should only be granted in very specific cases. @@ -26,7 +26,7 @@ export enum TezosSaplingPermissionScope { At the moment, only simple transfers are supported. At a later stage, this package will be extended to include shield and unshield operations, as well as shielded contract calls. -```typescript +```ts export enum TezosSaplingMessageType { /** * This message type is used for transfers from one sapling address to another. @@ -42,7 +42,7 @@ export enum TezosSaplingMessageType { This message is used to request permissions to use an account. -```typescript +```ts export interface TezosSaplingPermissionRequest extends PermissionRequestV3<"tezos-sapling"> { blockchainData: { @@ -62,7 +62,7 @@ export interface TezosSaplingPermissionRequest This message is used to share information about an account with a dApp. -```typescript +```ts export interface TezosSaplingPermissionResponse extends PermissionResponseV3<"tezos-sapling"> { blockchainData: { @@ -87,7 +87,7 @@ export interface TezosSaplingPermissionResponse This message is used to initiate a transfer between two accounts. -```typescript +```ts export interface TezosSaplingTransferRequest extends BlockchainMessage<"tezos-sapling"> { blockchainData: { @@ -106,7 +106,7 @@ export interface TezosSaplingTransferRequest This message is used to share information about a requested operation with the dApp. -```typescript +```ts export type TezosSaplingTransferResponse = | { transactionHash: string; diff --git a/src/docs/blockchains/introduction.md b/src/docs/blockchains/introduction.md index a2b37e5d..35a7218c 100644 --- a/src/docs/blockchains/introduction.md +++ b/src/docs/blockchains/introduction.md @@ -21,7 +21,7 @@ See the docs about the individual packages for more information about the messag In the Beacon protocol, every message is wrapped in the following wrapper. -```typescript +```ts export interface BeaconMessageWrapper { id: string; // ID of the message. The same ID is used in the request and response version: string; @@ -34,7 +34,7 @@ export interface BeaconMessageWrapper { The layout for the basic message is the same for all blockchains. -```typescript +```ts export interface BlockchainMessage { blockchainIdentifier: T; type: unknown; @@ -50,7 +50,7 @@ For this reason, there are two messages, `PermissionRequest` and `PermissionResp Those messages are handled differently from the generic `BlockchainRequest` and `BlockchainResponse` messages because they have to be completed first before any other action can take place. -```typescript +```ts export interface PermissionRequestV3 extends BlockchainMessage { blockchainIdentifier: T; @@ -62,7 +62,7 @@ export interface PermissionRequestV3 } ``` -```typescript +```ts export interface PermissionResponseV3 extends BlockchainMessage { blockchainIdentifier: T; @@ -80,7 +80,7 @@ Following are the generic messages of the Beacon Protocol. They can be extended Please see the docs about the specific blockchain messages for examples. -```typescript +```ts export interface BlockchainRequestV3 extends BlockchainMessage { blockchainIdentifier: T; @@ -93,7 +93,7 @@ export interface BlockchainRequestV3 } ``` -```typescript +```ts export interface BlockchainResponseV3 extends BlockchainMessage { blockchainIdentifier: T; diff --git a/src/docs/blockchains/usage.md b/src/docs/blockchains/usage.md index 6abc1fb2..c2c47f04 100644 --- a/src/docs/blockchains/usage.md +++ b/src/docs/blockchains/usage.md @@ -5,7 +5,7 @@ slug: /blockchains/usage Let's look at an example how a dApp can be initialized with support for a `substrate` based blockchain. -```typescript +```ts import { DAppClient } from "@airgap/beacon-dapp"; import { SubstrateBlockchain } from "@airgap/beacon-blockchain-substrate"; @@ -42,7 +42,7 @@ client.getActiveAccount().then((activeAccount) => { On the wallet side, the blockchain doesn't explicitly have to be registered, it can be filtered by the `blockchainIdentifier` property. -```typescript +```ts import { WalletClient } from "@airgap/beacon-wallet"; import { BeaconMessageType } from "@airgap/beacon-types"; diff --git a/src/docs/wallet/messages/substrate.mdx b/src/docs/wallet/messages/substrate.mdx index 1c1125ed..eb005eb4 100644 --- a/src/docs/wallet/messages/substrate.mdx +++ b/src/docs/wallet/messages/substrate.mdx @@ -2,4 +2,4 @@ title: Substrate --- -See [dApp docs](/blockchains/substrate) +See [DApp docs](/blockchains/substrate) diff --git a/src/docs/wallet/messages/tezos.mdx b/src/docs/wallet/messages/tezos.mdx index 4ca1d13f..2ce8deef 100644 --- a/src/docs/wallet/messages/tezos.mdx +++ b/src/docs/wallet/messages/tezos.mdx @@ -2,4 +2,4 @@ title: Tezos --- -See [dApp docs](/blockchains/tezos) +See [DApp docs](/blockchains/tezos)