createExternalMessage function

Future<UnsignedMessage> createExternalMessage({
  1. required String dst,
  2. required String contractAbi,
  3. required String method,
  4. String? stateInit,
  5. required TokensObject input,
  6. required PublicKey publicKey,
  7. required Duration timeout,
})

Create external unsigned message that can be listened and handled or throws error

Implementation

Future<UnsignedMessage> createExternalMessage({
  required String dst,
  required String contractAbi,
  required String method,
  String? stateInit,
  required TokensObject input,
  required PublicKey publicKey,
  required Duration timeout,
}) async {
  return UnsignedMessage.create(
    message: await createLib().createExternalMessage(
      dst: dst,
      contractAbi: contractAbi,
      method: method,
      input: jsonEncode(input),
      publicKey: publicKey.publicKey,
      timeout: timeout.inMilliseconds,
      stateInit: stateInit,
    ),
  );
}