Send Raw Transactions to Orchestrate

To submit raw transactions to Orchestrate, use the SDK as usual, and

  1. Initialize a new Producer
  2. Submit different set of fields for Producer Payload

1. Initialize a new Producer

To enable sending transactions to the transaction sender, run:

const producer = await broker.producer("topic-tx-sender", [options])

options object (optional): see Kafka-node producer options.

2. Producer payload for raw transactions

To send a raw transaction, send the following fields to the producer.send method:

  • chainId

    • string(number)
    • The chain id of the blockchain sending the transactions to. If more than one, separated by commas.
    • Example: ‘3’, ‘42’
  • raw

    • string(hex)
    • Raw representation of a transaction, with signatures attached.
    • Example: ‘0xf86c258502540be40083…7cc31c6686b670bd85cbc6da2d6e85’
  • hash

    • string(hex)
    • Raw value of a hash, generated with ethereum compatible hash function keccak256, applied to the raw field.
    • Example: ‘0x58e5a0fc…4e44ba6f5eb8ba1b7eb’
  • metadata

    • string (hex)
    • This is an optional field, here you can include as many custom fields as you find useful to track.
    • Example:
      metadata: {
                extra: {
                  myfield1: 'mypersonalfieldvalue1', // Interesting information to track on Orchestrate logs
                  myfield2: 'mypersonalfieldvalue2', // Felt like tracking this
                },
      

Example

```
const producerPayload = {
    chainId: '42',
    Raw: '0xf86c258502540be40083...7cc31c6686b670bd85cbc6da2d6e85',
    Hash: '0x7e654d251da770a068413677967f6d3ea2fea9e4'
}
const tx = await producer.send(producerPayload)
```

Tip

All other fields of the Producer Payload are not used.