# Provider Methods

## request

```javascript
await provider.request({ method, params });
```

The provider implements the EIP-1193 standard, so you can make JSON-RPC requests using the `request` method.

The `request` method sends JSON-RPC requests to the blockchain network. It handles both Wepin-specific wallet methods (like account requests and transaction signing) and standard blockchain RPC calls.

#### **Parameters**

* `args` \<RequestArguments>
  * `method` \<string> - RPC method name
  * `params` \<any\[]> **optional** - Method parameters

#### **Return value**

* Promise\<any> - RPC Response

#### **Example**

```javascript
const provider = await wepinProvider.getProvider('ethereum');

// Get connected accounts
const accounts = await provider.request({
  method: 'eth_requestAccounts',
});
console.log('Connected accounts:', accounts);

// Sign message
const signature = await provider.request({
  method: 'eth_sign',
  params: ['0x...', 'Hello, world!'],
});

// Personal sign
const personalSignature = await provider.request({
  method: 'personal_sign',
  params: ['Hello, World', '0x...'],
});

// Sign typed data v4
const typedDataV4 = {
  types: {
    EIP712Domain: [{ name: 'name', type: 'string' }],
    Mail: [{ name: 'contents', type: 'string' }],
  },
  primaryType: 'Mail',
  domain: { name: 'Ether Mail' },
  message: { contents: 'Hello, Bob!' },
};
const typedSignature = await provider.request({
  method: 'eth_signTypedData_v4',
  params: ['0x...', typedDataV4],
});

// Send transaction
const transaction = {
  from: '0x...',
  to: '0x...',
  value: '0x0',
  data: '0x',
};
const txHash = await provider.request({
  method: 'eth_sendTransaction',
  params: [transaction],
});
```


---

# 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://docs.wepin.io/en/widget-integration/react-native-sdk/provider/provider-methods.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.
