connectCocoPay

Connect to CocoPay built-in wallet or external wallet for secure interaction between DApp and user wallet. CocoPay wallet supports mainstream EVM blockchains; external wallets support multi-platform access, including WalletConnect and TokenPocket.

circle-check

After successful connection, you can use web3.js and ethers.js to call on-chain contracts without additional configuration.

The following chain list represents the chain types currently supported by CocoPay, with more chains to be added continuously. If the required chain is not yet supported by CocoPay, use external wallet connection.

Public Chain Name
Abbreviation

Ethereum

ETH

BNB Chain

BSC

Polygon

POLYGON

Avalanche-C

AVAXC

TRON

TRON

Arbitrum One

ARBITRUM

Poly Smart Chain

PSC

Viction

VIC

Request Parameters:

Parameter Name
Type
Required
Description

chainList

Array

Yes

Array of public chain abbreviations to connect (e.g., ["ETH", "BSC"]).

walletSupports

Array

No

Array of supported external wallets (e.g., ["WalletConnect", "TokenPocket"]). If not passed, defaults to connecting CocoPay; passing this adds wallet support.

Response Parameters:

Parameter Name
Type
Description

chainType

String

Abbreviation of the chain for the successfully connected wallet.

account

String

Wallet address for the successful connection.

Call Example: