# Phantom wallet SDK connection

**URL:** <https://forums.sui.io/t/phantom-wallet-sdk-connection/48983>\
**Category:** SDK\
**Tags:** wallet\
**Created:** [August 5, 2025, 1:51pm UTC](https://forums.sui.io/t/phantom-wallet-sdk-connection/48983 "2025-08-05T13:51:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DoubleJabber](https://dub1.discourse-cdn.com/sui/user_avatar/forums.sui.io/doublejabber/32/31287_2.png) [@DoubleJabber](https://forums.sui.io/u/DoubleJabber)\
**Post date:** [August 5, 2025, 1:51pm UTC](https://forums.sui.io/t/phantom-wallet-sdk-connection/48983/1 "2025-08-05T13:51:09Z")

</div>

Using the typescript sdk to connect to wallets, and trying to retrieve the public key of the wallet. The slush wallet works fine and returns the expected 33 byte array using the .toRawBytes() method over the Ed25519PublicKey, but the Phantom wallet returns some 60 byte array. What is it and how do I get it into the 32/33 byte value? I have attached the code snippet I have been using:

```auto
constructor(
    relayerUrl: string | Url,
    account: WalletWithRequiredFeatures | Ed25519Keypair,
    network: Network,
  ) {
    this.client = new SuiClient({ url: getFullnodeUrl(network) });
    this.url = relayerUrl instanceof Url ? relayerUrl : new Url(relayerUrl);
    this.account = account;
    this.network = network;
  }

  get htlcActorAddress(): string {
    if ("accounts" in this.account) {
      const suiBytes = new Ed25519PublicKey(
        this.account.accounts[0].publicKey,
      ).toRawBytes();
      const output = Buffer.from(suiBytes.slice(1)).toString("hex");
      console.log("output", output);
      return output;
    }

    return Buffer.from(this.account.getPublicKey().toRawBytes()).toString(
      "hex",
    );
  }

```

---

<div class="post-metadata">

**Author:** ![taki](https://dub1.discourse-cdn.com/sui/user_avatar/forums.sui.io/taki/32/30736_2.png) [@taki](https://forums.sui.io/u/taki)\
**Post date:** [August 12, 2025, 2:27am UTC](https://forums.sui.io/t/phantom-wallet-sdk-connection/48983/2 "2025-08-12T02:27:12Z")

</div>

Hi! I think that’s specific to the Phantom wallet. You might get a better answer by reaching out to the Phantom team.
