connect icon indicating copy to clipboard operation
connect copied to clipboard

[Xverse] connect return types are incorrect

Open pradel opened this issue 4 months ago • 0 comments

Describe the bug

The types in this package are defined like this

export interface AddressEntry {
    symbol?: string;
    address: string;
    publicKey: string;
}

export interface GetAddressesResult {
    addresses: AddressEntry[];
}

But what's returned by xverse is different

{
    "id": "xxx",
    "walletType": "software",
    "addresses": [
        {
            "address": "xxx",
            "publicKey": "xxx",
            "purpose": "ordinals",
            "addressType": "p2tr",
            "walletType": "software"
        },
        {
            "address": "xxx",
            "publicKey": "xxx",
            "purpose": "payment",
            "addressType": "p2wpkh",
            "walletType": "software"
        },
        {
            "address": "xxx",
            "publicKey": "xxx",
            "purpose": "stacks",
            "addressType": "stacks",
            "walletType": "software"
        }
    ],
    "network": {
        "bitcoin": {
            "name": "Testnet4"
        },
        "stacks": {
            "name": "Testnet4"
        }
    }
}

To Reproduce

Just connect with Xverse

Expected behavior

The response should match this package return types

pradel avatar Aug 22 '25 09:08 pradel