<p>I have read the doc you posted here, and yes, there are no parameters about the <code>address type</code>, so maybe it defaults to return the segwit address. Maybe you can propose an issue to the dev team to add a new address type parameter.</p>

CC BY-SA 4.0
2024-07-24T08:34:34.923Z
I sent email but no response, and their support chat is AI chat. not helped for me
Cornel Petrescu
CC BY-SA 4.0
2024-07-24T09:18:21.257Z
https://github.com/okx/js-wallet-sdk/blob/main/packages/coin-bitcoin/src/wallet/BtcWallet.ts#L96
Jack Tsia
CC BY-SA 4.0
2024-07-24T09:19:33.980Z
I found the related code in their bitcoin wallet code, and there actually is the `address type` param to choose from, but it does not exist in the okx wallet doc.
Jack Tsia
CC BY-SA 4.0
2024-07-24T07:44:50.437Z
2024-07-24T07:44:50.437Z
Jack Tsia
<p>I am going to connect OKX wallet in my bitcoin based game app and have one problem in getting native segwit address from okx wallet. I read their developer doc and there are two way to get address. <a href="https://www.okx.com/web3/build/docs/sdks/chains/bitcoin/provider" rel="nofollow noreferrer">https://www.okx.com/web3/build/docs/sdks/chains/bitcoin/provider</a></p>
<pre><code>const result = await okxwallet.bitcoin.connect()

let accounts = await okxwallet.bitcoin.requestAccounts();
</code></pre>
<p>both return taproot address and I can't get native segwit and other types of address when user connect wallet.</p>

<bitcoin-core><wallet><segregated-witness><taproot><bech32-address>
How to get Segwit address from OKX wallet
Cornel Petrescu
# How to get Segwit address from OKX wallet

(Asked by: username_0 on 2024-07-24)

I am going to connect OKX wallet in my bitcoin based game app and have one problem in getting native segwit address from okx wallet. I read their developer doc and there are two way to get address. <https://www.okx.com/web3/build/docs/sdks/chains/bitcoin/provider>

```
const result = await okxwallet.bitcoin.connect()

let accounts = await okxwallet.bitcoin.requestAccounts();

```

both return taproot address and I can't get native segwit and other types of address when user connect wallet.

**Tags:** bitcoin-core, wallet, segregated-witness, taproot, bech32-address


---

## 1 answers

### Answer by username_1 on 2024-07-24. Score: 1

I have read the doc you posted here, and yes, there are no parameters about the `address type`, so maybe it defaults to return the segwit address. Maybe you can propose an issue to the dev team to add a new address type parameter.

> **Comments:**
> **username_0**: I sent email but no response, and their support chat is AI chat. not helped for me  
> **username_1**: https://github.com/okx/js-wallet-sdk/blob/main/packages/coin-bitcoin/src/wallet/BtcWallet.ts#L96  
> **username_1**: I found the related code in their bitcoin wallet code, and there actually is the `address type` param to choose from, but it does not exist in the okx wallet doc.  

---

