open-index/open-npm huggingface dataset:
npm package: @radixdlt/actions
Description: Declare actions you as a user would like to perform e.g. 'transfer tokens' (`TransferTokensAction`)
Author: Alexander Cyon
Latest version: 1.0.7-alpha.8

# `@radixdlt/actions`

> TODO: description

## Usage

```
const radixActions = require('@radixdlt/actions')

// TODO: DEMONSTRATE API
```
npm package: @radixdlt/alphanet-gateway-api-v0-sdk
Description: This SDK is a thin wrapper around the Babylon V0 Gateway API, detailed in [the Open API schema](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/radixdlt/babylon-alphanet/main/gateway-api-v0/gateway-api-v0-schema.yaml).
Latest version: 0.1.5

# Alphanet Gateway v0 SDK

This SDK is a thin wrapper around the Babylon V0 Gateway API, detailed in [the Open API schema](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/radixdlt/babylon-alphanet/main/gateway-api-v0/gateway-api-v0-schema.yaml).

## Usage

Behind the scenes, this library uses the fetch API.

If in an environment where this is not available, a polyfill must be used.

An example using this with node is provided [here in the github repo](https://github.com/radixdlt/babylon-alphanet/blob/main/gateway-api-v0/examples/node-16/src/index.ts).

```typescript
import "./node-fetch-polyfill" // Polyfill for fetch required if running in node-js
import { TransactionApi, StateApi } from "@radixdlt/alphanet-gateway-api-v0-sdk";

const transactionApi = new TransactionApi();
const stateApi = new StateApi();

async function getEpoch() {
    let response = await stateApi.stateEpochPost();
    return response.epoch;
}

async function getTransactionStatus(transactionIntentHashHex: string) {
    let response = await transactionApi.transactionStatusPost({
        v0TransactionStatusRequest: {
            intent_hash: transactionIntentHashHex
        }
    });
    return response.intent_status;
}
```
npm package: @radixdlt/alphanet-walletextension-sdk
Description: ## Usage
Latest version: 0.1.5

# Alphanet Wallet Extension SDK

## Usage

### Request

```typescript
import WebSdk from '@radixdlt/alphanet-walletextension-sdk'

const webSdk = WebSdk()

const result = await webSdk.request({ accountAddresses: {} })

if (result.isErr()) {
  return handleError(result.error)
}

const activeAddress = result.value?.accountAddresses[0]
```

### Send transaction

```typescript
import WebSdk from '@radixdlt/alphanet-walletextension-sdk'

const webSdk = WebSdk()

const transactionManifest = '...'

const result = await webSdk.sendTransaction(transactionManifest)

if (result.isErr()) {
  return handleError(result.error)
}

const transactionHash = result.value?.transactionHash
```

### Build manifest

```typescript
import { ManifestBuilder } from '@radixdlt/alphanet-walletextension-sdk';

const manifest = new ManifestBuilder()
    .callMethod('component_tdx_a_1qguw8y8g437nnkusxukllha7l7c0cy658g34jyucm7tqkjanvl', 'withdraw_by_amount', [
        'Decimal("1")',
        'ResourceAddress("resource_tdx_a_1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzqegh4k9")'
    ])
    .takeFromWorktop('resource_tdx_a_1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzqegh4k9', 'xrd_bucket')
    .callMethod('component_tdx_a_1qfdcf5nvl9qkfv743p7dzj7zse5ex50p3cqnelg6puuqd4m540', 'buy_gumball', [ 'Bucket("xrd_bucket")' ])
    .callMethod('component_tdx_a_1qguw8y8g437nnkusxukllha7l7c0cy658g34jyucm7tqkjanvl', 'deposit_batch', ['Expression("ENTIRE_WORKTOP")'])
    .build();
```
npm package: @radixdlt/atom
Description: Container for CRUD instructions known as 'Particles' that are sent to the Radix decentralized ledger
Author: Alexander Cyon
Latest version: 1.0.7-alpha.8

# `@radixdlt/atom`

> TODO: description

## Usage

```
const radixAtom = require('@radixdlt/atom')

// TODO: DEMONSTRATE API
```
npm package: @radixdlt/create-radix-app
Description: A new project scaffolding tool for quickly bootstrapping a new Radix App project.
Author: Bryan Sharpley
Latest version: 0.2.1

# create-radix-dapp

A CLI tool to scaffold a new Radix dApp project. Choose from a selection of
templates to get started with your new project.

- Vanilla JS
- React JS
- React TS
- Svelte JS
- Svelte TS
- Full Stack Gumball Machine JS
- Full Stack Radiswap JS

## Getting Started

To scaffold a new project, run the following command in your terminal:

```bash
npx create-radix-dapp@latest
```

### Name your Project & Choose a Template

![Choosing a Template](bin/assets/choose-template.png)

### Creating Project & Installing Dependencies

![Creating Project](bin/assets/build-install-deps.png)

### Start the Development Server

![Starting the Development Server](bin/assets/start-dev-server.png)

### Open the Project in your Browser

![Open the Project in your Browser](bin/assets/open-project.png)

### Start Building your Radix dApp

Check out README.md in your new project for more information on how to get
started building your Radix dApp.

## Contributing

To create a new template for the create-radix-dapp package, add a new project to
the official-examples repository in the getting-started directory. Add a new
object to the templates array and ensure that the install step is correct for
the new template.

## Testing Locally

Clone this repository and run the following command from the it's root to link
the package to your local NPM registry: `npm link`

You can then run the following command anywhere on your system to test the
application: `npx create-radix-dapp@latest` and follow the prompts to scaffold a
new dApp project.

Once deployed to NPM there is no need to install the package globally, you can
simply run: `npx create-radix-dapp@latest` and follow the prompts to scaffold a
new Radix dApp project.

# License

The Create Radix dApp binaries licensed under the
[Radix Generic EULA](https://www.radixdlt.com/terms/genericEULA).

The Create Radix dApp code is released under the
[Apache 2.0 license](./LICENSE).

```
Copyright 2023 Radix Publishing Ltd

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.

You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and limitations under the License.
```
npm package: @radixdlt/create-radix-dapp
Description: A new project scaffolding tool for quickly bootstrapping a new Radix dApp project.
Author: Bryan Sharpley
Latest version: 0.0.6
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

## Testing Locally
Clone this repository and run the following command to link the package to your local NPM registry:
`npm link`

You can then run the following command anywhere on your system to test the application:
`npx create-radix-dapp` and follow the prompts to scaffold a new dApp project.

Once deployed to NPM there is no need to install the package globally, you can simply run:
`npx create-radix-dapp` and follow the prompts to scaffold a new Radix dApp project.

## Contributing
To create a new template create a new folder in the `templates` directory. The folder name will be the name of the template. The folder should contain a `template` folder which is named to represent the template it contains. Each template should contain the appropriate License. The template should also contain a `README.md` file explaining how to use the template.
npm package: @radixdlt/crypto
Description: Cryptographic primitives such as digests (hashing) and Elliptic Curve Cryptography (ECC) methods such as key generation, signing and verify.
Author: Alexander Cyon
Latest version: 2.1.17

# `@radixdlt/crypto`

> TODO: description

## Usage

```
const radixCrypto = require('@radixdlt/crypto')

// TODO: DEMONSTRATE API
```
npm package: @radixdlt/data-formats
Description: Data formats used for serialization.
Author: Alexander Cyon
Latest version: 2.1.8

# `@radixdlt/data-formats`

## Usage
### JSON Decoding


#### Examples

Without dependencies, using provided taggedStringDecoder:

```typescript
import { JSONDecoding, taggedStringDecoder } from '@radixdlt/data-formats'

const strTagDecoder = taggedStringDecoder(':str:')((value) => ok(value))

const { fromJSON } = JSONDecoding.withDecoders(strTagDecoder).create()

fromJSON(':str:xyz') // Ok('xyz')
```

An object with dependencies:

```typescript
import { JSONDecoding, taggedStringDecoder } from '@radixdlt/data-formats'
import { ok } from 'neverthrow'

const strTagDecoder = taggedStringDecoder(':str:')((value) => ok(value))

const Object1 = {
    ...JSONDecoding.withDecoders(strTagDecoder).create()
}

const tstTagDecoder = taggedStringDecoder(':tst:')((value) => ok(value))

const { fromJSON } = JSONDecoding
	.withDependencies(Object1)
	.withDecoders(testTagDecoder)
	.create()

fromJSON({
    a: ':str:foo',
    b: ':tst:bar'
}) // ok({ a: 'foo', b: 'bar' })
```

JSON decoding takes an object and applies `decoder`s to each key-value pair. `taggedObjectDecoder` and `taggedStringDecoder` are provided, but you can easily define a new decoder. Here is how `taggedStringDecoder` is defined:

```typescript
import { decoder } from '@radixdlt/data-formats'

export const taggedStringDecoder = (tag: string) => <T>(
	algorithm: (value: string) => Result<T, Error>,
): Decoder =>
	decoder<T>((value) =>
		isString(value) && `:${value.split(':')[1]}:` === tag
			? algorithm(value.slice(tag.length))
			: undefined,
	)
```

A `decoder` should supply a function that defines how the decoding should be applied. First it should do some validation logic (does this decoder apply to this value?), in this case checking if the value is a string and if has a matching tag. Then, apply some `algorithm` function, which is the actual decoding (create an instance of some object). If the validation fails, the decoder has to return `undefined`.