#currency #bundlr #balance #command #address #arg #delete

bin+lib race-bundlr-sdk

Bundlr 网络Rust SDK,删除命令参数

3 个版本

0.5.2 2024 年 5 月 16 日
0.5.1 2024 年 5 月 14 日
0.5.0 2024 年 5 月 13 日

35#balance

Download history 232/week @ 2024-05-08 210/week @ 2024-05-15 27/week @ 2024-05-22 18/week @ 2024-05-29 2/week @ 2024-06-05 4/week @ 2024-06-12

每月 110 次下载
race-arweave 中使用

Apache-2.0

185KB
4.5K SLoC

Bundlr Rust SDK

使用 Rust 与 Bundlr 网络交互的 SDK。

示例

代码示例可以在 examples 目录中找到

客户端

要使用客户端二进制文件,您必须使用以下命令构建它:

cargo build --release --features="build-binary"

客户端二进制文件将在 target/release/cli 中生成。然后您可以使用以下命令执行二进制文件:./cli --help

USAGE:
    cli <SUBCOMMAND>

OPTIONS:
    -h, --help    Print help information

SUBCOMMANDS:
    balance       Gets the specified user's balance for the current Bundlr node
    fund          Funds your account with the specified amount of atomic units
    help          Print this message or the help of the given subcommand(s)
    price         Check how much of a specific currency is required for an upload of <amount>
                      bytes
    upload        Uploads a specified file
    upload-dir    Uploads a folder (with a manifest)
    withdraw      Sends a fund withdrawal request

示例

./cli balance   <address>   --host <host> --currency <currency>
./cli price     <bytes>     --host <host> --currency <currency>
./cli fund      <amount>    --host <host> --currency <currency> --wallet <path | private_key>
./cli withdraw  <amount>    --host <host> --currency <currency> --wallet <path | private_key>
./cli upload    <file>      --host <host> --currency <currency> --wallet <path | private_key>

路线图

一些功能仍在开发中。如果您需要使用其中之一,您可能希望查看 js-sdk,或者在存储库中创建一个问题。

项目 Arweave Solana Ethereum ERC20 Cosmos Aptos
余额 [x] [x] [x] [ ] [ ] [ ]
价格 [x] [x] [x] [ ] [ ] [ ]
资金 [x] [ ] [ ] [ ] [ ] [ ]
提现 [x] [ ] [ ] [ ] [ ] [ ]
上传 [x] [x] [x] [ ] [ ] [ ]
上传目录 [ ] [ ] [ ] [ ] [ ] [ ]
验证捆绑包 [x] [x] [x] [x] [x] [x]

测试

为了正确运行测试,您需要生成随机捆绑包。运行

npm install
npm run generate-bundles

res/gen_bundles 中生成随机捆绑包,然后运行

cargo test

依赖项

~22–39MB
~678K SLoC