open-index/open-npm huggingface dataset:
npm package: @kadena/cryptography-utils
Description: Collection of Kadena cryptography utility functions
Latest version: 0.4.4

<!-- genericHeader start -->

# @kadena/cryptography-utils

Collection of Kadena cryptography utility functions

<picture>
  <source srcset="https://raw.githubusercontent.com/kadena-community/kadena.js/main/common/images/Kadena.JS_logo-white.png" media="(prefers-color-scheme: dark)"/>
  <img src="https://raw.githubusercontent.com/kadena-community/kadena.js/main/common/images/Kadena.JS_logo-black.png" width="200" alt="kadena.js logo" />
</picture>

<!-- genericHeader end -->

## Cryptography Utils

> Cryptography-Utils is a collection of cryptography utility functions. This
> library is used by kadena.js to hash your transactions. If you have private
> keys available, you can also sign them with this library.

API Reference can be found here [cryptography-utils.api.md][1]

### Usage Examples

```ts
import { hash, sign } from '@kadena/cryptography-utils';
import { IKeyPair } from '@kadena/types';

// Create a command
let commandPayload: string = 'Hello world!';

// Get the has of the command
let h: string = hash(commandPayload);

// Signing is normally handled by wallets, but if you have the private key
// available to you, you can also sign in this way:
let keyPair: IKeyPair = {
  publicKey: 'ba54b224d1924dd98403f5c751abdd10de6cd81b0121800bf7bdbdcfaec7388d',
  secretKey: '8693e641ae2bbe9ea802c736f42027b03f86afe63cae315e7169c9c496c17332',
};

let sig: string = sign(commandPayload, keyPair);
```

### Available Functions

crypto:

- `binToHex`
- `hexToBin`
- `base64UrlEncode`
- `base64UrlDecode`
- `base64UrlEncodeArr`
- `base64UrlDecodeArr`
- `strToUint8Array`
- `uint8ArrayToStr`
- `hash`
- `hashBin`
- `genKeyPair`
- `restoreKeyPairFromSecretKey`
- `sign`
- `signHash`
- `verifySig`
- `unique`
- `toTweetNaclSecretKey`

[1]:
  https://github.com/kadena-community/kadena.js/tree/main/packages/libs/cryptography-utils/etc/cryptography-utils.api.md
npm package: @kadena/fonts
Description: Package to serve fonts to applications
Author: Kadena LLC
Latest version: 0.0.1

# Getting started

Easily import Kadena fonts. 


```ts
import { KodeMono } from '@kadena/fonts'

// Basic implementation, return the Kode Mono Regular (weight: 400) font
const font = KodeMono()

// With specific weight
const font = KodeMono({
  weight: 400,
})

// With specific fallback
const font = KodeMono({
  weight: 400,
  fallback: 'Courier New, monospace',
})
```

# Usage

```tsx
// Using classnames
<div>
  <code className={font.className}>
    ...
  </code>
</div>
```
## or

```ts
// Using css font variable

const { variable } = KodeMono({
  weight: 400,
})
```

```css
.my-code {
  font-family: var(--replace-with-the-variable-return-string-value);
}
```
npm package: @kadena/kadena-cli
Description: Kadena CLI tool to interact with the Kadena blockchain (manage keys, transactions, etc.)
Latest version: 1.4.6

<!-- genericHeader start -->

# @kadena/kadena-cli

Kadena CLI tool to interact with the Kadena blockchain (manage keys,
transactions, etc.)

<picture>
  <source srcset="https://raw.githubusercontent.com/kadena-community/kadena.js/main/common/images/Kadena.JS_logo-white.png" media="(prefers-color-scheme: dark)"/>
  <img src="https://raw.githubusercontent.com/kadena-community/kadena.js/main/common/images/Kadena.JS_logo-black.png" width="200" alt="kadena.js logo" />
</picture>

<!-- genericHeader end -->

## Documentation

[Reference documentation][1]

# KADENA CLI

The Kadena CLI embodies our commitment to simplicity, power, and flexibility for
developers. It's crafted to streamline your development process, offering direct
and efficient access to Kadena's blockchain capabilities. This tool caters to
the pragmatic needs of developers by providing a straightforward, command-line
interface that integrates seamlessly into your workflow, allowing you to focus
on building robust, innovative applications without the overhead of unnecessary
complexity. Our philosophy centers on empowering developers with the tools they
need to unlock the full potential of the kadena blockchain, in a clear and
concise manner.

## Installation from npm

```npm
npm install -g @kadena/kadena-cli
```

## Installation from pnpm

```pnpm
pnpm install -g @kadena/kadena-cli
```

Read more at [docs.kadena.io][1]

[1]: https://docs.kadena.io/reference/kadena-cli-ref
npm package: @kadena/pactjs
Description: Collection of utility functions pactjs related
Latest version: 0.6.0

<!-- genericHeader start -->

# @kadena/pactjs

Collection of utility functions pactjs related

