open-index/open-npm huggingface dataset:
npm package: @p.network/ptokens
Description: This package is a unique entrypoint for all `ptokens.js` packages. To integrate your project within your application, it will be sufficient to just import `ptokens` (https://www.npmjs.com/package/ptokens).
Latest version: 1.7.1

This package is a unique entrypoint for all `ptokens.js` packages.
To integrate your project within your application, it will be sufficient to just import `ptokens` (https://www.npmjs.com/package/ptokens).

See the full documentation [here](https://pnetwork-association.github.io/ptokens.js).
npm package: @p.network/ptokens-assets-algorand
Description: This package permits to create a `pTokensAlgorandAsset` object for creating a swap.
Latest version: 1.7.1

This package permits to create a `pTokensAlgorandAsset` object for creating a swap.

A `pTokensAlgorandAsset` object can be created as follows:
```ts
const {
  ChainId,
  pTokensNode,
  pTokensNodeProvider,
  pTokensAlgorandAssetBuilder,
} = require('ptokens')

const PNETWORK_NODE = 'https://pnetwork-node-2a.eu.ngrok.io/v3'

// create a pTokensNodeProvider and pTokensNode to interact with pNetwork
const provider = new pTokensNodeProvider(PNETWORK_NODE)
const node = new pTokensNode(provider)

// create builder
const algorandBuilder = new pTokensAlgorandAssetBuilder(node)

// create an Algorand asset for pBTC on Algorand Mainnet
algorandBuilder.setBlockchain(ChainId.AlgorandMainnet)
algorandBuilder.setSymbol('pbtc')
const algorandAsset = await algorandBuilder.build()
```

See the full documentation [here](https://pnetwork-association.github.io/ptokens.js/modules/pTokens_Algorand_Asset.html).
npm package: @p.network/ptokens-assets-eosio
Description: This package permits to create a `pTokensEosioAsset` object for creating a swap.
Latest version: 1.7.1

This package permits to create a `pTokensEosioAsset` object for creating a swap.

A `pTokensEosioAsset` object can be created as follows:
```ts
const {
  ChainId,
  pTokensNode,
  pTokensNodeProvider,
  pTokensEosioAssetBuilder,
} = require('ptokens')

const PNETWORK_NODE = 'https://pnetwork-node-2a.eu.ngrok.io/v3'

// create a pTokensNodeProvider and pTokensNode to interact with pNetwork
const provider = new pTokensNodeProvider(PNETWORK_NODE)
const node = new pTokensNode(provider)

// create builders
const eosioBuilder = new pTokensEosioAssetBuilder(node)

// create an EOSIO asset for pBTC on EOS Mainnet
eosioBuilder.setBlockchain(ChainId.EosMainnet)
eosioBuilder.setSymbol('pbtc')
const eosioAsset = await eosioBuilder.build()
```

See the full documentation [here](https://pnetwork-association.github.io/ptokens.js/modules/pTokens_EOSIO_asset.html).
npm package: @p.network/ptokens-assets-evm
Description: This package permits to create a `pTokensEvmAsset` object for creating a swap.
Latest version: 1.7.1

This package permits to create a `pTokensEvmAsset` object for creating a swap.

A `pTokensEvmAsset` object can be created as follows:
```ts
const {
  ChainId,
  pTokensNode,
  pTokensNodeProvider,
  pTokensEvmAssetBuilder,
} = require('ptokens')

const PNETWORK_NODE = 'https://pnetwork-node-2a.eu.ngrok.io/v3'

// create a pTokensNodeProvider and pTokensNode to interact with pNetwork
const provider = new pTokensNodeProvider(PNETWORK_NODE)
const node = new pTokensNode(provider)

// create builders
const evmBuilder = new pTokensEvmAssetBuilder(node)

// create an EVM asset for pBTC on Ethereum Mainnet
evmBuilder.setBlockchain(ChainId.EthereumMainnet)
evmBuilder.setSymbol('pbtc')
const evmAsset = await evmBuilder.build()
```

See the full documentation [here](https://pnetwork-association.github.io/ptokens.js/modules/pTokens_EVM_asset.html).
npm package: @p.network/ptokens-assets-utxo
Description: This package permits to create a `pTokensUtxoAsset` object for creating a swap.
Latest version: 1.7.1

This package permits to create a `pTokensUtxoAsset` object for creating a swap.

A `pTokensUtxoAsset` object can be created as follows:
```ts
const {
  ChainId,
  pTokensNode,
  pTokensNodeProvider,
  pTokensUtxoAssetBuilder,
} = require('ptokens')

const PNETWORK_NODE = 'https://pnetwork-node-2a.eu.ngrok.io/v3'

// create a pTokensNodeProvider and pTokensNode to interact with pNetwork
const provider = new pTokensNodeProvider(PNETWORK_NODE)
const node = new pTokensNode(provider)

// create builders
const utxoBuilder = new pTokensUtxoAssetBuilder(node)

// create a UTXO asset for BTC on Bitcoin Mainnet
utxoBuilder.setBlockchain(ChainId.BitcoinMainnet)
utxoBuilder.setSymbol('btc')
const utxoAsset = await utxoBuilder.build()
```

See the full documentation [here](https://pnetwork-association.github.io/ptokens.js/modules/pTokens_UTXO_asset.html).
npm package: @p.network/ptokens-node
Description: This package permits to create a pTokens node object for interacting with the pNetwork.
Latest version: 1.7.1

This package permits to create a pTokens node object for interacting with the pNetwork.

A pNetwork node can be created as follows:
```ts
const { pTokensNode, pTokensNodeProvider } = require('ptokens')
const PNETWORK_NODE = 'https://pnetwork-node-2a.eu.ngrok.io/v3'

// create a pTokensNodeProvider and pTokensNode to interact with pNetwork
const provider = new pTokensNodeProvider(PNETWORK_NODE)
const node = new pTokensNode(provider)
```

See the full documentation [here](https://pnetwork-association.github.io/ptokens.js/modules/pTokens_Node.html).
npm package: @p.network/ptokens-swap
Description: This package permits to build a `pTokensSwap` from a `pTokensSwapBuilder` instance. The created `pTokensSwap` object can be called with a specific method `execute()` to initiate the swap: the method return a [PromiEvent](https://www.npmjs.com/package/prom
Latest version: 1.7.1

This package permits to build a `pTokensSwap` from a `pTokensSwapBuilder` instance. The created `pTokensSwap` object can be called with a specific method `execute()` to initiate the swap: the method return a [PromiEvent](https://www.npmjs.com/package/promievent), a particular Promise that can also emit events that can be listened.

In particular, given two pTokens Assets already build, the swap takes place as follows:
```ts
const PNETWORK_NODE = 'https://pnetwork-node-2a.eu.ngrok.io/v3'
const DESTINATION_ADDRESS: 'destination-address'

// create a pTokensNodeProvider and pTokensNode to interact with pNetwork
const provider = new pTokensNodeProvider(PNETWORK_NODE)
const node = new pTokensNode(provider)

// create swap builder
const swapBuilder = new pTokensSwapBuilder(node)

// create assets
let sourceAsset: pTokensAsset
let destinationAsset: pTokensAsset

// ...

// build the swap
swapBuilder.setSourceAsset(sourceAsset)
swapBuilder.addDestinationAsset(destinationAsset, DESTINATION_ADDRESS)
swapBuilder.setAmount(0.000001 * 10 ** 18)
const swap = swapBuilder.build()

try {
    // execute the swap and listen to events
    await swap
        .execute()
        .on('inputTxBroadcasted', (_) => console.info('inputTxBroadcasted', _))
        .on('inputTxConfirmed', (_) => console.info('inputTxConfirmed', _))
        .on('inputTxDetected', (_) => console.info('inputTxDetected', _))
        .on('outputTxDetected', (_) => console.info('outputTxDetected', _))
        .on('outputTxBroadcasted', (_) => console.info('outputTxBroadcasted', _))
        .on('outputTxConfirmed', (_) => console.info('outputTxConfirmed', _))
} catch (err) {
    console.info('err', err)
}
```

See the full documentation [here](https://pnetwork-association.github.io/ptokens.js/modules/pTokens_Swap.html).
npm package: @p00ls-games/sdk
Description: Browser library to integrate with p00ls games
Latest version: 4.8.0

# @p00ls-games/sdk

Browser library to integrate with p00ls games

## Using as library

### Browser

Here is an example on how to use in [Unity](https://github.com/p00ls-games-hosting/hello-world/tree/main/Assets/WebGLTemplates/P00LS)

### As lib

Use `npm install @p00ls-games/sdk` to install the library

## MonoRepo commands

## Building

Run `nx build p00ls-games-sdk` to build the library.

## Running unit tests

Run `nx test p00ls-games-sdk` to execute the unit tests via [Jest](https://jestjs.io).