For the complete documentation index, see llms.txt. This page is also available as Markdown.

validateStacksAddress

Validates whether a string is a valid Stacks address (c32check encoded).


Usage

import { validateStacksAddress } from '@stacks/transactions';

validateStacksAddress('ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM');
// true

validateStacksAddress('invalid-address');
// false

Reference Link


Signature

function validateStacksAddress(address: string): boolean;

Returns

boolean

true if the address is a valid c32check-encoded Stacks address, false otherwise.


Parameters

address (required)

  • Type: string

The address string to validate.

Last updated

Was this helpful?