<picture>
  <source srcset="https://raw.githubusercontent.com/kadena-community/kadena.js/main/common/images/Kadena.JS_logo-white.png" media="(prefers-color-scheme: dark)"/>
  <img src="https://raw.githubusercontent.com/kadena-community/kadena.js/main/common/images/Kadena.JS_logo-black.png" width="200" alt="kadena.js logo" />
</picture>

<!-- genericHeader end -->

## PactJS

API Reference can be found here [pactjs.api.md][1]

crypto:

- `createExp`
- `PactNumber`

[1]:
  https://github.com/kadena-community/kadena.js/blob/main/packages/libs/pactjs/etc/pactjs.api.md
npm package: @kadena/pactjs-generator
Description: Generates TypeScript definitions of Pact contracts, for use in @kadena/pactjs
Latest version: 1.18.3

<!-- genericHeader start -->

# @kadena/pactjs-generator

Generates TypeScript definitions of Pact contracts, for use in @kadena/pactjs

<picture>
  <source srcset="https://raw.githubusercontent.com/kadena-community/kadena.js/main/common/images/Kadena.JS_logo-white.png" media="(prefers-color-scheme: dark)"/>
  <img src="https://raw.githubusercontent.com/kadena-community/kadena.js/main/common/images/Kadena.JS_logo-black.png" width="200" alt="kadena.js logo" />
</picture>

<!-- genericHeader end -->

## PactJS Generator

API Reference can be found here [pactjs-generator.api.md][1]

[1]:
  https://github.com/kadena-community/kadena.js/tree/main/packages/libs/pactjs-generator/etc/pactjs-generator.api.md
npm package: @kadena/snap
Description: MetaMask snap to manage your Kadena accounts and KDA.
Latest version: 1.0.3

# Kadena Snap

This is Kadena Snap, which is written in TypeScript. It leverages the state
storage of Snaps to store the status of the DApp. It provides various functions,
including `kda_signTransaction`, `kda_addAccount`, `kda_getActiveAccount`, and
many more.

<!-- markdownlint-disable MD033 -->
<picture>
  <source srcset="https://raw.githubusercontent.com/kadena-community/kadena.js/main/common/images/Kadena.JS_logo-white.png" media="(prefers-color-scheme: dark)"/>
  <img src="https://raw.githubusercontent.com/kadena-community/kadena.js/main/common/images/Kadena.JS_logo-black.png" width="200" alt="kadena.js logo" />
</picture>
<!-- markdownlint-enable MD033 -->

## Testing

