@evefrontier/dapp-kit 0.1.3 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/graphql/client.ts +15 -15
- package/graphql/queries.ts +15 -19
- package/graphql/types.ts +47 -47
- package/hooks/useConnection.ts +1 -1
- package/hooks/useNotification.ts +1 -1
- package/hooks/useSmartObject.ts +1 -1
- package/hooks/useSponsoredTransaction.ts +15 -8
- package/package.json +11 -1
- package/providers/SmartObjectProvider.tsx +3 -4
- package/types/contexts.ts +7 -4
- package/types/sponsoredTransaction.ts +8 -0
- package/types/types.ts +4 -0
- package/utils/__tests__/datahub.test.ts +48 -0
- package/utils/__tests__/mapping.test.ts +0 -2
- package/utils/burnRate.ts +1 -1
- package/utils/config.ts +4 -4
- package/utils/constants.ts +126 -31
- package/utils/datahub.ts +32 -5
- package/utils/errors.ts +2 -2
- package/utils/mapping.ts +4 -4
- package/utils/transforms.ts +2 -2
- package/utils/utils.ts +20 -14
- package/wallet/features.ts +5 -10
- package/CHANGELOG.md +0 -19
- package/docs/api/.nojekyll +0 -1
- package/docs/api/assets/hierarchy.js +0 -1
- package/docs/api/assets/highlight.css +0 -120
- package/docs/api/assets/icons.js +0 -18
- package/docs/api/assets/icons.svg +0 -1
- package/docs/api/assets/main.js +0 -60
- package/docs/api/assets/navigation.js +0 -1
- package/docs/api/assets/search.js +0 -1
- package/docs/api/assets/style.css +0 -1633
- package/docs/api/classes/WalletNoAccountSelectedError.html +0 -3
- package/docs/api/classes/WalletNotConnectedError.html +0 -3
- package/docs/api/classes/WalletSponsoredTransactionNotSupportedError.html +0 -5
- package/docs/api/enums/ActionTypes.html +0 -6
- package/docs/api/enums/Assemblies.html +0 -8
- package/docs/api/enums/QueryParams.html +0 -3
- package/docs/api/enums/Severity.html +0 -5
- package/docs/api/enums/SponsoredTransactionActions.html +0 -7
- package/docs/api/enums/State.html +0 -6
- package/docs/api/enums/SupportedWallets.html +0 -3
- package/docs/api/enums/TYPEIDS.html +0 -15
- package/docs/api/functions/EveFrontierProvider.html +0 -11
- package/docs/api/functions/NotificationProvider.html +0 -2
- package/docs/api/functions/SmartObjectProvider.html +0 -10
- package/docs/api/functions/VaultProvider.html +0 -1
- package/docs/api/functions/abbreviateAddress.html +0 -11
- package/docs/api/functions/assertAssemblyType.html +0 -9
- package/docs/api/functions/clickToCopy.html +0 -1
- package/docs/api/functions/executeGraphQLQuery.html +0 -12
- package/docs/api/functions/findOwnerByAddress.html +0 -5
- package/docs/api/functions/formatDuration.html +0 -8
- package/docs/api/functions/formatM3.html +0 -8
- package/docs/api/functions/getAdjustedBurnRate.html +0 -6
- package/docs/api/functions/getAssemblyType.html +0 -4
- package/docs/api/functions/getAssemblyTypeApiString.html +0 -2
- package/docs/api/functions/getAssemblyWithOwner.html +0 -18
- package/docs/api/functions/getCharacterAndOwnedObjects.html +0 -3
- package/docs/api/functions/getCharacterOwnedObjects.html +0 -5
- package/docs/api/functions/getCharacterOwnedObjectsJson.html +0 -5
- package/docs/api/functions/getCharacterOwnerCapType.html +0 -3
- package/docs/api/functions/getCharacterPlayerProfileType.html +0 -3
- package/docs/api/functions/getCommonItems.html +0 -1
- package/docs/api/functions/getDappUrl.html +0 -7
- package/docs/api/functions/getDatahubGameInfo.html +0 -13
- package/docs/api/functions/getEnergyConfig.html +0 -4
- package/docs/api/functions/getEnergyConfigType.html +0 -3
- package/docs/api/functions/getEnergyUsageForType.html +0 -5
- package/docs/api/functions/getEnv.html +0 -1
- package/docs/api/functions/getEveWorldPackageId.html +0 -4
- package/docs/api/functions/getFuelEfficiencyConfig.html +0 -4
- package/docs/api/functions/getFuelEfficiencyConfigType.html +0 -3
- package/docs/api/functions/getFuelEfficiencyForType.html +0 -5
- package/docs/api/functions/getObjectByAddress.html +0 -9
- package/docs/api/functions/getObjectId.html +0 -4
- package/docs/api/functions/getObjectOwnerAndOwnedObjectsByType.html +0 -10
- package/docs/api/functions/getObjectOwnerAndOwnedObjectsWithJson.html +0 -7
- package/docs/api/functions/getObjectRegistryType.html +0 -3
- package/docs/api/functions/getObjectWithDynamicFields.html +0 -10
- package/docs/api/functions/getObjectWithJson.html +0 -9
- package/docs/api/functions/getObjectsByType.html +0 -12
- package/docs/api/functions/getOwnedObjectsByPackage.html +0 -10
- package/docs/api/functions/getOwnedObjectsByType.html +0 -10
- package/docs/api/functions/getRegistryAddress.html +0 -3
- package/docs/api/functions/getSingletonObjectByType.html +0 -9
- package/docs/api/functions/getSponsoredTransactionFeature.html +0 -11
- package/docs/api/functions/getSuiGraphqlEndpoint.html +0 -4
- package/docs/api/functions/getTxUrl.html +0 -8
- package/docs/api/functions/getVolumeM3.html +0 -5
- package/docs/api/functions/getWalletCharacters.html +0 -3
- package/docs/api/functions/hasSponsoredTransactionFeature.html +0 -3
- package/docs/api/functions/isOwner.html +0 -10
- package/docs/api/functions/parseCharacterFromJson.html +0 -5
- package/docs/api/functions/parseErrorFromMessage.html +0 -1
- package/docs/api/functions/parseStatus.html +0 -2
- package/docs/api/functions/parseURL.html +0 -1
- package/docs/api/functions/removeTrailingZeros.html +0 -1
- package/docs/api/functions/transformToAssembly.html +0 -5
- package/docs/api/functions/transformToCharacter.html +0 -2
- package/docs/api/functions/useConnection.html +0 -21
- package/docs/api/functions/useNotification.html +0 -28
- package/docs/api/functions/useSmartObject.html +0 -21
- package/docs/api/functions/useSponsoredTransaction.html +0 -50
- package/docs/api/functions/walletSupportsSponsoredTransaction.html +0 -13
- package/docs/api/hierarchy.html +0 -1
- package/docs/api/index.html +0 -24
- package/docs/api/interfaces/AddressOwner.html +0 -2
- package/docs/api/interfaces/AddressOwnerWithJson.html +0 -2
- package/docs/api/interfaces/AddressWithObjects.html +0 -3
- package/docs/api/interfaces/AdjustedBurnRate.html +0 -8
- package/docs/api/interfaces/AsMoveObjectRef.html +0 -3
- package/docs/api/interfaces/AssemblyProperties.html +0 -17
- package/docs/api/interfaces/CharacterAndOwnedObjectsNode.html +0 -2
- package/docs/api/interfaces/CharacterInfo.html +0 -8
- package/docs/api/interfaces/CharacterOwnerNode.html +0 -3
- package/docs/api/interfaces/ConfigExtractDynamicFieldNode.html +0 -3
- package/docs/api/interfaces/ContentsBcs.html +0 -2
- package/docs/api/interfaces/ContentsJsonAndBcs.html +0 -3
- package/docs/api/interfaces/ContentsJsonOnly.html +0 -3
- package/docs/api/interfaces/ContentsTypeAndBcs.html +0 -3
- package/docs/api/interfaces/ContentsTypeJsonAndBcs.html +0 -4
- package/docs/api/interfaces/DatahubGameInfo.html +0 -28
- package/docs/api/interfaces/DetailedAssemblyResponse.html +0 -17
- package/docs/api/interfaces/DetailedSmartCharacterResponse.html +0 -7
- package/docs/api/interfaces/DynamicFieldNode.html +0 -3
- package/docs/api/interfaces/EphemeralInventory.html +0 -6
- package/docs/api/interfaces/EveFrontierSponsoredTransactionFeature.html +0 -7
- package/docs/api/interfaces/ExtractAsMoveObjectNode.html +0 -4
- package/docs/api/interfaces/GateModule.html +0 -2
- package/docs/api/interfaces/GetCharacterAndOwnedObjectsResponse.html +0 -2
- package/docs/api/interfaces/GetObjectAndCharacterOwnerResponse.html +0 -2
- package/docs/api/interfaces/GetObjectByAddressResponse.html +0 -2
- package/docs/api/interfaces/GetObjectOwnerAndOwnedObjectsResponse.html +0 -2
- package/docs/api/interfaces/GetObjectOwnerAndOwnedObjectsWithJsonResponse.html +0 -2
- package/docs/api/interfaces/GetObjectResponse.html +0 -2
- package/docs/api/interfaces/GetObjectWithJsonResponse.html +0 -2
- package/docs/api/interfaces/GetObjectsByTypeResponse.html +0 -2
- package/docs/api/interfaces/GetOwnedObjectsByPackageResponse.html +0 -2
- package/docs/api/interfaces/GetOwnedObjectsByTypeResponse.html +0 -2
- package/docs/api/interfaces/GetSingletonConfigObjectByTypeResponse.html +0 -2
- package/docs/api/interfaces/GetSingletonObjectByTypeResponse.html +0 -2
- package/docs/api/interfaces/GetWalletCharactersResponse.html +0 -2
- package/docs/api/interfaces/GraphQLResponse.html +0 -3
- package/docs/api/interfaces/InventoryItem.html +0 -8
- package/docs/api/interfaces/ManufacturingModule.html +0 -1
- package/docs/api/interfaces/MoveObjectContents.html +0 -4
- package/docs/api/interfaces/MoveObjectData.html +0 -3
- package/docs/api/interfaces/NetworkNodeModule.html +0 -6
- package/docs/api/interfaces/NotificationContextType.html +0 -4
- package/docs/api/interfaces/NotificationState.html +0 -6
- package/docs/api/interfaces/Notify.html +0 -6
- package/docs/api/interfaces/ObjectNodes.html +0 -2
- package/docs/api/interfaces/ObjectWithContentsNode.html +0 -4
- package/docs/api/interfaces/OwnedObjectAddressNode.html +0 -2
- package/docs/api/interfaces/OwnedObjectFullNode.html +0 -4
- package/docs/api/interfaces/OwnedObjectNode.html +0 -3
- package/docs/api/interfaces/OwnedObjectNodeWithJson.html +0 -4
- package/docs/api/interfaces/OwnerCapData.html +0 -5
- package/docs/api/interfaces/PageInfo.html +0 -3
- package/docs/api/interfaces/PreviousTransaction.html +0 -2
- package/docs/api/interfaces/RawCharacterData.html +0 -8
- package/docs/api/interfaces/RawSuiObjectData.html +0 -21
- package/docs/api/interfaces/RefineryModule.html +0 -1
- package/docs/api/interfaces/SmartAssemblyResponse.html +0 -15
- package/docs/api/interfaces/SmartObjectContextType.html +0 -7
- package/docs/api/interfaces/SponsoredTransactionInput.html +0 -14
- package/docs/api/interfaces/SponsoredTransactionOutput.html +0 -8
- package/docs/api/interfaces/StorageModule.html +0 -3
- package/docs/api/interfaces/SuiObjectResponse.html +0 -5
- package/docs/api/interfaces/TransformOptions.html +0 -10
- package/docs/api/interfaces/TurretModule.html +0 -1
- package/docs/api/interfaces/TypeRepr.html +0 -2
- package/docs/api/interfaces/TypeReprWithLayout.html +0 -3
- package/docs/api/interfaces/VaultContextType.html +0 -8
- package/docs/api/modules.html +0 -1
- package/docs/api/types/AssemblyType.html +0 -1
- package/docs/api/types/ContentsTypeAndJson.html +0 -2
- package/docs/api/types/ErrorType.html +0 -5
- package/docs/api/types/MoveObjectRefWithJson.html +0 -2
- package/docs/api/types/SendSponsoredTransactionFn.html +0 -1
- package/docs/api/types/SponsoredTransactionArgs.html +0 -2
- package/docs/api/types/SponsoredTransactionAssemblyType.html +0 -2
- package/docs/api/types/SponsoredTransactionMethod.html +0 -2
- package/docs/api/types/UseSponsoredTransactionArgs.html +0 -3
- package/docs/api/types/UseSponsoredTransactionError.html +0 -2
- package/docs/api/types/UseSponsoredTransactionMutationOptions.html +0 -2
- package/docs/api/variables/ASSEMBLY_TYPE_API_STRING.html +0 -2
- package/docs/api/variables/ERRORS.html +0 -1
- package/docs/api/variables/ERROR_MESSAGES.html +0 -1
- package/docs/api/variables/EVEFRONTIER_SPONSORED_TRANSACTION.html +0 -4
- package/docs/api/variables/EXCLUDED_TYPEIDS.html +0 -1
- package/docs/api/variables/GET_OBJECTS_BY_TYPE.html +0 -3
- package/docs/api/variables/GET_OBJECT_BY_ADDRESS.html +0 -3
- package/docs/api/variables/GET_OBJECT_OWNER_AND_OWNED_OBJECTS_BY_TYPE.html +0 -4
- package/docs/api/variables/GET_OBJECT_OWNER_AND_OWNED_OBJECTS_WITH_JSON.html +0 -3
- package/docs/api/variables/GET_OBJECT_WITH_DYNAMIC_FIELDS.html +0 -4
- package/docs/api/variables/GET_OBJECT_WITH_JSON.html +0 -3
- package/docs/api/variables/GET_OWNED_OBJECTS_BY_PACKAGE.html +0 -3
- package/docs/api/variables/GET_OWNED_OBJECTS_BY_TYPE.html +0 -3
- package/docs/api/variables/GET_SINGLETON_CONFIG_OBJECT_BY_TYPE.html +0 -2
- package/docs/api/variables/GET_SINGLETON_OBJECT_BY_TYPE.html +0 -3
- package/docs/api/variables/GET_WALLET_CHARACTERS.html +0 -3
- package/docs/api/variables/NotificationContext.html +0 -1
- package/docs/api/variables/ONE_M3.html +0 -2
- package/docs/api/variables/POLLING_INTERVAL.html +0 -2
- package/docs/api/variables/STORAGE_KEYS.html +0 -2
- package/docs/api/variables/SmartObjectContext.html +0 -1
- package/docs/api/variables/VaultContext.html +0 -1
- package/docs/api/variables/dAppKit.html +0 -2
- package/tsconfig.json +0 -22
- package/typedoc.json +0 -38
- package/vite-env.d.ts +0 -14
package/README.md
CHANGED
|
@@ -44,6 +44,19 @@ function MyDapp() {
|
|
|
44
44
|
|
|
45
45
|
Configure assembly via env (`VITE_OBJECT_ID`, as Sui Object ID) or URL (`?itemId=...&tenant=...`, derived).
|
|
46
46
|
|
|
47
|
+
Install the package once; then import only what you need via subpaths.
|
|
48
|
+
|
|
49
|
+
| Subpath | Use when you need |
|
|
50
|
+
|--------|--------------------|
|
|
51
|
+
| `@evefrontier/dapp-kit` | Default: providers, hooks, types, utils |
|
|
52
|
+
| `@evefrontier/dapp-kit/graphql` | GraphQL client, queries, and response types |
|
|
53
|
+
| `@evefrontier/dapp-kit/types` | Type definitions only |
|
|
54
|
+
| `@evefrontier/dapp-kit/utils` | Utilities (parsing, transforms, config) |
|
|
55
|
+
| `@evefrontier/dapp-kit/hooks` | Hooks only |
|
|
56
|
+
| `@evefrontier/dapp-kit/providers` | Providers only |
|
|
57
|
+
| `@evefrontier/dapp-kit/config` | Config / dApp kit setup |
|
|
58
|
+
|
|
59
|
+
|
|
47
60
|
## More
|
|
48
61
|
|
|
49
62
|
Hooks, types, GraphQL helpers, utilities, and wallet APIs are documented at **[http://sui-docs.evefrontier.com/](http://sui-docs.evefrontier.com/)**.
|
package/graphql/client.ts
CHANGED
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
* This is the low-level function used by all other GraphQL helper functions.
|
|
46
46
|
* Use this when you need to execute custom queries not covered by the helper functions.
|
|
47
47
|
*
|
|
48
|
-
* @category GraphQL
|
|
48
|
+
* @category GraphQL Client
|
|
49
49
|
* @typeParam T - The expected response data type
|
|
50
50
|
* @param query - The GraphQL query string
|
|
51
51
|
* @param variables - Variables to pass to the query
|
|
@@ -97,7 +97,7 @@ export async function executeGraphQLQuery<T = unknown>(
|
|
|
97
97
|
* Use this for low-level object access when you need raw BCS data.
|
|
98
98
|
* For JSON-decoded data, use {@link getObjectWithJson} instead.
|
|
99
99
|
*
|
|
100
|
-
* @category GraphQL
|
|
100
|
+
* @category GraphQL Client
|
|
101
101
|
* @param address - The Sui object address (0x...)
|
|
102
102
|
* @returns Promise resolving to object with BCS contents
|
|
103
103
|
*
|
|
@@ -121,7 +121,7 @@ export async function getObjectByAddress(address: string) {
|
|
|
121
121
|
* which is useful for assemblies that store data in dynamic fields
|
|
122
122
|
* (e.g., inventory items, configuration).
|
|
123
123
|
*
|
|
124
|
-
* @category GraphQL
|
|
124
|
+
* @category GraphQL Client
|
|
125
125
|
* @param objectId - The Sui object ID
|
|
126
126
|
* @returns Promise resolving to object with dynamic fields
|
|
127
127
|
*
|
|
@@ -147,7 +147,7 @@ export async function getObjectWithDynamicFields(objectId: string) {
|
|
|
147
147
|
* This is the most common way to fetch object data when you need
|
|
148
148
|
* to read the object's fields as JavaScript objects.
|
|
149
149
|
*
|
|
150
|
-
* @category GraphQL
|
|
150
|
+
* @category GraphQL Client
|
|
151
151
|
* @param address - The Sui object address
|
|
152
152
|
* @returns Promise resolving to object with JSON contents
|
|
153
153
|
*
|
|
@@ -170,7 +170,7 @@ export async function getObjectWithJson(address: string) {
|
|
|
170
170
|
* Useful for traversing ownership chains, e.g., finding all assemblies
|
|
171
171
|
* owned by a specific character.
|
|
172
172
|
*
|
|
173
|
-
* @category GraphQL
|
|
173
|
+
* @category GraphQL Client
|
|
174
174
|
* @param objectAddress - The Sui object address to query owner of
|
|
175
175
|
* @param ownedObjectType - Optional type filter for owned objects
|
|
176
176
|
* @returns Promise resolving to owner info and owned objects (BCS format)
|
|
@@ -203,7 +203,7 @@ export async function getObjectOwnerAndOwnedObjectsByType(
|
|
|
203
203
|
* Similar to {@link getObjectOwnerAndOwnedObjectsByType} but returns
|
|
204
204
|
* JSON-decoded contents for easier consumption.
|
|
205
205
|
*
|
|
206
|
-
* @category GraphQL
|
|
206
|
+
* @category GraphQL Client
|
|
207
207
|
* @param objectAddress - The Sui object address
|
|
208
208
|
* @param ownedObjectType - Optional type filter for owned objects
|
|
209
209
|
* @returns Promise resolving to owner info and owned objects (JSON format)
|
|
@@ -227,7 +227,7 @@ export async function getObjectOwnerAndOwnedObjectsWithJson(
|
|
|
227
227
|
* This is a specialized query for EVE Frontier assemblies that
|
|
228
228
|
* follows the owner_cap_id to resolve the owning character.
|
|
229
229
|
*
|
|
230
|
-
* @category GraphQL
|
|
230
|
+
* @category GraphQL Client
|
|
231
231
|
* @param objectAddress - The assembly object address
|
|
232
232
|
* @returns Promise resolving to assembly and character data
|
|
233
233
|
* @internal
|
|
@@ -248,7 +248,7 @@ export async function getObjectAndCharacterOwner(objectAddress: string) {
|
|
|
248
248
|
* Returns only object addresses (lightweight). Use this when you need
|
|
249
249
|
* to find objects and will fetch their details separately.
|
|
250
250
|
*
|
|
251
|
-
* @category GraphQL
|
|
251
|
+
* @category GraphQL Client
|
|
252
252
|
* @param owner - The owner's Sui address
|
|
253
253
|
* @param objectType - Optional Move type filter (e.g., "0xpkg::module::Type")
|
|
254
254
|
* @returns Promise resolving to list of owned object addresses
|
|
@@ -281,7 +281,7 @@ export async function getOwnedObjectsByType(
|
|
|
281
281
|
* Returns full object data with dynamic fields. Use this when you need
|
|
282
282
|
* all objects from a specific package (e.g., all EVE Frontier objects).
|
|
283
283
|
*
|
|
284
|
-
* @category GraphQL
|
|
284
|
+
* @category GraphQL Client
|
|
285
285
|
* @param owner - The owner's Sui address
|
|
286
286
|
* @param packageId - The Move package ID to filter by
|
|
287
287
|
* @returns Promise resolving to full object data including dynamic fields
|
|
@@ -312,7 +312,7 @@ export async function getOwnedObjectsByPackage(
|
|
|
312
312
|
* Get all characters owned by a wallet
|
|
313
313
|
* Returns the most recent character owned by the wallet
|
|
314
314
|
*
|
|
315
|
-
* @category GraphQL
|
|
315
|
+
* @category GraphQL Client
|
|
316
316
|
*/
|
|
317
317
|
export async function getWalletCharacters(wallet: string) {
|
|
318
318
|
return executeGraphQLQuery<GetWalletCharactersResponse>(
|
|
@@ -328,7 +328,7 @@ export async function getWalletCharacters(wallet: string) {
|
|
|
328
328
|
* Get all characters owned by a wallet
|
|
329
329
|
* Returns the characters owned by the wallet
|
|
330
330
|
*
|
|
331
|
-
* @category GraphQL
|
|
331
|
+
* @category GraphQL Client
|
|
332
332
|
*/
|
|
333
333
|
export async function getCharacterAndOwnedObjects(wallet: string) {
|
|
334
334
|
return executeGraphQLQuery<GetCharacterAndOwnedObjectsResponse>(
|
|
@@ -346,7 +346,7 @@ export async function getCharacterAndOwnedObjects(wallet: string) {
|
|
|
346
346
|
* Useful for global/singleton objects where there's only one instance
|
|
347
347
|
* of a particular type on-chain.
|
|
348
348
|
*
|
|
349
|
-
* @category GraphQL
|
|
349
|
+
* @category GraphQL Client
|
|
350
350
|
* @param objectType - The full Move type string
|
|
351
351
|
* @returns Promise resolving to the singleton object address
|
|
352
352
|
*
|
|
@@ -372,7 +372,7 @@ export async function getSingletonObjectByType(objectType: string) {
|
|
|
372
372
|
* a table of key/value entries via dynamic fields. Returns the first object's full
|
|
373
373
|
* response including contents.extract...addressAt.dynamicFields.nodes.
|
|
374
374
|
*
|
|
375
|
-
* @category GraphQL
|
|
375
|
+
* @category GraphQL Client
|
|
376
376
|
* @param objectType - The full Move type string (e.g. from getEnergyConfigType())
|
|
377
377
|
* @param tableName - The table path for extract (e.g. "assembly_energy", "fuel_efficiency")
|
|
378
378
|
* @returns Promise resolving to the GraphQL response with objects.nodes[0] and dynamicFields.nodes
|
|
@@ -402,7 +402,7 @@ export async function getSingletonConfigObjectByType(
|
|
|
402
402
|
* Use with caution as this may return many results. Supports cursor-based
|
|
403
403
|
* pagination for iterating through large result sets.
|
|
404
404
|
*
|
|
405
|
-
* @category GraphQL
|
|
405
|
+
* @category GraphQL Client
|
|
406
406
|
* @param objectType - The full Move type string
|
|
407
407
|
* @param options - Pagination options
|
|
408
408
|
* @param options.first - Number of results per page (default: 50)
|
|
@@ -442,7 +442,7 @@ export async function getObjectsByType(
|
|
|
442
442
|
* It fetches the assembly's Move object data, dynamic fields, and
|
|
443
443
|
* resolves the owner character through the ownership chain.
|
|
444
444
|
*
|
|
445
|
-
* @category GraphQL
|
|
445
|
+
* @category GraphQL Client
|
|
446
446
|
* @param assemblyId - The assembly's Sui object ID
|
|
447
447
|
* @returns Promise resolving to:
|
|
448
448
|
* - `moveObject` - The assembly's Move object data with JSON contents and dynamic fields
|
package/graphql/queries.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Query for fetching a specific object by address with BCS-encoded contents
|
|
11
11
|
* Use this for low-level object access with raw BCS data
|
|
12
12
|
*
|
|
13
|
-
* @category GraphQL
|
|
13
|
+
* @category GraphQL Queries
|
|
14
14
|
*/
|
|
15
15
|
export const GET_OBJECT_BY_ADDRESS = `
|
|
16
16
|
query GetObjectByAddress($address: SuiAddress!) {
|
|
@@ -31,11 +31,9 @@ export const GET_OBJECT_BY_ADDRESS = `
|
|
|
31
31
|
`;
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
35
|
-
* Retrieves the assembly contents and dynamic fields from the EVE Frontier world package
|
|
36
|
-
* Use this for higher-level object access with parsed JSON data
|
|
34
|
+
* Object by address with JSON contents and dynamic fields (nodes).
|
|
37
35
|
*
|
|
38
|
-
* @category GraphQL
|
|
36
|
+
* @category GraphQL Queries
|
|
39
37
|
*/
|
|
40
38
|
export const GET_OBJECT_WITH_DYNAMIC_FIELDS = `
|
|
41
39
|
query GetObjectWithDynamicFields($objectId: SuiAddress!) {
|
|
@@ -66,11 +64,9 @@ export const GET_OBJECT_WITH_DYNAMIC_FIELDS = `
|
|
|
66
64
|
`;
|
|
67
65
|
|
|
68
66
|
/**
|
|
69
|
-
*
|
|
70
|
-
* Retrieves the assembly contents and dynamic fields from the EVE Frontier world package
|
|
71
|
-
* Use this for higher-level object access with parsed JSON data
|
|
67
|
+
* Assembly object with owner/character extract and character-owned objects (e.g. inventory).
|
|
72
68
|
*
|
|
73
|
-
* @category GraphQL
|
|
69
|
+
* @category GraphQL Queries
|
|
74
70
|
*/
|
|
75
71
|
export const GET_OBJECT_DYNAMICFIELD_CHARACTER_WITH_JSON = `
|
|
76
72
|
query GetObjectOwnerCharacterOwnerAndInventory(
|
|
@@ -168,7 +164,7 @@ query GetObjectOwnerCharacterOwnerAndInventory(
|
|
|
168
164
|
* Useful for finding related objects (e.g., getting a character's assemblies)
|
|
169
165
|
* Returns BCS-encoded data only
|
|
170
166
|
*
|
|
171
|
-
* @category GraphQL
|
|
167
|
+
* @category GraphQL Queries
|
|
172
168
|
*/
|
|
173
169
|
export const GET_OBJECT_OWNER_AND_OWNED_OBJECTS_BY_TYPE = `
|
|
174
170
|
query GetObjectOwnerAndOwnedObjectByType($object: SuiAddress!, $owned_object_type: String) {
|
|
@@ -204,7 +200,7 @@ export const GET_OBJECT_OWNER_AND_OWNED_OBJECTS_BY_TYPE = `
|
|
|
204
200
|
* Query to get an object's owner and their owned objects of a specific type
|
|
205
201
|
* Returns both BCS and JSON-decoded data for easier consumption
|
|
206
202
|
*
|
|
207
|
-
* @category GraphQL
|
|
203
|
+
* @category GraphQL Queries
|
|
208
204
|
*/
|
|
209
205
|
export const GET_OBJECT_OWNER_AND_OWNED_OBJECTS_WITH_JSON = `
|
|
210
206
|
query GetObjectOwnerAndOwnedObjectWithJson($object: SuiAddress!, $owned_object_type: String) {
|
|
@@ -242,7 +238,7 @@ export const GET_OBJECT_OWNER_AND_OWNED_OBJECTS_WITH_JSON = `
|
|
|
242
238
|
* Query to get full object details with JSON contents
|
|
243
239
|
* Used to fetch character details after getting the character ID from OwnerCap
|
|
244
240
|
*
|
|
245
|
-
* @category GraphQL
|
|
241
|
+
* @category GraphQL Queries
|
|
246
242
|
*/
|
|
247
243
|
export const GET_OBJECT_WITH_JSON = `
|
|
248
244
|
query GetObjectWithJson($address: SuiAddress!) {
|
|
@@ -267,7 +263,7 @@ export const GET_OBJECT_WITH_JSON = `
|
|
|
267
263
|
* Query to get all objects of a specific type owned by an address
|
|
268
264
|
* Returns object addresses only (lightweight)
|
|
269
265
|
*
|
|
270
|
-
* @category GraphQL
|
|
266
|
+
* @category GraphQL Queries
|
|
271
267
|
*/
|
|
272
268
|
export const GET_OWNED_OBJECTS_BY_TYPE = `
|
|
273
269
|
query GetOwnedObjectsByType($owner: SuiAddress!, $object_type: String) {
|
|
@@ -289,7 +285,7 @@ export const GET_OWNED_OBJECTS_BY_TYPE = `
|
|
|
289
285
|
* Query for fetching objects owned by an address filtered by package
|
|
290
286
|
* Returns full object data with dynamic fields
|
|
291
287
|
*
|
|
292
|
-
* @category GraphQL
|
|
288
|
+
* @category GraphQL Queries
|
|
293
289
|
*/
|
|
294
290
|
export const GET_OWNED_OBJECTS_BY_PACKAGE = `
|
|
295
291
|
query GetOwnedObjectsByPackage($owner: SuiAddress!, $packageId: SuiAddress!) {
|
|
@@ -336,7 +332,7 @@ export const GET_OWNED_OBJECTS_BY_PACKAGE = `
|
|
|
336
332
|
* Query to get all characters owned by a wallet
|
|
337
333
|
* Returns the characters owned by the wallet
|
|
338
334
|
*
|
|
339
|
-
* @category GraphQL
|
|
335
|
+
* @category GraphQL Queries
|
|
340
336
|
*/
|
|
341
337
|
export const GET_WALLET_CHARACTERS = `
|
|
342
338
|
query GetWalletCharacters($owner: SuiAddress!, $characterPlayerProfileType: String!) {
|
|
@@ -376,7 +372,7 @@ export const GET_WALLET_CHARACTERS = `
|
|
|
376
372
|
* Query to get character owned by a wallet and objects owned by the character
|
|
377
373
|
* Returns the character and objects owned by the character
|
|
378
374
|
*
|
|
379
|
-
* @category GraphQL
|
|
375
|
+
* @category GraphQL Queries
|
|
380
376
|
*/
|
|
381
377
|
export const GET_CHARACTER_AND_OWNED_OBJECTS = `
|
|
382
378
|
query GetCharacterAndOwnedObjects($owner: SuiAddress!, $characterPlayerProfileType: String!) {
|
|
@@ -440,7 +436,7 @@ query GetCharacterAndOwnedObjects($owner: SuiAddress!, $characterPlayerProfileTy
|
|
|
440
436
|
* Query to get a singleton object by its type
|
|
441
437
|
* Returns the first object of the specified type (useful for global/singleton objects)
|
|
442
438
|
*
|
|
443
|
-
* @category GraphQL
|
|
439
|
+
* @category GraphQL Queries
|
|
444
440
|
*/
|
|
445
441
|
export const GET_SINGLETON_OBJECT_BY_TYPE = `
|
|
446
442
|
query GetSingletonObjectByType($object_type: String) {
|
|
@@ -460,7 +456,7 @@ export const GET_SINGLETON_OBJECT_BY_TYPE = `
|
|
|
460
456
|
/**
|
|
461
457
|
* Query to get a singleton config object by its type
|
|
462
458
|
*
|
|
463
|
-
* @category GraphQL
|
|
459
|
+
* @category GraphQL Queries
|
|
464
460
|
*/
|
|
465
461
|
export const GET_SINGLETON_CONFIG_OBJECT_BY_TYPE = `
|
|
466
462
|
query GetSingletonConfigObjectByType($object_type: String!, $table_name: String!) {
|
|
@@ -504,7 +500,7 @@ export const GET_SINGLETON_CONFIG_OBJECT_BY_TYPE = `
|
|
|
504
500
|
* Query to get all objects of a specific type (global search)
|
|
505
501
|
* Use with caution - may return many results
|
|
506
502
|
*
|
|
507
|
-
* @category GraphQL
|
|
503
|
+
* @category GraphQL Queries
|
|
508
504
|
*/
|
|
509
505
|
export const GET_OBJECTS_BY_TYPE = `
|
|
510
506
|
query GetObjectsByType($object_type: String, $first: Int, $after: String) {
|
package/graphql/types.ts
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
// Base GraphQL Types
|
|
7
7
|
// ============================================================================
|
|
8
8
|
|
|
9
|
-
/** @category GraphQL */
|
|
9
|
+
/** Response wrapper for GraphQL with optional `data` and `errors`. @category GraphQL Types */
|
|
10
10
|
export interface GraphQLResponse<T = unknown> {
|
|
11
11
|
data?: T;
|
|
12
12
|
errors?: Array<{ message: string }>;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
/** @category GraphQL */
|
|
15
|
+
/** Pagination cursor and has-next flag. @category GraphQL Types */
|
|
16
16
|
export interface PageInfo {
|
|
17
17
|
hasNextPage: boolean;
|
|
18
18
|
endCursor: string | null;
|
|
@@ -22,44 +22,44 @@ export interface PageInfo {
|
|
|
22
22
|
// Shared building blocks (reused across response types)
|
|
23
23
|
// ============================================================================
|
|
24
24
|
|
|
25
|
-
/** @category GraphQL */
|
|
25
|
+
/** @category GraphQL Types */
|
|
26
26
|
export interface TypeRepr {
|
|
27
27
|
repr: string;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
/** @category GraphQL */
|
|
30
|
+
/** @category GraphQL Types */
|
|
31
31
|
export interface TypeReprWithLayout extends TypeRepr {
|
|
32
32
|
layout?: string;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
/** @category GraphQL */
|
|
35
|
+
/** @category GraphQL Types */
|
|
36
36
|
export interface ContentsBcs {
|
|
37
37
|
bcs: string;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
/** @category GraphQL */
|
|
40
|
+
/** @category GraphQL Types */
|
|
41
41
|
export interface ContentsTypeAndBcs extends ContentsBcs {
|
|
42
42
|
type: TypeRepr;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
/** @category GraphQL */
|
|
45
|
+
/** @category GraphQL Types */
|
|
46
46
|
export interface ContentsJsonAndBcs extends ContentsBcs {
|
|
47
47
|
json: Record<string, unknown>;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
/** @category GraphQL */
|
|
50
|
+
/** @category GraphQL Types */
|
|
51
51
|
export interface ContentsTypeJsonAndBcs extends ContentsJsonAndBcs {
|
|
52
52
|
type: TypeRepr;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/** Contents with type + json only (no bcs). Reuses ContentsTypeJsonAndBcs shape.
|
|
56
|
-
* @category GraphQL
|
|
56
|
+
* @category GraphQL Types
|
|
57
57
|
*/
|
|
58
58
|
export type ContentsTypeAndJson = Pick<ContentsTypeJsonAndBcs, "type" | "json">;
|
|
59
59
|
|
|
60
60
|
/** Node shape: contents.extract.asAddress.asObject.asMoveObject.contents.
|
|
61
61
|
* Reusable for any extract-path node whose inner contents are typed as T.
|
|
62
|
-
* @category GraphQL
|
|
62
|
+
* @category GraphQL Types
|
|
63
63
|
*/
|
|
64
64
|
export interface ExtractAsMoveObjectNode<T = ContentsTypeAndJson> {
|
|
65
65
|
contents: {
|
|
@@ -75,24 +75,24 @@ export interface ExtractAsMoveObjectNode<T = ContentsTypeAndJson> {
|
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
/** @category GraphQL */
|
|
78
|
+
/** @category GraphQL Types */
|
|
79
79
|
export interface PreviousTransaction {
|
|
80
80
|
effects?: { timestamp?: string };
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
/** @category GraphQL */
|
|
83
|
+
/** @category GraphQL Types */
|
|
84
84
|
export interface ObjectNodes<T> {
|
|
85
85
|
nodes: T[];
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
/** @category GraphQL */
|
|
88
|
+
/** @category GraphQL Types */
|
|
89
89
|
export interface AddressWithObjects<T> {
|
|
90
90
|
address: string;
|
|
91
91
|
objects: ObjectNodes<T>;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
/** GraphQL asAddress → asObject → asMoveObject ref chain.
|
|
95
|
-
* @category GraphQL
|
|
95
|
+
* @category GraphQL Types
|
|
96
96
|
*/
|
|
97
97
|
export interface AsMoveObjectRef<T> {
|
|
98
98
|
asAddress?: {
|
|
@@ -103,14 +103,14 @@ export interface AsMoveObjectRef<T> {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
/** Contents with only json (optional payload).
|
|
106
|
-
* @category GraphQL
|
|
106
|
+
* @category GraphQL Types
|
|
107
107
|
*/
|
|
108
108
|
export interface ContentsJsonOnly {
|
|
109
109
|
json: Record<string, unknown>;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
/** Move object ref whose contents have json of type T.
|
|
113
|
-
* @category GraphQL
|
|
113
|
+
* @category GraphQL Types
|
|
114
114
|
*/
|
|
115
115
|
export type MoveObjectRefWithJson<T> = AsMoveObjectRef<{
|
|
116
116
|
contents: { json: T };
|
|
@@ -120,14 +120,14 @@ export type MoveObjectRefWithJson<T> = AsMoveObjectRef<{
|
|
|
120
120
|
// Move Object Types
|
|
121
121
|
// ============================================================================
|
|
122
122
|
|
|
123
|
-
/** @category GraphQL */
|
|
123
|
+
/** @category GraphQL Types */
|
|
124
124
|
export interface MoveObjectContents {
|
|
125
125
|
json?: Record<string, unknown>;
|
|
126
126
|
bcs?: string;
|
|
127
127
|
type?: TypeReprWithLayout;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
/** @category GraphQL */
|
|
130
|
+
/** @category GraphQL Types */
|
|
131
131
|
export interface DynamicFieldNode {
|
|
132
132
|
contents: {
|
|
133
133
|
json: Record<string, unknown>;
|
|
@@ -139,7 +139,7 @@ export interface DynamicFieldNode {
|
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
/** @category GraphQL */
|
|
142
|
+
/** @category GraphQL Types */
|
|
143
143
|
export interface MoveObjectData {
|
|
144
144
|
contents: MoveObjectContents;
|
|
145
145
|
dynamicFields?: ObjectNodes<DynamicFieldNode>;
|
|
@@ -149,7 +149,7 @@ export interface MoveObjectData {
|
|
|
149
149
|
// Object Response Types
|
|
150
150
|
// ============================================================================
|
|
151
151
|
|
|
152
|
-
/** @category GraphQL */
|
|
152
|
+
/** @category GraphQL Types */
|
|
153
153
|
export interface SuiObjectResponse {
|
|
154
154
|
address?: string;
|
|
155
155
|
version?: number;
|
|
@@ -157,12 +157,12 @@ export interface SuiObjectResponse {
|
|
|
157
157
|
asMoveObject: MoveObjectData | null;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
/** @category GraphQL */
|
|
160
|
+
/** @category GraphQL Types */
|
|
161
161
|
export interface GetObjectResponse {
|
|
162
162
|
object?: SuiObjectResponse;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
/** @category GraphQL */
|
|
165
|
+
/** @category GraphQL Types */
|
|
166
166
|
export interface GetObjectByAddressResponse {
|
|
167
167
|
object?: {
|
|
168
168
|
address: string;
|
|
@@ -176,41 +176,41 @@ export interface GetObjectByAddressResponse {
|
|
|
176
176
|
// Owner & Owned Objects Response Types
|
|
177
177
|
// ============================================================================
|
|
178
178
|
|
|
179
|
-
/** @category GraphQL */
|
|
179
|
+
/** @category GraphQL Types */
|
|
180
180
|
export interface OwnedObjectNode {
|
|
181
181
|
contents: ContentsBcs;
|
|
182
182
|
previousTransaction?: PreviousTransaction;
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
-
/** @category GraphQL */
|
|
185
|
+
/** @category GraphQL Types */
|
|
186
186
|
export interface AddressOwner {
|
|
187
187
|
address: AddressWithObjects<OwnedObjectNode>;
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
/** @category GraphQL */
|
|
190
|
+
/** @category GraphQL Types */
|
|
191
191
|
export interface GetObjectOwnerAndOwnedObjectsResponse {
|
|
192
192
|
object?: { owner?: { address?: AddressOwner["address"] } };
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
-
/** @category GraphQL */
|
|
195
|
+
/** @category GraphQL Types */
|
|
196
196
|
export interface OwnedObjectNodeWithJson {
|
|
197
197
|
address: string;
|
|
198
198
|
contents: ContentsJsonAndBcs;
|
|
199
199
|
previousTransaction?: PreviousTransaction;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
-
/** @category GraphQL */
|
|
202
|
+
/** @category GraphQL Types */
|
|
203
203
|
export interface AddressOwnerWithJson {
|
|
204
204
|
address: AddressWithObjects<OwnedObjectNodeWithJson>;
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
-
/** @category GraphQL */
|
|
207
|
+
/** @category GraphQL Types */
|
|
208
208
|
export interface GetObjectOwnerAndOwnedObjectsWithJsonResponse {
|
|
209
209
|
object?: { owner?: { address?: AddressOwnerWithJson["address"] } };
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
/** Node shape for owner's objects in GetObjectAndCharacterOwner (authorizedObj → character).
|
|
213
|
-
* @category GraphQL
|
|
213
|
+
* @category GraphQL Types
|
|
214
214
|
*/
|
|
215
215
|
export interface CharacterOwnerNode {
|
|
216
216
|
contents: {
|
|
@@ -218,7 +218,7 @@ export interface CharacterOwnerNode {
|
|
|
218
218
|
};
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
/** @category GraphQL */
|
|
221
|
+
/** @category GraphQL Types */
|
|
222
222
|
export interface GetObjectAndCharacterOwnerResponse {
|
|
223
223
|
object: {
|
|
224
224
|
asMoveObject: {
|
|
@@ -235,7 +235,7 @@ export interface GetObjectAndCharacterOwnerResponse {
|
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
/** @category GraphQL */
|
|
238
|
+
/** @category GraphQL Types */
|
|
239
239
|
export interface GetObjectWithJsonResponse {
|
|
240
240
|
object?: {
|
|
241
241
|
address: string;
|
|
@@ -249,12 +249,12 @@ export interface GetObjectWithJsonResponse {
|
|
|
249
249
|
// GetOwnedObjectsByType Response Types
|
|
250
250
|
// ============================================================================
|
|
251
251
|
|
|
252
|
-
/** @category GraphQL */
|
|
252
|
+
/** @category GraphQL Types */
|
|
253
253
|
export interface OwnedObjectAddressNode {
|
|
254
254
|
address: string;
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
-
/** @category GraphQL */
|
|
257
|
+
/** @category GraphQL Types */
|
|
258
258
|
export interface GetOwnedObjectsByTypeResponse {
|
|
259
259
|
address?: { objects: ObjectNodes<OwnedObjectAddressNode> };
|
|
260
260
|
}
|
|
@@ -263,24 +263,24 @@ export interface GetOwnedObjectsByTypeResponse {
|
|
|
263
263
|
// GetOwnedObjectsByPackage Response Types
|
|
264
264
|
// ============================================================================
|
|
265
265
|
|
|
266
|
-
/** @category GraphQL */
|
|
266
|
+
/** @category GraphQL Types */
|
|
267
267
|
export interface OwnedObjectFullNode {
|
|
268
268
|
address: string;
|
|
269
269
|
version: number;
|
|
270
270
|
asMoveObject: MoveObjectData | null;
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
-
/** @category GraphQL */
|
|
273
|
+
/** @category GraphQL Types */
|
|
274
274
|
export interface GetOwnedObjectsByPackageResponse {
|
|
275
275
|
objects: ObjectNodes<OwnedObjectFullNode>;
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
-
/** @category GraphQL */
|
|
278
|
+
/** @category GraphQL Types */
|
|
279
279
|
export interface GetWalletCharactersResponse {
|
|
280
280
|
address: AddressWithObjects<ExtractAsMoveObjectNode>;
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
-
/** @category GraphQL */
|
|
283
|
+
/** @category GraphQL Types */
|
|
284
284
|
export interface CharacterAndOwnedObjectsNode {
|
|
285
285
|
contents: {
|
|
286
286
|
extract: {
|
|
@@ -296,7 +296,7 @@ export interface CharacterAndOwnedObjectsNode {
|
|
|
296
296
|
};
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
/** @category GraphQL */
|
|
299
|
+
/** @category GraphQL Types */
|
|
300
300
|
export interface GetCharacterAndOwnedObjectsResponse {
|
|
301
301
|
address: AddressWithObjects<CharacterAndOwnedObjectsNode>;
|
|
302
302
|
}
|
|
@@ -305,18 +305,18 @@ export interface GetCharacterAndOwnedObjectsResponse {
|
|
|
305
305
|
// Singleton & Type-based Query Response Types
|
|
306
306
|
// ============================================================================
|
|
307
307
|
|
|
308
|
-
/** @category GraphQL */
|
|
308
|
+
/** @category GraphQL Types */
|
|
309
309
|
export interface GetSingletonObjectByTypeResponse {
|
|
310
310
|
objects: ObjectNodes<OwnedObjectAddressNode>;
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
-
/** @category GraphQL */
|
|
313
|
+
/** @category GraphQL Types */
|
|
314
314
|
export interface ConfigExtractDynamicFieldNode {
|
|
315
315
|
key: { json: string };
|
|
316
316
|
value: { json: string };
|
|
317
317
|
}
|
|
318
318
|
|
|
319
|
-
/** @category GraphQL */
|
|
319
|
+
/** @category GraphQL Types */
|
|
320
320
|
export interface GetSingletonConfigObjectByTypeResponse {
|
|
321
321
|
objects: {
|
|
322
322
|
nodes: Array<{
|
|
@@ -341,7 +341,7 @@ export interface GetSingletonConfigObjectByTypeResponse {
|
|
|
341
341
|
};
|
|
342
342
|
}
|
|
343
343
|
|
|
344
|
-
/** @category GraphQL */
|
|
344
|
+
/** @category GraphQL Types */
|
|
345
345
|
export interface ObjectWithContentsNode {
|
|
346
346
|
address: string;
|
|
347
347
|
version: number;
|
|
@@ -350,7 +350,7 @@ export interface ObjectWithContentsNode {
|
|
|
350
350
|
} | null;
|
|
351
351
|
}
|
|
352
352
|
|
|
353
|
-
/** @category GraphQL */
|
|
353
|
+
/** @category GraphQL Types */
|
|
354
354
|
export interface GetObjectsByTypeResponse {
|
|
355
355
|
objects: ObjectNodes<ObjectWithContentsNode> & { pageInfo: PageInfo };
|
|
356
356
|
}
|
|
@@ -362,7 +362,7 @@ export interface GetObjectsByTypeResponse {
|
|
|
362
362
|
/**
|
|
363
363
|
* Raw Sui object data structure returned from the EVE Frontier package
|
|
364
364
|
*
|
|
365
|
-
* @category GraphQL
|
|
365
|
+
* @category GraphQL Types
|
|
366
366
|
*/
|
|
367
367
|
export interface RawSuiObjectData {
|
|
368
368
|
id: string;
|
|
@@ -422,7 +422,7 @@ export interface RawSuiObjectData {
|
|
|
422
422
|
* OwnerCap JSON structure - returned from Character OwnerCap query
|
|
423
423
|
* Contains the authorized_object_id which is the Character ID
|
|
424
424
|
*
|
|
425
|
-
* @category GraphQL
|
|
425
|
+
* @category GraphQL Types
|
|
426
426
|
*/
|
|
427
427
|
export interface OwnerCapData {
|
|
428
428
|
authorized_object_id: string;
|
|
@@ -432,7 +432,7 @@ export interface OwnerCapData {
|
|
|
432
432
|
/**
|
|
433
433
|
* Raw Character data structure from the EVE Frontier package
|
|
434
434
|
*
|
|
435
|
-
* @category GraphQL
|
|
435
|
+
* @category GraphQL Types
|
|
436
436
|
*/
|
|
437
437
|
export interface RawCharacterData {
|
|
438
438
|
id: `0x${string}`;
|
|
@@ -456,7 +456,7 @@ export interface RawCharacterData {
|
|
|
456
456
|
/**
|
|
457
457
|
* Processed character/owner information
|
|
458
458
|
*
|
|
459
|
-
* @category GraphQL
|
|
459
|
+
* @category GraphQL Types
|
|
460
460
|
*/
|
|
461
461
|
export interface CharacterInfo {
|
|
462
462
|
id: string;
|
package/hooks/useConnection.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { VaultContextType } from "../types";
|
|
|
9
9
|
* and methods to connect/disconnect wallets. Automatically detects EVE Vault
|
|
10
10
|
* wallet availability.
|
|
11
11
|
*
|
|
12
|
-
* @category Hooks
|
|
12
|
+
* @category Hooks - Connection
|
|
13
13
|
* @returns Object containing wallet state and connection methods:
|
|
14
14
|
* - `currentAccount` - The currently connected wallet account (or null)
|
|
15
15
|
* - `walletAddress` - The connected wallet's address string
|
package/hooks/useNotification.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { NotificationContextType } from "../types";
|
|
|
9
9
|
* and info messages to users. Commonly used after transaction completions
|
|
10
10
|
* or to display important status updates.
|
|
11
11
|
*
|
|
12
|
-
* @category Hooks
|
|
12
|
+
* @category Hooks - Notification
|
|
13
13
|
* @returns Object containing notification state and methods:
|
|
14
14
|
* - `notify` - Function to trigger a notification
|
|
15
15
|
* - `notification` - Current notification state object with:
|
package/hooks/useSmartObject.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { SmartObjectContextType } from "../types";
|
|
|
10
10
|
* The assembly ID is determined from URL query parameters (`?itemId=` and `?tenant=`)
|
|
11
11
|
* or environment variables as a Sui object ID (`VITE_OBJECT_ID`).
|
|
12
12
|
*
|
|
13
|
-
* @category Hooks
|
|
13
|
+
* @category Hooks - Smart Object
|
|
14
14
|
* @returns Object containing assembly state and methods:
|
|
15
15
|
* - `assembly` - The transformed assembly data (or null if not loaded)
|
|
16
16
|
* - `character` - The owner character information (or null)
|