> For the complete documentation index, see [llms.txt](https://tutorial.neoline.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tutorial.neoline.io/reference/neo3-provider-api/relay.md).

# 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"
```
