validateStacksAddress
Last updated
Was this helpful?
Validates whether a string is a valid Stacks address (c32check encoded).
import { validateStacksAddress } from '@stacks/transactions';
validateStacksAddress('ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM');
// true
validateStacksAddress('invalid-address');
// falsefunction validateStacksAddress(address: string): boolean;boolean
true if the address is a valid c32check-encoded Stacks address, false otherwise.
Type: string
The address string to validate.
Last updated
Was this helpful?
Was this helpful?