#helper #lib #timestamp #account #type #wallet #transfer

b3_helper_lib

This is helper library for B3Wallet project

5 releases

0.0.5 Jul 18, 2023
0.0.4 Jul 18, 2023
0.0.3 Jul 17, 2023
0.0.2 Jul 17, 2023
0.0.1 Jul 17, 2023

#130 in #transfer

MIT license

100KB
2.5K SLoC

B3 Helper Library

B3Helper Library is a Rust library designed to simplify the development of applications and wallets on the Internet Computer. It provides utility functions and types for handling various operations such as transfers, tokens, timestamps, and more.

For more detailed examples, see the documentation.

License

This project is licensed under the MIT License.


lib.rs:

B3Helper Library

b3_helper_lib is a Rust library designed to simplify the development of applications and wallets on the Internet Computer. It provides utility functions and types for handling various operations such as transfers, tokens, timestamps, and more.

Features

  • Account - Create and manage accounts.
  • Constants - Constants used by the library.
  • Currency - Currency types and conversion functions.
  • Environment - Environment types and conversion functions.
  • Error - Error types and conversion functions.
  • Owner - Owner types and conversion functions.
  • Release - Release types and conversion functions.
  • Subaccount - Subaccount types and conversion functions.
  • System - System types and conversion functions.
  • Timestamp - Timestamp types and conversion functions.
  • Types - Types used by the library.
  • Utils - Utility functions.
  • Wallet - Wallet types and conversion functions.
  • Wasm - Wasm types and conversion functions.

Examples

Here's a simple example of how to create a new icrc1 account :

use b3_helper_lib::ICRCAccount;
use b3_helper_lib::Subaccount;
use b3_helper_lib::Environment;
use candid::Principal;

let owner = Principal::from_text("b7pqa-qqaaa-aaaap-abdva-cai").unwrap();
let subaccount = Subaccount::new(Environment::Production, 1);

let account = ICRCAccount::new(owner, Some(subaccount));

assert_eq!(account.to_text(), "b7pqa-qqaaa-aaaap-abdva-cai-vpwy45i.1");

For more detailed examples, see the documentation for each module.

More Information

For more information, see the API documentation.

Contributing

We welcome contributions to the B3 Helper Library! Please see our contributing guide for more details.

License

This project is licensed under the MIT License.

Dependencies

~5–12MB
~134K SLoC