@bankofai/wallet-cli-bai-plugin 0.0.0-stage → 0.1.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 BANK OF AI
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,62 @@
1
- # Temporary Holding Version
1
+ # @bankofai/wallet-cli-bai-plugin
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ `bai` is a plugin for [wallet-cli](https://github.com/tronprotocol/wallet-cli). B.AI ([b.ai](https://b.ai/)) provides
4
+ language, image and video model services, chat access and an AI API, with usage paid from credits that
5
+ can be topped up. The plugin shows a B.AI account's credits, usage records and recharge orders, and
6
+ recharges the account with stablecoins through an x402 payment, which it makes itself: the separate `x402`
7
+ plugin need not be installed.
8
+
9
+ It needs wallet-cli with plugin support ([Requirements](#requirements)) and a B.AI API key
10
+ ([Credentials and settings](#credentials-and-settings)); a recharge runs on mainnet only.
11
+
12
+ ## Requirements
13
+
14
+ - wallet-cli with plugin support and a plugin SDK of version 1.1 or a later 1.x (this package declares
15
+ `sdkVersion` `^1.1.0`). Plugin support is on wallet-cli's `feat/plugin-architecture` branch and not
16
+ yet in a release.
17
+ - Node.js 22.23.4+, 24.22.1+ or 26.12.1+.
18
+
19
+ ## Install
20
+
21
+ wallet-cli installs a plugin only by its npm package name. This package is not on npm yet; until it is,
22
+ publish it to a private or local npm registry and set `pluginRegistry` to it, as the
23
+ [wallet-cli plugins guide](https://github.com/tronprotocol/wallet-cli/blob/develop/ts/docs/guide/plugins.md) describes.
24
+
25
+ ```bash
26
+ wallet-cli plugin install @bankofai/wallet-cli-bai-plugin
27
+ wallet-cli plugin list
28
+ ```
29
+
30
+ ## Commands
31
+
32
+ | Command | What it does |
33
+ |---|---|
34
+ | [`bai recharge`](https://github.com/BofAI/wallet-cli-plugins/blob/main/packages/bai/docs/commands/recharge.md) | Recharge your own or another B.AI account |
35
+ | [`bai report-recharge`](https://github.com/BofAI/wallet-cli-plugins/blob/main/packages/bai/docs/commands/report-recharge.md) | Report an existing recharge transaction without paying again |
36
+ | [`bai usage-summary`](https://github.com/BofAI/wallet-cli-plugins/blob/main/packages/bai/docs/commands/usage-summary.md) | Show B.AI usage summary |
37
+ | [`bai usage-records`](https://github.com/BofAI/wallet-cli-plugins/blob/main/packages/bai/docs/commands/usage-records.md) | List individual B.AI usage records |
38
+ | [`bai recharge-orders`](https://github.com/BofAI/wallet-cli-plugins/blob/main/packages/bai/docs/commands/recharge-orders.md) | List B.AI recharge orders |
39
+
40
+ `wallet-cli bai <command> --help` shows the options of each command. What the plugin adds to wallet-cli's
41
+ JSON output and error codes is in [machine-interface.md](https://github.com/BofAI/wallet-cli-plugins/blob/main/packages/bai/docs/machine-interface.md).
42
+
43
+ ## Credentials and settings
44
+
45
+ Your B.AI API key, set with wallet-cli's [`config`](https://github.com/tronprotocol/wallet-cli/blob/develop/ts/docs/commands/config.md) from stdin:
46
+
47
+ ```bash
48
+ printf '%s\n' "$BAI_KEY" | wallet-cli config baiApiKey --api-key-stdin
49
+ ```
50
+
51
+ When `--gasfree-relay gasfree` (the GasFree Open API) is selected, a recharge also needs the API key and
52
+ secret of the GasFree service (`gasfreeApiKey`, `gasfreeApiSecret`, set the same way), whatever the scheme,
53
+ also to validate its options and for a dry run. The default `official` relay and an HTTPS relay URL of your
54
+ own need none. This plugin declares the keys itself; the separate `gasfree` plugin need not be
55
+ installed. The GasFree service of a network then comes from the `gasfree` block of that
56
+ network in wallet-cli's `config.yaml`; mainnet and Nile have builtin defaults, which a written block
57
+ replaces whole.
58
+
59
+ ## License
60
+
61
+ [MIT](https://github.com/BofAI/wallet-cli-plugins/blob/main/LICENSE). The licences of the third-party packages bundled into `dist/index.mjs` are in
62
+ `dist/THIRD_PARTY_LICENSES.txt`.