export type UpdateApiNftsOwnershipTokensArgs = {blockchainDescriptor: 'ETH' | 'ETH_TEST5' | 'ETH_TEST6' | 'POLYGON' | 'POLYGON_TEST_MUMBAI' | 'AMOY_POLYGON_TEST' | 'BASECHAIN_ETH' | 'BASECHAIN_ETH_TEST5' | 'ETHERLINK' | 'ETHERLINK_TEST' | 'MANTLE' | 'MANTLE_TEST' | 'GUN_GUNZILLA' | 'GUN_GUNZILLA_TEST' | 'ETH_SONEIUM' | 'SONEIUM_MINATO_TEST' | 'IOTX_IOTEX' | 'KLAY_KAIA' | 'KLAY_KAIA_TEST' | 'APECHAIN' | 'APECHAIN_TEST' | 'ROBINHOOD_CHAIN_TESTNET_TEST', vaultAccountId: string, 'Idempotency-Key'?: string | undefined}; export type UpdateApiNftsOwnershipTokensOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Refresh vault account tokens * * PUT /nfts/ownership/tokens */ export const updateApiNftsOwnershipTokens = async (args: UpdateApiNftsOwnershipTokensArgs, options?: UpdateApiNftsOwnershipTokensOptions) => { const {baseUrl = "https://api.fireblocks.io/v1", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.blockchainDescriptor != null) query.append("blockchainDescriptor", String(args.blockchainDescriptor)) if (args.vaultAccountId != null) query.append("vaultAccountId", String(args.vaultAccountId)) if (args['Idempotency-Key'] != null) headers.set("Idempotency-Key", String(args['Idempotency-Key'])) const url = `${baseUrl.replace(/\/+$/, '')}/nfts/ownership/tokens${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };