Cross-ledger messaging in blockchains