# relay

Relays a signed `ContractParametersContext` to the network and returns the transaction hash.

## Parameters

#### 1. context *(required)*

`ContractParametersContext`

The signed transaction context to relay.

## Returns

`Promise<UInt256>`

The relayed transaction hash.

## Errors

| Code    | Name                 | Description                                                            |
| ------- | -------------------- | ---------------------------------------------------------------------- |
| `10002` | `INVALID`            | The context payload is invalid.                                        |
| `10005` | `TIMEOUT`            | The relay request timed out.                                           |
| `10006` | `CANCELED`           | The user rejected the relay request.                                   |
| `10007` | `INSUFFICIENT_FUNDS` | The transaction cannot be relayed because the balance is insufficient. |
| `10008` | `RPC_ERROR`          | The RPC server returned an error.                                      |

## Example

### Request

```js
const txid = await provider.relay({
  type: 'Neo.Network.P2P.Payloads.Transaction',
  hash: '9ec26f10d2da8d4dc6ddf68893318660ed234e9d5173ddb146fe955067c17a8d',
  data: 'AJ80ThdAQg8AAAAAAHCTAAAAAAAAdmjmAAEKstQadGt9Gi0vwZ7fSt3chVB8mgEAWgsCQA0DAAwUvfdhkjTHOXEg9FzagIK2pzKs83kMFAqy1Bp0a30aLS/Bnt9K3dyFUHyaFMAfDAh0cmFuc2ZlcgwUz3bii9AGLEpHjuNVYQETGfPPpNJBYn1bUgFCDEBnDmZinpnEG685XDQMsPj9na88G1cbShrMC61QDuZaE1Fq/f+qG94gT4UtWpYcCjS6lbr8sLSfyls1cls34qiIKAwhAiZPRP6EiofBMkyH3bF7Ks3anXm8APlUncIpMGTDwH5fQVbnsyc=',
  items: {
    '9a7c5085dcdd4adf9ec12f2d1a7d6b741ad4b20a': {
      script: 'DCECJk9E/oSKh8EyTIfdsXsqzdqdebwA+VSdwikwZMPAfl9BVuezJw==',
      parameters: [
        {
          name: 'signature',
          type: 'Signature',
          value: 'Zw5mYp6ZxBuvOVw0DLD4/Z2vPBtXG0oazAutUA7mWhNRav3/qhveIE+FLVqWHAo0upW6/LC0n8pbNXJbN+KoiA=='
        }
      ],
      signatures: {
        '02264f44fe848a87c1324c87ddb17b2acdda9d79bc00f9549dc2293064c3c07e5f': 'Zw5mYp6ZxBuvOVw0DLD4/Z2vPBtXG0oazAutUA7mWhNRav3/qhveIE+FLVqWHAo0upW6/LC0n8pbNXJbN+KoiA=='
      }
    }
  },
  network: 894710606
});
```

### Response

```js
"0x1f4d1defa46faa5e7b9b8d3f79a06bec777d7c26c4aa5f6f5899a291daa87c15"
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tutorial.neoline.io/reference/neo3-provider-api/relay.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
