<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "Bitcoin",
  "identifier" : "/documentation/Bitcoin/JSONRPCService/send(_:params:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Bitcoin"
    ],
    "preciseIdentifier" : "s:7Bitcoin14JSONRPCServiceC4send_6paramsxSS_SayAA8RPCParamOGtYaKSeRzs8SendableRzlF"
  },
  "title" : "send(_:params:)"
}
-->

# send(_:params:)

Sends an RPC method and returns the decoded response.

```
func send<T>(_ method: String, params: [RPCParam] = []) async throws -> T where T : Decodable, T : Sendable
```

## Parameters

`method`

The RPC method name.

`params`

The parameters to pass.

## Return Value

The decoded response of type `T`.

## Discussion> Throws: An error if the request fails, the response is invalid, or decoding fails.