Skip to main content
deleted 6 characters in body
Source Link
knaccc
  • 8.5k
  • 16
  • 23

The structure of your whole extra field is:

01 - TX_EXTRA_TAG_PUBKEY (1 byte)
49fa9fbadf1c1a4d054c6cbf918778f869ad02103501d8da7eec8762eb2202e6 - the tx pubkey (32 bytes)
04 - TX_EXTRA_TAG_ADDITIONAL_PUBKEYS (1 byte)
04 - the number of tx additional pubkeys that will follow (varint)
23a7b09c4078f5c9ea571e3db6e5406de7c27f5e9ec27c84575ce7ad247baf03
c9b9152925ec1a3cb3afde3ba43d42581f032bfd39badb178058f654c74b860d
f4f3a6d5c3bd7abf9b4c183c5db3d4ae34cd2ebfe77be112ff28f869dc2e5600
35136f206595a6777ba3be8eda6baf036d425fffe0b8678c4ca5cc853f705694
 - the 4 additonal tx pubkeys (32 bytes each)

Note that if you try to parse the tx extra tag and it is 00, that is padding and you can skip forward a byte. If it is anything other than 00, 01 or 04, then after you read the tag, read a varint next, and then skip that number of bytes (as indicated by the varint) to get to the next tx extra tag id to read.

Note: The VarIntvarint integer representation is defined in section 1.2 of https://tukaani.org/xz/xz-file-format.txt

The structure of your whole extra field is:

01 - TX_EXTRA_TAG_PUBKEY (1 byte)
49fa9fbadf1c1a4d054c6cbf918778f869ad02103501d8da7eec8762eb2202e6 - the tx pubkey (32 bytes)
04 - TX_EXTRA_TAG_ADDITIONAL_PUBKEYS (1 byte)
04 - the number of tx additional pubkeys that will follow (varint)
23a7b09c4078f5c9ea571e3db6e5406de7c27f5e9ec27c84575ce7ad247baf03
c9b9152925ec1a3cb3afde3ba43d42581f032bfd39badb178058f654c74b860d
f4f3a6d5c3bd7abf9b4c183c5db3d4ae34cd2ebfe77be112ff28f869dc2e5600
35136f206595a6777ba3be8eda6baf036d425fffe0b8678c4ca5cc853f705694
 - the 4 additonal tx pubkeys (32 bytes each)

Note that if you try to parse the tx extra tag and it is 00, that is padding and you can skip forward a byte. If it is anything other than 00, 01 or 04, then after you read the tag, read a varint next, and then skip that number of bytes (as indicated by the varint) to get to the next tx extra tag id to read.

Note: The VarInt integer representation is defined in section 1.2 of https://tukaani.org/xz/xz-file-format.txt

The structure of your whole extra field is:

01 - TX_EXTRA_TAG_PUBKEY (1 byte)
49fa9fbadf1c1a4d054c6cbf918778f869ad02103501d8da7eec8762eb2202e6 - the tx pubkey (32 bytes)
04 - TX_EXTRA_TAG_ADDITIONAL_PUBKEYS (1 byte)
04 - the number of tx additional pubkeys that will follow (varint)
23a7b09c4078f5c9ea571e3db6e5406de7c27f5e9ec27c84575ce7ad247baf03
c9b9152925ec1a3cb3afde3ba43d42581f032bfd39badb178058f654c74b860d
f4f3a6d5c3bd7abf9b4c183c5db3d4ae34cd2ebfe77be112ff28f869dc2e5600
35136f206595a6777ba3be8eda6baf036d425fffe0b8678c4ca5cc853f705694
 - the 4 additonal tx pubkeys (32 bytes each)

Note that if you try to parse the tx extra tag and it is 00, that is padding and you can skip forward a byte. If it is anything other than 00, 01 or 04, then after you read the tag, read a varint next, and then skip that number of bytes (as indicated by the varint) to get to the next tx extra tag id to read.

The varint integer representation is defined in section 1.2 of https://tukaani.org/xz/xz-file-format.txt

Source Link
knaccc
  • 8.5k
  • 16
  • 23

The structure of your whole extra field is:

01 - TX_EXTRA_TAG_PUBKEY (1 byte)
49fa9fbadf1c1a4d054c6cbf918778f869ad02103501d8da7eec8762eb2202e6 - the tx pubkey (32 bytes)
04 - TX_EXTRA_TAG_ADDITIONAL_PUBKEYS (1 byte)
04 - the number of tx additional pubkeys that will follow (varint)
23a7b09c4078f5c9ea571e3db6e5406de7c27f5e9ec27c84575ce7ad247baf03
c9b9152925ec1a3cb3afde3ba43d42581f032bfd39badb178058f654c74b860d
f4f3a6d5c3bd7abf9b4c183c5db3d4ae34cd2ebfe77be112ff28f869dc2e5600
35136f206595a6777ba3be8eda6baf036d425fffe0b8678c4ca5cc853f705694
 - the 4 additonal tx pubkeys (32 bytes each)

Note that if you try to parse the tx extra tag and it is 00, that is padding and you can skip forward a byte. If it is anything other than 00, 01 or 04, then after you read the tag, read a varint next, and then skip that number of bytes (as indicated by the varint) to get to the next tx extra tag id to read.

Note: The VarInt integer representation is defined in section 1.2 of https://tukaani.org/xz/xz-file-format.txt