Module: MixinBot::Utils
- Defined in:
- lib/mixin_bot/utils.rb,
lib/mixin_bot/utils/crypto.rb,
lib/mixin_bot/utils/address.rb,
lib/mixin_bot/utils/decoder.rb,
lib/mixin_bot/utils/encoder.rb
Overview
Utility module providing various helper methods for Mixin Network operations.
This module aggregates utility methods from several sub-modules:
Sub-modules
- MixinBot::Utils::Address
-
Address-related utilities
- Main address handling
- Ghost key derivation
- Address validation
- MixinBot::Utils::Crypto
-
Cryptographic operations
- JWT token generation
- Key generation and management
- Transaction signing
- PIN encryption
- UUID generation
- MixinBot::Utils::Decoder
-
Data decoding utilities
- Integer decoding
- Transaction decoding
- Key decoding
- MixinBot::Utils::Encoder
-
Data encoding utilities
- Integer encoding
- Transaction encoding
- Binary packing
Usage
Access utilities through the MixinBot.utils shortcut:
# Generate a unique UUID
uuid = MixinBot.utils.unique_uuid(uuid1, uuid2)
# Generate access token
token = MixinBot.utils.access_token('GET', '/me', '')
# Encode a transaction
raw = MixinBot.utils.encode_raw_transaction(txn)
# Decode a key
key = MixinBot.utils.decode_key(encoded_key)
Defined Under Namespace
Modules: Address, Crypto, Decoder, Encoder
Constant Summary
Constants included from Address
Address::MAIN_ADDRESS_PREFIX, Address::MIX_ADDRESS_PREFIX, Address::MIX_ADDRESS_VERSION
Method Summary
Methods included from Address
build_main_address, build_mix_address, build_safe_recipient, burning_address, hash_members, parse_main_address, parse_mix_address
Methods included from Crypto
access_token, chunked, decrypt_pin, derive_ghost_private_key, derive_ghost_public_key, encrypt_pin, generate_ed25519_key, generate_group_conversation_id, generate_rsa_key, generate_trace_from_hash, generate_unique_uuid, generate_user_checksum, hash_scalar, make_unique_string_slice, multiply_keys, scalar_from_bytes, shared_public_key, sign, tip_public_key, unique_object_id, unique_uuid
Methods included from Decoder
decode_int, decode_key, decode_raw_transaction, decode_uint16, decode_uint32, decode_uint64, hex_to_uuid
Methods included from Encoder
bytes_of, encode_int, encode_raw_transaction, encode_uint16, encode_uint32, encode_uint64, nft_memo