tokens.search
Searches for an SPL token in the SPL token registry
Last updated
Searches for an SPL token in the SPL token registry
Last updated
search: string - what to use to search (address
, name
, symbol
)
param: string - the parameter/search term to use to find a token
compare_type (optional, default: "equals"
): string - how to compare the search for tokens (equals
, startsWith
, endsWith
, includes
)
skip_validation (optional, default: false
): boolean - whether to skip validation on if a token in the SPL token registry is a valid SPL token (true for skipping validation, false for not skipping validation), it is recommended to set this field to true when a large number of tokens are being returned and you want the function to execute quickly
object ({"tokens": [...]}
) - the list of tokens (see for format)
SOL Pay SDK Fatal Error: Invalid search ${search}.
- an invalid search was used
SOL Pay SDK Fatal Error: Invalid compare type ${compare_type}.
- an invalid compare type was used
SOL Pay SDK Fatal Error: No connection found. Use SOLPay.connectNetwork() to connect to the Solana network.
- could not find a connection to the Solana network
SOL Pay SDK Fatal Error: Connection did not respond. Use SOLPay.connectNetwork() to connect to the Solana network.
- did not receive response from Solana network