Message Sender

Get signed pending on-chain messages from the Bridge node

API Endpoint

https://bridge.endless.link/msg/msgs/{target_chain}/{executor_contract_address}/{last_message_timestamp}

Request Method

GET

Request Parameters:

  • target_chain:The chain ID of the target blockchain.

  • executor_contract_address:The address of the executor contract on the target chain.

  • last_message_timestamp:The timestamp of the last retrieved message. Use 0 if fetching for the first time.

Example Request

https://bridge.endless.link/msg/msgs/0-221/8s1Z9CEF9t8aV1MUdHoR8ViZ3V49ycW4duvueb78DqZZ/1737457503000

Example Response

[{
    "no": 1737457503000,
    "msg": {
        "head": {
            "type": 0,
            "nonce": 39,
            "from_chain": {
                "vm": "Solana",
                "id": 103
            },
            "from_addr": "DwZPNgo4Qtxw2PcbSVgs16kVzynhBLHMF1iz9Js1efY5",
            "to_chain": {
                "vm": "Endless",
                "id": 221
            },
            "to_addr": "8s1Z9CEF9t8aV1MUdHoR8ViZ3V49ycW4duvueb78DqZZ",
            "fee_relay": 4
        },
        "body": "069b8857feab8184fb687f634618c035dac439dc1aeb3b5598a0f000000000010000000000000000000000000061a800003e77bbd14390f1c817f346b16b4a673fa229fb8a9866b1b5ca492270457ecf469cb1cfa8296a52c4a6b9fff024b20dec50ac80dc6238979e7668bceb6b9d16",
        "fee_msger": 4,
        "from_block": 355618888,
        "from_hash": {
            "hash": "232szfkDHR2QeGeo96n4ANy2iMLBEdFCD9dJeiRmYphMX3zymyKHZZtcWFAV8HrRrHmNpk5FaWzjgE5NwUcSQMG3",
            "chain": {
                "vm": "Solana",
                "id": 103
            }
        }
    },
    "sig": [{
        "pubkey": "78ovkFF2NnH65J6B8ZkoK8fqT18BvKzdJdWFgqg7fJ8ScUC2N7wAPaXKXNJpCaaRkg",
        "sig": "tzBEevmqNH2ukGA5sRsDS6EVzPWkJKGnCTAU6efXcURFX8G9hTx95PdRst1P8XzsxHKw1zKidDGFnt9LGunfScnktFg7MoSubL3n1FfgSqE9Em3srotowc8EgZjpePgkRWV"
    }],
    "sig_pubkeys": ["6RuoTTnHQvJChqCpnn8ZSF3YJ1TB5FtiCm4qQFYEccNt2xPV2eHs5sqhidEg6y8xe9", "79ixbSEaCk1NVk8X1bbUndg9ZZn7SGzwvYrELfvKa9DLKSFsYewCBLGcK9yEGxp8ph"]
}, {
    "no": 1737457503001,
    "msg": {
        "head": {
            "type": 0,
            "nonce": 40,
            "from_chain": {
                "vm": "Solana",
                "id": 103
            },
            "from_addr": "DwZPNgo4Qtxw2PcbSVgs16kVzynhBLHMF1iz9Js1efY5",
            "to_chain": {
                "vm": "Endless",
                "id": 221
            },
            "to_addr": "8s1Z9CEF9t8aV1MUdHoR8ViZ3V49ycW4duvueb78DqZZ",
            "fee_relay": 4
        },
        "body": "069b8857feab8184fb687f634618c035dac439dc1aeb3b5598a0f000000000010000000000000000000000000061a800003e77bbd14390f1c817f346b16b4a673fa229fb8a9866b1b5ca492270457ecf469cb1cfa8296a52c4a6b9fff024b20dec50ac80dc6238979e7668bceb6b9d16",
        "fee_msger": 4,
        "from_block": 355618928,
        "from_hash": {
            "hash": "xEZGyw5bCh4LppvVjv5KEnHiG1JdeVag343MoWMkRdyAfN4APFbvNnVVXmXSRxkPQLV2htXHu42Khr2iQm2FNTr",
            "chain": {
                "vm": "Solana",
                "id": 103
            }
        }
    },
    "sig": [{
        "pubkey": "78ovkFF2NnH65J6B8ZkoK8fqT18BvKzdJdWFgqg7fJ8ScUC2N7wAPaXKXNJpCaaRkg",
        "sig": "niJZPebLvUc2T9tMd1gr5YJg71jMHJRc47ozKzSsyDMZTVkqTH9MZsMn2m8Gi5u35vUyBazhM5L5FFLV82NgooFz4ewptb1fzELntxrhQssuBVniiGLMXBdaiVWZm3ux6Uf"
    }],
    "sig_pubkeys": ["6RuoTTnHQvJChqCpnn8ZSF3YJ1TB5FtiCm4qQFYEccNt2xPV2eHs5sqhidEg6y8xe9", "79ixbSEaCk1NVk8X1bbUndg9ZZn7SGzwvYrELfvKa9DLKSFsYewCBLGcK9yEGxp8ph"]
}]

Response Parameters

The response is an array of message objects, where each element represents a cross-chain message. Each message contains the following fields:

  1. no: Unique message number, typically used to identify the message order.

  2. msg: The main message body, containing the following sub-fields:

    • head: Message header, containing metadata:

      • type: Message type (e.g., 0 means a normal message).

      • nonce: Message nonce, used to prevent replay attacks.

      • from_chain: Source chain information, including:

        • vm: Virtual machine type of the source chain (e.g., Solana).

        • id: Identifier of the source chain.

      • from_addr: Source address representing the sender of the message.

      • to_chain: Destination chain information, including:

        • vm: Virtual machine type of the target chain (e.g., Endless).

        • id: Identifier of the target chain.

      • to_addr: Destination address representing the receiver of the message.

      • fee_relay: Relay fee, representing the cost needed to process this message.

    • body: Content of the message body, usually a byte sequence containing the actual data to be transferred.

    • fee_msger: Message fee, representing the cost required to send this message.

    • from_block: Block height on the source chain, indicating the originating block of the message.

    • from_hash: Source block hash, containing:

      • hash: The hash value of the block.

      • chain: Information of the source chain (VM type and ID).

  3. sig: Array of signatures, containing signature information for the message:

    • pubkey: Public key of the signer.

    • sig: Signature value used to verify the message’s integrity and origin.

  4. sig_pubkeys: Array of public keys, listing all public keys involved in the signature aggregation.

Last updated