getStarknetIdUnboundedUserData
Action for getting unbounded user data associated with a Starknet ID.
Import
import { getStarknetIdUnboundedUserData } from "starkweb/core";
Usage
index.ts
import { getStarknetIdUnboundedUserData } from "starkweb/core";
import { config } from "./config";
const userData = await getStarknetIdUnboundedUserData(config, {
starknetId: "0x123...",
field: "profile",
domain: "app",
selector: "avatar",
});
Parameters
import { type GetStarknetIdUnboundedUserDataParameters } from "starkweb/core";
starknetId
Hex
The Starknet ID to get unbounded user data for.
field
string
The specific field of user data to retrieve.
domain
string
The domain for the unbounded data.
selector
string
The selector for the specific data field.
index.ts
import { getStarknetIdUnboundedUserData } from "starkweb/core";
import { config } from "./config";
const userData = await getStarknetIdUnboundedUserData(config, {
starknetId: "0x123...",
field: "profile",
domain: "app",
selector: "avatar",
});
chainId (optional)
Hex | undefined
The chain ID to query. If not provided, uses the current chain.
index.ts
import { getStarknetIdUnboundedUserData } from "starkweb/core";
import { mainnet } from "starkweb/chains";
import { config } from "./config";
const userData = await getStarknetIdUnboundedUserData(config, {
starknetId: "0x123...",
field: "profile",
domain: "app",
selector: "avatar",
chainId: mainnet.chain_id,
});
Return Type
import { type GetStarknetIdUnboundedUserDataReturnType } from "starkweb/core";
Returns the unbounded user data value for the specified field, domain, and selector.
Example
example.ts
import { getStarknetIdUnboundedUserData } from "starkweb/core";
import { mainnet } from "starkweb/chains";
import { config } from "./config";
// Get unbounded user data on current chain
const userData = await getStarknetIdUnboundedUserData(config, {
starknetId: "0x123...",
field: "profile",
domain: "app",
selector: "avatar",
});
console.log("Unbounded user data:", userData);
// Get unbounded user data on specific chain
const mainnetData = await getStarknetIdUnboundedUserData(config, {
starknetId: "0x123...",
field: "profile",
domain: "app",
selector: "avatar",
chainId: mainnet.chain_id,
});
Error
import { type GetStarknetIdUnboundedUserDataErrorType } from "starkweb/core";
TanStack Query
import {
type GetStarknetIdUnboundedUserDataData,
type GetStarknetIdUnboundedUserDataOptions,
type GetStarknetIdUnboundedUserDataQueryFnData,
type GetStarknetIdUnboundedUserDataQueryKey,
getStarknetIdUnboundedUserDataQueryKey,
getStarknetIdUnboundedUserDataQueryOptions,
} from "starkweb/query";