massa 1.6.1
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 #
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();
}
Additional information #
You can get more information about massa by visiting the links below.
Links #
- Massa: Massa main website
- Testnet: Massa testnet
- Massa Documentation: Valuable massa documentation
- Massa Github: Massa official github repository
- Massa Web3: massa-dart will have similar functionalities as massa-web3
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.