@evefrontier/dapp-kit 0.1.0 → 0.1.1
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/CHANGELOG.md +7 -0
- package/docs/api/assets/hierarchy.js +1 -1
- package/docs/api/assets/navigation.js +1 -1
- package/docs/api/assets/search.js +1 -1
- package/docs/api/classes/WalletNoAccountSelectedError.html +3 -3
- package/docs/api/classes/WalletNotConnectedError.html +3 -3
- package/docs/api/classes/WalletSponsoredTransactionNotSupportedError.html +3 -3
- package/docs/api/enums/ActionTypes.html +2 -2
- package/docs/api/enums/Assemblies.html +2 -2
- package/docs/api/enums/QueryParams.html +2 -2
- package/docs/api/enums/Severity.html +2 -2
- package/docs/api/enums/SponsoredTransactionActions.html +3 -3
- package/docs/api/enums/State.html +2 -2
- package/docs/api/enums/SupportedWallets.html +3 -0
- package/docs/api/enums/TYPEIDS.html +3 -3
- package/docs/api/functions/EveFrontierProvider.html +2 -2
- package/docs/api/functions/NotificationProvider.html +2 -2
- package/docs/api/functions/SmartObjectProvider.html +2 -2
- package/docs/api/functions/VaultProvider.html +1 -1
- package/docs/api/functions/abbreviateAddress.html +2 -2
- package/docs/api/functions/assertAssemblyType.html +2 -2
- package/docs/api/functions/clickToCopy.html +1 -1
- package/docs/api/functions/executeGraphQLQuery.html +2 -2
- package/docs/api/functions/findOwnerByAddress.html +2 -2
- package/docs/api/functions/formatDuration.html +2 -2
- package/docs/api/functions/formatM3.html +2 -2
- package/docs/api/functions/getAssemblyType.html +2 -2
- package/docs/api/functions/getAssemblyTypeApiString.html +2 -2
- package/docs/api/functions/getAssemblyWithOwner.html +2 -2
- package/docs/api/functions/getCharacterOwnerCapType.html +2 -2
- package/docs/api/functions/getCommonItems.html +1 -1
- package/docs/api/functions/getDappUrl.html +2 -2
- package/docs/api/functions/getDatahubGameInfo.html +2 -2
- package/docs/api/functions/getEnv.html +1 -1
- package/docs/api/functions/getEveWorldPackageId.html +2 -2
- package/docs/api/functions/getObjectByAddress.html +2 -2
- package/docs/api/functions/getObjectId.html +2 -2
- package/docs/api/functions/getObjectOwnerAndOwnedObjectsByType.html +2 -2
- package/docs/api/functions/getObjectRegistryType.html +2 -2
- package/docs/api/functions/getObjectWithDynamicFields.html +2 -2
- package/docs/api/functions/getObjectWithJson.html +2 -2
- package/docs/api/functions/getObjectsByType.html +2 -2
- package/docs/api/functions/getOwnedObjectsByPackage.html +2 -2
- package/docs/api/functions/getOwnedObjectsByType.html +2 -2
- package/docs/api/functions/getRegistryAddress.html +2 -2
- package/docs/api/functions/getSingletonObjectByType.html +2 -2
- package/docs/api/functions/getSponsoredTransactionFeature.html +2 -2
- package/docs/api/functions/getSuiGraphqlEndpoint.html +2 -2
- package/docs/api/functions/getTxUrl.html +2 -2
- package/docs/api/functions/getVolumeM3.html +2 -2
- package/docs/api/functions/hasSponsoredTransactionFeature.html +2 -2
- package/docs/api/functions/isOwner.html +2 -2
- package/docs/api/functions/parseErrorFromMessage.html +1 -1
- package/docs/api/functions/parseStatus.html +2 -2
- package/docs/api/functions/parseURL.html +1 -1
- package/docs/api/functions/removeTrailingZeros.html +1 -1
- package/docs/api/functions/transformToAssembly.html +2 -2
- package/docs/api/functions/transformToCharacter.html +2 -2
- package/docs/api/functions/useConnection.html +2 -2
- package/docs/api/functions/useNotification.html +2 -2
- package/docs/api/functions/useSmartObject.html +2 -2
- package/docs/api/functions/useSponsoredTransaction.html +9 -9
- package/docs/api/functions/walletSupportsSponsoredTransaction.html +2 -2
- package/docs/api/hierarchy.html +1 -1
- package/docs/api/index.html +2 -2
- package/docs/api/interfaces/AddressOwner.html +2 -2
- package/docs/api/interfaces/AddressOwnerWithJson.html +2 -2
- package/docs/api/interfaces/AssemblyProperties.html +2 -2
- package/docs/api/interfaces/CharacterInfo.html +3 -3
- package/docs/api/interfaces/DatahubGameInfo.html +15 -15
- package/docs/api/interfaces/DetailedAssemblyResponse.html +2 -2
- package/docs/api/interfaces/DetailedSmartCharacterResponse.html +2 -2
- package/docs/api/interfaces/DynamicFieldNode.html +2 -2
- package/docs/api/interfaces/EphemeralInventory.html +2 -2
- package/docs/api/interfaces/EveFrontierSponsoredTransactionFeature.html +3 -3
- package/docs/api/interfaces/GameTypeResponse.html +2 -2
- package/docs/api/interfaces/GateModule.html +2 -2
- package/docs/api/interfaces/GetObjectByAddressResponse.html +2 -2
- package/docs/api/interfaces/GetObjectOwnerAndOwnedObjectsResponse.html +2 -2
- package/docs/api/interfaces/GetObjectOwnerAndOwnedObjectsWithJsonResponse.html +2 -2
- package/docs/api/interfaces/GetObjectResponse.html +2 -2
- package/docs/api/interfaces/GetObjectWithJsonResponse.html +2 -2
- package/docs/api/interfaces/GetObjectsByTypeResponse.html +2 -2
- package/docs/api/interfaces/GetOwnedObjectsByPackageResponse.html +2 -2
- package/docs/api/interfaces/GetOwnedObjectsByTypeResponse.html +2 -2
- package/docs/api/interfaces/GetSingletonObjectByTypeResponse.html +2 -2
- package/docs/api/interfaces/GraphQLResponse.html +2 -2
- package/docs/api/interfaces/InventoryItem.html +2 -2
- package/docs/api/interfaces/ManufacturingModule.html +2 -2
- package/docs/api/interfaces/MoveObjectContents.html +2 -2
- package/docs/api/interfaces/MoveObjectData.html +2 -2
- package/docs/api/interfaces/NetworkNodeModule.html +2 -3
- package/docs/api/interfaces/NotificationContextType.html +2 -2
- package/docs/api/interfaces/NotificationState.html +2 -2
- package/docs/api/interfaces/Notify.html +2 -2
- package/docs/api/interfaces/ObjectWithContentsNode.html +2 -2
- package/docs/api/interfaces/OwnedObjectAddressNode.html +2 -2
- package/docs/api/interfaces/OwnedObjectFullNode.html +2 -2
- package/docs/api/interfaces/OwnedObjectNode.html +2 -2
- package/docs/api/interfaces/OwnedObjectNodeWithJson.html +2 -2
- package/docs/api/interfaces/OwnerCapData.html +3 -3
- package/docs/api/interfaces/PageInfo.html +2 -2
- package/docs/api/interfaces/RawCharacterData.html +3 -3
- package/docs/api/interfaces/RawSuiObjectData.html +6 -6
- package/docs/api/interfaces/RefineryModule.html +2 -2
- package/docs/api/interfaces/SmartAssemblyResponse.html +2 -2
- package/docs/api/interfaces/SmartObjectContextType.html +3 -2
- package/docs/api/interfaces/SponsoredTransactionInput.html +8 -8
- package/docs/api/interfaces/SponsoredTransactionOutput.html +5 -5
- package/docs/api/interfaces/StorageModule.html +2 -2
- package/docs/api/interfaces/SuiObjectResponse.html +2 -2
- package/docs/api/interfaces/TransformOptions.html +4 -4
- package/docs/api/interfaces/TurretModule.html +2 -2
- package/docs/api/interfaces/VaultContextType.html +3 -2
- package/docs/api/modules.html +1 -1
- package/docs/api/types/AssemblyType.html +1 -1
- package/docs/api/types/ErrorType.html +2 -2
- package/docs/api/types/SendSponsoredTransactionFn.html +1 -1
- package/docs/api/types/SponsoredTransactionArgs.html +2 -2
- package/docs/api/types/SponsoredTransactionAssemblyType.html +2 -2
- package/docs/api/types/SponsoredTransactionMethod.html +2 -2
- package/docs/api/types/UseSponsoredTransactionArgs.html +2 -2
- package/docs/api/types/UseSponsoredTransactionError.html +2 -2
- package/docs/api/types/UseSponsoredTransactionMutationOptions.html +2 -2
- package/docs/api/variables/ASSEMBLY_TYPE_API_STRING.html +2 -0
- package/docs/api/variables/ERRORS.html +1 -1
- package/docs/api/variables/ERROR_MESSAGES.html +1 -1
- package/docs/api/variables/EVEFRONTIER_SPONSORED_TRANSACTION.html +2 -2
- package/docs/api/variables/EXCLUDED_TYPEIDS.html +1 -1
- package/docs/api/variables/GET_OBJECTS_BY_TYPE.html +2 -2
- package/docs/api/variables/GET_OBJECT_BY_ADDRESS.html +2 -2
- package/docs/api/variables/GET_OBJECT_OWNER_AND_OWNED_OBJECTS_BY_TYPE.html +2 -2
- package/docs/api/variables/GET_OBJECT_OWNER_AND_OWNED_OBJECTS_WITH_JSON.html +2 -2
- package/docs/api/variables/GET_OBJECT_WITH_DYNAMIC_FIELDS.html +2 -2
- package/docs/api/variables/GET_OBJECT_WITH_JSON.html +2 -2
- package/docs/api/variables/GET_OWNED_OBJECTS_BY_PACKAGE.html +2 -2
- package/docs/api/variables/GET_OWNED_OBJECTS_BY_TYPE.html +2 -2
- package/docs/api/variables/GET_SINGLETON_OBJECT_BY_TYPE.html +2 -2
- package/docs/api/variables/NotificationContext.html +1 -1
- package/docs/api/variables/ONE_M3.html +2 -2
- package/docs/api/variables/POLLING_INTERVAL.html +2 -2
- package/docs/api/variables/STORAGE_KEYS.html +2 -2
- package/docs/api/variables/SmartObjectContext.html +1 -1
- package/docs/api/variables/VaultContext.html +1 -1
- package/docs/api/variables/dAppKit.html +2 -2
- package/hooks/useConnection.ts +2 -1
- package/hooks/useNotification.ts +5 -3
- package/hooks/useSmartObject.ts +2 -4
- package/hooks/useSponsoredTransaction.ts +35 -17
- package/index.ts +0 -10
- package/package.json +1 -1
- package/providers/NotificationProvider.tsx +1 -20
- package/providers/SmartObjectProvider.tsx +1 -26
- package/providers/VaultProvider.tsx +6 -14
- package/providers/index.ts +1 -8
- package/types/contexts.ts +57 -0
- package/types/index.ts +1 -1
- package/types/sponsoredTransaction.ts +35 -0
- package/types/worldApiReturnTypes.ts +6 -4
- package/utils/transforms.ts +7 -8
- package/utils/utils.ts +1 -1
- package/vite-env.d.ts +0 -2
- package/wallet/features.ts +9 -38
- package/wallet/index.ts +0 -2
- package/wallet/utils.ts +1 -1
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { WalletAccount } from "@mysten/wallet-standard";
|
|
2
|
+
import {
|
|
3
|
+
Assemblies,
|
|
4
|
+
AssemblyType,
|
|
5
|
+
DetailedSmartCharacterResponse,
|
|
6
|
+
Severity,
|
|
7
|
+
} from "./types";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Vault Context Type
|
|
11
|
+
* @category Types */
|
|
12
|
+
export interface VaultContextType {
|
|
13
|
+
currentAccount: WalletAccount | null;
|
|
14
|
+
walletAddress: string | undefined;
|
|
15
|
+
hasEveVault: boolean;
|
|
16
|
+
isConnected: boolean;
|
|
17
|
+
handleConnect: () => void;
|
|
18
|
+
handleDisconnect: () => void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export enum SupportedWallets {
|
|
22
|
+
EVE_VAULT = "Eve Vault",
|
|
23
|
+
EVE_FRONTIER_CLIENT_WALLET = "EVE Frontier Client Wallet",
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Smart Object Context Type
|
|
28
|
+
* @category Types */
|
|
29
|
+
export interface SmartObjectContextType {
|
|
30
|
+
assembly: AssemblyType<Assemblies> | null;
|
|
31
|
+
character: DetailedSmartCharacterResponse | null;
|
|
32
|
+
selectedObjectId: string;
|
|
33
|
+
loading: boolean;
|
|
34
|
+
error: string | null;
|
|
35
|
+
setSelectedObjectId: (id: string) => void;
|
|
36
|
+
refetch: () => Promise<void>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** @category Types */
|
|
40
|
+
export interface NotificationContextType {
|
|
41
|
+
notify: (notification: {
|
|
42
|
+
type: Severity;
|
|
43
|
+
txHash?: string;
|
|
44
|
+
message?: string;
|
|
45
|
+
}) => void;
|
|
46
|
+
notification: NotificationState;
|
|
47
|
+
handleClose: () => void;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** @category Types */
|
|
51
|
+
export interface NotificationState {
|
|
52
|
+
message: string;
|
|
53
|
+
txHash: string;
|
|
54
|
+
severity: Severity;
|
|
55
|
+
handleClose: () => void;
|
|
56
|
+
isOpen: boolean;
|
|
57
|
+
}
|
package/types/index.ts
CHANGED
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
SponsoredTransactionArgs,
|
|
3
3
|
SponsoredTransactionOutput,
|
|
4
4
|
} from "../wallet";
|
|
5
|
+
import { Assemblies } from "./types";
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Available sponsored transaction actions
|
|
@@ -24,3 +25,37 @@ export type SendSponsoredTransactionFn = (
|
|
|
24
25
|
onError?: (error: Error) => void;
|
|
25
26
|
},
|
|
26
27
|
) => Promise<SponsoredTransactionOutput>;
|
|
28
|
+
|
|
29
|
+
// ============================================================================
|
|
30
|
+
// Feature Identifiers
|
|
31
|
+
// ============================================================================
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Feature identifier for sponsored transactions.
|
|
35
|
+
* Wallets implementing this feature can request gas sponsorship from
|
|
36
|
+
* the EVE Frontier sponsored-transaction backend service.
|
|
37
|
+
*
|
|
38
|
+
* @category Wallet
|
|
39
|
+
*/
|
|
40
|
+
export const EVEFRONTIER_SPONSORED_TRANSACTION =
|
|
41
|
+
"evefrontier:sponsoredTransaction" as const;
|
|
42
|
+
|
|
43
|
+
// ============================================================================
|
|
44
|
+
// Sponsored Transaction Types
|
|
45
|
+
// ============================================================================
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Map assembly types to API strings
|
|
49
|
+
*/
|
|
50
|
+
export const ASSEMBLY_TYPE_API_STRING: Record<Assemblies, string> = {
|
|
51
|
+
[Assemblies.SmartStorageUnit]: "storage-units",
|
|
52
|
+
[Assemblies.SmartTurret]: "turrets",
|
|
53
|
+
[Assemblies.SmartGate]: "gates",
|
|
54
|
+
[Assemblies.NetworkNode]: "network-nodes",
|
|
55
|
+
[Assemblies.Manufacturing]: "manufacturing",
|
|
56
|
+
[Assemblies.Refinery]: "refineries",
|
|
57
|
+
} as const;
|
|
58
|
+
|
|
59
|
+
/** API slug for assembly type in sponsored transaction payloads (e.g. "storage-units"). */
|
|
60
|
+
export type SponsoredTransactionAssemblyType =
|
|
61
|
+
(typeof ASSEMBLY_TYPE_API_STRING)[Assemblies];
|
|
@@ -65,7 +65,6 @@ export interface GateModule {
|
|
|
65
65
|
/** @category Types */
|
|
66
66
|
export interface NetworkNodeModule {
|
|
67
67
|
fuel: FuelResponse;
|
|
68
|
-
burn: BurnResponse;
|
|
69
68
|
energyProduction: number;
|
|
70
69
|
energyMaxCapacity: number;
|
|
71
70
|
totalReservedEnergy: number;
|
|
@@ -78,9 +77,13 @@ export interface NetworkNodeModule {
|
|
|
78
77
|
|
|
79
78
|
/** @category Types @internal */
|
|
80
79
|
export interface FuelResponse {
|
|
81
|
-
|
|
80
|
+
quantity: number;
|
|
82
81
|
burnRateInMs: number;
|
|
83
|
-
|
|
82
|
+
burnStartTime: number;
|
|
83
|
+
isBurning: boolean;
|
|
84
|
+
lastUpdated: number;
|
|
85
|
+
maxCapacity: number;
|
|
86
|
+
previousCycleElapsedTime: number;
|
|
84
87
|
unitVolume: number;
|
|
85
88
|
typeId: number;
|
|
86
89
|
}
|
|
@@ -89,7 +92,6 @@ export interface FuelResponse {
|
|
|
89
92
|
export interface BurnResponse {
|
|
90
93
|
isBurning: boolean;
|
|
91
94
|
startTime: string;
|
|
92
|
-
previousCycleElapsedTimeInSec: number;
|
|
93
95
|
}
|
|
94
96
|
|
|
95
97
|
// =========================================
|
package/utils/transforms.ts
CHANGED
|
@@ -194,19 +194,18 @@ export async function transformToAssembly(
|
|
|
194
194
|
...baseAssembly,
|
|
195
195
|
networkNode: {
|
|
196
196
|
fuel: {
|
|
197
|
-
amount: parseInt(rawData.fuel?.quantity || "0", 10),
|
|
198
197
|
burnRateInMs: parseInt(rawData.fuel?.burn_rate_in_ms || "0", 10),
|
|
199
|
-
|
|
200
|
-
unitVolume: parseInt(rawData.fuel?.unit_volume || "0", 10),
|
|
201
|
-
typeId: parseInt(rawData.fuel?.type_id || "0", 10),
|
|
202
|
-
},
|
|
203
|
-
burn: {
|
|
198
|
+
burnStartTime: parseInt(rawData.fuel?.burn_start_time || "0", 10),
|
|
204
199
|
isBurning: rawData.fuel?.is_burning || false,
|
|
205
|
-
|
|
206
|
-
|
|
200
|
+
lastUpdated: parseInt(rawData.fuel?.last_updated || "0", 10),
|
|
201
|
+
maxCapacity: parseInt(rawData.fuel?.max_capacity || "0", 10),
|
|
202
|
+
previousCycleElapsedTime: parseInt(
|
|
207
203
|
rawData.fuel?.previous_cycle_elapsed_time || "0",
|
|
208
204
|
10,
|
|
209
205
|
),
|
|
206
|
+
quantity: parseInt(rawData.fuel?.quantity || "0", 10),
|
|
207
|
+
typeId: parseInt(rawData.fuel?.type_id || "0", 10),
|
|
208
|
+
unitVolume: parseInt(rawData.fuel?.unit_volume || "0", 10),
|
|
210
209
|
},
|
|
211
210
|
energyProduction: parseInt(
|
|
212
211
|
rawData.energy_source?.current_energy_production || "0",
|
package/utils/utils.ts
CHANGED
|
@@ -256,7 +256,7 @@ export const formatDuration = (seconds: number): string => {
|
|
|
256
256
|
const formattedDays = String(days).padStart(2, "0");
|
|
257
257
|
const formattedHours = String(hours).padStart(2, "0");
|
|
258
258
|
const formattedMinutes = String(minutes).padStart(2, "0");
|
|
259
|
-
const formattedSeconds = String(remainingSeconds).padStart(2, "0");
|
|
259
|
+
const formattedSeconds = String(remainingSeconds.toFixed(0)).padStart(2, "0");
|
|
260
260
|
|
|
261
261
|
if (days > 0) {
|
|
262
262
|
return `${formattedDays}d ${formattedHours}h ${formattedMinutes}m ${formattedSeconds}s`;
|
package/vite-env.d.ts
CHANGED
|
@@ -7,8 +7,6 @@ interface ImportMetaEnv {
|
|
|
7
7
|
readonly VITE_EVE_WORLD_PACKAGE_ID: string;
|
|
8
8
|
/** Optional smart assembly item ID override */
|
|
9
9
|
readonly VITE_ITEM_ID?: string;
|
|
10
|
-
/** Tenant identifier (required when VITE_ITEM_ID is set) */
|
|
11
|
-
readonly VITE_EVE_WORLD_TENANT?: string;
|
|
12
10
|
}
|
|
13
11
|
|
|
14
12
|
interface ImportMeta {
|
package/wallet/features.ts
CHANGED
|
@@ -7,44 +7,13 @@
|
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
9
|
Assemblies,
|
|
10
|
+
ASSEMBLY_TYPE_API_STRING,
|
|
10
11
|
AssemblyType,
|
|
12
|
+
EVEFRONTIER_SPONSORED_TRANSACTION,
|
|
11
13
|
SponsoredTransactionActions,
|
|
14
|
+
SponsoredTransactionAssemblyType,
|
|
12
15
|
} from "../types";
|
|
13
16
|
|
|
14
|
-
// ============================================================================
|
|
15
|
-
// Feature Identifiers
|
|
16
|
-
// ============================================================================
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Feature identifier for sponsored transactions.
|
|
20
|
-
* Wallets implementing this feature can request gas sponsorship from
|
|
21
|
-
* the EVE Frontier sponsored-transaction backend service.
|
|
22
|
-
*
|
|
23
|
-
* @category Wallet
|
|
24
|
-
*/
|
|
25
|
-
export const EVEFRONTIER_SPONSORED_TRANSACTION =
|
|
26
|
-
"evefrontier:sponsoredTransaction" as const;
|
|
27
|
-
|
|
28
|
-
// ============================================================================
|
|
29
|
-
// Sponsored Transaction Types
|
|
30
|
-
// ============================================================================
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Map assembly types to API strings
|
|
34
|
-
*/
|
|
35
|
-
const ASSEMBLY_TYPE_API_STRING: Record<Assemblies, string> = {
|
|
36
|
-
[Assemblies.SmartStorageUnit]: "storage-units",
|
|
37
|
-
[Assemblies.SmartTurret]: "turrets",
|
|
38
|
-
[Assemblies.SmartGate]: "gates",
|
|
39
|
-
[Assemblies.NetworkNode]: "network-nodes",
|
|
40
|
-
[Assemblies.Manufacturing]: "manufacturing",
|
|
41
|
-
[Assemblies.Refinery]: "refineries",
|
|
42
|
-
} as const;
|
|
43
|
-
|
|
44
|
-
/** API slug for assembly type in sponsored transaction payloads (e.g. "storage-units"). */
|
|
45
|
-
export type SponsoredTransactionAssemblyType =
|
|
46
|
-
(typeof ASSEMBLY_TYPE_API_STRING)[Assemblies];
|
|
47
|
-
|
|
48
17
|
/**
|
|
49
18
|
* Maps an assembly type enum to the API string expected by the sponsored transaction backend.
|
|
50
19
|
*
|
|
@@ -68,21 +37,23 @@ export interface SponsoredTransactionInput {
|
|
|
68
37
|
txAction: SponsoredTransactionActions;
|
|
69
38
|
/** Assembly ID */
|
|
70
39
|
assembly: AssemblyType<Assemblies>["item_id"];
|
|
40
|
+
tenant: string;
|
|
71
41
|
/** The assembly type to be sponsored and executed */
|
|
72
42
|
assemblyType: SponsoredTransactionAssemblyType;
|
|
73
43
|
/** The Sui chain to execute on (e.g., "sui:testnet", "sui:mainnet") */
|
|
74
44
|
chain: `sui:${string}`;
|
|
75
|
-
/**
|
|
76
|
-
|
|
45
|
+
/** Additional properties */
|
|
46
|
+
[key: string]: unknown;
|
|
77
47
|
}
|
|
78
48
|
|
|
79
|
-
/** Sponsored tx args with assembly object; id and assemblyType are derived. */
|
|
49
|
+
/** Sponsored tx args with assembly object; id and assemblyType are derived. Tenant is optional; the hook resolves it from args, URL query param, or default. */
|
|
80
50
|
export type SponsoredTransactionArgs = Omit<
|
|
81
51
|
SponsoredTransactionInput,
|
|
82
|
-
"assembly" | "assemblyType" | "account"
|
|
52
|
+
"assembly" | "assemblyType" | "account" | "tenant"
|
|
83
53
|
> & {
|
|
84
54
|
assembly: AssemblyType<Assemblies>;
|
|
85
55
|
account?: string;
|
|
56
|
+
tenant?: string;
|
|
86
57
|
};
|
|
87
58
|
|
|
88
59
|
/**
|
package/wallet/index.ts
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
|
|
7
7
|
// Feature definitions and types
|
|
8
8
|
export {
|
|
9
|
-
EVEFRONTIER_SPONSORED_TRANSACTION,
|
|
10
9
|
getAssemblyTypeApiString,
|
|
11
10
|
hasSponsoredTransactionFeature,
|
|
12
11
|
supportsSponsoredTransaction,
|
|
@@ -14,7 +13,6 @@ export {
|
|
|
14
13
|
export type {
|
|
15
14
|
EveFrontierSponsoredTransactionFeature,
|
|
16
15
|
SponsoredTransactionArgs,
|
|
17
|
-
SponsoredTransactionAssemblyType,
|
|
18
16
|
SponsoredTransactionInput,
|
|
19
17
|
SponsoredTransactionMethod,
|
|
20
18
|
SponsoredTransactionOutput,
|
package/wallet/utils.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Wallet } from "@mysten/wallet-standard";
|
|
2
2
|
import {
|
|
3
|
-
EVEFRONTIER_SPONSORED_TRANSACTION,
|
|
4
3
|
hasSponsoredTransactionFeature,
|
|
5
4
|
supportsSponsoredTransaction,
|
|
6
5
|
type EveFrontierSponsoredTransactionFeature,
|
|
7
6
|
type SponsoredTransactionMethod,
|
|
8
7
|
} from "./features";
|
|
8
|
+
import { EVEFRONTIER_SPONSORED_TRANSACTION } from "../types";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Check if a wallet supports the EVE Frontier sponsored transaction feature.
|