Profile Data Structure
All profile information can be returned as a 2d string array from the contract through 'assembleAccountData(address)', which recursively calls other public assemble functions that return 1d string arrays and compiles them into the 2d array.
The data structure returned from assembleAccountData(address) is as follows:
[0]
: Basic Data - Includes basic account information.[0]
Alias[1]
Detail[2]
Social Media Link[3]
Personal Website Link[4]
Gallery Link[5]
Priority Link Index # (0 : Social, 1 : Website, 2 : Gallery)[6]
Profile Picture Contract Address[7]
Profile Picture Token ID #
[1]
Additional Links - Includes all the additional links associated with the account. (Tuple)[0]
URL A[1]
Detail A[2]
URL B[3]
Detail B...
[2]
Associated Accounts - List of an account's Associated Accounts. (Tuple)[0]
Address A[1]
Detail A[2]
Address B[3]
Detail B...
[3]
Respecters - List of accounts that have respected the queried account.[0] Account A
...
[4]
Respectees - List of accounts that the queried account has respected.[0] Account A
...
[5]
Notes Received - List of notes that have been written for the account. (Tuple)[0]
Account A[1]
Note Content A[2]
Account B[3]
Note Content B...
[6]
Notes Sent - List of notes that have been written by the account. (Tuple)[0]
Account A[1]
Note Content A[2]
Account B[3]
Note Content B...
[7]
Tags - List of tags that have been written for the account.[0] Tag A
...
[8]
Custom Data - List of custom data that has been written for the account.[0] Custom Data
The individual 'assemble' functions that the above 'assembleAccountData(address) calls, returns data in a 1d array that matches the above format.
For example, calling 'assembleAssociatedAccounts(account) returns the 1d array at index 2 above.
Handling Tuples:
Some data is stored as tuples on the contract, and are publicly viewable state values. All tuples are converted to 1d arrays in the 'assemble' query responses, with alternating data elements. Tuple-type data on the contract is nested in a 2D array: [[Tuple-A], [Tuple-B] === [ [ 1a, 1b ], [ 2a, 2b ] ].
In all 'assemble' read functions, treat these tuples as 1d arrays.
When writing, deleting, or modifying tuple data on the contract, treat the index as its 2D format.
Example: Targeting the second entry in associated accounts and updating the detail value:
Last updated