Skip to content

Commit

Permalink
Fix production run
Browse files Browse the repository at this point in the history
  • Loading branch information
jandrad committed Apr 24, 2024
1 parent d40d773 commit a381794
Show file tree
Hide file tree
Showing 6 changed files with 1,763 additions and 2,805 deletions.
70 changes: 20 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ The NeftyBlocks CLI is a tool that will help you manage your collections by crea
* [Installation](#installation)
* [Configuration](#configuration)
* [Quick Start](#quick-start)
* [Create templates](#create-templates)
* [Mint assets](#mint-assets)
* [Generate PFPs](#generate-pfps)
* [Transfer tokens](#transfer-tokens)
* [XLS files](#xls-files)
* [Commands](#commands)
<!-- tocstop -->
Expand Down Expand Up @@ -50,7 +46,7 @@ $ npm install -g @nefty/cli
$ nefty COMMAND
running command...
$ nefty (--version)
@nefty/cli/0.2.0 darwin-arm64 node-v18.12.1
@nefty/cli/0.2.1 darwin-arm64 node-v18.19.1
$ nefty --help [COMMAND]
USAGE
$ nefty COMMAND
Expand Down Expand Up @@ -242,7 +238,6 @@ The token transfer file is used to define the tokens to be transferred, the reci
<!-- commands -->
* [`nefty assets`](#nefty-assets)
* [`nefty assets mint INPUT`](#nefty-assets-mint-input)
* [`nefty assets transfer INPUT`](#nefty-assets-transfer-input)
* [`nefty config`](#nefty-config)
* [`nefty config auth`](#nefty-config-auth)
* [`nefty config get`](#nefty-config-get)
Expand Down Expand Up @@ -274,7 +269,7 @@ DESCRIPTION
Manages a collection's assets.
```

_See code: [dist/commands/assets/index.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.0/src/commands/assets/index.ts)_
_See code: [dist/commands/assets/index.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.1/src/commands/assets/index.ts)_

## `nefty assets mint INPUT`

Expand All @@ -299,32 +294,7 @@ EXAMPLES
$ nefty assets mint test.xls -c alpacaworlds
```

_See code: [dist/commands/assets/mint.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.0/src/commands/assets/mint.ts)_

## `nefty assets transfer INPUT`

Mints assets in batches using a spreadsheet.

```
USAGE
$ nefty assets transfer INPUT -c <value> [-b <value>] [-i]
ARGUMENTS
INPUT Excel file with the templates and amounts
FLAGS
-b, --batchSize=<value> [default: 100] Transactions batch size
-c, --collectionName=<value> (required) Collection name
-i, --ignoreSupply Ignore supply errors
DESCRIPTION
Mints assets in batches using a spreadsheet.
EXAMPLES
$ nefty assets transfer test.xls -c alpacaworlds
```

_See code: [dist/commands/assets/transfer.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.0/src/commands/assets/transfer.ts)_
_See code: [dist/commands/assets/mint.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.1/src/commands/assets/mint.ts)_

## `nefty config`

Expand All @@ -338,7 +308,7 @@ DESCRIPTION
Manages the configuration.
```

_See code: [dist/commands/config/index.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.0/src/commands/config/index.ts)_
_See code: [dist/commands/config/index.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.1/src/commands/config/index.ts)_

## `nefty config auth`

Expand All @@ -357,7 +327,7 @@ EXAMPLES
$ nefty config auth auth
```

_See code: [dist/commands/config/auth.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.0/src/commands/config/auth.ts)_
_See code: [dist/commands/config/auth.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.1/src/commands/config/auth.ts)_

## `nefty config get`

Expand All @@ -374,7 +344,7 @@ EXAMPLES
$ nefty config get
```

_See code: [dist/commands/config/get.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.0/src/commands/config/get.ts)_
_See code: [dist/commands/config/get.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.1/src/commands/config/get.ts)_

## `nefty config init`

Expand All @@ -394,7 +364,7 @@ EXAMPLES
$ nefty config init
```

_See code: [dist/commands/config/init.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.0/src/commands/config/init.ts)_
_See code: [dist/commands/config/init.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.1/src/commands/config/init.ts)_

## `nefty config set [PROPERTY] [VALUE]`

Expand All @@ -417,7 +387,7 @@ EXAMPLES
$ nefty config set explorerUrl https://waxblock.io
```

_See code: [dist/commands/config/set.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.0/src/commands/config/set.ts)_
_See code: [dist/commands/config/set.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.1/src/commands/config/set.ts)_

## `nefty generate`

Expand All @@ -431,7 +401,7 @@ DESCRIPTION
Generates files to use in other batch commands.
```

_See code: [dist/commands/generate/index.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.0/src/commands/generate/index.ts)_
_See code: [dist/commands/generate/index.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.1/src/commands/generate/index.ts)_

## `nefty generate mint-file OUTPUT`

Expand Down Expand Up @@ -463,7 +433,7 @@ EXAMPLES
$ nefty generate mint-file mints.xlsx -c alpacaworlds
```

_See code: [dist/commands/generate/mint-file.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.0/src/commands/generate/mint-file.ts)_
_See code: [dist/commands/generate/mint-file.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.1/src/commands/generate/mint-file.ts)_

## `nefty generate pfp-file OUTPUT`

Expand Down Expand Up @@ -495,7 +465,7 @@ EXAMPLES
$ nefty generate pfp-file pfp-layers.xlsx -l Body -l Face -l Hair -a
```

_See code: [dist/commands/generate/pfp-file.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.0/src/commands/generate/pfp-file.ts)_
_See code: [dist/commands/generate/pfp-file.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.1/src/commands/generate/pfp-file.ts)_

## `nefty generate template-file OUTPUT`

Expand Down Expand Up @@ -527,7 +497,7 @@ EXAMPLES
$ nefty generate template-file templates.xlsx -c alpacaworlds
```

_See code: [dist/commands/generate/template-file.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.0/src/commands/generate/template-file.ts)_
_See code: [dist/commands/generate/template-file.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.1/src/commands/generate/template-file.ts)_

## `nefty generate token-transfer-file OUTPUT`

Expand All @@ -549,7 +519,7 @@ EXAMPLES
$ nefty generate token-transfer-file transfers.xlsx
```

_See code: [dist/commands/generate/token-transfer-file.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.0/src/commands/generate/token-transfer-file.ts)_
_See code: [dist/commands/generate/token-transfer-file.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.1/src/commands/generate/token-transfer-file.ts)_

## `nefty help [COMMANDS]`

Expand Down Expand Up @@ -583,7 +553,7 @@ DESCRIPTION
Commands to manage a PFP collection.
```

_See code: [dist/commands/pfps/index.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.0/src/commands/pfps/index.ts)_
_See code: [dist/commands/pfps/index.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.1/src/commands/pfps/index.ts)_

## `nefty pfps generate INPUT OUTPUT`

Expand Down Expand Up @@ -611,7 +581,7 @@ EXAMPLES
$ nefty pfps generate pfps-specs.xlsx pfps
```

_See code: [dist/commands/pfps/generate.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.0/src/commands/pfps/generate.ts)_
_See code: [dist/commands/pfps/generate.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.1/src/commands/pfps/generate.ts)_

## `nefty templates`

Expand All @@ -625,7 +595,7 @@ DESCRIPTION
Manages a collection's templates.
```

_See code: [dist/commands/templates/index.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.0/src/commands/templates/index.ts)_
_See code: [dist/commands/templates/index.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.1/src/commands/templates/index.ts)_

## `nefty templates create INPUT`

Expand All @@ -649,7 +619,7 @@ EXAMPLES
$ nefty templates create template.xls -c alpacaworlds
```

_See code: [dist/commands/templates/create.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.0/src/commands/templates/create.ts)_
_See code: [dist/commands/templates/create.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.1/src/commands/templates/create.ts)_

## `nefty templates export OUTPUT`

Expand Down Expand Up @@ -681,7 +651,7 @@ EXAMPLES
$ nefty templates export templates.xlsx -c alpacaworlds
```

_See code: [dist/commands/templates/export.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.0/src/commands/templates/export.ts)_
_See code: [dist/commands/templates/export.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.1/src/commands/templates/export.ts)_

## `nefty tokens`

Expand All @@ -695,7 +665,7 @@ DESCRIPTION
Manages an account's tokens
```

_See code: [dist/commands/tokens/index.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.0/src/commands/tokens/index.ts)_
_See code: [dist/commands/tokens/index.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.1/src/commands/tokens/index.ts)_

## `nefty tokens transfer INPUT`

Expand All @@ -718,5 +688,5 @@ EXAMPLES
$ nefty tokens transfer test.xls
```

_See code: [dist/commands/tokens/transfer.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.0/src/commands/tokens/transfer.ts)_
_See code: [dist/commands/tokens/transfer.ts](https://github.com/neftyblocks/neftyblocks-cli/blob/v0.2.1/src/commands/tokens/transfer.ts)_
<!-- commandsstop -->
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nefty/cli",
"version": "0.2.1",
"version": "0.2.2",
"description": "The NeftyBlocks cli will help you manage your collection with commands to create templates, mint assets, and more.",
"author": "NeftyBlocks",
"bin": {
Expand All @@ -21,17 +21,16 @@
"@oclif/core": "^2",
"@oclif/plugin-help": "5.2.19",
"@oclif/plugin-not-found": "2.4.1",
"@wharfkit/session": "^1.0.0",
"@wharfkit/wallet-plugin-anchor": "^1.0.0",
"@wharfkit/session": "^1.2.7",
"@wharfkit/wallet-plugin-anchor": "^1.3.0",
"@wharfkit/wallet-plugin-privatekey": "^1.0.0",
"atomicassets": "^1.5.1",
"cli-progress": "^3.12.0",
"node-fetch": "2.6.7",
"qrcode-terminal": "^0.12.0",
"read-excel-file": "^5.6.1",
"sharp": "^0.32.5",
"write-excel-file": "^1.4.27",
"ws": "^8.16.0"
"write-excel-file": "^1.4.27"
},
"devDependencies": {
"@oclif/test": "^2.3.25",
Expand All @@ -49,7 +48,7 @@
"husky": "^8.0.0",
"lint-staged": "^14.0.1",
"mocha": "^9",
"oclif": "^3",
"oclif": "^4",
"prettier": "^3.0.3",
"shx": "^0.3.3",
"ts-node": "^10.9.1",
Expand Down Expand Up @@ -93,7 +92,7 @@
"fixreadme": "sed -i'.original' -e 's/\\/dist\\/commands/\\/src\\/commands/g' README.md"
},
"engines": {
"node": ">=16.17.0"
"node": ">=18.0.0"
},
"bugs": "https://github.com/neftyblocks/neftyblocks-cli/issues",
"keywords": [
Expand Down
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export { run } from '@oclif/core';
Object.assign(global, { WebSocket: require('ws') });
5 changes: 5 additions & 0 deletions src/services/antelope-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ import { WalletPluginAnchor } from '@wharfkit/wallet-plugin-anchor';
import { ConsoleUserInterface } from '../wallet/ConsoleRenderer';
import { createSessionStorage } from '../wallet/WalletSessionStorage';
import { WalletPluginSecurePrivateKey } from '../wallet/WalletPluginSecurePrivateKey';
import WebSocket from 'isomorphic-ws';

let apiClient: APIClient;
let session: Session | undefined;

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
global.WebSocket = WebSocket;

export function getApiClient(rpcUrl: string): APIClient {
if (!apiClient) {
apiClient = new APIClient({
Expand Down
8 changes: 7 additions & 1 deletion src/wallet/ConsoleRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ YOU ACKNOWLEDGE THAT THIS SOFTWARE IS NOT DESIGNED, LICENSED OR INTENDED FOR USE
IN THE DESIGN, CONSTRUCTION, OPERATION OR MAINTENANCE OF ANY MILITARY FACILITY.
*/

import { Checksum256, PermissionLevel } from '@wharfkit/session';
import { Checksum256, PermissionLevel, UserInterfaceAccountCreationResponse } from '@wharfkit/session';
import {
cancelable,
Cancelable,
Expand Down Expand Up @@ -132,6 +132,12 @@ export class ConsoleUserInterface implements UserInterface {
*/
}

async onAccountCreateComplete(): Promise<void> {}

async onAccountCreate(): Promise<UserInterfaceAccountCreationResponse> {
return {};
}

translate(): string {
return '';
}
Expand Down
Loading

0 comments on commit a381794

Please sign in to comment.