open-index/open-npm huggingface dataset:
npm package: @polymedia/profile-sdk
Description: An SDK to interact with Polymedia Profile objects on the Sui network
Author: @juzybits
Latest version: 3.0.0

# Polymedia Profile: TypeScript SDK

A library to interact with the _PolymediaProfile_ package on Sui.

For an overview of Polymedia Profile, see [../../README.md](../../README.md).

For details about the Sui package, see [../../move/profile/README.md](../../move/profile/README.md).

## Installation
```bash
pnpm i @polymedia/profile-sdk
```

## Overview

The `ProfileClient` class can be used to fetch profile data from the network.

The [./src/package.ts](./src/package.ts) functions can be used to build transactions.

The `PolymediaProfile` type represents a Profile Sui object:
```ts
export type PolymediaProfile = {
    id: string;
    name: string;
    imageUrl: string;
    description: string;
    data: unknown;
    owner: string;
};
```

## Instantiate `ProfileClient`

```ts
import { ProfileClient } from "@polymedia/profile-sdk";
import { useSignTransaction, useSuiClient } from "@mysten/dapp-kit";

const suiClient = useSuiClient();
const { mutateAsync: walletSignTx } = useSignTransaction();

const profileClient = new ProfileClient({
    profilePkgId: "0x...",
    registryId: "0x...",
    suiClient,
    signTx: (tx) => walletSignTx({ transaction: tx }),
    // waitForTxOptions: ... optional ...
    // txRespOptions: ... optional ...
});
```

## Find profiles

`ProfileClient` keeps an internal cache to avoid wasteful RPC requests. You can skip the cache by passing the `useCache: false` argument to any of the methods below.

Use `ProfileClient.getProfileByOwner()` to find the profile associated to a single address:
```ts
profileClient.getProfileByOwner(
    '0x_USER_ADDRESS'
).then((profile: PolymediaProfile|null) => {
    // A null result means lookupAddress does not have a Profile in this Registry
}).catch(error => {
    // Handle RPC error
});
```

Use `ProfileClient.getProfilesByOwner()` to find the profiles associated to multiple addresses:
```ts
profileClient.getProfilesByOwner(
    ['0x_USER_ADDRESS_1', '0x_USER_ADDRESS_2'],
).then((profiles: Map<string, PolymediaProfile|null>) => {
    // ...
});
```

Use `ProfileClient.getProfileById()` to get a single profile by its object ID:
```ts
profileClient.getProfileById(
    '0x_PROFILE_ID',
)
.then((profile: PolymediaProfile|null) => {
    // A null result means the object does not exist
})
.catch((error: any) => {
    // Handle RPC error
});
```

use `ProfileClient.getProfilesById()` to get multiple profiles by their object IDs:
```ts
profileClient.getProfilesById(
    ['0x_PROFILE_ID_1', '0x_PROFILE_ID_2'],
)
.then((profiles: Map<string, PolymediaProfile|null>) => {
    // ...
});
```

Use `ProfileClient.hasProfile()` to check if an address has a profile associated to it:
```ts
profileClient.hasProfile(
    '0x_USER_ADDRESS'
).then((hasProfile: boolean) => {
    // ...
});
```
npm package: @polymedia/verify-msg
Description: Verify a Sui personal message signature
Author: @juzybits
Latest version: 0.0.5

# polymedia-verify-msg

CLI tool to verify Sui personal message signatures.

## Installation

```shell
npm install -g @polymedia/verify-msg
# or
pnpm add -g @polymedia/verify-msg
```

## Usage

```
Usage: polymedia-verify-msg [options]

Verify a Sui personal message signature

Options:
  -v, --version             output the version number
  -m, --message <string>    message that was signed
  -a, --address <string>    signer address
  -s, --signature <string>  signature to verify
  -h, --help                display help for command
```

## Example

```shell
polymedia-verify-msg \
    -m "Hello Sui" \
    -a "0x9859bde15e867d37256aa080b5d092a2ed09347601ebc751c4478cf26f882bea" \
    -s "ACUqih6ukoYyYmAqJ3mE9Yy0XxvnvOQuTKUumE1mOwfAcMIJWpsIcoU/1Jaij2ywjbMvik+NWUeRBPvg2HHYGQs7AdEIr//TRcmBsxmWwuzr9KVoj/MN1Vw+eHF1eqmckg=="
```

## Output Format

Success (exit code 0):
```json
{
    "success": true
}
```

Error (exit code 1):
```json
{
    "success": false,
    "error": "The error message"
}
```

## Related Links

- [Signing messages](https://sdk.mystenlabs.com/dapp-kit/wallet-hooks/useSignPersonalMessage)
- [Verifying signatures](https://github.com/MystenLabs/ts-sdks/blob/main/packages/typescript/src/verify/verify.ts)
npm package: @polymedia/zui
Description: zui: Sui command line tools
Author: @juzybits
Latest version: 0.0.14

# zui: Sui command line tools

![Polymedia Zui](https://assets.polymedia.app/img/zui/open-graph.webp)

## `zui -h`

```
Usage: zui [options] [command]

zui: Sui command line tools

Options:
  -V, --version       output the version number
  --json              output in JSON format
  -q, --quiet         suppress non-error output
  -v, --verbose       show debug output
  -h, --help          display help for command

Commands:
  bulksend            Airdrop coins to multiple addresses
  bytecode-transform  Modify Move bytecode by replacing constants and identifiers
  bytecode-publish    Publish Move bytecode files as a Sui package
  coin-send           Send a coin amount to an address
  coin-zero-destroy   Destroy all zero-balance coin objects
  coin-zero-send      Create and transfer zero-balance coins
  empty-wallet        Transfer all non-SUI objects to an address
  find-last-tx        Find the latest transaction for one or more Sui addresses
  find-coin-holders   Find coin holders and their balances
  find-nft-holders    Find unique holders of an NFT collection
  find-nfts           Find all NFTs (object ID, owner, and name) in a collection
  find-nft-verified   Find all NFT collections that are verified on TradePort
  msg-sign            Sign a Sui personal message with your active keypair
  msg-verify          Validate a Sui personal message signature
  rand-addr           Generate pseudorandom Sui addresses
  help                display help for command
```

## Installation

```
npm --global install @polymedia/zui
zui -h
```

If you'll fetch NFT data, set your Indexer.xyz credentials as environment variables:
```
export INDEXER_API_USER=your_username
export INDEXER_API_KEY=your_api_key
```


## Development

```
git clone https://github.com/juzybits/polymedia-zui.git
cd polymedia-zui
cd src/cli
pnpm i
pnpm zui -h
```

Optionally, create a `src/cli/.env` file with your Indexer.xyz credentials.