massa 1.6.1 copy "massa: ^1.6.1" to clipboard
massa: ^1.6.1 copied to clipboard

Massa package is an SDK that connects your Dart and Flutter applications to the Massa blockchain, create wallet, send transactions, and work with smart contracts.

massa #

pub.dev Stars Issues MIT License

Massa is a public blockchain and protocol that aims to deliver decentralization, scale and security for many people. It uses PROOF OF STAKE consensus mechanism to ensures full participation, protection, and high transaction throughput.

Introduction #

Massa-dart is an SDK that is able to connect your Dart and Flutter applications to the Massa blockchain, create wallet, send transactions, and work with smart contracts.

Features #

This package will allows you to interact with massa blockchain using the folloiwng public and privated grpc methods.

GRPC Public API (node_ip:33037) #

  • ✅ executeReadOnlyCall
  • ✅ getBlocks
  • ✅ getDataStoreEntries
  • ✅ getNextBlockBestParents
  • ✅ getOperations
  • ✅ getScExecutionEvents
  • ✅ getSelectorDraw
  • ✅ getStakers
  • ✅ getStatus
  • ✅ getTransactionThroughput
  • ✅ queryState
  • ✅ newBlocks
  • ✅ newEndorsements
  • ✅ newFilledBlocks
  • ✅ newOperations
  • ✅ newSlotExecutionOutputs
  • ✅ sendBlocks
  • ✅ sendEndorsements
  • ✅ sendOperations
  • ✅ transactionThroughput

GRPC Private API (node_ip:33038) #

  • ✅ addToBootstrapBlacklist
  • ✅ addToBootstrapWhitelist
  • ✅ addToPeersWhitelist
  • ✅ addStakingSecretKeys
  • ✅ allowEveryoneToBootstrap
  • ✅ banNodesByIds
  • ✅ banNodesByIps
  • ✅ getBootstrapBlacklist
  • ✅ getBootstrapWhitelist
  • ✅ getMipStatus
  • ✅ getNodeStatus
  • ✅ getPeersWhitelist
  • ✅ removeFromBootstrapBlacklist
  • ✅ removeFromBootstrapWhitelist
  • ✅ removeFromPeersWhitelist
  • ✅ removeStakingAddresses
  • ✅ signMessages
  • ✅ shutdownGracefully
  • ✅ unbanNodesByIds
  • ✅ unbanNodesByIps

Getting started #

Check usage in /test folder.

Usage #

View more examples in /example folder.

The example below shows how to get list of stakers

import 'package:massa/massa.dart';

Future<void> main() async {
  const ipAddress = 'test.massa.net';
  const port = 33037;
  var grpc = GRPCPublicClient(ipAddress, port);
  final stakers = await grpc.getStakers(limit: Int64(10));
  if (stakers.isEmpty) {
    print('No stakers found');
    return;
  }

  final totalAddresses = stakers.length;
  Int64 totalRolls = Int64(0);
  for (var staker in stakers) {
    print('${staker.address}:${staker.rolls}');
    totalRolls += staker.rolls;
  }
  print('Total addresses: $totalAddresses');
  print('Total rolls: $totalRolls');
  await grpc.shutDown();
}
copied to clipboard

Additional information #

You can get more information about massa by visiting the links below.

Support #

This project is supported by massa

Contribute #

You can contribute to this package, request new features or report any bug by visiting the package repository at massa-dart

License #

The MIT License (MIT). Please see License File for more information.

4
likes
0
points
98
downloads

Publisher

verified publishernafsi.world

Weekly Downloads

2024.08.20 - 2025.03.04

Massa package is an SDK that connects your Dart and Flutter applications to the Massa blockchain, create wallet, send transactions, and work with smart contracts.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

base_codecs, cryptography, fixnum, grpc, hex, http2, pointycastle, protobuf, retry

More

Packages that depend on massa