Skip to content
Discussion options

You must be logged in to vote

Unfortunately this is a deficiency on our side. For legacy reasons, some representations of account addresses are not AIP-40 compliant and therefore return addresses without padding zeroes (abridged as you say). One big culprit is the JSON representation of a Move resource, leading zeroes are dropped.

All you can do is normalize the address client side. For example, in Typescript with the TS SDK, with a function like this:

import { AccountAddress } from '@aptos-labs/ts-sdk';

export function normalizeAddress(address: string) {
  return AccountAddress.from(address).toStringLong();
}

Or just something like this:

export function normalizeAddress(address: string): string {
  // Check if the i…

Replies: 1 comment

Comment options

banool
May 8, 2024
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by banool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
move Questions related to the Move Language indexer Questions related to indexers
1 participant