Reading from NEAR testnet…
Reading from NEAR testnet…
7RGdhnKhyhmW3DWGKjSVLokmiXaqohxXsatdCRcZkiFo
web4go.testnet to web4go.testnet · failed
fs_store()
<!DOCTYPE html><html lang=en><title>WEB4GO</title><meta charset=UTF-8><meta name=viewport content="width=device-width, initial-scale=1.0"><meta name=description content="WEB4GO - Your gateway to Web4 content on NEAR blockchain. Browse and discover decentralized web applications across master accounts and subaccounts."><meta name=keywords content="web4, NEAR blockchain, IPFS, decentralized web, web4 browser, NEAR protocol, blockchain apps, dapps, web3"><meta name=author content=sleet.near><meta name=robots content="index, follow"><meta name=googlebot content="index, follow"><meta name=language content=English><meta name=theme-color content=#000000><link rel=stylesheet href=/web4go.c9be53a5.css><link rel=icon href=/web_icon.01cdfa59.png type=image/x-icon><body>
<button id=near_web4_login>LOGIN</button>
<h1>web4 go</h1>
submit a near account
<form class=search-bar><input placeholder="enter .near account..." class=search-input value><button class=search-button>SUBMIT</button></form>
<p id=message>messgae</p>
<p class=footer>
/ your gateway to web4
<br>
<a href=./>discover</a>
<a href=/submit.html>submit</a>
</p>
<script src=/web4go.e98c6dfa.js></script>
<script type=module src=/submit.c9ebbe74.js></script>
fs_store()
{
"mappings": "A,S,E,C,E,O,G,E,U,C,E,O,C,C,C,S,E,C,C,C,C,C,C,C,E,O,c,C,E,E,C,I,E,I,E,W,C,E,a,C,C,E,C,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,I,E,E,Q,C,E,Q,S,C,C,C,E,E,E,O,C,a,I,G,E,E,O,C,e,I,G,E,E,O,C,Q,I,G,E,E,O,C,S,I,G,E,E,O,C,O,I,G,I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_login.js"
],
"sourcesContent": [
"\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequire28b0\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequire28b0\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nparcelRegister(\"ancfa\", function(module, exports) {\n\n$parcel$export(module.exports, \"isSignedIn\", () => $230f63469ea25d73$export$1ae390d25d018ea4);\n$parcel$export(module.exports, \"getAccountId\", () => $230f63469ea25d73$export$c1e0336bde96e2dc);\n$parcel$export(module.exports, \"login\", () => $230f63469ea25d73$export$596d806903d1f59e);\n$parcel$export(module.exports, \"logout\", () => $230f63469ea25d73$export$a0973bcfe11b05c9);\n$parcel$export(module.exports, \"view\", () => $230f63469ea25d73$export$c4ddc81c7b2c8d7a);\n\nvar $8Nbse = parcelRequire(\"8Nbse\");\n/**\n * Constructs a callback URL for web4 operations.\n * Preserves query parameters and ensures proper URL formatting.\n * \n * @param {string} path - The path to return to after the web4 operation\n * @returns {string} A fully qualified URL string\n */ function $230f63469ea25d73$var$constructCallbackUrl(path) {\n // Use current origin to ensure we stay on the same web4 domain\n const origin = window.location.origin;\n const url = new URL(path.startsWith('/') ? path : `/${path}`, origin);\n // Preserve existing query parameters\n const currentParams = new URLSearchParams(window.location.search);\n currentParams.forEach((value, key)=>{\n if (!key.startsWith('web4_')) url.searchParams.append(key, value);\n });\n return url.toString();\n}\nfunction $230f63469ea25d73$export$1ae390d25d018ea4() {\n return !!(0, (/*@__PURE__*/$parcel$interopDefault($8Nbse))).get(\"web4_account_id\");\n}\nfunction $230f63469ea25d73$export$c1e0336bde96e2dc() {\n return (0, (/*@__PURE__*/$parcel$interopDefault($8Nbse))).get(\"web4_account_id\");\n}\nfunction $230f63469ea25d73$export$68a1d9fd3e4aba45() {\n return (0, (/*@__PURE__*/$parcel$interopDefault($8Nbse))).get(\"web4_private_key\");\n}\nfunction $230f63469ea25d73$export$596d806903d1f59e(options = {}) {\n const { contractId: contractId, callbackPath: callbackPath = '/' } = options;\n const params = new URLSearchParams();\n if (contractId) params.append(\"web4_contract_id\", contractId);\n params.append(\"web4_callback_url\", $230f63469ea25d73$var$constructCallbackUrl(callbackPath));\n window.location.href = `/web4/login?${params.toString()}`;\n}\nfunction $230f63469ea25d73$export$a0973bcfe11b05c9() {\n window.location.href = \"/web4/logout\";\n}\n/**\n * Internal function to execute view method calls.\n * These calls don't modify state and don't require signing.\n * \n * @param {string} contractId - The contract to call\n * @param {string} methodName - The view method to call\n * @param {ViewMethodArgs} [args] - Arguments to pass to the method (optional)\n * @returns {Promise<T>} The method's return value\n * @template T\n */ async function $230f63469ea25d73$var$fetchViewMethod(contractId, methodName, args) {\n // Convert args to .json format\n const params = new URLSearchParams();\n if (args) Object.entries(args).forEach(([key, value])=>{\n params.append(`${key}.json`, JSON.stringify(value));\n });\n const url = `/web4/contract/${contractId}/${methodName}?${params.toString()}`;\n const response = await fetch(url);\n if (!response.ok) throw new Error(await response.text());\n return response.json();\n}\n/**\n * Internal function to execute contract calls that can modify state.\n * These calls may require signing and handle deposits.\n * \n * @param {string} contractId - The contract to call\n * @param {string} methodName - The method to call\n * @param {ContractCallArgs} args - Arguments to pass to the method\n * @param {ContractCallOptions} [options] - Call configuration options (optional)\n * @returns {Promise<T>} The method's return value, or null if redirected for signing\n * @template T\n */ async function $230f63469ea25d73$var$fetchContractCall(contractId, methodName, args, options = {}) {\n const callbackUrl = options.callbackUrl ? $230f63469ea25d73$var$constructCallbackUrl(options.callbackUrl) : $230f63469ea25d73$var$constructCallbackUrl('/'); // Defaults to app root\n // Construct form data with web4_ parameters at top level\n const formData = new URLSearchParams();\n // Add contract call arguments\n Object.entries(args).forEach(([key, value])=>{\n formData.append(key, JSON.stringify(value));\n });\n // Add web4 parameters\n if (options.gas) formData.append('web4_gas', options.gas);\n if (options.deposit) formData.append('web4_deposit', options.deposit);\n formData.append('web4_callback_url', callbackUrl);\n const response = await fetch(`/web4/contract/${contractId}/${methodName}`, {\n method: 'POST',\n body: formData,\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded'\n }\n });\n // Handle redirects (e.g., deposit requires a signature)\n if (response.redirected) {\n window.location.href = response.url;\n return null;\n }\n if (!response.ok) throw new Error(await response.text());\n return response.json();\n}\nasync function $230f63469ea25d73$export$c4ddc81c7b2c8d7a(contractId, methodName, args) {\n try {\n return await $230f63469ea25d73$var$fetchViewMethod(contractId, methodName, args);\n } catch (error) {\n console.error(\"Error in view method:\", error);\n throw error;\n }\n}\nasync function $230f63469ea25d73$export$848feb93d8f32b9b(contractId, methodName, args, options = {}) {\n try {\n return await $230f63469ea25d73$var$fetchContractCall(contractId, methodName, args, options);\n } catch (error) {\n console.error(\"Error in call method:\", error);\n throw error;\n }\n}\n\n});\nparcelRegister(\"8Nbse\", function(module, exports) {\n/*! js-cookie v3.0.5 | MIT */ (function(global, factory) {\n module.exports = factory();\n})(module.exports, function() {\n 'use strict';\n /* eslint-disable no-var */ function assign(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i];\n for(var key in source)target[key] = source[key];\n }\n return target;\n }\n /* eslint-enable no-var */ /* eslint-disable no-var */ var defaultConverter = {\n read: function(value) {\n if (value[0] === '\"') value = value.slice(1, -1);\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent);\n },\n write: function(value) {\n return encodeURIComponent(value).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent);\n }\n };\n /* eslint-enable no-var */ /* eslint-disable no-var */ function init(converter, defaultAttributes) {\n function set(name, value, attributes) {\n if (typeof document === 'undefined') return;\n attributes = assign({}, defaultAttributes, attributes);\n if (typeof attributes.expires === 'number') attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n if (attributes.expires) attributes.expires = attributes.expires.toUTCString();\n name = encodeURIComponent(name).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);\n var stringifiedAttributes = '';\n for(var attributeName in attributes){\n if (!attributes[attributeName]) continue;\n stringifiedAttributes += '; ' + attributeName;\n if (attributes[attributeName] === true) continue;\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n return document.cookie = name + '=' + converter.write(value, name) + stringifiedAttributes;\n }\n function get(name) {\n if (typeof document === 'undefined' || arguments.length && !name) return;\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for(var i = 0; i < cookies.length; i++){\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n try {\n var found = decodeURIComponent(parts[0]);\n jar[found] = converter.read(value, found);\n if (name === found) break;\n } catch (e) {}\n }\n return name ? jar[name] : jar;\n }\n return Object.create({\n set: set,\n get: get,\n remove: function(name, attributes) {\n set(name, '', assign({}, attributes, {\n expires: -1\n }));\n },\n withAttributes: function(attributes) {\n return init(this.converter, assign({}, this.attributes, attributes));\n },\n withConverter: function(converter) {\n return init(assign({}, this.converter, converter), this.attributes);\n }\n }, {\n attributes: {\n value: Object.freeze(defaultAttributes)\n },\n converter: {\n value: Object.freeze(converter)\n }\n });\n }\n var api = init(defaultConverter, {\n path: '/'\n });\n /* eslint-enable no-var */ return api;\n});\n\n});\n\n\n// submit-transaction.js\n\nvar $ancfa = parcelRequire(\"ancfa\");\n// Contract IDs based on network\nconst $77961b444e09ed35$var$CONTRACT_IDS = {\n mainnet: 'web4go.sleet.near',\n testnet: 'web4go.sleet.testnet'\n};\n// Get current network from localStorage\nconst $77961b444e09ed35$var$getCurrentNetwork = ()=>localStorage.getItem('networkId') || 'testnet';\n// Get current contract ID based on network\nconst $77961b444e09ed35$var$getCurrentContractId = ()=>$77961b444e09ed35$var$CONTRACT_IDS[$77961b444e09ed35$var$getCurrentNetwork()];\n// UI Elements\nconst $77961b444e09ed35$var$loginButton = document.getElementById('near_web4_login');\nconst $77961b444e09ed35$var$submitForm = document.querySelector('.search-bar');\nconst $77961b444e09ed35$var$submitInput = document.querySelector('.search-input');\nconst $77961b444e09ed35$var$messageElement = document.getElementById('message');\n// Update UI for login button only\nfunction $77961b444e09ed35$var$updateUI() {\n const signedIn = (0, $ancfa.isSignedIn)();\n $77961b444e09ed35$var$loginButton.textContent = signedIn ? 'LOGOUT' : 'LOGIN';\n if (signedIn) {\n const accountId = (0, $ancfa.getAccountId)();\n console.log('Logged in as:', accountId);\n }\n}\n// Update message element\nfunction $77961b444e09ed35$var$updateMessage(text, timeout = 3000) {\n if ($77961b444e09ed35$var$messageElement) {\n $77961b444e09ed35$var$messageElement.textContent = text;\n $77961b444e09ed35$var$messageElement.style.display = 'block'; // Show message\n setTimeout(()=>{\n $77961b444e09ed35$var$messageElement.style.display = 'none'; // Hide after timeout\n }, timeout);\n }\n}\n// Handle login/logout\n$77961b444e09ed35$var$loginButton.addEventListener('click', ()=>{\n if ((0, $ancfa.isSignedIn)()) {\n (0, $ancfa.logout)();\n $77961b444e09ed35$var$updateUI();\n } else (0, $ancfa.login)({\n contractId: $77961b444e09ed35$var$getCurrentContractId(),\n callbackPath: window.location.pathname\n });\n});\n// Handle form submission\nasync function $77961b444e09ed35$var$handleSubmit(event) {\n event.preventDefault();\n if (!(0, $ancfa.isSignedIn)()) {\n $77961b444e09ed35$var$updateMessage('Please login first');\n return;\n }\n const accountId = $77961b444e09ed35$var$submitInput.value.trim().toLowerCase();\n if (!accountId || !accountId.endsWith('.near') && !accountId.endsWith('.testnet')) {\n $77961b444e09ed35$var$updateMessage('Please enter a valid .near or .testnet account.');\n return;\n }\n try {\n const contractId = $77961b444e09ed35$var$getCurrentContractId();\n const functionCall = {\n methodName: 'add_account',\n args: {\n account_id: accountId\n },\n gas: '3000000000000',\n deposit: '0' // or specify in yoctoNEAR if needed\n };\n const response = await fetch(`/web4/contract/${contractId}/${functionCall.methodName}`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n type: 'FunctionCall',\n params: {\n methodName: functionCall.methodName,\n args: functionCall.args,\n gas: functionCall.gas,\n deposit: functionCall.deposit\n }\n })\n });\n if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);\n // Check if response has a body and is JSON\n const contentType = response.headers.get('content-type');\n let result = null;\n if (contentType && contentType.includes('application/json')) result = await response.json().catch((err)=>{\n console.warn('Failed to parse JSON response:', err);\n return null;\n });\n else {\n console.warn('Response is not JSON or empty');\n const text = await response.text();\n console.log('Raw response:', text);\n }\n console.log('Transaction submitted successfully for:', accountId);\n console.log('Transaction result:', result || 'No JSON response');\n $77961b444e09ed35$var$updateMessage(`Submitted account: ${accountId}`);\n $77961b444e09ed35$var$submitInput.value = ''; // Clear input\n } catch (error) {\n console.error('Transaction failed:', error.message);\n $77961b444e09ed35$var$updateMessage('Error submitting account. Check console.');\n }\n}\n// Initialize UI\ndocument.addEventListener('DOMContentLoaded', ()=>{\n $77961b444e09ed35$var$updateUI();\n $77961b444e09ed35$var$submitForm.addEventListener('submit', $77961b444e09ed35$var$handleSubmit);\n if ($77961b444e09ed35$var$messageElement) $77961b444e09ed35$var$messageElement.style.display = 'none'; // Hide message by default\n});\n\n\n//# sourceMappingURL=submit.c9ebbe74.js.map\n",
"import Cookies from \"js-cookie\";\n\n/**\n * Valid JSON values that can be passed as arguments to web4 methods.\n */\ntype JsonValue = string | number | boolean | null | JsonValue[] | { [key: string]: JsonValue };\n\n/**\n * Arguments for view method calls that don't modify state.\n * These are converted to URL parameters with .json suffix.\n * @property {JsonValue} [key: string] - Key-value pairs where values must be valid JSON (optional)\n */\ninterface ViewMethodArgs {\n [key: string]: JsonValue;\n}\n\n/**\n * Arguments for contract calls that can modify state.\n * These are sent as form data with web4_ parameters.\n * @property {JsonValue} [key: string] - Key-value pairs where values must be valid JSON (optional)\n */\ninterface ContractCallArgs {\n [key: string]: JsonValue;\n}\n\n/**\n * Options for contract calls.\n * @property {string} [gas] - Gas limit for the transaction (optional)\n * @property {string} [deposit] - Amount of NEAR to attach to the call (optional)\n * @property {string} [callbackUrl] - URL to return to after transaction completion (optional)\n */\ninterface ContractCallOptions {\n gas?: string;\n deposit?: string;\n callbackUrl?: string;\n}\n\n/**\n * Options for the login process.\n * @property {string} [contractId] - Contract requiring access (optional)\n * @property {string} [callbackPath] - Path to return to after login (optional)\n */\ninterface LoginOptions {\n contractId?: string;\n callbackPath?: string;\n}\n\n/**\n * Constructs a callback URL for web4 operations.\n * Preserves query parameters and ensures proper URL formatting.\n * \n * @param {string} path - The path to return to after the web4 operation\n * @returns {string} A fully qualified URL string\n */\nfunction constructCallbackUrl(path: string): string {\n // Use current origin to ensure we stay on the same web4 domain\n const origin = window.location.origin;\n const url = new URL(path.startsWith('/') ? path : `/${path}`, origin);\n\n // Preserve existing query parameters\n const currentParams = new URLSearchParams(window.location.search);\n currentParams.forEach((value, key) => {\n if (!key.startsWith('web4_')) { // Don't carry over web4_ params\n url.searchParams.append(key, value);\n }\n });\n\n return url.toString();\n}\n\n/**\n * Checks if a user is currently signed in to web4.\n * @returns {boolean} true if user is signed in, false otherwise\n */\nexport function isSignedIn(): boolean {\n return !!Cookies.get(\"web4_account_id\");\n}\n\n/**\n * Gets the currently signed in account ID.\n * @returns {string | undefined} The account ID if signed in, undefined otherwise\n */\nexport function getAccountId(): string | undefined {\n return Cookies.get(\"web4_account_id\");\n}\n\n/**\n * Gets the current session's private key.\n * @returns {string | undefined} The session key if signed in, undefined otherwise\n */\nexport function getSessionKey(): string | undefined {\n return Cookies.get(\"web4_private_key\");\n}\n\n/**\n * Initiates the web4 login process.\n * Redirects to the login page and returns to the specified callback path.\n * \n * @param {LoginOptions} [options] - Login configuration options (optional)\n * @returns {void}\n */\nexport function login(options: LoginOptions = {}): void {\n const { contractId, callbackPath = '/' } = options;\n const params = new URLSearchParams();\n\n if (contractId) {\n params.append(\"web4_contract_id\", contractId);\n }\n params.append(\"web4_callback_url\", constructCallbackUrl(callbackPath));\n\n window.location.href = `/web4/login?${params.toString()}`;\n}\n\n/**\n * Logs out the current user and clears web4 session data.\n * Redirects to the web4 logout page which will clear cookies.\n * @returns {void}\n */\nexport function logout(): void {\n window.location.href = \"/web4/logout\";\n}\n\n/**\n * Internal function to execute view method calls.\n * These calls don't modify state and don't require signing.\n * \n * @param {string} contractId - The contract to call\n * @param {string} methodName - The view method to call\n * @param {ViewMethodArgs} [args] - Arguments to pass to the method (optional)\n * @returns {Promise<T>} The method's return value\n * @template T\n */\nasync function fetchViewMethod<T>(\n contractId: string,\n methodName: string,\n args?: ViewMethodArgs\n): Promise<T> {\n // Convert args to .json format\n const params = new URLSearchParams();\n if (args) {\n Object.entries(args).forEach(([key, value]) => {\n params.append(`${key}.json`, JSON.stringify(value));\n });\n }\n\n const url = `/web4/contract/${contractId}/${methodName}?${params.toString()}`;\n const response = await fetch(url);\n\n if (!response.ok) {\n throw new Error(await response.text());\n }\n\n return response.json();\n}\n\n/**\n * Internal function to execute contract calls that can modify state.\n * These calls may require signing and handle deposits.\n * \n * @param {string} contractId - The contract to call\n * @param {string} methodName - The method to call\n * @param {ContractCallArgs} args - Arguments to pass to the method\n * @param {ContractCallOptions} [options] - Call configuration options (optional)\n * @returns {Promise<T>} The method's return value, or null if redirected for signing\n * @template T\n */\nasync function fetchContractCall<T>(\n contractId: string,\n methodName: string,\n args: ContractCallArgs,\n options: ContractCallOptions = {}\n): Promise<T> {\n const callbackUrl = options.callbackUrl\n ? constructCallbackUrl(options.callbackUrl)\n : constructCallbackUrl('/'); // Defaults to app root\n\n // Construct form data with web4_ parameters at top level\n const formData = new URLSearchParams();\n\n // Add contract call arguments\n Object.entries(args).forEach(([key, value]) => {\n formData.append(key, JSON.stringify(value));\n });\n\n // Add web4 parameters\n if (options.gas) formData.append('web4_gas', options.gas);\n if (options.deposit) formData.append('web4_deposit', options.deposit);\n formData.append('web4_callback_url', callbackUrl);\n\n const response = await fetch(`/web4/contract/${contractId}/${methodName}`, {\n method: 'POST',\n body: formData,\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n },\n });\n\n // Handle redirects (e.g., deposit requires a signature)\n if (response.redirected) {\n window.location.href = response.url;\n return null as T;\n }\n\n if (!response.ok) {\n throw new Error(await response.text());\n }\n\n return response.json();\n}\n\n/**\n * Calls a view method on a web4 contract.\n * These calls don't modify state and don't require signing.\n * \n * @param {string} contractId - The contract to call\n * @param {string} methodName - The view method to call\n * @param {ViewMethodArgs} [args] - Arguments to pass to the method (optional)\n * @returns {Promise<T>} A promise that resolves to the method's return value\n * @throws {Error} If the call fails\n * @template T\n */\nexport async function view<T = any>(\n contractId: string,\n methodName: string,\n args?: ViewMethodArgs,\n): Promise<T> {\n try {\n return await fetchViewMethod<T>(contractId, methodName, args);\n } catch (error) {\n console.error(\"Error in view method:\", error);\n throw error;\n }\n}\n\n/**\n * Calls a method on a web4 contract that can modify state.\n * These calls may require signing and can include deposits.\n * \n * @param {string} contractId - The contract to call\n * @param {string} methodName - The method to call\n * @param {ContractCallArgs} args - Arguments to pass to the method\n * @param {ContractCallOptions} [options] - Optional call configuration\n * @param {string} [options.gas] - Gas limit for the transaction (optional)\n * @param {string} [options.deposit] - Amount of NEAR to attach to the call (optional)\n * @param {string} [options.callbackUrl] - URL to return to after transaction completion (optional)\n * @returns {Promise<T>} A promise that resolves to the execution outcome or redirects for signing\n * @throws {Error} If the call fails\n * @template T\n */\nexport async function call<T = any>(\n contractId: string,\n methodName: string,\n args: ContractCallArgs,\n options: ContractCallOptions = {},\n): Promise<T> {\n try {\n return await fetchContractCall<T>(contractId, methodName, args, options);\n } catch (error) {\n console.error(\"Error in call method:\", error);\n throw error;\n }\n}\n",
"/*! js-cookie v3.0.5 | MIT */\n;\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, (function () {\n var current = global.Cookies;\n var exports = global.Cookies = factory();\n exports.noConflict = function () { global.Cookies = current; return exports; };\n })());\n})(this, (function () { 'use strict';\n\n /* eslint-disable no-var */\n function assign (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target\n }\n /* eslint-enable no-var */\n\n /* eslint-disable no-var */\n var defaultConverter = {\n read: function (value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n },\n write: function (value) {\n return encodeURIComponent(value).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n )\n }\n };\n /* eslint-enable no-var */\n\n /* eslint-disable no-var */\n\n function init (converter, defaultAttributes) {\n function set (name, value, attributes) {\n if (typeof document === 'undefined') {\n return\n }\n\n attributes = assign({}, defaultAttributes, attributes);\n\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n\n name = encodeURIComponent(name)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue\n }\n\n stringifiedAttributes += '; ' + attributeName;\n\n if (attributes[attributeName] === true) {\n continue\n }\n\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n\n return (document.cookie =\n name + '=' + converter.write(value, name) + stringifiedAttributes)\n }\n\n function get (name) {\n if (typeof document === 'undefined' || (arguments.length && !name)) {\n return\n }\n\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for (var i = 0; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n\n try {\n var found = decodeURIComponent(parts[0]);\n jar[found] = converter.read(value, found);\n\n if (name === found) {\n break\n }\n } catch (e) {}\n }\n\n return name ? jar[name] : jar\n }\n\n return Object.create(\n {\n set,\n get,\n remove: function (name, attributes) {\n set(\n name,\n '',\n assign({}, attributes, {\n expires: -1\n })\n );\n },\n withAttributes: function (attributes) {\n return init(this.converter, assign({}, this.attributes, attributes))\n },\n withConverter: function (converter) {\n return init(assign({}, this.converter, converter), this.attributes)\n }\n },\n {\n attributes: { value: Object.freeze(defaultAttributes) },\n converter: { value: Object.freeze(converter) }\n }\n )\n }\n\n var api = init(defaultConverter, { path: '/' });\n /* eslint-enable no-var */\n\n return api;\n\n}));\n",
"// submit-transaction.js\n\nimport { login, logout, isSignedIn, getAccountId } from 'web4-api-js';\n\n// Contract IDs based on network\nconst CONTRACT_IDS = {\n mainnet: 'web4go.sleet.near',\n testnet: 'web4go.sleet.testnet'\n};\n\n// Get current network from localStorage\nconst getCurrentNetwork = () => localStorage.getItem('networkId') || 'testnet';\n\n// Get current contract ID based on network\nconst getCurrentContractId = () => CONTRACT_IDS[getCurrentNetwork()];\n\n// UI Elements\nconst loginButton = document.getElementById('near_web4_login');\nconst submitForm = document.querySelector('.search-bar');\nconst submitInput = document.querySelector('.search-input');\nconst messageElement = document.getElementById('message');\n\n// Update UI for login button only\nfunction updateUI() {\n const signedIn = isSignedIn();\n loginButton.textContent = signedIn ? 'LOGOUT' : 'LOGIN';\n if (signedIn) {\n const accountId = getAccountId();\n console.log('Logged in as:', accountId);\n }\n}\n\n// Update message element\nfunction updateMessage(text, timeout = 3000) {\n if (messageElement) {\n messageElement.textContent = text;\n messageElement.style.display = 'block'; // Show message\n setTimeout(() => {\n messageElement.style.display = 'none'; // Hide after timeout\n }, timeout);\n }\n}\n\n// Handle login/logout\nloginButton.addEventListener('click', () => {\n if (isSignedIn()) {\n logout();\n updateUI();\n } else {\n login({\n contractId: getCurrentContractId(),\n callbackPath: window.location.pathname\n });\n }\n});\n\n// Handle form submission\nasync function handleSubmit(event) {\n event.preventDefault();\n if (!isSignedIn()) {\n updateMessage('Please login first');\n return;\n }\n\n const accountId = submitInput.value.trim().toLowerCase();\n if (!accountId || (!accountId.endsWith('.near') && !accountId.endsWith('.testnet'))) {\n updateMessage('Please enter a valid .near or .testnet account.');\n return;\n }\n\n try {\n const contractId = getCurrentContractId();\n\n const functionCall = {\n methodName: 'add_account',\n args: { account_id: accountId },\n gas: '3000000000000', // 3 TGas\n deposit: '0' // or specify in yoctoNEAR if needed\n };\n\n const response = await fetch(`/web4/contract/${contractId}/${functionCall.methodName}`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n type: 'FunctionCall',\n params: {\n methodName: functionCall.methodName,\n args: functionCall.args,\n gas: functionCall.gas,\n deposit: functionCall.deposit\n }\n })\n });\n\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n\n // Check if response has a body and is JSON\n const contentType = response.headers.get('content-type');\n let result = null;\n if (contentType && contentType.includes('application/json')) {\n result = await response.json().catch(err => {\n console.warn('Failed to parse JSON response:', err);\n return null;\n });\n } else {\n console.warn('Response is not JSON or empty');\n const text = await response.text();\n console.log('Raw response:', text);\n }\n\n console.log('Transaction submitted successfully for:', accountId);\n console.log('Transaction result:', result || 'No JSON response');\n updateMessage(`Submitted account: ${accountId}`);\n submitInput.value = ''; // Clear input\n } catch (error) {\n console.error('Transaction failed:', error.message);\n updateMessage('Error submitting account. Check console.');\n }\n}\n\n// Initialize UI\ndocument.addEventListener('DOMContentLoaded', () => {\n updateUI();\n submitForm.addEventListener('submit', handleSubmit);\n if (messageElement) {\n messageElement.style.display = 'none'; // Hide message by default\n }\n});"
],
"names": [
"$parcel$interopDefault",
"a",
"__esModule",
"default",
"$parcel$export",
"e",
"n",
"v",
"s",
"Object",
"defineProperty",
"get",
"set",
"enumerable",
"configurable",
"$parcel$global",
"globalThis",
"$parcel$modules",
"$parcel$inits",
"parcelRequire",
"id",
"exports",
"init",
"module",
"call",
"err",
"Error",
"code",
"register",
"parcelRegister",
"$230f63469ea25d73$export$1ae390d25d018ea4",
"$230f63469ea25d73$export$c1e0336bde96e2dc",
"$230f63469ea25d73$export$596d806903d1f59e",
"$230f63469ea25d73$export$a0973bcfe11b05c9",
"$230f63469ea25d73$export$c4ddc81c7b2c8d7a",
"$8Nbse",
"options",
"contractId",
"callbackPath",
"params",
"URLSearchParams",
"append",
"$230f63469ea25d73$var$constructCallbackUrl",
"path",
"origin",
"window",
"location",
"url",
"URL",
"startsWith",
"currentParams",
"search",
"forEach",
"value",
"key",
"searchParams",
"toString",
"href",
"$230f63469ea25d73$var$fetchViewMethod",
"methodName",
"args",
"entries",
"JSON",
"stringify",
"response",
"fetch",
"ok",
"text",
"json",
"error",
"console",
"factory",
"assign",
"target",
"i",
"arguments",
"length",
"source",
"converter",
"defaultAttributes",
"name",
"attributes",
"document",
"expires",
"Date",
"now",
"toUTCString",
"encodeURIComponent",
"replace",
"decodeURIComponent",
"escape",
"stringifiedAttributes",
"attributeName",
"split",
"cookie",
"write",
"create",
"cookies",
"jar",
"parts",
"slice",
"join",
"found",
"read",
"remove",
"withAttributes",
"withConverter",
"freeze",
"$ancfa",
"$77961b444e09ed35$var$CONTRACT_IDS",
"mainnet",
"testnet",
"$77961b444e09ed35$var$getCurrentContractId",
"localStorage",
"getItem",
"$77961b444e09ed35$var$loginButton",
"getElementById",
"$77961b444e09ed35$var$submitForm",
"querySelector",
"$77961b444e09ed35$var$submitInput",
"$77961b444e09ed35$var$messageElement",
"$77961b444e09ed35$var$updateUI",
"signedIn",
"isSignedIn",
"textContent",
"log",
"getAccountId",
"$77961b444e09ed35$var$updateMessage",
"timeout",
"style",
"display",
"setTimeout",
"$77961b444e09ed35$var$handleSubmit",
"event",
"preventDefault",
"accountId",
"trim",
"toLowerCase",
"endsWith",
"method",
"headers",
"body",
"type",
"account_id",
"gas",
"deposit",
"status",
"contentType",
"result",
"includes",
"catch",
"warn",
"message",
"addEventListener",
"logout",
"login",
"pathname"
],
"version": 3,
"file": "submit.c9ebbe74.js.map"
}fs_store()
function e(e){return e&&e.__esModule?e.default:e}function t(e,t,n,o){Object.defineProperty(e,t,{get:n,set:o,enumerable:!0,configurable:!0})}var n=globalThis,o={},r={},a=n.parcelRequire28b0;null==a&&((a=function(e){if(e in o)return o[e].exports;if(e in r){var t=r[e];delete r[e];var n={id:e,exports:{}};return o[e]=n,t.call(n.exports,n,n.exports),n.exports}var a=Error("Cannot find module '"+e+"'");throw a.code="MODULE_NOT_FOUND",a}).register=function(e,t){r[e]=t},n.parcelRequire28b0=a);var i=a.register;i("ancfa",function(n,o){t(n.exports,"isSignedIn",()=>i),t(n.exports,"getAccountId",()=>c),t(n.exports,"login",()=>s),t(n.exports,"logout",()=>l),t(n.exports,"view",()=>d);var r=a("8Nbse");function i(){return!!e(r).get("web4_account_id")}function c(){return e(r).get("web4_account_id")}function s(e={}){let{contractId:t,callbackPath:n="/"}=e,o=new URLSearchParams;t&&o.append("web4_contract_id",t),o.append("web4_callback_url",function(e){let t=window.location.origin,n=new URL(e.startsWith("/")?e:`/${e}`,t);return new URLSearchParams(window.location.search).forEach((e,t)=>{t.startsWith("web4_")||n.searchParams.append(t,e)}),n.toString()}(n)),window.location.href=`/web4/login?${o.toString()}`}function l(){window.location.href="/web4/logout"}async function u(e,t,n){let o=new URLSearchParams;n&&Object.entries(n).forEach(([e,t])=>{o.append(`${e}.json`,JSON.stringify(t))});let r=`/web4/contract/${e}/${t}?${o.toString()}`,a=await fetch(r);if(!a.ok)throw Error(await a.text());return a.json()}async function d(e,t,n){try{return await u(e,t,n)}catch(e){throw console.error("Error in view method:",e),e}}}),i("8Nbse",function(e,t){e.exports,e.exports=function(){function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)e[o]=n[o]}return e}return function t(n,o){function r(t,r,a){if("undefined"!=typeof document){"number"==typeof(a=e({},o,a)).expires&&(a.expires=new Date(Date.now()+864e5*a.expires)),a.expires&&(a.expires=a.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var i="";for(var c in a)a[c]&&(i+="; "+c,!0!==a[c]&&(i+="="+a[c].split(";")[0]));return document.cookie=t+"="+n.write(r,t)+i}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],o={},r=0;r<t.length;r++){var a=t[r].split("="),i=a.slice(1).join("=");try{var c=decodeURIComponent(a[0]);if(o[c]=n.read(i,c),e===c)break}catch(e){}}return e?o[e]:o}},remove:function(t,n){r(t,"",e({},n,{expires:-1}))},withAttributes:function(n){return t(this.converter,e({},this.attributes,n))},withConverter:function(n){return t(e({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(o)},converter:{value:Object.freeze(n)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})}()});var c=a("ancfa");const s={mainnet:"web4go.sleet.near",testnet:"web4go.sleet.testnet"},l=()=>s[localStorage.getItem("networkId")||"testnet"],u=document.getElementById("near_web4_login"),d=document.querySelector(".search-bar"),p=document.querySelector(".search-input"),f=document.getElementById("message");function g(){let e=(0,c.isSignedIn)();u.textContent=e?"LOGOUT":"LOGIN",e&&console.log("Logged in as:",(0,c.getAccountId)())}function w(e,t=3e3){f&&(f.textContent=e,f.style.display="block",setTimeout(()=>{f.style.display="none"},t))}async function h(e){if(e.preventDefault(),!(0,c.isSignedIn)())return void w("Please login first");let t=p.value.trim().toLowerCase();if(!t||!t.endsWith(".near")&&!t.endsWith(".testnet"))return void w("Please enter a valid .near or .testnet account.");try{let e=l(),n="add_account",o=await fetch(`/web4/contract/${e}/${n}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"FunctionCall",params:{methodName:n,args:{account_id:t},gas:"3000000000000",deposit:"0"}})});if(!o.ok)throw Error(`HTTP error! status: ${o.status}`);let r=o.headers.get("content-type"),a=null;if(r&&r.includes("application/json"))a=await o.json().catch(e=>(console.warn("Failed to parse JSON response:",e),null));else{console.warn("Response is not JSON or empty");let e=await o.text();console.log("Raw response:",e)}console.log("Transaction submitted successfully for:",t),console.log("Transaction result:",a||"No JSON response"),w(`Submitted account: ${t}`),p.value=""}catch(e){console.error("Transaction failed:",e.message),w("Error submitting account. Check console.")}}u.addEventListener("click",()=>{(0,c.isSignedIn)()?((0,c.logout)(),g()):(0,c.login)({contractId:l(),callbackPath:window.location.pathname})}),document.addEventListener("DOMContentLoaded",()=>{g(),d.addEventListener("submit",h),f&&(f.style.display="none")});
//# sourceMappingURL=submit.c9ebbe74.js.map
fs_store()
5 $U sd4?ď����&�y`}�G��D�ցD�].� index.html� = $U ��Kc�xm�O��� �/��3J@�Y D��Nsubmit.c9ebbe74.js�&B $U �:�����oS�����4��2������|Q�submit.c9ebbe74.js.map�6 $U >`�M&�ל$�8_��g���I�n�O���H36submit.html� = $U pl��ECT��v���C ��}D�0�web4go.50cc6aa5.js�#B $U i �2-�5��n�-����%��FK� i�)duweb4go.50cc6aa5.js.mapγ= $U j��F;�,����ژ.(�=�?&S2z�web4go.afa932c7.js�A $U ���r����.���e���F�$q��|�XˢTweb4go.afa932c7.js.map�f> $U �R��+�6�����|�� �NT�� �����web4go.c9be53a5.css�B $U ^�=wy��az:o��fr����,�|y�XmFweb4go.c9be53a5.css.map�(= $U W��r�u*�I���:��vs~Iq��Z�fGK�web4go.e98c6dfa.js�A $U 4*t��Lט��i��zC���k6����X�web4go.e98c6dfa.js.map�@ $U �$=���V��?���."w��~��5 ��@web_icon.01cdfa59.png�z
{"ActionError":{"index":0,"kind":{"FunctionCallError":{"MethodResolveError":"MethodNotFound"}}}}
1 automatic refund step from the network not shown.
This page reads FastNEAR's public transaction index and stores nothing. This command asks a NEAR archival node for the same transaction and needs no keys.
curl -s https://archival-rpc.testnet.fastnear.com -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"tx","params":{"tx_hash":"7RGdhnKhyhmW3DWGKjSVLokmiXaqohxXsatdCRcZkiFo","sender_account_id":"web4go.testnet","wait_until":"FINAL"}}'Vouch has its own page because testnet.nearblocks.io stopped indexing on 27 Sep 2026, so it can't show newer transactions.