getAddressFromPublicKey
Usage
import { getAddressFromPublicKey } from '@stacks/transactions';
const address = getAddressFromPublicKey(
'034f355bdcb7cc0af728ef3cceb9615d90684bb5b2ca5f859ab0f0b704075871aa'
);
// 'SP...' (mainnet address by default)
const testnetAddress = getAddressFromPublicKey(
'034f355bdcb7cc0af728ef3cceb9615d90684bb5b2ca5f859ab0f0b704075871aa',
'testnet'
);
// 'ST...' (testnet address)Signature
function getAddressFromPublicKey(
publicKey: PublicKey,
network?: StacksNetworkName | StacksNetwork
): string;Returns
Parameters
publicKey (required)
network (optional)
Last updated
Was this helpful?