Multiple messages transaction with a few members

Hello, Cosmos community!

I have an interesting situation, I need to implement some mechanism over cosmos-sdk, and that sounds like:

  1. Alice want to send something that she has to Bob and take some penny back from Bob
  2. Alice could make a multiple messages transaction sign it and send it to Bob.
  3. Bob would take that semi-signed partial request, inspect all the things inside the request. And if all is ok Bob could sign that request and send it to the blockchain

And that’s all, just three steps

There is a pseudo-code for step 2

{
    "body": {
        "messages": [
            {
                "@type": "send-something-message",
                "sender": "alice-address",
                "recipient": "bob-address"
            },
            {
                "@type": "send-penny-message",
                "sender": "bob-address",
                "recipient": "alice-address"
            }
        ]
    },
    "auth_info": {
        "signer_infos": [
            {
                "public_key": {
                    "@type": "/cosmos.crypto.secp256k1.PubKey",
                    "key": "alice-public-key"
                },
                "mode_info": {
                    "single": {
                        "mode": "SIGN_MODE_DIRECT"
                    }
                },
                "sequence": "1"
            }
        ],
        "fee": {
            "amount": [],
            "gas_limit": "200000",
            "payer": "",
            "granter": ""
        }
    },
    "signatures": [
        "alice-signature-with-sign-doc"
    ]
}

Look a the signer_infos and signatures here

And there is a 3 step json

{
    ...

    "auth_info": {
        "signer_infos": [
            {
                "public_key": {
                    "@type": "/cosmos.crypto.secp256k1.PubKey",
                    "key": "alice-public-key"
                },
                "mode_info": {
                    "single": {
                        "mode": "SIGN_MODE_DIRECT"
                    }
                },
                "sequence": "1"
            },
            {
                "public_key": {
                    "@type": "/cosmos.crypto.secp256k1.PubKey",
                    "key": "bob-public-key"
                },
                "mode_info": {
                    "single": {
                        "mode": "SIGN_MODE_DIRECT"
                    }
                },
                "sequence": "1"
            }
        ],
        ...
    },
    "signatures": [
        "alice-signature-with-sign-doc",
        "bob-signature-with-sign-doc"
    ]
}

Bob just add his signs and finish a complete transaction

And my question is: is it real to make something like this over cosmos-sdk with grpc broadcasts from clients?

Who will be charged with fees? Could it be Alice or Bob? Or it’s always someone who sends the transaction to the blockchain?

I think you should ask in the Cosmos Developers discord

don’t think so, but I will wait for the answer here and in the discord, thank you :slight_smile:

just for anyone who will faced with the same issue as me, in short, it’s my fault :]