The Kadena Snap project includes several tests that cover the majority of its
functions. To test the snap, navigate to this directory and run yarn test. This
command will use
[`@metamask/snaps-jest`](https://github.com/MetaMask/snaps/tree/main/packages/snaps-jest)
to execute the tests found in src/index.test.ts.
npm package: @kadena/types
Description: <!-- genericHeader start -->
Latest version: 0.7.0

<!-- genericHeader start -->

# @kadena/types

<picture>
  <source srcset="https://raw.githubusercontent.com/kadena-community/kadena.js/main/common/images/Kadena.JS_logo-white.png" media="(prefers-color-scheme: dark)"/>
  <img src="https://raw.githubusercontent.com/kadena-community/kadena.js/main/common/images/Kadena.JS_logo-black.png" width="200" alt="kadena.js logo" />
</picture>

<!-- genericHeader end -->
npm package: @kadena/wallet-adapter-chainweaver
Description: Kadena Wallet Adapter for Chainweaver
Latest version: 0.0.6

# Wallet adapter Chainweaver V3

This package provides an adapter for the Chainweaver Legacy Wallet on Kadena. It
extends a base adapter while preserving the `"kadena_"`‑prefixed methods
expected by `BaseWalletAdapter` by mapping them to the Chainweaver local HTTP
API.

## Installation

```bash
npm install @kadena/wallet-adapter-chainweaver-legacy
# or
yarn add @kadena/wallet-adapter-chainweaver-legacy
# or
pmpm add @kadena/wallet-adapter-chainweaver-legacy
```

## Factory Usage

The primary export is a factory function `chainweaverAdapterLegacy`, which
detects the Chainweaver provider and, if found, returns an adapter instance. If
the Chainweaver provider is not available, detection returns `null`:

```ts
import { chainweaverAdapterLegacy } from '@kadena/wallet-adapter-chainweaver-legacy';

(async () => {
  const adapterFactory = chainweaverAdapterLegacy();
  const provider = await adapterFactory.detect();
  if (!provider) {
    console.log('Chainweaver Wallet not found.');
    return;
  }
  const adapter = await adapterFactory.adapter(provider);
  await adapter.connect();
  const account = await adapter.getActiveAccount();
  console.log('Connected account:', account);
})();
```

## Manual Usage of the Adapter or Detection

For lower-level access, the following exports are available:

- **`ChainweaverWalletAdapterLegacy`**: The adapter class you can instantiate
  directly.
- **`detectChainweaverProviderLegacy`**: A standalone function that checks
  whether the Chainweaver wallet provider is present. It returns the provider if
  found, or `null` otherwise.

```ts
import {
  ChainweaverWalletAdapterLegacy,
  detectChainweaverProviderLegacy,
} from '@kadena/wallet-adapter-chainweaver-legacy';

(async () => {
  const provider = await detectChainweaverProviderLegacy({ silent: true });
  if (!provider) {
    console.log('Chainweaver Wallet not available.');
    return;
  }
  const adapter = new ChainweaverWalletAdapterLegacy({ provider });
  await adapter.connect();
  console.log('Connected to Chainweaver directly!');
})();
```

## Supported methods

| Method                | KIP         | Supported |
| --------------------- | ----------- | --------- |
| kadena_sign_v1        | [KIP-17][1] | No        |
| kadena_quicksign_v1   | [KIP-17][1] | Yes       |
| kadena_getAccount_v1  | [KIP-37][2] | Yes       |
| kadena_getAccounts_v2 | [KIP-38][3] | Yes       |
| kadena_getNetwork_v1  | [KIP-39][4] | No        |
| kadena_getNetworks_v1 | [KIP-40][5] | No        |

## Other Notes

- The adapter internally calls methods like `kadena_sign_v1`, and
  `kadena_quicksign_v1`, mapping them to Chainweaver’s local HTTP endpoints
  (e.g. `http://127.0.0.1:9467/v1/sign` and `/v1/quicksign`).
- If you support multiple wallets in your application, the lazy import in
  `chainweaverAdapterLegacy` helps reduce your initial bundle size by loading
  the Chainweaver adapter code only when the provider is detected.
- Ensure that the user has installed the Chainweaver wallet. If the wallet is
  not installed, detection will yield `null`.
npm package: @kadena/wallet-adapter-magic
Description: Kadena Wallet Adapter for Magic
Latest version: 0.0.7

# Magic Wallet Adapter

This package provides an adapter for the Magic Wallet extension on Kadena.

## Installation

```bash
npm install @kadena/wallet-adapter-magic
# or
yarn add @kadena/wallet-adapter-magic
# or
pmpm add @kadena/wallet-adapter-magic
```

## Usage with wallet-adapter-core

Wallet adapters are designed to work easily with `WalletAdapterClient` from
`@kadena/wallet-adapter-core`. This allows loading in multiple adapters and
automatically detecting which are available and providing a uniform api to
interact with the adapters.

```ts
import { magicAdapter } from '@kadena/wallet-adapter-magic';
import { WalletAdapterClient } from '@kadena/wallet-adapter-core';

const client = new WalletAdapterClient([magicAdapter]);
await client.init();
await client.connect('magic');
```

## Factory Usage

The primary export is a factory function `magicAdapter`, which detects the Magic
wallet provider and, if found, returns an instance of `MagicWalletAdapter`. If
Magic is not installed, it returns `null`:

```ts
import { magicAdapter } from '@kadena/wallet-adapter-magic';

(async () => {
  const provider = await magicAdapter.detect();
  if (!provider) {
    console.log('Magic Wallet not found.');
    return;
  }

  const adapter = await magicAdapter.adapter(provider);

  await adapter.connect();
  const account = await adapter.getActiveAccount();
  console.log('Active account:', account);
})();
```

## Manual Usage of the Adapter or Detection

If you need lower-level access, the following are also exported:

- **`MagicAdapter`**: The actual adapter class, in case you want to instantiate
  it manually without relying on the lazy-loading factory.
- **`detectMagicProvider`**: A standalone function that checks whether the Magic
  wallet is present. It returns the provider if found, or `null` otherwise.

```ts
import {
  MagicAdapter,
  detectMagicProvider,
} from '@kadena/wallet-adapter-magic';

(async () => {
  const provider = await detectMagicProvider({ silent: true });
  if (!provider) {
    console.log('Magic not available.');
    return;
  }
  const adapter = new MagicWalletAdapter({ provider });
  await adapter.connect();
  console.log('Connected to Magic directly!');
})();
```

## Supported methods

| Method                | KIP         | Supported |
| --------------------- | ----------- | --------- |
| kadena_sign_v1        | [KIP-17][1] | No        |
| kadena_quicksign_v1   | [KIP-17][1] | Yes       |
| kadena_getAccount_v1  | [KIP-37][2] | Yes       |
| kadena_getAccounts_v2 | [KIP-38][3] | Yes       |
| kadena_getNetwork_v1  | [KIP-39][4] | No        |
| kadena_getNetworks_v1 | [KIP-40][5] | No        |

[1]: https://github.com/kadena-io/KIPs/blob/master/kip-0017.md
[2]: https://github.com/kadena-io/KIPs/blob/master/kip-0037.md
[3]: https://github.com/kadena-io/KIPs/blob/master/kip-0038.md
[4]: https://github.com/kadena-io/KIPs/blob/master/kip-0039.md
[5]: https://github.com/kadena-io/KIPs/blob/master/kip-0040.md