encode method

Uint8List encode(
  1. ChainInfo chainInfo,
  2. Uint8List destination,
  3. BigInt amount
)

Implementation

Uint8List encode(ChainInfo chainInfo, Uint8List destination, BigInt amount) {
  final transferArgument = MapEntry(
    'Balances',
    MapEntry(
      method,
      {
        'dest': MapEntry('Id', destination),
        'value': amount,
      },
    ),
  );

  final ByteOutput output = ByteOutput();

  chainInfo.scaleCodec.registry.codecs['Call']!
      .encodeTo(transferArgument, output);
  return output.toBytes();
}